Skip to content

try-works/role-model / .agents/skills/recursive-mode

recursive-mode

Unverified

Repository workflow orchestration skill for staged implementation, locked artifacts, late-phase receipts, and durable memory maintenance. Use when executing recursive-mode runs, resuming a run, locking a phase, or verifying locks.

FileKindSize
.agent/PLANS.mdmarkdown2.6 KB
.codex/AGENTS.mdmarkdown7.5 KB
.gitattributesother522 B
.gitignoreother553 B
.recursive/AGENTS.mdmarkdown3.3 KB
.recursive/DECISIONS.mdmarkdown1.1 KB
.recursive/README.mdmarkdown8.5 KB
.recursive/RECURSIVE.mdmarkdown107.5 KB
.recursive/STATE.mdmarkdown1.6 KB
.recursive/config/recursive-router.jsonconfig1.4 KB
.recursive/memory/MEMORY.mdmarkdown3.3 KB
.recursive/memory/archive/.gitkeepother1 B
.recursive/memory/domains/.gitkeepother1 B
.recursive/memory/episodes/.gitkeepother1 B
.recursive/memory/incidents/.gitkeepother1 B
.recursive/memory/patterns/.gitkeepother1 B
.recursive/memory/skills/SKILLS.mdmarkdown4.3 KB
.recursive/memory/skills/availability/.gitkeepother1 B
.recursive/memory/skills/issues/.gitkeepother1 B
.recursive/memory/skills/patterns/.gitkeepother1 B
.recursive/memory/skills/patterns/delegated-verification-and-refresh.mdmarkdown1.7 KB
.recursive/memory/skills/patterns/phase8-skill-memory-promotion.mdmarkdown1.4 KB
.recursive/memory/skills/usage/.gitkeepother1 B
.recursive/memory/skills/usage/skill-discovery-and-evaluation.mdmarkdown1.6 KB
.recursive/run/.gitkeepother1 B
AGENTS.mdmarkdown7.8 KB
LICENSEother11.1 KB
README.mdmarkdown17.8 KB
SKILL.mdskill md13.1 KB
agents/code-reviewer.mdmarkdown6.1 KB
agents/implementer.mdmarkdown6.3 KB
agents/openai.yamlconfig202 B
docs/templates/commands/check-reusable-repo-hygiene.mdmarkdown1.3 KB
docs/templates/commands/recursive-closeout.mdmarkdown2.8 KB
docs/templates/commands/recursive-init.mdmarkdown2.2 KB
docs/templates/commands/recursive-lock.mdmarkdown1.3 KB
docs/templates/commands/recursive-review-bundle.mdmarkdown3.6 KB
docs/templates/commands/recursive-status.mdmarkdown2.0 KB
docs/templates/commands/recursive-subagent-action.mdmarkdown4.2 KB
docs/templates/commands/test-recursive-mode-smoke.mdmarkdown3.4 KB
docs/templates/hooks/hooks.jsonconfig400 B
docs/templates/hooks/run-hook.cmdscript1.2 KB
docs/templates/hooks/session-start.ps1script3.6 KB
docs/templates/hooks/session-start.shscript3.5 KB
references/agents-block.mdmarkdown7.4 KB
references/artifact-template.mdmarkdown70.7 KB
references/benchmark-addon/recursive-benchmark/BENCHMARK-ADDON.mdmarkdown6.7 KB
references/benchmark-addon/recursive-benchmark/recursive-benchmark/BENCHMARK-ADDON.mdmarkdown6.7 KB
references/benchmark-addon/recursive-benchmark/recursive-benchmark/references/patterns.mdmarkdown4.9 KB
references/benchmark-addon/recursive-benchmark/references/patterns.mdmarkdown4.9 KB
references/benchmarks/README.mdmarkdown1.5 KB
references/benchmarks/local-first-planner/00-requirements.mdmarkdown3.3 KB
references/benchmarks/local-first-planner/README.mdmarkdown1.1 KB
references/benchmarks/local-first-planner/prompt-recursive-off.mdmarkdown1.1 KB
references/benchmarks/local-first-planner/prompt-recursive-on.mdmarkdown14.8 KB
references/benchmarks/local-first-planner/scoring-rubric.mdmarkdown1.3 KB
references/benchmarks/local-first-planner/starter/.gitignoreother30 B
references/benchmarks/local-first-planner/starter/README.mdmarkdown264 B
references/benchmarks/local-first-planner/starter/index.htmlother316 B
references/benchmarks/local-first-planner/starter/package.jsonmanifest628 B
references/benchmarks/local-first-planner/starter/src/App.test.tsxother334 B
references/benchmarks/local-first-planner/starter/src/App.tsxother971 B
references/benchmarks/local-first-planner/starter/src/main.tsxother238 B
references/benchmarks/local-first-planner/starter/src/styles.cssother976 B
references/benchmarks/local-first-planner/starter/src/test-setup.tsscript43 B
references/benchmarks/local-first-planner/starter/src/vite-env.d.tsscript38 B
references/benchmarks/local-first-planner/starter/tsconfig.app.jsonconfig552 B
references/benchmarks/local-first-planner/starter/tsconfig.jsonconfig89 B
references/benchmarks/local-first-planner/starter/vite.config.tsscript214 B
references/benchmarks/release-readiness-dashboard/00-requirements.mdmarkdown5.9 KB
references/benchmarks/release-readiness-dashboard/README.mdmarkdown1.2 KB
references/benchmarks/release-readiness-dashboard/prompt-recursive-off.mdmarkdown1.1 KB
references/benchmarks/release-readiness-dashboard/prompt-recursive-on.mdmarkdown14.8 KB
references/benchmarks/release-readiness-dashboard/scoring-rubric.mdmarkdown1.8 KB
references/benchmarks/release-readiness-dashboard/starter/.gitignoreother30 B
references/benchmarks/release-readiness-dashboard/starter/README.mdmarkdown272 B
references/benchmarks/release-readiness-dashboard/starter/index.htmlother324 B
references/benchmarks/release-readiness-dashboard/starter/package.jsonmanifest628 B
references/benchmarks/release-readiness-dashboard/starter/src/App.test.tsxother342 B
references/benchmarks/release-readiness-dashboard/starter/src/App.tsxother979 B
references/benchmarks/release-readiness-dashboard/starter/src/main.tsxother238 B
references/benchmarks/release-readiness-dashboard/starter/src/styles.cssother976 B
references/benchmarks/release-readiness-dashboard/starter/src/test-setup.tsscript43 B
references/benchmarks/release-readiness-dashboard/starter/src/vite-env.d.tsscript38 B
references/benchmarks/release-readiness-dashboard/starter/tsconfig.app.jsonconfig552 B
references/benchmarks/release-readiness-dashboard/starter/tsconfig.jsonconfig89 B
references/benchmarks/release-readiness-dashboard/starter/vite.config.tsscript214 B
references/benchmarks/scientific-calculator-rust/00-requirements.mdmarkdown4.1 KB
references/benchmarks/scientific-calculator-rust/README.mdmarkdown1.4 KB
references/benchmarks/scientific-calculator-rust/prompt-recursive-off.mdmarkdown1.1 KB
references/benchmarks/scientific-calculator-rust/prompt-recursive-on.mdmarkdown16.6 KB
references/benchmarks/scientific-calculator-rust/scoring-rubric.mdmarkdown1.5 KB
references/benchmarks/scientific-calculator-rust/starter/.gitignoreother14 B
references/benchmarks/scientific-calculator-rust/starter/Cargo.lockmanifest25.7 KB
references/benchmarks/scientific-calculator-rust/starter/Cargo.tomlmanifest226 B
references/benchmarks/team-capacity-board/00-requirements.mdmarkdown3.6 KB
references/benchmarks/team-capacity-board/README.mdmarkdown1.0 KB
references/benchmarks/team-capacity-board/prompt-recursive-off.mdmarkdown1.1 KB
references/benchmarks/team-capacity-board/prompt-recursive-on.mdmarkdown14.8 KB
references/benchmarks/team-capacity-board/scoring-rubric.mdmarkdown1.4 KB
references/benchmarks/team-capacity-board/starter/.gitignoreother30 B
references/benchmarks/team-capacity-board/starter/README.mdmarkdown264 B
references/benchmarks/team-capacity-board/starter/index.htmlother316 B
references/benchmarks/team-capacity-board/starter/package.jsonmanifest628 B
references/benchmarks/team-capacity-board/starter/src/App.test.tsxother334 B
references/benchmarks/team-capacity-board/starter/src/App.tsxother971 B
references/benchmarks/team-capacity-board/starter/src/main.tsxother238 B
references/benchmarks/team-capacity-board/starter/src/styles.cssother976 B
references/benchmarks/team-capacity-board/starter/src/test-setup.tsscript43 B
references/benchmarks/team-capacity-board/starter/src/vite-env.d.tsscript38 B
references/benchmarks/team-capacity-board/starter/tsconfig.app.jsonconfig552 B
references/benchmarks/team-capacity-board/starter/tsconfig.jsonconfig89 B
references/benchmarks/team-capacity-board/starter/vite.config.tsscript214 B
references/bootstrap/RECURSIVE.mdmarkdown109.9 KB
references/fixtures/tiny-tasks-smoke-recipe.mdmarkdown2.6 KB
references/local-first-web-app-checklist.mdmarkdown1.6 KB
references/plans-canonical.mdmarkdown10.8 KB
scripts/check-reusable-repo-hygiene.ps1script625 B
scripts/check-reusable-repo-hygiene.pyscript6.3 KB
scripts/install-recursive-mode.ps1script36.0 KB
scripts/install-recursive-mode.pyscript31.8 KB
scripts/install-recursive-mode.shscript363 B
scripts/lint-recursive-run.ps1script739 B
scripts/lint-recursive-run.pyscript127.4 KB
scripts/recursive-closeout.ps1script1015 B
scripts/recursive-closeout.pyscript24.0 KB
scripts/recursive-init.ps1script18.7 KB
scripts/recursive-init.pyscript12.6 KB
scripts/recursive-lock.ps1script677 B
scripts/recursive-lock.pyscript12.6 KB
scripts/recursive-review-bundle.ps1script2.9 KB
scripts/recursive-review-bundle.pyscript22.1 KB
scripts/recursive-router-cli-configure.ps1script86 B
scripts/recursive-router-cli-configure.pyscript230 B
scripts/recursive-router-cli-init.ps1script81 B
scripts/recursive-router-cli-init.pyscript225 B
scripts/recursive-router-cli-invoke.ps1script83 B
scripts/recursive-router-cli-invoke.pyscript227 B
scripts/recursive-router-cli-probe.ps1script82 B
scripts/recursive-router-cli-probe.pyscript226 B
scripts/recursive-router-cli-resolve.ps1script84 B
scripts/recursive-router-cli-resolve.pyscript228 B
scripts/recursive-router-cli-validate.ps1script85 B
scripts/recursive-router-cli-validate.pyscript229 B
scripts/recursive-router-configure.ps1script798 B
scripts/recursive-router-configure.pyscript2.8 KB
scripts/recursive-router-init.ps1script490 B
scripts/recursive-router-init.pyscript925 B
scripts/recursive-router-invoke.ps1script1.5 KB
scripts/recursive-router-invoke.pyscript4.4 KB
scripts/recursive-router-probe.ps1script735 B
scripts/recursive-router-probe.pyscript1.6 KB
scripts/recursive-router-resolve.ps1script803 B
scripts/recursive-router-resolve.pyscript1.6 KB
scripts/recursive-router-validate.ps1script494 B
scripts/recursive-router-validate.pyscript804 B
scripts/recursive-status.ps1script674 B
scripts/recursive-status.pyscript97.7 KB
scripts/recursive-subagent-action.ps1script5.8 KB
scripts/recursive-subagent-action.pyscript12.4 KB
scripts/recursive-training-extract.ps1script586 B
scripts/recursive-training-extract.pyscript1.0 KB
scripts/recursive-training-grpo.ps1script1.2 KB
scripts/recursive-training-grpo.pyscript47.2 KB
scripts/recursive-training-loader.ps1script2.3 KB
scripts/recursive-training-loader.pyscript20.1 KB
scripts/recursive-training-mcp.ps1script721 B
scripts/recursive-training-mcp.pyscript10.1 KB
scripts/recursive-training-phase8-trigger.ps1script1.4 KB
scripts/recursive-training-phase8-trigger.pyscript4.0 KB
scripts/recursive-training-sync.ps1script735 B
scripts/recursive-training-sync.pyscript6.9 KB
scripts/recursive_phase_rules.pyscript12.7 KB
scripts/recursive_router_cli_lib.pyscript77 B
scripts/recursive_router_lib.pyscript84.5 KB
scripts/run-recursive-benchmark.ps1script2.1 KB
scripts/run-recursive-benchmark.pyscript376.1 KB
scripts/test-recursive-mode-smoke.ps1script1.0 KB
scripts/test-recursive-mode-smoke.pyscript121.0 KB
scripts/test_install_recursive_mode.pyscript38.4 KB
scripts/test_lint_recursive_run.pyscript4.1 KB
scripts/test_recursive_phase_rules.pyscript21.4 KB
scripts/test_recursive_review_bundle.pyscript5.8 KB
scripts/test_recursive_router.pyscript53.3 KB
scripts/test_recursive_subagent_action.pyscript3.2 KB
scripts/test_recursive_training.pyscript12.0 KB
scripts/test_run_recursive_benchmark.pyscript160.0 KB
scripts/verify-locks.ps1script733 B
scripts/verify-locks.pyscript13.8 KB

