Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .takt/pieces/dual-core-apply.yaml
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
91 changes: 91 additions & 0 deletions .takt/pieces/dual-core-approval.yaml
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
2 changes: 1 addition & 1 deletion .takt/pieces/dual-core.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dual-core
description: Claude plans and implements, Codex audits and fixes with an explicit approval gate.
description: Legacy single-run flow. Claude plans/implements and Codex audits/fixes with model-driven approval routing.
interactive_mode: persona
initial_movement: plan
max_movements: 12
Expand Down
41 changes: 41 additions & 0 deletions APPROVAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# APPROVAL Packet

## Purpose
Stabilize hard-gate execution by fixing run-start marker handling in `scripts/takt-run-approved.sh`.

## Changed Files List (Planned)
- scripts/takt-run-approved.sh
- Takt_setup.md
- APPROVAL.md

## Change Summary
- Removed marker backdating (`touch -d '1 second ago'`) from wrapper.
- Use exact run-start timestamp marker to detect phase-1 outputs.
- Keep explicit approval requirement (`Y`/`y` only) unchanged.
- Keep create-worktree normalization (`true|false` -> `yes|no`) unchanged.

## Impact Scope
- Approval-gated wrapper run path (`scripts/takt-run-approved.sh`).
- Documentation and operator runbook behavior.

## Commands To Run
- `bash -n scripts/takt-run-approved.sh`
- `./scripts/takt-run-approved.sh --create-worktree yes --auto-pr`

## Command Results
- `bash -n scripts/takt-run-approved.sh`: PASS
- End-to-end execution: pending operator run

## Risk Evaluation / Unresolved Items
- If filesystem timestamp resolution is coarse, strict marker checks could miss truly-updated files in rare edge cases.
- Clone metadata parsing still depends on current parser behavior.

## Rollback Procedure
1. Revert commit containing this marker fix.
2. Re-run wrapper and validate phase-1 detection behavior.
3. If necessary, temporarily run manual two-step flow while investigating.

## Approval
Approved (Y/N): Y
Reason: Prevent stale or pre-run artifacts from passing phase-1 freshness detection.
Timestamp: 2026-02-14T15:30:00+09:00
Loading