-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enforce hard approval gate for dual-core flow #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xrm07
wants to merge
6
commits into
main
Choose a base branch
from
feat/hard-approval-gate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4929351
feat: enforce hard approval gate with two-phase takt flow
xrm07 3e2a046
fix: harden approval wrapper validation and file discovery
xrm07 4d62281
fix: resolve approval packet from phase1 worktree metadata
xrm07 ee9e11d
fix: require explicit Y confirmation for phase-2 run
xrm07 8dc74ad
fix: normalize create-worktree values for phase-1 takt call
xrm07 75cb25d
fix: use strict run-start marker and refresh approval packet
xrm07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: dual-core-apply | ||
| description: Phase 2 only. Run implement and fix after explicit human approval is confirmed. | ||
| interactive_mode: persona | ||
| initial_movement: implement | ||
| max_movements: 12 | ||
|
|
||
| piece_config: | ||
| provider_options: | ||
| claude: | ||
| network_access: true | ||
| codex: | ||
| network_access: true | ||
|
|
||
| movements: | ||
| - name: implement | ||
| edit: true | ||
| permission_mode: edit | ||
| provider: claude | ||
| model: claude-opus-4-6[1m] | ||
| persona: coder | ||
| knowledge: architecture | ||
| allowed_tools: [Read, Glob, Grep, Edit, Bash] | ||
| instruction_template: | | ||
| Inputs: APPROVAL.md, PLAN.md, and AUDIT.md. | ||
| Precondition: | ||
| - APPROVAL.md must include all of the following fields with non-empty values: | ||
| Approved(Y/N), Reason, Timestamp. | ||
| - If APPROVAL.md is missing or Approved(Y/N) is not Y, do not implement anything. | ||
| Return status tag "blocked" with the reason. | ||
| Goal: implement according to PLAN.md and resolve audit findings. | ||
| Rules: | ||
| - Keep changes minimal and explain each change. | ||
| - Run relevant build/tests and document command outputs. | ||
| Deliverable: | ||
| - Implementation report including changed files, commands, and results. | ||
| output_contracts: | ||
| report: | ||
| - name: 04-implement-log.md | ||
| rules: | ||
| - condition: blocked | ||
| next: ABORT | ||
| - condition: done | ||
| next: fix | ||
|
|
||
| - name: fix | ||
| edit: true | ||
| permission_mode: edit | ||
| provider: codex | ||
| model: gpt-5.3-codex | ||
| persona: code-reviewer | ||
| knowledge: architecture | ||
| allowed_tools: [Read, Glob, Grep, Edit, Bash] | ||
| instruction_template: | | ||
| Goal: make minimal fixes for failed tests/build or quality issues. | ||
| Rules: | ||
| - Do not weaken test coverage to force a pass. | ||
| - Iterate as: identify root cause -> propose minimal fix -> apply -> verify. | ||
| Deliverable: | ||
| - Fix report with root cause, patch summary, rerun commands, and outcomes. | ||
| output_contracts: | ||
| report: | ||
| - name: 05-fix-log.md | ||
| rules: | ||
| - condition: done | ||
| next: COMPLETE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| name: dual-core-approval | ||
| description: Phase 1 only. Plan, audit, and build APPROVAL.md, then always stop for explicit human approval. | ||
| interactive_mode: persona | ||
| initial_movement: plan | ||
| max_movements: 12 | ||
|
|
||
| piece_config: | ||
| provider_options: | ||
| claude: | ||
| network_access: true | ||
| codex: | ||
| network_access: true | ||
|
|
||
| movements: | ||
| - name: plan | ||
| edit: false | ||
| permission_mode: readonly | ||
| provider: claude | ||
| model: claude-opus-4-6[1m] | ||
| persona: architect-planner | ||
| knowledge: architecture | ||
| allowed_tools: [Read, Glob, Grep] | ||
| instruction_template: | | ||
| Goal: create PLAN.md at repository root before any code changes. | ||
| Constraints: | ||
| - Do not modify source code in this movement. | ||
| Deliverables: | ||
| - PLAN.md with requirements, candidate files, implementation steps, validation criteria, | ||
| rollback procedure, and risks. | ||
| - A short movement report summarizing key decisions. | ||
| output_contracts: | ||
| report: | ||
| - name: 01-plan-summary.md | ||
| rules: | ||
| - condition: done | ||
| next: audit | ||
|
|
||
| - name: audit | ||
| edit: false | ||
| permission_mode: readonly | ||
| provider: codex | ||
| model: gpt-5.3-codex | ||
| persona: security-reviewer | ||
| knowledge: architecture | ||
| allowed_tools: [Read, Glob, Grep] | ||
| instruction_template: | | ||
| Input: PLAN.md at repository root. | ||
| Goal: audit the plan for missing items, contradictions, security risks, dependency gaps, | ||
| and execution risks. | ||
| Deliverables: | ||
| - AUDIT.md at repository root with PASS/FAIL and evidence. | ||
| - Report with top 5 critical findings. | ||
| Constraint: | ||
| - Do not modify source code in this movement. | ||
| output_contracts: | ||
| report: | ||
| - name: 02-audit-top5.md | ||
| rules: | ||
| - condition: done | ||
| next: approval | ||
|
|
||
| - name: approval | ||
| edit: true | ||
| permission_mode: edit | ||
| provider: claude | ||
| model: claude-opus-4-6[1m] | ||
| persona: supervisor | ||
| knowledge: architecture | ||
| allowed_tools: [Read, Glob, Grep, Edit] | ||
| instruction_template: | | ||
| Inputs: PLAN.md and AUDIT.md. | ||
| Goal: generate APPROVAL.md at repository root as a pre-implementation approval packet. | ||
| Required sections in APPROVAL.md: | ||
| - Purpose | ||
| - Changed files list (planned) | ||
| - Change summary (3-7 bullets) | ||
| - Impact scope | ||
| - Commands to run and expected results | ||
| - Risk and unresolved items | ||
| - Rollback plan | ||
| - Approval fields: Approved(Y/N), Reason, Timestamp | ||
| Rules: | ||
| - Do not modify source code except APPROVAL.md in this movement. | ||
| - Choose Approved(Y/N) based on PLAN.md and AUDIT.md findings. | ||
| - Always produce APPROVAL.md and finish with status tag "done". | ||
| output_contracts: | ||
| report: | ||
| - name: 03-approval-gate.md | ||
| rules: | ||
| - condition: done | ||
| next: COMPLETE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The runbook recommends
./scripts/takt-run-approved.sh -w dual-core ..., but the wrapper ignores the provided-w/--piecevalue. To avoid confusion, update the documented command to omit-w dual-core(or document that it’s accepted but validated/ignored).