references/plans-canonical.md

View on GitHub
# plans-canonical bridge

The single canonical workflow specification lives in `/.recursive/RECURSIVE.md`.

This file remains a compatibility locator plus a compact mirror of the hard requirements so older references still point at the right behavior without maintaining a second full workflow spec.

## Current Workflow Profile

New runs should use:

- `Workflow version: recursive-mode-audit-v2`

Compatibility aliases still recognized by tooling:

- `recursive-mode-audit-v1`
- `memory-phase8`
- legacy runs with no late-phase marker

## Workflow Mirror

The current strict workflow requires:

- audited phases use `draft -> audit -> repair -> re-audit -> pass -> lock`
- audited phases are: Phase 1, Phase 1.5 when present, Phase 2, Phase 3, Phase 3.5 when present, Phase 4, Phase 6, Phase 7, and Phase 8
- exactly one active phase may exist in a run at a time; later-phase draft work is invalid while an earlier phase remains unresolved
- subagents are still optional infrastructure, but delegated audit/review is the default inside the active phase when subagents are available and the context bundle is complete; they do not permit parallel phase advancement
- read-only review/audit delegation and independent test execution are allowed only inside the active phase
- write-capable subagent work is allowed only for explicitly independent sub-phases with disjoint write scopes
- meaningful subagent work must leave durable action records under `/.recursive/run/<run-id>/subagents/` and the controller must verify them against actual files and artifacts before acceptance
- reusable skill or workflow repos should keep shipped history clean; do not treat current-session run artifacts as durable repo content unless they are intentional fixtures

