@williambeto/ai-workflow 1.19.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -838
- package/PUBLISH_MANIFEST.json +34 -0
- package/README.md +78 -148
- package/{packages/ai-workflow/bin → bin}/ai-workflow.js +0 -0
- package/dist-assets/AGENTS.md +27 -0
- package/dist-assets/agents/astra.md +63 -0
- package/dist-assets/agents/atlas.md +169 -0
- package/dist-assets/agents/nexus.md +42 -0
- package/dist-assets/agents/orion.md +44 -0
- package/dist-assets/agents/phoenix.md +42 -0
- package/dist-assets/agents/sage.md +54 -0
- package/dist-assets/commands/README.md +14 -0
- package/dist-assets/commands/atlas.md +12 -0
- package/dist-assets/commands/audit.md +10 -0
- package/dist-assets/commands/deploy.md +12 -0
- package/dist-assets/commands/discover.md +10 -0
- package/dist-assets/commands/implement.md +28 -0
- package/dist-assets/commands/optimize-tokens.md +10 -0
- package/dist-assets/commands/plan.md +10 -0
- package/dist-assets/commands/release.md +12 -0
- package/dist-assets/commands/run.md +26 -0
- package/dist-assets/commands/spec-create.md +10 -0
- package/dist-assets/commands/spec-implement.md +10 -0
- package/dist-assets/commands/spec-review.md +10 -0
- package/dist-assets/commands/update-memory.md +10 -0
- package/dist-assets/commands/validate.md +12 -0
- package/dist-assets/docs/INDEX.md +21 -0
- package/dist-assets/docs/QUICKSTART.md +23 -0
- package/dist-assets/docs/adr/ADR-0000.md +19 -0
- package/dist-assets/docs/adr/ADR-0001.md +45 -0
- package/dist-assets/docs/adr/ADR-0002.md +62 -0
- package/dist-assets/docs/adr/ADR-0003.md +60 -0
- package/dist-assets/docs/adr/ADR-0004.md +71 -0
- package/dist-assets/docs/adr/ADR-0005.md +22 -0
- package/dist-assets/docs/adr/ADR-0006.md +82 -0
- package/dist-assets/docs/adr/ADR-0007.md +78 -0
- package/dist-assets/docs/api-engine-reference.md +7 -0
- package/{docs → dist-assets/docs}/architecture-policy.md +1 -1
- package/dist-assets/docs/cli-reference.md +27 -0
- package/dist-assets/docs/compatibility/provider-usage.md +38 -0
- package/dist-assets/docs/compatibility/runtime-matrix.md +30 -0
- package/dist-assets/docs/consumer-onboarding.md +17 -0
- package/dist-assets/docs/contributing-guide.md +11 -0
- package/{docs → dist-assets/docs}/design-patterns-policy.md +2 -2
- package/dist-assets/docs/full-documentation.md +113 -0
- package/{docs → dist-assets/docs}/npm-consumer-quickstart.md +18 -46
- package/dist-assets/docs/opencode-readme.md +8 -0
- package/dist-assets/docs/policies/01-BRANCH_GATE.md +63 -0
- package/dist-assets/docs/policies/02-SDD_METHODOLOGY.md +95 -0
- package/dist-assets/docs/policies/03-QUALITY_GATE.md +22 -0
- package/dist-assets/docs/policies/05-AGENT_CONTRACT.md +7 -0
- package/dist-assets/docs/policies/06-FINAL_EVIDENCE_CONTRACT.md +31 -0
- package/dist-assets/docs/policies/07-RELEASE_GATE.md +47 -0
- package/dist-assets/docs/policies/08-PRODUCT_TRUTHFULNESS_AND_PROJECT_DOCS.md +18 -0
- package/dist-assets/docs/policies/09-SPEC_VISIBILITY_AND_PUBLICATION.md +28 -0
- package/dist-assets/docs/policies/10-BEHAVIORAL_CONTRACT_HARDENING.md +9 -0
- package/dist-assets/docs/policies/11-EXECUTABLE_DELEGATION_AND_TRUTHFULNESS.md +7 -0
- package/dist-assets/docs/policies/ORCHESTRATION_PROTOCOL.md +15 -0
- package/dist-assets/docs/policies/PROCEDURE_DELIVERY_ARTIFACTS.md +21 -0
- package/dist-assets/docs/policies/PROCEDURE_DOCUMENTATION_CHECKLIST.md +24 -0
- package/dist-assets/docs/policies/PROCEDURE_UI_CHECKLIST.md +54 -0
- package/dist-assets/docs/profiles/README.md +19 -0
- package/dist-assets/docs/profiles/backend-api.md +5 -0
- package/dist-assets/docs/profiles/documentation.md +3 -0
- package/dist-assets/docs/profiles/frontend-product.md +19 -0
- package/dist-assets/docs/profiles/frontend-utility.md +19 -0
- package/dist-assets/docs/profiles/refactor.md +3 -0
- package/dist-assets/docs/profiles/security-review.md +3 -0
- package/dist-assets/docs/references/frontend-quality/landing-page-quality-checklist.md +11 -0
- package/dist-assets/docs/references/frontend-quality/product-copy-truthfulness.md +7 -0
- package/dist-assets/docs/references/frontend-quality/quality-failure-examples.md +20 -0
- package/dist-assets/docs/references/frontend-quality/visual-composition-patterns.md +10 -0
- package/dist-assets/docs/specs/runtime-operational-contract.md +39 -0
- package/dist-assets/docs/troubleshooting-guide.md +21 -0
- package/dist-assets/docs/visual-validation-guide.md +76 -0
- package/dist-assets/examples/README.md +10 -0
- package/dist-assets/examples/autopilot-cycle/00-CONTEXT.md +3 -0
- package/dist-assets/examples/autopilot-cycle/01-requirement.md +16 -0
- package/dist-assets/examples/autopilot-cycle/02-gate-a-check.md +23 -0
- package/dist-assets/examples/autopilot-cycle/03-orion-planning.md +20 -0
- package/dist-assets/examples/autopilot-cycle/04-astra-implementation.md +17 -0
- package/dist-assets/examples/autopilot-cycle/05-sage-validation.md +15 -0
- package/dist-assets/examples/autopilot-cycle/06-phoenix-healing.md +12 -0
- package/dist-assets/examples/autopilot-cycle/07-orchestration-report.md +18 -0
- package/dist-assets/examples/backend-api/00-CONTEXT.md +12 -0
- package/dist-assets/examples/backend-api/01-requirement.md +19 -0
- package/dist-assets/examples/backend-api/02-functional-spec.md +20 -0
- package/dist-assets/examples/backend-api/03-technical-plan.md +15 -0
- package/dist-assets/examples/backend-api/04-pr-breakdown.md +10 -0
- package/dist-assets/examples/backend-api/05-execution-handoff.md +13 -0
- package/dist-assets/examples/backend-api/06-validation-report.md +11 -0
- package/dist-assets/examples/backend-api/07-orchestration-report.md +7 -0
- package/dist-assets/examples/blocked-scenarios/00-CONTEXT.md +9 -0
- package/dist-assets/examples/blocked-scenarios/01-branch-gate-block.md +12 -0
- package/dist-assets/examples/blocked-scenarios/02-quality-gate-block.md +13 -0
- package/dist-assets/examples/blocked-scenarios/03-scope-creep-block.md +13 -0
- package/dist-assets/examples/blocked-scenarios/04-unblock-resolution.md +9 -0
- package/dist-assets/examples/blocked-scenarios/05-orchestration-decision-log.md +11 -0
- package/dist-assets/examples/bugfix-critical/00-CONTEXT.md +12 -0
- package/dist-assets/examples/bugfix-critical/01-bug-report.md +11 -0
- package/dist-assets/examples/bugfix-critical/02-diagnosis-hypothesis.md +11 -0
- package/dist-assets/examples/bugfix-critical/03-technical-plan.md +12 -0
- package/dist-assets/examples/bugfix-critical/04-implementation-handoff.md +8 -0
- package/dist-assets/examples/bugfix-critical/05-validation-report.md +10 -0
- package/dist-assets/examples/bugfix-critical/06-orchestration-report.md +7 -0
- package/dist-assets/examples/cli-package/00-CONTEXT.md +9 -0
- package/dist-assets/examples/cli-package/01-requirement.md +14 -0
- package/dist-assets/examples/cli-package/02-technical-spec.md +16 -0
- package/dist-assets/examples/cli-package/03-technical-plan.md +12 -0
- package/dist-assets/examples/cli-package/04-pr-breakdown.md +9 -0
- package/dist-assets/examples/cli-package/05-release-report.md +15 -0
- package/dist-assets/examples/docs-only-repo/01-requirement.md +31 -0
- package/dist-assets/examples/docs-only-repo/02-functional-spec.md +25 -0
- package/dist-assets/examples/docs-only-repo/03-technical-plan.md +21 -0
- package/dist-assets/examples/docs-only-repo/04-pr-breakdown.md +13 -0
- package/dist-assets/examples/docs-only-repo/05-execution-handoff.md +17 -0
- package/dist-assets/examples/docs-only-repo/06-validation-report.md +16 -0
- package/dist-assets/examples/docs-only-repo/README.md +26 -0
- package/dist-assets/examples/full-stack-checkout/00-CONTEXT.md +9 -0
- package/dist-assets/examples/full-stack-checkout/01-requirement.md +12 -0
- package/dist-assets/examples/full-stack-checkout/02-functional-spec.md +15 -0
- package/dist-assets/examples/full-stack-checkout/03-technical-plan.md +15 -0
- package/dist-assets/examples/full-stack-checkout/04-pr-breakdown.md +8 -0
- package/dist-assets/examples/full-stack-checkout/05-execution-handoff.md +14 -0
- package/dist-assets/examples/full-stack-checkout/06-validation-report.md +12 -0
- package/dist-assets/examples/healing-cycle/00-CONTEXT.md +15 -0
- package/dist-assets/examples/healing-cycle/01-broken-implementation.md +10 -0
- package/dist-assets/examples/healing-cycle/02-sage-fails.md +14 -0
- package/dist-assets/examples/healing-cycle/03-phoenix-diagnosis.md +17 -0
- package/dist-assets/examples/healing-cycle/04-phoenix-fix.md +18 -0
- package/dist-assets/examples/healing-cycle/05-sage-revalidation.md +12 -0
- package/dist-assets/examples/healing-cycle/06-orchestration-log.md +14 -0
- package/dist-assets/examples/infra-deploy/00-CONTEXT.md +9 -0
- package/dist-assets/examples/infra-deploy/01-operational-goal.md +12 -0
- package/dist-assets/examples/infra-deploy/02-architecture-specs.md +15 -0
- package/dist-assets/examples/infra-deploy/03-implementation-plan.md +14 -0
- package/dist-assets/examples/infra-deploy/04-step-breakdown.md +9 -0
- package/dist-assets/examples/infra-deploy/05-execution-handoff.md +13 -0
- package/dist-assets/examples/infra-deploy/06-operational-report.md +11 -0
- package/dist-assets/examples/multi-pr-release/00-CONTEXT.md +9 -0
- package/dist-assets/examples/multi-pr-release/01-requirement.md +13 -0
- package/dist-assets/examples/multi-pr-release/02-strategic-plan.md +13 -0
- package/dist-assets/examples/multi-pr-release/03-pr-breakdown.md +14 -0
- package/dist-assets/examples/multi-pr-release/04-release-plan.md +12 -0
- package/dist-assets/examples/multi-pr-release/05-orchestration-report.md +7 -0
- package/dist-assets/examples/nuxt-dashboard/01-requirement.md +81 -0
- package/dist-assets/examples/nuxt-dashboard/02-functional-spec.md +88 -0
- package/dist-assets/examples/nuxt-dashboard/03-technical-plan.md +76 -0
- package/dist-assets/examples/nuxt-dashboard/04-pr-breakdown.md +219 -0
- package/dist-assets/examples/nuxt-dashboard/05-execution-handoff.md +88 -0
- package/dist-assets/examples/nuxt-dashboard/06-validation-report.md +56 -0
- package/dist-assets/examples/nuxt-dashboard/07-orchestration-report.md +79 -0
- package/dist-assets/examples/nuxt-dashboard/README.md +52 -0
- package/dist-assets/examples/react-dashboard/01-requirement.md +84 -0
- package/dist-assets/examples/react-dashboard/02-functional-spec.md +88 -0
- package/dist-assets/examples/react-dashboard/03-technical-plan.md +76 -0
- package/dist-assets/examples/react-dashboard/04-pr-breakdown.md +218 -0
- package/dist-assets/examples/react-dashboard/05-execution-handoff.md +13 -0
- package/dist-assets/examples/react-dashboard/06-validation-report.md +12 -0
- package/dist-assets/examples/react-dashboard/07-orchestration-report.md +7 -0
- package/dist-assets/examples/react-dashboard/README.md +70 -0
- package/dist-assets/examples/refactoring-service/00-CONTEXT.md +9 -0
- package/dist-assets/examples/refactoring-service/01-debt-report.md +12 -0
- package/dist-assets/examples/refactoring-service/02-behavior-spec.md +11 -0
- package/dist-assets/examples/refactoring-service/03-technical-plan.md +13 -0
- package/dist-assets/examples/refactoring-service/04-pr-breakdown.md +9 -0
- package/dist-assets/examples/refactoring-service/05-execution-handoff.md +14 -0
- package/dist-assets/examples/refactoring-service/06-stability-report.md +12 -0
- package/dist-assets/examples/sdd-cycle/00-CONTEXT.md +12 -0
- package/dist-assets/examples/sdd-cycle/01-raw-request.md +13 -0
- package/dist-assets/examples/sdd-cycle/02-spec-creation.md +18 -0
- package/dist-assets/examples/sdd-cycle/03-spec-review.md +12 -0
- package/dist-assets/examples/sdd-cycle/04-technical-plan.md +16 -0
- package/dist-assets/examples/sdd-cycle/05-pr-breakdown.md +9 -0
- package/dist-assets/examples/sdd-cycle/06-spec-implement.md +13 -0
- package/dist-assets/examples/sdd-cycle/07-validation-against-spec.md +13 -0
- package/dist-assets/examples/wordpress-theme/01-requirement.md +29 -0
- package/dist-assets/examples/wordpress-theme/02-functional-spec.md +22 -0
- package/dist-assets/examples/wordpress-theme/03-technical-plan.md +22 -0
- package/dist-assets/examples/wordpress-theme/04-pr-breakdown.md +14 -0
- package/dist-assets/examples/wordpress-theme/05-execution-handoff.md +17 -0
- package/dist-assets/examples/wordpress-theme/06-validation-report.md +16 -0
- package/dist-assets/examples/wordpress-theme/README.md +32 -0
- package/{harness → dist-assets/harness}/handoffs/HANDOFF.template.md +2 -2
- package/{harness → dist-assets/harness}/workflows/agent-evaluation-checklist.md +5 -5
- package/{harness → dist-assets/harness}/workflows/implement-review-validate.md +24 -0
- package/{harness → dist-assets/harness}/workflows/multi-agent-handoff.md +4 -4
- package/{harness → dist-assets/harness}/workflows/planner-executor-workflow.md +5 -5
- package/{harness → dist-assets/harness}/workflows/requirement-to-pr.md +1 -1
- package/dist-assets/runbooks/agent-delegation-workflow.md +50 -0
- package/dist-assets/runbooks/apply-starter-to-real-project.md +45 -0
- package/dist-assets/runbooks/commands-cheatsheet.md +44 -0
- package/dist-assets/runbooks/how-to-use-skills.md +44 -0
- package/dist-assets/runbooks/private-spec-publication-safety.md +35 -0
- package/{runbooks → dist-assets/runbooks}/spec-driven-development.md +3 -6
- package/dist-assets/runbooks/tutorial-walkthroughs.md +23 -0
- package/dist-assets/runbooks/use-linear-for-operational-planning.md +45 -0
- package/dist-assets/runbooks/use-napkin-project-memory.md +33 -0
- package/dist-assets/skills/architecture/SKILL.md +166 -0
- package/dist-assets/skills/backend-development/SKILL.md +166 -0
- package/dist-assets/skills/deployment/SKILL.md +166 -0
- package/dist-assets/skills/design-principles/SKILL.md +166 -0
- package/dist-assets/skills/documentation/SKILL.md +171 -0
- package/dist-assets/skills/frontend-development/SKILL.md +225 -0
- package/dist-assets/skills/full-stack-development/SKILL.md +166 -0
- package/dist-assets/skills/optimize-tokens/SKILL.md +166 -0
- package/dist-assets/skills/pr-workflow/SKILL.md +166 -0
- package/dist-assets/skills/product-discovery/SKILL.md +166 -0
- package/dist-assets/skills/product-planning/SKILL.md +166 -0
- package/dist-assets/skills/project-memory/SKILL.md +166 -0
- package/dist-assets/skills/prompt-engineer/SKILL.md +166 -0
- package/dist-assets/skills/qa-workflow/SKILL.md +186 -0
- package/dist-assets/skills/refactoring/SKILL.md +166 -0
- package/dist-assets/skills/release-workflow/SKILL.md +166 -0
- package/dist-assets/skills/spec-driven-development/SKILL.md +166 -0
- package/dist-assets/skills/technical-leadership/SKILL.md +166 -0
- package/dist-assets/skills/ui-ux-design/SKILL.md +202 -0
- package/dist-assets/templates/.geminiignore.template +8 -0
- package/dist-assets/templates/CLAUDE.md.template +20 -0
- package/dist-assets/templates/CODEX.md.template +20 -0
- package/dist-assets/templates/GEMINI.md.template +20 -0
- package/dist-assets/templates/HANDOFF.template.md +45 -0
- package/dist-assets/templates/SPEC.template.md +38 -0
- package/dist-assets/templates/change-proposal.template.md +14 -0
- package/dist-assets/templates/owner-evidence/astra-implementation.json +10 -0
- package/dist-assets/templates/owner-evidence/phoenix-remediation.json +8 -0
- package/dist-assets/templates/owner-evidence/sage-revalidation.json +8 -0
- package/dist-assets/templates/owner-evidence/sage-validation.json +8 -0
- package/dist-assets/templates/specs/deep.md +48 -0
- package/dist-assets/templates/specs/standard.md +38 -0
- package/dist-assets/templates/specs/tiny.md +19 -0
- package/package.json +43 -47
- package/src/adapters/index.js +3 -0
- package/src/adapters/platforms/claude.js +126 -0
- package/src/adapters/platforms/codex.js +100 -0
- package/src/adapters/platforms/gemini.js +232 -0
- package/src/cli.js +114 -0
- package/src/commands/collect-evidence.js +61 -0
- package/src/commands/doctor.js +186 -0
- package/src/commands/execute.js +172 -0
- package/{packages/ai-workflow/src → src}/commands/init.js +119 -20
- package/src/commands/run.js +112 -0
- package/src/core/completion-contract.js +35 -0
- package/src/core/execution-planner.js +59 -0
- package/src/core/gates/branch-gate.js +146 -0
- package/src/core/handoff/handoff-engine.js +104 -0
- package/src/core/healing/cli-remediation-executor.js +151 -0
- package/src/core/healing/healer-engine.js +179 -0
- package/src/core/identity.js +43 -0
- package/{packages/ai-workflow/src → src}/core/install-plan.js +3 -3
- package/src/core/opencode-merge.js +149 -0
- package/{packages/ai-workflow/src → src}/core/package-assets.js +29 -10
- package/src/core/request-classifier.js +58 -0
- package/src/core/runtime/opencode-adapter.js +94 -0
- package/src/core/sdd/validator.js +67 -0
- package/src/core/statuses.js +29 -0
- package/src/core/symlink-layout.js +93 -0
- package/src/core/templates.js +221 -0
- package/src/core/validation/canonical-finalization.js +43 -0
- package/src/core/validation/evidence-collector.js +109 -0
- package/src/core/validation/quality-guard.js +243 -0
- package/src/core/workflow-profiles.js +107 -0
- package/src/core/workflow-state-machine.js +46 -0
- package/.agents/napkin.md +0 -89
- package/.agents/skills/backend-implementer/SKILL.md +0 -490
- package/.agents/skills/build-and-validate/SKILL.md +0 -442
- package/.agents/skills/deploy-engineer/SKILL.md +0 -541
- package/.agents/skills/docs-writer/SKILL.md +0 -430
- package/.agents/skills/frontend-implementer/SKILL.md +0 -488
- package/.agents/skills/interface-design/SKILL.md +0 -428
- package/.agents/skills/interface-design/references/critique.md +0 -67
- package/.agents/skills/interface-design/references/example.md +0 -86
- package/.agents/skills/interface-design/references/principles.md +0 -235
- package/.agents/skills/interface-design/references/validation.md +0 -48
- package/.agents/skills/minimal-context/SKILL.md +0 -177
- package/.agents/skills/napkin/SKILL.md +0 -84
- package/.agents/skills/opencode-agent-design/SKILL.md +0 -77
- package/.agents/skills/playwright-cli/SKILL.md +0 -62
- package/.agents/skills/pr-orchestrator/SKILL.md +0 -366
- package/.agents/skills/product-manager/SKILL.md +0 -519
- package/.agents/skills/seo-audit/SKILL.md +0 -176
- package/.agents/skills/stack-variant-creator/SKILL.md +0 -265
- package/.agents/skills/tech-lead/SKILL.md +0 -453
- package/.agents/skills/tester/SKILL.md +0 -399
- package/.agents/skills/token-economy/SKILL.md +0 -137
- package/.agents/skills/vue-nuxt/SKILL.md +0 -102
- package/.agents/skills/wordpress-engineer/SKILL.md +0 -75
- package/.codex/prompts/README.md +0 -44
- package/.codex/prompts/autopilot.md +0 -50
- package/.codex/prompts/deploy.md +0 -33
- package/.codex/prompts/execute-selected-pr.md +0 -35
- package/.codex/prompts/fix-issue.md +0 -34
- package/.codex/prompts/minimal-context-mode.md +0 -55
- package/.codex/prompts/orchestrate-next.md +0 -33
- package/.codex/prompts/plan-from-requirement.md +0 -37
- package/.codex/prompts/review-implementation.md +0 -33
- package/.codex/prompts/roadmap-audit.md +0 -22
- package/.codex/prompts/specs/create-spec-from-requirement.md +0 -26
- package/.codex/prompts/specs/review-spec.md +0 -29
- package/.codex/prompts/specs/spec-to-pr-breakdown.md +0 -23
- package/.codex/prompts/specs/spec-to-technical-plan.md +0 -28
- package/.codex/prompts/start-project.md +0 -29
- package/.codex/prompts/token-economy-mode.md +0 -48
- package/.codex/prompts/validate-work.md +0 -28
- package/checklists/change-spec-readiness-checklist.md +0 -34
- package/docs/full-documentation.md +0 -661
- package/docs/setup-codex-opencode.md +0 -313
- package/harness/README.md +0 -106
- package/opencode/README.md +0 -84
- package/opencode/agents/README.md +0 -113
- package/opencode/agents/atlas.md +0 -127
- package/opencode/agents/discovery.md +0 -61
- package/opencode/agents/fixer.md +0 -51
- package/opencode/agents/implementer.md +0 -61
- package/opencode/agents/orchestrator.md +0 -145
- package/opencode/agents/planner.md +0 -60
- package/opencode/agents/prompt-engineer.md +0 -50
- package/opencode/agents/release-manager.md +0 -50
- package/opencode/agents/reviewer.md +0 -51
- package/opencode/agents/spec-engineer.md +0 -85
- package/opencode/agents/validator.md +0 -50
- package/opencode/agents/wordpress-engineer.md +0 -49
- package/opencode/commands/README.md +0 -48
- package/opencode/commands/autopilot.md +0 -50
- package/opencode/commands/deploy.md +0 -35
- package/opencode/commands/execute.md +0 -47
- package/opencode/commands/orchestrate.md +0 -37
- package/opencode/commands/plan.md +0 -39
- package/opencode/commands/review.md +0 -33
- package/opencode/commands/roadmap-audit.md +0 -30
- package/opencode/commands/ship.md +0 -48
- package/opencode/commands/specs/create-spec-from-request.md +0 -27
- package/opencode/commands/specs/create-spec-from-requirement.md +0 -25
- package/opencode/commands/specs/review-spec.md +0 -26
- package/opencode/commands/specs/spec-to-pr-breakdown.md +0 -19
- package/opencode/commands/specs/spec-to-tasks.md +0 -26
- package/opencode/commands/specs/spec-to-technical-plan.md +0 -27
- package/opencode/commands/start.md +0 -45
- package/opencode/commands/token-economy.md +0 -29
- package/opencode/commands/validate.md +0 -33
- package/opencode.jsonc +0 -235
- package/packages/ai-workflow/README.md +0 -82
- package/packages/ai-workflow/src/cli.js +0 -70
- package/packages/ai-workflow/src/commands/codex.js +0 -37
- package/packages/ai-workflow/src/commands/doctor.js +0 -168
- package/packages/ai-workflow/src/commands/guide.js +0 -194
- package/packages/ai-workflow/src/core/opencode-merge.js +0 -172
- package/packages/ai-workflow/src/core/symlink-layout.js +0 -54
- package/packages/ai-workflow/src/core/templates.js +0 -276
- package/runbooks/agent-delegation-workflow.md +0 -111
- package/runbooks/apply-starter-to-real-project.md +0 -445
- package/runbooks/commands-cheatsheet.md +0 -71
- package/runbooks/how-to-use-skills.md +0 -713
- package/runbooks/quick-start-guide.md +0 -213
- package/runbooks/tutorial-walkthroughs.md +0 -416
- package/runbooks/use-linear-for-operational-planning.md +0 -185
- package/runbooks/use-napkin-project-memory.md +0 -77
- package/templates/AGENTS.template.md +0 -397
- package/templates/DESIGN.template.md +0 -484
- package/templates/PR-PLAN.template.md +0 -172
- package/templates/README.template.md +0 -293
- package/templates/REQUIREMENT.template.md +0 -165
- package/templates/SPEC.template.md +0 -397
- package/templates/TECH-PLAN.template.md +0 -244
- package/templates/change-proposal.template.md +0 -97
- /package/{checklists/spec-readiness-checklist.md → dist-assets/docs/policies/SPEC_READINESS.md} +0 -0
- /package/{prompts → dist-assets/prompts}/00-bootstrap-project.md +0 -0
- /package/{prompts → dist-assets/prompts}/01-create-requirement.md +0 -0
- /package/{prompts → dist-assets/prompts}/02-create-spec.md +0 -0
- /package/{prompts → dist-assets/prompts}/03-create-tech-plan.md +0 -0
- /package/{prompts → dist-assets/prompts}/04-breakdown-prs.md +0 -0
- /package/{prompts → dist-assets/prompts}/05-implement-pr.md +0 -0
- /package/{prompts → dist-assets/prompts}/06-review-and-fix.md +0 -0
- /package/{prompts → dist-assets/prompts}/07-apply-design.md +0 -0
- /package/{prompts → dist-assets/prompts}/08-validate.md +0 -0
- /package/{prompts → dist-assets/prompts}/09-deploy.md +0 -0
- /package/{prompts → dist-assets/prompts}/commands/implement.md +0 -0
- /package/{prompts → dist-assets/prompts}/commands/requirement.md +0 -0
- /package/{prompts → dist-assets/prompts}/commands/spec.md +0 -0
- /package/{prompts → dist-assets/prompts}/commands/tech-plan.md +0 -0
- /package/{prompts → dist-assets/prompts}/commands/validate.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/branch-cleanup.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/deploy-checklist.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/publication-readiness-checklist.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/publish-package-checklist.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/team-governance-pr-readiness.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/validate-starter-in-real-project.md +0 -0
- /package/{runbooks → dist-assets/runbooks}/validation-checklist.md +0 -0
- /package/{schemas → dist-assets/schemas}/README.md +0 -0
- /package/{schemas → dist-assets/schemas}/functional-spec.schema.json +0 -0
- /package/{schemas → dist-assets/schemas}/handoff.schema.json +0 -0
- /package/{schemas → dist-assets/schemas}/pr-breakdown.schema.json +0 -0
- /package/{schemas → dist-assets/schemas}/requirement.schema.json +0 -0
- /package/{schemas → dist-assets/schemas}/technical-plan.schema.json +0 -0
- /package/{schemas → dist-assets/schemas}/validation-report.schema.json +0 -0
- /package/{packages/ai-workflow/src → src}/core/backup.js +0 -0
- /package/{packages/ai-workflow/src → src}/core/filesystem.js +0 -0
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
# Setup Codex and OpenCode
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
This guide explains how to install and start using Codex or OpenCode with **AI Workflow Kit**.
|
|
6
|
-
|
|
7
|
-
Use this when you need the tool setup path before running the workflow in this repository or in a target project.
|
|
8
|
-
|
|
9
|
-
## Recommendation
|
|
10
|
-
|
|
11
|
-
AI Workflow Kit works with both OpenCode and Codex.
|
|
12
|
-
|
|
13
|
-
Recommended path:
|
|
14
|
-
|
|
15
|
-
- Use **OpenCode** for the best integrated experience with commands, agents, routing, and `opencode.jsonc`.
|
|
16
|
-
- Use **Codex** when you want OpenAI's terminal coding agent and prefer explicit prompt-driven workflow control.
|
|
17
|
-
|
|
18
|
-
Summary:
|
|
19
|
-
|
|
20
|
-
| Tool | Best for | Workflow style |
|
|
21
|
-
| --- | --- | --- |
|
|
22
|
-
| OpenCode | Full local workflow automation | Commands, agents, routing, project config |
|
|
23
|
-
| Codex | OpenAI CLI workflow | `AGENTS.md`, `.codex/prompts/`, manual gate progression |
|
|
24
|
-
|
|
25
|
-
## Before installing
|
|
26
|
-
|
|
27
|
-
Recommended prerequisites:
|
|
28
|
-
|
|
29
|
-
- Git installed;
|
|
30
|
-
- Node.js/npm available for repository validation commands;
|
|
31
|
-
- a terminal environment that can run local project commands;
|
|
32
|
-
- access to the AI provider account or API key required by the tool you choose.
|
|
33
|
-
|
|
34
|
-
Security notes:
|
|
35
|
-
|
|
36
|
-
- Do not paste secrets into prompts unless required and safe.
|
|
37
|
-
- Do not commit `.env` files or credentials.
|
|
38
|
-
- Prefer provider sign-in flows or environment variables for credentials.
|
|
39
|
-
- Review generated changes before running destructive commands.
|
|
40
|
-
|
|
41
|
-
## Install OpenCode
|
|
42
|
-
|
|
43
|
-
OpenCode is an open source AI coding agent available as a terminal interface, desktop app, or IDE extension.
|
|
44
|
-
|
|
45
|
-
Install with the official script:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
curl -fsSL https://opencode.ai/install | bash
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Alternative install with npm:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm install -g opencode-ai
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Alternative install with Homebrew:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
brew install anomalyco/tap/opencode
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
On Windows, OpenCode recommends WSL for the best terminal experience.
|
|
64
|
-
|
|
65
|
-
## Configure OpenCode
|
|
66
|
-
|
|
67
|
-
Start OpenCode:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
opencode
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Connect a provider from the OpenCode TUI:
|
|
74
|
-
|
|
75
|
-
```txt
|
|
76
|
-
/connect
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Follow the provider sign-in/API key flow in OpenCode.
|
|
80
|
-
|
|
81
|
-
Then initialize OpenCode in a project:
|
|
82
|
-
|
|
83
|
-
```txt
|
|
84
|
-
/init
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
OpenCode may create or update an `AGENTS.md` file. Commit project-level agent instructions when they are intentional and safe.
|
|
88
|
-
|
|
89
|
-
## Use AI Workflow Kit with OpenCode
|
|
90
|
-
|
|
91
|
-
OpenCode is the most integrated path because AI Workflow Kit can install or reference OpenCode commands, agents, and config.
|
|
92
|
-
|
|
93
|
-
For most projects, use the standalone CLI first:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
npx @williambeto/ai-workflow init --yes --profile=operational
|
|
97
|
-
npx @williambeto/ai-workflow doctor
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
The CLI creates or merges a project-root `opencode.jsonc`. That generated config is the file OpenCode reads in the target project. The repository-root `opencode.jsonc` is the reference config used by this kit itself.
|
|
101
|
-
|
|
102
|
-
Repository reference assets:
|
|
103
|
-
|
|
104
|
-
The paths below are shown from the repository root so they also work with this repository's reference validator.
|
|
105
|
-
|
|
106
|
-
- [`opencode.jsonc`](opencode.jsonc);
|
|
107
|
-
- [`opencode/commands/`](opencode/commands/);
|
|
108
|
-
- [`opencode/agents/`](opencode/agents/);
|
|
109
|
-
- [`opencode/agents/orchestrator.md`](opencode/agents/orchestrator.md);
|
|
110
|
-
- specialist skills in [`.agents/skills/`](.agents/skills/).
|
|
111
|
-
|
|
112
|
-
Common OpenCode commands:
|
|
113
|
-
|
|
114
|
-
| Command file | Use when |
|
|
115
|
-
| --- | --- |
|
|
116
|
-
| [`opencode/commands/start.md`](opencode/commands/start.md) | Starting workflow discovery. |
|
|
117
|
-
| [`opencode/commands/plan.md`](opencode/commands/plan.md) | Creating a plan from a requirement. |
|
|
118
|
-
| [`opencode/commands/execute.md`](opencode/commands/execute.md) | Implementing one selected PR. |
|
|
119
|
-
| [`opencode/commands/review.md`](opencode/commands/review.md) | Reviewing implementation. |
|
|
120
|
-
| [`opencode/commands/validate.md`](opencode/commands/validate.md) | Validating work with evidence. |
|
|
121
|
-
| [`opencode/commands/orchestrate.md`](opencode/commands/orchestrate.md) | Running gate-based handoff routing. |
|
|
122
|
-
| [`opencode/commands/ship.md`](opencode/commands/ship.md) | Running the end-to-end shipping workflow. |
|
|
123
|
-
| [`opencode/commands/autopilot.md`](opencode/commands/autopilot.md) | Routing a local-first task through existing workflow assets. |
|
|
124
|
-
| [`opencode/commands/deploy.md`](opencode/commands/deploy.md) | Preparing deployment readiness. |
|
|
125
|
-
|
|
126
|
-
Recommended first OpenCode workflow:
|
|
127
|
-
|
|
128
|
-
```txt
|
|
129
|
-
/start
|
|
130
|
-
→ /plan
|
|
131
|
-
→ /execute
|
|
132
|
-
→ /review
|
|
133
|
-
→ /validate
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Use `/ship` only when you want an end-to-end workflow and are ready for gate-based progression.
|
|
137
|
-
|
|
138
|
-
## Install Codex
|
|
139
|
-
|
|
140
|
-
Codex CLI is OpenAI's coding agent that runs locally in your terminal.
|
|
141
|
-
|
|
142
|
-
Install with npm:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
npm install -g @openai/codex
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Alternative install with Homebrew:
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
brew install --cask codex
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Then start Codex:
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
codex
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Codex supports ChatGPT sign-in and API key-based setup. Use the authentication method appropriate for your account and environment.
|
|
161
|
-
|
|
162
|
-
## Use AI Workflow Kit with Codex
|
|
163
|
-
|
|
164
|
-
Codex works well through explicit prompt entrypoints and the shared agent contract.
|
|
165
|
-
|
|
166
|
-
After CLI initialization, start from the project-local files the CLI creates:
|
|
167
|
-
|
|
168
|
-
- `README.workflow.md` for local workflow instructions;
|
|
169
|
-
- `.codex/prompts/README.md` for Codex prompt entrypoint guidance;
|
|
170
|
-
- `.ai-workflow.json` for install profile and managed file metadata.
|
|
171
|
-
|
|
172
|
-
The complete reference prompt set remains in this repository. Copy or adapt only the prompt entrypoints your project needs.
|
|
173
|
-
|
|
174
|
-
Primary Codex assets:
|
|
175
|
-
|
|
176
|
-
- [`AGENTS.md`](AGENTS.md);
|
|
177
|
-
- [`.codex/prompts/`](.codex/prompts/);
|
|
178
|
-
- ordered prompts in [`prompts/`](prompts/);
|
|
179
|
-
- handoff rules in [`harness/workflows/`](harness/workflows/).
|
|
180
|
-
|
|
181
|
-
Common Codex prompt entrypoints:
|
|
182
|
-
|
|
183
|
-
| Prompt file | Use when |
|
|
184
|
-
| --- | --- |
|
|
185
|
-
| [`.codex/prompts/start-project.md`](.codex/prompts/start-project.md) | Starting a project workflow. |
|
|
186
|
-
| [`.codex/prompts/plan-from-requirement.md`](.codex/prompts/plan-from-requirement.md) | Creating a plan from a requirement. |
|
|
187
|
-
| [`.codex/prompts/execute-selected-pr.md`](.codex/prompts/execute-selected-pr.md) | Implementing one selected PR. |
|
|
188
|
-
| [`.codex/prompts/review-implementation.md`](.codex/prompts/review-implementation.md) | Reviewing implementation. |
|
|
189
|
-
| [`.codex/prompts/validate-work.md`](.codex/prompts/validate-work.md) | Validating work with evidence. |
|
|
190
|
-
| [`.codex/prompts/orchestrate-next.md`](.codex/prompts/orchestrate-next.md) | Progressing gate-based handoffs manually. |
|
|
191
|
-
| [`.codex/prompts/fix-issue.md`](.codex/prompts/fix-issue.md) | Diagnosing and fixing an issue. |
|
|
192
|
-
| [`.codex/prompts/autopilot.md`](.codex/prompts/autopilot.md) | Routing a local-first task through existing workflow assets. |
|
|
193
|
-
| [`.codex/prompts/deploy.md`](.codex/prompts/deploy.md) | Preparing deployment readiness. |
|
|
194
|
-
|
|
195
|
-
Codex wrapper commands from the standalone CLI (copy/paste helper):
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
npx @williambeto/ai-workflow codex:start
|
|
199
|
-
npx @williambeto/ai-workflow codex:orchestrate
|
|
200
|
-
npx @williambeto/ai-workflow codex:plan
|
|
201
|
-
npx @williambeto/ai-workflow codex:execute
|
|
202
|
-
npx @williambeto/ai-workflow codex:review
|
|
203
|
-
npx @williambeto/ai-workflow codex:validate
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
These commands print the generated local prompt content (for example, `.codex/prompts/start-project.md`) so it can be pasted directly into Codex sessions.
|
|
207
|
-
|
|
208
|
-
Recommended first Codex workflow:
|
|
209
|
-
|
|
210
|
-
```txt
|
|
211
|
-
start-project
|
|
212
|
-
→ plan-from-requirement
|
|
213
|
-
→ execute-selected-pr
|
|
214
|
-
→ review-implementation
|
|
215
|
-
→ validate-work
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
For multi-step work, use [`.codex/prompts/orchestrate-next.md`](.codex/prompts/orchestrate-next.md) and [`harness/workflows/multi-agent-handoff.md`](harness/workflows/multi-agent-handoff.md) to progress gates manually.
|
|
219
|
-
|
|
220
|
-
## OpenCode vs Codex differences
|
|
221
|
-
|
|
222
|
-
| Area | OpenCode | Codex |
|
|
223
|
-
| --- | --- | --- |
|
|
224
|
-
| Best fit in this repo | Primary integrated experience | Fully supported explicit workflow |
|
|
225
|
-
| Configuration | `opencode.jsonc` | `AGENTS.md` and prompt files |
|
|
226
|
-
| Commands | OpenCode command registry | Prompt entrypoints |
|
|
227
|
-
| Agent routing | More automated | More manual |
|
|
228
|
-
| Handoffs | Orchestrator can route steps | User/Codex follows gates explicitly |
|
|
229
|
-
| Local-first safety | Enforced by commands and agents | Enforced by `AGENTS.md` and prompts |
|
|
230
|
-
| Agent files | `opencode/agents/` (auto-spawn, auto-routing) | `.codex/prompts/` only (manual paste or explicit invocation); OpenCode agent files are not Codex subagents |
|
|
231
|
-
|
|
232
|
-
## Use autopilot safely
|
|
233
|
-
|
|
234
|
-
Autopilot is a local-first workflow entrypoint, not permission to bypass review or validation.
|
|
235
|
-
|
|
236
|
-
Use autopilot when you want the tool to apply the existing workflow contract:
|
|
237
|
-
|
|
238
|
-
1. parse the objective;
|
|
239
|
-
2. define the smallest safe scope;
|
|
240
|
-
3. choose the lightest valid route;
|
|
241
|
-
4. route to existing agents, prompts, skills, and workflow contracts only;
|
|
242
|
-
5. check branch safety before writing;
|
|
243
|
-
6. validate proportionally to risk;
|
|
244
|
-
7. stop as `Blocked` when required context, safe scope, or validation is missing;
|
|
245
|
-
8. ask before push, publish, remote repository creation, merge PR, release, or deploy actions.
|
|
246
|
-
|
|
247
|
-
Autopilot must not create new architecture, agents, or skills during execution.
|
|
248
|
-
|
|
249
|
-
Files:
|
|
250
|
-
|
|
251
|
-
- [`opencode/commands/autopilot.md`](opencode/commands/autopilot.md)
|
|
252
|
-
- [`.codex/prompts/autopilot.md`](.codex/prompts/autopilot.md)
|
|
253
|
-
- [`opencode/agents/orchestrator.md`](opencode/agents/orchestrator.md)
|
|
254
|
-
|
|
255
|
-
## First validation
|
|
256
|
-
|
|
257
|
-
When developing this repository, install dependencies and run validation:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
npm install
|
|
261
|
-
npm run validate
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Expected result:
|
|
265
|
-
|
|
266
|
-
```txt
|
|
267
|
-
Validation passed: 10 check(s) completed.
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
If validation fails, inspect the failing command output before continuing.
|
|
271
|
-
|
|
272
|
-
## Applying this to another project
|
|
273
|
-
|
|
274
|
-
Use the adoption runbook:
|
|
275
|
-
|
|
276
|
-
```txt
|
|
277
|
-
runbooks/apply-starter-to-real-project.md
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
Use the standalone CLI for most target projects:
|
|
281
|
-
|
|
282
|
-
```bash
|
|
283
|
-
npx @williambeto/ai-workflow init --yes
|
|
284
|
-
npx @williambeto/ai-workflow doctor
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
AI Workflow Kit uses `.ai-workflow/` as managed workflow source with symlinked project paths by default. Use the standalone CLI (`npx @williambeto/ai-workflow init`) for new and existing projects.
|
|
288
|
-
|
|
289
|
-
## Troubleshooting
|
|
290
|
-
|
|
291
|
-
| Problem | Check |
|
|
292
|
-
| --- | --- |
|
|
293
|
-
| Command not found | Confirm the CLI is installed and available in `PATH`. |
|
|
294
|
-
| OpenCode has no provider | Run `/connect` and configure a provider/API key. |
|
|
295
|
-
| Codex cannot authenticate | Confirm ChatGPT sign-in or API key setup. |
|
|
296
|
-
| Validation fails | Run the failing `npm run validate:*` command directly and inspect output. |
|
|
297
|
-
| Agent ignores project rules | Confirm `AGENTS.md` exists and the selected command/prompt references it. |
|
|
298
|
-
| Changes are too broad | Stop, restate scope, and use requirement/spec/plan before implementation. |
|
|
299
|
-
|
|
300
|
-
## Source links
|
|
301
|
-
|
|
302
|
-
Tool installation changes over time. Confirm current official installation details when needed:
|
|
303
|
-
|
|
304
|
-
- Codex: <https://github.com/openai/codex>
|
|
305
|
-
- OpenCode: <https://opencode.ai/docs>
|
|
306
|
-
|
|
307
|
-
## Final guidance
|
|
308
|
-
|
|
309
|
-
Start with OpenCode if you want the most integrated AI Workflow Kit experience.
|
|
310
|
-
|
|
311
|
-
Start with Codex if you prefer OpenAI's CLI and explicit prompt-driven control.
|
|
312
|
-
|
|
313
|
-
In both cases, keep the same delivery discipline: scope first, small PRs, validation evidence, and no-regression rules.
|
package/harness/README.md
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# Execution Harness
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
The harness turns the repository's prompts, templates, runbooks, and skills into repeatable execution workflows.
|
|
6
|
-
|
|
7
|
-
It is not a framework, build system, or task runner. It is a small operating layer for moving work between planning, implementation, review, and validation with clear handoffs.
|
|
8
|
-
|
|
9
|
-
`schemas/` provides lightweight contracts that future harness tooling can use to check structured outputs. `examples/` shows what completed workflow artifacts look like in a concrete project context.
|
|
10
|
-
|
|
11
|
-
## When To Use
|
|
12
|
-
|
|
13
|
-
Use the harness when a request needs more structure than a single prompt:
|
|
14
|
-
|
|
15
|
-
- turning a user idea into a scoped PR;
|
|
16
|
-
- handing planned work to an implementer;
|
|
17
|
-
- reviewing an implementation before merge;
|
|
18
|
-
- validating Markdown, commands, scope, and acceptance criteria.
|
|
19
|
-
|
|
20
|
-
For small typo fixes or narrow Markdown cleanup, use a proportional workflow and validate the changed file directly.
|
|
21
|
-
|
|
22
|
-
## Workflows
|
|
23
|
-
|
|
24
|
-
Current workflows:
|
|
25
|
-
|
|
26
|
-
- `harness/workflows/requirement-to-pr.md` — turns a user request into a requirement, specification, technical plan, PR breakdown, and implementer handoff.
|
|
27
|
-
- `harness/workflows/implement-review-validate.md` — implements one selected PR, reviews it, fixes issues, validates it, and prepares a commit recommendation.
|
|
28
|
-
- `harness/workflows/multi-agent-handoff.md` — enforces deterministic gate-based transitions between planner, implementer, reviewer, validator, and release-manager.
|
|
29
|
-
|
|
30
|
-
## Handoff Contract
|
|
31
|
-
|
|
32
|
-
Use `harness/handoffs/HANDOFF.template.md` when one agent transfers work to another.
|
|
33
|
-
|
|
34
|
-
A handoff must define:
|
|
35
|
-
|
|
36
|
-
- the objective;
|
|
37
|
-
- context and decisions already made;
|
|
38
|
-
- files in and out of scope;
|
|
39
|
-
- constraints;
|
|
40
|
-
- required validation;
|
|
41
|
-
- known risks;
|
|
42
|
-
- stop conditions;
|
|
43
|
-
- expected output.
|
|
44
|
-
|
|
45
|
-
The receiving agent should stop if the handoff is missing required context or asks for work outside the approved scope.
|
|
46
|
-
|
|
47
|
-
## Validation Mindset
|
|
48
|
-
|
|
49
|
-
Validation is evidence-based.
|
|
50
|
-
|
|
51
|
-
Every workflow should identify:
|
|
52
|
-
|
|
53
|
-
- what was checked;
|
|
54
|
-
- which command or manual review was used;
|
|
55
|
-
- what passed;
|
|
56
|
-
- what failed;
|
|
57
|
-
- what was not checked and why.
|
|
58
|
-
|
|
59
|
-
Do not claim validation passed without command output, file evidence, or a clear manual check result.
|
|
60
|
-
|
|
61
|
-
## Workflow State Tracker
|
|
62
|
-
|
|
63
|
-
The optional `.workflow-state.json` file tracks the current project workflow phase and PR progress. It is used by `npm run validate:workflow` to check phase ordering and detect skipped steps.
|
|
64
|
-
|
|
65
|
-
### Phase order
|
|
66
|
-
|
|
67
|
-
```txt
|
|
68
|
-
bootstrap → requirement → specification → technicalPlan → prBreakdown
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Phase rules
|
|
72
|
-
|
|
73
|
-
- Each phase must reach `done` before the next phase can begin.
|
|
74
|
-
- A phase can be marked `skipped` if explicitly decided.
|
|
75
|
-
- The `current` block tracks which phase is active and which PR number is being worked on.
|
|
76
|
-
- The `completed.prs` array records merged PRs with number, title, and merge date.
|
|
77
|
-
|
|
78
|
-
### Valid status values
|
|
79
|
-
|
|
80
|
-
- `pending` — phase not started
|
|
81
|
-
- `done` — phase completed
|
|
82
|
-
- `skipped` — phase explicitly skipped
|
|
83
|
-
|
|
84
|
-
### Example usage
|
|
85
|
-
|
|
86
|
-
Before running `prompts/05-implement-pr.md`, verify:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
npm run validate:workflow
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
This checks that the prerequisite phases exist and are marked `done`.
|
|
93
|
-
|
|
94
|
-
### Optional
|
|
95
|
-
|
|
96
|
-
This tracker is optional. The repository validates without it. It becomes useful when a project needs explicit workflow state tracking or automated phase-gate enforcement.
|
|
97
|
-
|
|
98
|
-
## Related Repository Areas
|
|
99
|
-
|
|
100
|
-
- `prompts/` provides ordered task instructions.
|
|
101
|
-
- `templates/` provides reusable document structures.
|
|
102
|
-
- `runbooks/` provides operational procedures.
|
|
103
|
-
- `.agents/skills/` provides specialist behavior for Codex-style agents.
|
|
104
|
-
|
|
105
|
-
- `schemas/` provides lightweight contracts for structured outputs and handoffs.
|
|
106
|
-
- `examples/` provides concrete workflow demonstrations for real project contexts.
|
package/opencode/README.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# OpenCode Assets
|
|
2
|
-
|
|
3
|
-
`opencode/` contains Markdown prompt assets for adapting this repository's workflow to OpenCode-based usage.
|
|
4
|
-
|
|
5
|
-
These files are portable workflow assets. They are not a guarantee that every OpenCode installation will register every file automatically. Adapt file names, registration, and invocation style to the target OpenCode setup.
|
|
6
|
-
|
|
7
|
-
## Configuration
|
|
8
|
-
|
|
9
|
-
`opencode.jsonc` registers project agents, commands, and skill discovery paths using the current OpenCode config schema at `https://opencode.ai/config.json`.
|
|
10
|
-
|
|
11
|
-
There are two common config sources:
|
|
12
|
-
|
|
13
|
-
| Source | Use when | Notes |
|
|
14
|
-
| --- | --- | --- |
|
|
15
|
-
| Generated project `opencode.jsonc` | Most projects installed with `npx @williambeto/ai-workflow init`. | The CLI creates or merges managed sections while preserving existing project config. |
|
|
16
|
-
| Repository `opencode.jsonc` | Maintaining this kit. | Treat it as a reference config for workflow command/agent behavior. |
|
|
17
|
-
|
|
18
|
-
Before using `opencode.jsonc` in a production environment:
|
|
19
|
-
|
|
20
|
-
- verify the configuration against the target OpenCode version;
|
|
21
|
-
- keep the top-level keys aligned with the OpenCode schema, especially `agent`, `command`, and `skills`;
|
|
22
|
-
- note that the config uses JSONC (JSON with `//` comments) and requires a JSONC-aware parser.
|
|
23
|
-
|
|
24
|
-
If the OpenCode config format changes, update `opencode.jsonc` to match. The agent and command files in `opencode/agents/` and `opencode/commands/` remain the primary source of truth for agent behavior.
|
|
25
|
-
|
|
26
|
-
## Adoption model
|
|
27
|
-
|
|
28
|
-
Use the standalone CLI.
|
|
29
|
-
|
|
30
|
-
Generated workflow assets are installed under `.ai-workflow/` and linked into expected project paths (for example `.codex/`, `.agents/`, and `opencode/`).
|
|
31
|
-
|
|
32
|
-
Do not manually edit files inside `.ai-workflow/`; treat it as managed workflow source.
|
|
33
|
-
|
|
34
|
-
## Model
|
|
35
|
-
|
|
36
|
-
Use this distinction consistently:
|
|
37
|
-
|
|
38
|
-
| Type | Meaning | Location |
|
|
39
|
-
| ---- | ------- | -------- |
|
|
40
|
-
| Agent | Operational role in a workflow, such as discovery, planning, implementation, review, validation, or release. | `opencode/agents/` |
|
|
41
|
-
| Command | Compact entrypoint for a recurring action. | `opencode/commands/` |
|
|
42
|
-
| Skill | Reusable technical capability that can guide Codex or agent behavior. | `.agents/skills/` |
|
|
43
|
-
|
|
44
|
-
Do not confuse the generic skills in `.agents/skills/` with OpenCode agents. Skills such as `frontend-implementer`, `tester`, or `docs-writer` are capabilities. OpenCode agents are role prompts that decide how work should move through a real workflow.
|
|
45
|
-
|
|
46
|
-
## Folders
|
|
47
|
-
|
|
48
|
-
- `opencode/agents/` defines practical role prompts for Atlas-led triage, discovery, estimation, planning, implementation, fixing, review, validation, release, and selected specialist domains.
|
|
49
|
-
- `opencode/commands/` defines short command prompts for repeated planning, execution, review, and validation actions.
|
|
50
|
-
- `opencode/commands/start.md` is the recommended startup router: default to `orchestrator`, fallback to `discovery` for vague scope, fallback to `prompt-engineer` for prompt/skill-centric requests, and fallback to `planner` for planning-only requests.
|
|
51
|
-
|
|
52
|
-
Commands can route work into agents, and agents can reference skills when a reusable capability is relevant.
|
|
53
|
-
|
|
54
|
-
## Napkin project memory
|
|
55
|
-
|
|
56
|
-
OpenCode workflows should treat Napkin as always discoverable but contextually applied:
|
|
57
|
-
|
|
58
|
-
- check `.agents/napkin.md` at relevant task start;
|
|
59
|
-
- use `.agents/skills/napkin/SKILL.md` for read/update/cleanup rules;
|
|
60
|
-
- keep memory concise and durable;
|
|
61
|
-
- do not store secrets or sensitive data;
|
|
62
|
-
- do not use Napkin as a task-log dump.
|
|
63
|
-
|
|
64
|
-
## First-run verification checklist
|
|
65
|
-
|
|
66
|
-
Before team adoption, run this quick smoke test in the target repository:
|
|
67
|
-
|
|
68
|
-
1. Confirm `opencode.jsonc` is detected by your OpenCode installation.
|
|
69
|
-
2. Confirm agents referenced in `opencode.jsonc` load without file-path errors.
|
|
70
|
-
3. Confirm commands resolve their templates:
|
|
71
|
-
- `start`
|
|
72
|
-
- `plan`
|
|
73
|
-
- `execute`
|
|
74
|
-
- `review`
|
|
75
|
-
- `validate`
|
|
76
|
-
4. Run one small end-to-end cycle (`plan -> execute -> review -> validate`) and record evidence.
|
|
77
|
-
|
|
78
|
-
Expected outcome:
|
|
79
|
-
|
|
80
|
-
- command routing works without manual path rewrites;
|
|
81
|
-
- agent prompts load from `opencode/agents/` successfully;
|
|
82
|
-
- validation evidence is produced for the selected test task.
|
|
83
|
-
|
|
84
|
-
If any command cannot load, verify relative paths in `opencode.jsonc` and your OpenCode command registration mechanism before continuing.
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# OpenCode Agents
|
|
2
|
-
|
|
3
|
-
OpenCode agents in this repository are operational role prompts for real project workflows.
|
|
4
|
-
|
|
5
|
-
Use this model:
|
|
6
|
-
|
|
7
|
-
| Type | Definition |
|
|
8
|
-
| ---- | ---------- |
|
|
9
|
-
| Agent | Operational role in the workflow. |
|
|
10
|
-
| Skill | Technical capability reused by agents or Codex. |
|
|
11
|
-
| Command | Short trigger or entrypoint for a recurring action. |
|
|
12
|
-
|
|
13
|
-
Do not treat generic skills as OpenCode agents. A skill explains how to perform a capability. An agent owns a workflow role, input expectations, stop conditions, and handoff output.
|
|
14
|
-
|
|
15
|
-
## Recommended Workflows
|
|
16
|
-
|
|
17
|
-
Client/request discovery:
|
|
18
|
-
|
|
19
|
-
```txt
|
|
20
|
-
discovery → spec-engineer → planner
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Lightweight spec-first delivery:
|
|
24
|
-
|
|
25
|
-
```txt
|
|
26
|
-
request → spec-engineer → implementer
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Feature delivery:
|
|
30
|
-
|
|
31
|
-
```txt
|
|
32
|
-
atlas → planner → orchestrator → implementer → reviewer → validator → release-manager
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Bug fix:
|
|
36
|
-
|
|
37
|
-
```txt
|
|
38
|
-
fixer → reviewer → validator → release-manager
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Frontend architecture:
|
|
42
|
-
|
|
43
|
-
```txt
|
|
44
|
-
planner → implementer → reviewer → validator
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
WordPress project:
|
|
48
|
-
|
|
49
|
-
```txt
|
|
50
|
-
discovery → wordpress-engineer → reviewer → validator → release-manager
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Prompt/system improvement:
|
|
54
|
-
|
|
55
|
-
```txt
|
|
56
|
-
prompt-engineer → reviewer → validator → release-manager
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Orchestrated delivery (automatic routing gates):
|
|
60
|
-
|
|
61
|
-
```txt
|
|
62
|
-
orchestrator (gate A/B/C/D) -> next agent by pass/block result
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Discovery routing guard:
|
|
66
|
-
|
|
67
|
-
- `discovery` is clarification-only.
|
|
68
|
-
- If execution, file edits, validation execution, release actions, or specialist delegation is requested during discovery, the correct behavior is `Blocked` + handoff to `orchestrator`.
|
|
69
|
-
|
|
70
|
-
Delegation policy baseline:
|
|
71
|
-
|
|
72
|
-
- route ownership by dominant task type using `AGENTS.md` delegation matrix;
|
|
73
|
-
- send handoffs with explicit contract fields (task summary, files, constraints, expected output, validation, risk, do-not-change list, evidence);
|
|
74
|
-
- require specialist outputs with summary, files changed/inspected, risks, validation commands, open questions, and recommendation;
|
|
75
|
-
- avoid overdelegation (no trivial one-file delegation, max 2 delegated agents unless cross-functional).
|
|
76
|
-
|
|
77
|
-
## Skill auto-load baseline
|
|
78
|
-
|
|
79
|
-
When routing to an agent, use this baseline skill auto-load map:
|
|
80
|
-
|
|
81
|
-
```txt
|
|
82
|
-
planner -> product-manager + tech-lead + pr-orchestrator
|
|
83
|
-
implementer -> pr-orchestrator + tester + (frontend-implementer or backend-implementer)
|
|
84
|
-
reviewer -> tester + pr-orchestrator
|
|
85
|
-
validator -> build-and-validate + tester
|
|
86
|
-
release-manager -> deploy-engineer
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Contextual additions:
|
|
90
|
-
|
|
91
|
-
- add `napkin` when recurring operational decisions should be preserved for future sessions;
|
|
92
|
-
- add `interface-design` only for interface-focused tasks.
|
|
93
|
-
|
|
94
|
-
When `napkin` is used, read `.agents/napkin.md` at relevant task start and apply progressive disclosure (only relevant entries).
|
|
95
|
-
|
|
96
|
-
Do not use Napkin as a temporary task log, and never store secrets.
|
|
97
|
-
|
|
98
|
-
## Agent Index
|
|
99
|
-
|
|
100
|
-
| Agent | Purpose | Use when | Should not do |
|
|
101
|
-
| ----- | ------- | -------- | ------------- |
|
|
102
|
-
| `atlas` | Act as the primary senior engineering partner and workflow orchestrator. | Users need default triage, critical planning, safe implementation guidance, review, validation, or delegation to existing workflow agents. | Replace specialists blindly, skip evidence, over-engineer, or bypass branch/confirmation gates. |
|
|
103
|
-
| `discovery` | Turn vague requests into a discovery brief. | Scope, risks, dependencies, and unknowns are unclear. | Estimate price, implement, edit files, perform execution/delegation routing directly (must return `Blocked` and route to `orchestrator`). |
|
|
104
|
-
| `spec-engineer` | Turn vague/risky requests into lightweight change artifacts for implementation handoff. | Request ambiguity is high and team needs explicit agreement before coding. | Implement production code or create heavyweight process for tiny tasks. |
|
|
105
|
-
| `planner` | Turn approved scope into requirements, specs, technical plans, and PR breakdowns. | Scope is approved and implementation needs a handoff. | Implement. |
|
|
106
|
-
| `implementer` | Implement one selected PR. | A PR plan or handoff exists. | Expand scope or do opportunistic refactors. |
|
|
107
|
-
| `fixer` | Diagnose and fix bugs, regressions, failures, and warnings. | There is broken behavior or failed validation. | Rewrite large areas without evidence. |
|
|
108
|
-
| `reviewer` | Critically review the current diff before merge. | A PR or implementation needs risk review. | Nitpick without impact or approve without evidence. |
|
|
109
|
-
| `validator` | Run objective repository or PR validation. | Work needs command-based evidence. | Modify files unless explicitly requested. |
|
|
110
|
-
| `release-manager` | Close the Git and PR cycle safely. | Work is validated and ready for commit, PR, merge, or cleanup. | Merge with a dirty worktree or skip validation. |
|
|
111
|
-
| `wordpress-engineer` | Guide WordPress, WooCommerce, ACF, PHP 7, hooks, shortcodes, templates, and security work. | WordPress implementation or review needs platform-specific judgment. | Use PHP 8-only syntax unless allowed or bypass WordPress APIs. |
|
|
112
|
-
| `prompt-engineer` | Improve prompts, commands, handoffs, agents, skills, and token-efficient workflows. | Workflow instructions need sharper routing, shorter context, or clearer outputs. | Duplicate large context or remove operational constraints. |
|
|
113
|
-
| `orchestrator` | Run low-touch end-to-end workflow and route work across agents using gate checks. | The user wants minimal interaction with required checkpoints and deterministic multi-step handoff control. | Skip confirmations, bypass blocked gates, implement feature changes directly, or skip gate evidence. |
|