## Audit Context Mirror

Every audited phase must record:

- `Audit Execution Mode: subagent` or `Audit Execution Mode: self-audit`
- `Subagent Availability: available` or `Subagent Availability: unavailable`
- `Subagent Capability Probe`
- `Delegation Decision Basis`
- `Delegation Override Reason` when available subagents were not used
- `Audit Inputs Provided:` with exact artifact paths, diff basis, changed files, and targeted code references

Delegation rules:

- self-audit is mandatory when subagents are unavailable
- delegated audit/review is the preferred default when subagents are available and the context bundle is complete
- if available subagents are not used, the artifact should record an explicit `Delegation Override Reason`
- delegated audits are invalid unless the subagent receives the full context bundle
- the required context bundle includes the current phase draft, exact upstream artifacts, relevant addenda, diff basis from `00-worktree.md`, changed file list, targeted code paths, relevant control-plane docs, and phase-specific audit questions
- if the context bundle is incomplete, do not delegate; perform the audit locally and record `Audit Execution Mode: self-audit`
- for Phase 3.5 and similar delegated review work, prefer a canonical review bundle under `/.recursive/run/<run-id>/evidence/review-bundles/` and record `Review Bundle Path` in the phase artifact
- review bundles should auto-include relevant addenda by default, and the written review narrative must cite the bundle path plus bundle-grounded upstream artifacts, addenda, prior recursive evidence, and changed files or code refs
- delegated acceptance must record any repair performed after verification when main-agent checks found issues or stale delegated context
- if a run needs a missing specialized capability, prefer `find-skills` when available; otherwise use the Skills CLI (`npx skills find`, `npx skills add`, `npx skills check`, `npx skills update`) and record the result in Phase 8 when skill usage is relevant

## Audit Evidence Mirror

Every audited artifact must contain, before Coverage and Approval:

- `## Audit Context`
- `## Effective Inputs Re-read`
- `## Earlier Phase Reconciliation`
- `## Subagent Contribution Verification`
- `## Worktree Diff Audit`
- `## Gaps Found`
- `## Repair Work Performed`
- `## Requirement Completion Status`
- `## Audit Verdict`

The following audited phases must also contain `## Prior Recursive Evidence Reviewed`:

- Phase 1
- Phase 2
- Phase 4
- Phase 7
- Phase 8

The artifact must end with:

- `Audit: PASS` or `Audit: FAIL`
- `Coverage: PASS` or `Coverage: FAIL`
- `Approval: PASS` or `Approval: FAIL`

## Reconciliation Mirror

Audited phases must reconcile against:

- `00-requirements.md`
- `00-worktree.md`
- the immediately previous locked phase artifact
- relevant addenda
- relevant sub-phase artifacts where applicable
- any phase-specific earlier artifacts
- relevant prior recursive-mode run docs when they matter to the same subsystem, workflow, or architecture area
- relevant stage-local addenda and current-phase upstream-gap addenda that change the effective input set

Diff reconciliation must reuse the baseline recorded in `00-worktree.md`, including:

- baseline type
- baseline reference
- comparison reference
- normalized baseline
- normalized comparison
- normalized diff command

Audited phases that rely on implementation reality must explicitly compare:

- planned or claimed changed files
- actual changed files reviewed
- claimed completion vs actual code and tests
- unexplained drift or omissions

No audited phase may pass or lock if upstream reconciliation is incomplete, in-scope gaps remain, or unexplained diff drift remains.

Phase-scoped diff ownership:

- Phase 2 owns the planned product/worktree surface, not the eventual full repo diff forever.
- Phase 3, Phase 3.5, and Phase 4 own actual product/worktree drift reconciliation.
- Phase 6 owns `/.recursive/DECISIONS.md` plus reviewed final product/worktree paths.
- Phase 7 owns `/.recursive/STATE.md` plus reviewed final product/worktree paths.
- Phase 8 owns `/.recursive/memory/**` plus reviewed final product/worktree paths.
- Later control-plane or memory churn must not retroactively invalidate earlier locked planning artifacts.
- If a locked earlier phase omitted something material, the owning downstream phase must compensate via its artifact or addenda instead of rewriting locked history.
- Effective inputs are base artifact plus relevant addenda; downstream audited phases must list, re-read, and reconcile them explicitly.
- Diff audit excludes incidental runtime byproducts such as `__pycache__/`, `*.pyc`, `.pytest_cache/`, `.mypy_cache/`, and `.ruff_cache/` unless the repo intentionally tracks them.
- Requirement completion is not proven by Traceability alone. Audited phases must include machine-checkable `Requirement Completion Status` entries for every in-scope requirement or Phase 1 source-inventory ID.
- `implemented` and `verified` requirement dispositions must cite concrete `Changed Files`; `verified` also requires distinct verification evidence.
- Prior recursive evidence must cite actual run or memory paths, or explicitly state that none is relevant with justification.

## Phase-Specific Audit Mirror

Phase 2 must fail unless:

- every in-scope `R#` is planned in v1, and every Phase 1 source-inventory item is accounted for in v2
- targeted files/modules are concrete enough for later comparison
- tests and QA coverage are concrete
- expected change surface is concrete enough for later diff reconciliation
- v2 plans include `## Requirement Mapping`, `## Plan Drift Check`, and plan-stage `## Requirement Completion Status`

Phase 3 must audit implementation claims against:

- `00-requirements.md`
- `02-to-be-plan.md`
- current diff and actual changed files
- required implementation and test evidence
- declared `TDD Mode: strict|pragmatic`
- strict-mode RED and GREEN evidence paths under `/.recursive/run/<run-id>/evidence/logs/`
- pragmatic-mode exception rationale plus compensating validation evidence when strict mode is not used

Phase 3.5, when present, must explicitly review:

- implementation vs requirements
- implementation vs plan
- git diff vs claimed scope
- code quality and maintainability
- test adequacy and TDD compliance
- the review bundle path and bundle contents when delegation is used

Phase 4 must perform a pre-test implementation audit and fail back to Phase 3 repair if unfinished in-scope work remains.

Phase 5 must declare `QA Execution Mode: human|agent-operated|hybrid` and satisfy the matching requirements:

- `human`: observed results plus explicit user sign-off
- `agent-operated`: observed results plus execution record, tools used, and evidence paths
- `hybrid`: both execution evidence and explicit user sign-off

Phase 6, Phase 7, and Phase 8 must reconcile their control-plane updates against final validated repo state:

- Phase 6 verifies `DECISIONS.md`
- Phase 7 verifies `STATE.md`
- Phase 8 verifies memory updates and status transitions against touched paths, prior memory truth, `STATE.md`, `DECISIONS.md`, and final code
- Phase 6, Phase 7, and Phase 8 receipts should be concise delta receipts that point to the final control-plane docs instead of restating large sections of them
- Phase 8 must record run-local skill usage, promotion decisions, and why observations were or were not promoted into durable skill memory

## Gate And Tooling Mirror

For audited phases:

- `Coverage: PASS` is invalid unless `Audit: PASS`
- `Approval: PASS` is invalid unless `Audit: PASS`
- no lock is valid without required audit sections, traceability, and audit success
- downstream artifacts must explicitly map every in-scope `R#`; vague traceability is invalid

Repo tooling should stay aligned with these rules:

- `lint-recursive-run.*` rejects missing audit structure, missing `Audit: PASS|FAIL`, missing required `R#` coverage, missing prior recursive evidence where required, and missing diff-basis usage where required
- `recursive-status.*` reports audit blockers, diff-audit deficiencies, missing reconciliation, missing prior recursive evidence, traceability gaps, and lock ineligibility reasons
- `recursive-status.*` and `lint-recursive-run.*` must fail delegated review records that only point at a bundle file without citing bundle-grounded upstream artifacts, addenda, prior recursive evidence, and changed files/code refs
- `recursive-status.*` also reports missing RED/GREEN evidence, invalid pragmatic TDD exceptions, and QA-mode-specific blockers
- `verify-locks.*` remains primarily structural/cryptographic, but audited-phase lock validity must stay consistent with the strict audit gates
- `recursive-lock.*` is the primary supported locking path and must refuse to lock artifacts whose required gates, TDD evidence requirements, QA-mode requirements, or lint-critical structure are not yet valid

## Canonical Locations

- Canonical workflow: `/.recursive/RECURSIVE.md`
- Primary Codex AGENTS bridge: `/.codex/AGENTS.md`
- Primary Codex PLANS bridge: `/.agent/PLANS.md`
- Canonical run root: `/.recursive/run/<run-id>/`
- Durable memory root: `/.recursive/memory/`
- Skill-memory router: `/.recursive/memory/skills/SKILLS.md`
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall