@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
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# ADR-0006: Evidence-First Validation
|
|
2
|
+
|
|
3
|
+
- **Status**: Accepted
|
|
4
|
+
- **Date**: YYYY-MM-DD
|
|
5
|
+
- **Author**: José Willams
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
In autonomous AI workflows, agents frequently claim success ("the task is complete", "everything works") without verifiable proof. Without physical evidence of execution, these claims cannot be audited or validated. This creates risk when merging code or deploying changes.
|
|
10
|
+
|
|
11
|
+
The project needed a mechanism to:
|
|
12
|
+
- Require executable evidence for all validation claims
|
|
13
|
+
- Collect and persist evidence in a structured, machine-readable format
|
|
14
|
+
- Enforce that no success claim is valid without corresponding evidence
|
|
15
|
+
|
|
16
|
+
## Decision
|
|
17
|
+
|
|
18
|
+
Adopt **Evidence-First Validation**: every validation claim must be backed by executable evidence recorded in `EVIDENCE.json`.
|
|
19
|
+
|
|
20
|
+
### Components
|
|
21
|
+
|
|
22
|
+
1. **EvidenceCollector** (`src/core/validation/evidence-collector.js`):
|
|
23
|
+
- Auto-detects validation scripts from `package.json` (lint, test, validate)
|
|
24
|
+
- Runs each task and captures output, exit codes, and duration
|
|
25
|
+
- Generates structured `EVIDENCE.json` at project root
|
|
26
|
+
- Injects documentation-specific validation tasks when a docs-only task is detected
|
|
27
|
+
|
|
28
|
+
2. **QualityGuard** (`src/core/validation/quality-guard.js`):
|
|
29
|
+
- Verifies policy compliance after evidence collection
|
|
30
|
+
- Checks UI evidence (screenshots) for UI tasks
|
|
31
|
+
- Checks self-review dimensions (security, performance, accessibility, etc.)
|
|
32
|
+
- Checks documentation consistency for docs tasks
|
|
33
|
+
|
|
34
|
+
3. **Evidence Format**:
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"overallStatus": "PASS" | "FAIL",
|
|
38
|
+
"tasks": [
|
|
39
|
+
{
|
|
40
|
+
"name": "lint",
|
|
41
|
+
"status": "PASS" | "FAIL",
|
|
42
|
+
"output": "...",
|
|
43
|
+
"exitCode": 0
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"policyValidation": {
|
|
47
|
+
"overallStatus": "PASS" | "FAIL",
|
|
48
|
+
"checks": { ... }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Enforcement
|
|
54
|
+
|
|
55
|
+
- `runMasterOrchestrator` runs evidence collection as Phase 2 (Validation & Self-Healing).
|
|
56
|
+
- `runCollectEvidence()` persists results to `EVIDENCE.json`.
|
|
57
|
+
- QualityGuard enforces policies after evidence is collected.
|
|
58
|
+
- `AGENTS.md` hard constraint: "**Evidence-First**: No success claim is valid without executable evidence."
|
|
59
|
+
|
|
60
|
+
## Consequences
|
|
61
|
+
|
|
62
|
+
**Positive**:
|
|
63
|
+
- All validation claims are backed by physical evidence.
|
|
64
|
+
- Evidence is machine-readable and can be audited programmatically.
|
|
65
|
+
- Quality policy violations are caught and reported with specific missing items.
|
|
66
|
+
- Evidence persists across sessions for later review.
|
|
67
|
+
|
|
68
|
+
**Negative**:
|
|
69
|
+
- Evidence collection adds time to the pipeline.
|
|
70
|
+
- Some evidence (e.g., UI screenshots) requires manual creation.
|
|
71
|
+
- Large evidence files may bloat the repository if not managed.
|
|
72
|
+
|
|
73
|
+
## Compliance
|
|
74
|
+
|
|
75
|
+
- `src/commands/collect-evidence.js` orchestrates evidence collection.
|
|
76
|
+
- `src/core/validation/evidence-collector.js` runs tasks and captures output.
|
|
77
|
+
- `src/core/validation/quality-guard.js` enforces policy checks.
|
|
78
|
+
- `EVIDENCE.json` is generated at project root and excluded from git via `.gitignore`.
|
|
79
|
+
|
|
80
|
+
## Notes
|
|
81
|
+
|
|
82
|
+
The evidence collector auto-detects standard npm scripts but can also run custom tasks. Documentation-specific validation tasks are injected when `isDocsTask()` returns true, ensuring that documentation changes are validated with appropriate checks (link validation, consistency).
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# ADR-0007: Unified Private Monorepo Structure
|
|
2
|
+
|
|
3
|
+
- **Status**: Accepted
|
|
4
|
+
- **Date**: YYYY-MM-DD
|
|
5
|
+
- **Author**: José Willams
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
The `@williambeto/ai-workflow` package started as a standalone tool but grew to include multiple concerns: core engine logic, CLI commands, platform adapters, documentation, specifications, validation scripts, and template files. Files were scattered across the repository without clear boundaries between:
|
|
10
|
+
|
|
11
|
+
- Public API (`src/`) vs. internal tooling (`internal/`)
|
|
12
|
+
- Specifications (`specs/`) vs. documentation (`assets/docs/`)
|
|
13
|
+
- Package source (`packages/ai-workflow/`) vs. root configuration
|
|
14
|
+
|
|
15
|
+
A unified structure was needed to clarify ownership, simplify imports, and provide clear separation between the distributed package and internal utilities.
|
|
16
|
+
|
|
17
|
+
## Decision
|
|
18
|
+
|
|
19
|
+
Adopt a **Unified Private Monorepo Structure** with the following top-level layout:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
core/ # Package root (published as @williambeto/ai-workflow)
|
|
23
|
+
├── src/ # Public API source code
|
|
24
|
+
│ ├── adapters/ # Platform adapters (Gemini, Claude, Codex)
|
|
25
|
+
│ ├── commands/ # CLI command implementations
|
|
26
|
+
│ ├── cli.js # CLI entry point
|
|
27
|
+
│ └── core/ # Core engine modules
|
|
28
|
+
│ ├── gates/ # BranchGate
|
|
29
|
+
│ ├── healing/ # HealerEngine
|
|
30
|
+
│ ├── sdd/ # SpecValidator
|
|
31
|
+
│ ├── handoff/ # HandoffEngine
|
|
32
|
+
│ └── validation/ # EvidenceCollector, QualityGuard
|
|
33
|
+
├── assets/docs/ # Published documentation
|
|
34
|
+
├── bin/ # CLI binary
|
|
35
|
+
├── internal/ # Internal tooling (not published)
|
|
36
|
+
│ ├── validate/ # Validation pipeline scripts
|
|
37
|
+
│ └── docs/ # Documentation generators
|
|
38
|
+
├── specs/ # Project specifications
|
|
39
|
+
├── packages/ # Workspace packages
|
|
40
|
+
│ └── ai-workflow/ # (symlink or workspace)
|
|
41
|
+
├── checklists/ # Readiness checklists
|
|
42
|
+
├── tests/ # E2E tests
|
|
43
|
+
├── .opencode/ # OpenCode agent/skill definitions
|
|
44
|
+
├── openspec/ # OpenSpec change definitions
|
|
45
|
+
└── .ai-workflow/ # Managed workflow state (gitignored)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Key Principles
|
|
49
|
+
|
|
50
|
+
1. **Separation of public and internal**: `src/` is the public API; `internal/` is unpublished tooling.
|
|
51
|
+
2. **Specifications are specifications**: `specs/` contains requirement and architecture documents. `assets/docs/` contains user-facing documentation.
|
|
52
|
+
3. **Publisher control**: `package.json` `files` field explicitly lists what gets published.
|
|
53
|
+
4. **Managed workspace**: `.ai-workflow/` is gitignored and regenerated via `ai-workflow init`.
|
|
54
|
+
5. **Unified identity**: The package lives in `core/` and is published as `@williambeto/ai-workflow`.
|
|
55
|
+
|
|
56
|
+
## Consequences
|
|
57
|
+
|
|
58
|
+
**Positive**:
|
|
59
|
+
- Clear separation between public API and internal utilities.
|
|
60
|
+
- Published package is minimal (`bin`, `src`, `assets`, `opencode.jsonc`).
|
|
61
|
+
- Specs are co-located with source, enabling Spec-Driven Development.
|
|
62
|
+
- Monorepo structure supports future workspace expansion.
|
|
63
|
+
|
|
64
|
+
**Negative**:
|
|
65
|
+
- Some path references must account for `core/` prefix.
|
|
66
|
+
- Migration from flat structure required renaming and refactoring.
|
|
67
|
+
- Contributors must understand the public/internal boundary.
|
|
68
|
+
|
|
69
|
+
## Compliance
|
|
70
|
+
|
|
71
|
+
- `package.json` `files` field defines the published scope.
|
|
72
|
+
- `internal/` scripts are not listed in `files` and are not published.
|
|
73
|
+
- `internal/validate/` scripts are invoked by `npm run validate:*` but not distributed to consumers.
|
|
74
|
+
- `specs/` is included in the repository but excluded from npm publish.
|
|
75
|
+
|
|
76
|
+
## Notes
|
|
77
|
+
|
|
78
|
+
The monorepo structure supports the unified package identity (`@williambeto/ai-workflow`). Future expansions (e.g., separate CLI package, web dashboard) would be added as additional workspace packages under `packages/`. The `internal/validate/validate-all.mjs` script references all 14 validation checks, ensuring the structure remains consistent.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# API Engine Reference
|
|
2
|
+
|
|
3
|
+
This package distributes runtime contracts for agents, commands, skills, policies, schemas, and templates.
|
|
4
|
+
|
|
5
|
+
## Runtime taxonomy
|
|
6
|
+
|
|
7
|
+
Primary Agents own workflow accountability. Skill-backed Specialist Roles provide domain support through skills. Commands are entrypoints. Skills standardize domain practice.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# CLI reference
|
|
2
|
+
|
|
3
|
+
## `ai-workflow init`
|
|
4
|
+
|
|
5
|
+
Installs the OpenCode-first workflow assets into a consumer project.
|
|
6
|
+
|
|
7
|
+
## `ai-workflow doctor`
|
|
8
|
+
|
|
9
|
+
Checks the local installation and generated configuration.
|
|
10
|
+
|
|
11
|
+
## `ai-workflow run --spec-path=<path>`
|
|
12
|
+
|
|
13
|
+
Runs formal orchestration for an approved specification. It enforces branch safety, observed validation, bounded remediation, and handoff generation.
|
|
14
|
+
|
|
15
|
+
## `ai-workflow collect-evidence [--task=<slug>] [--mode=<quick|standard|full>] [--dry-run]`
|
|
16
|
+
|
|
17
|
+
Runs relevant project validation scripts and objective quality checks.
|
|
18
|
+
|
|
19
|
+
- quick/standard: prints a concise delivery summary and does not require `EVIDENCE.json`;
|
|
20
|
+
- full: persists `EVIDENCE.json` unless `--dry-run` is used;
|
|
21
|
+
- failed or unavailable required validation returns `BLOCKED`.
|
|
22
|
+
|
|
23
|
+
## Public states
|
|
24
|
+
|
|
25
|
+
- `COMPLETED`
|
|
26
|
+
- `COMPLETED_WITH_NOTES`
|
|
27
|
+
- `BLOCKED`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Provider Usage
|
|
2
|
+
|
|
3
|
+
## OpenCode
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @williambeto/ai-workflow init --yes
|
|
7
|
+
npx @williambeto/ai-workflow doctor
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Use `opencode.jsonc` and the generated OpenCode assets as the primary workflow interface.
|
|
11
|
+
|
|
12
|
+
## Codex
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @williambeto/ai-workflow init --yes --codex
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Review generated `.github/agents/`, `.agents/skills/`, and `.codex/prompts/`. Preserve the repository's existing `AGENTS.md`; do not assume Codex reproduces OpenCode delegation semantics.
|
|
19
|
+
|
|
20
|
+
## Claude Code
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @williambeto/ai-workflow init --yes --claude
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Review `CLAUDE.md` and `.claude/rules/`. Existing user-authored instructions must not be overwritten without backup and explicit intent.
|
|
27
|
+
|
|
28
|
+
## Gemini CLI
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx @williambeto/ai-workflow init --yes --gemini
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Review `GEMINI.md` and `.gemini/`. Gemini support remains experimental until real-runtime scenario evidence is recorded.
|
|
35
|
+
|
|
36
|
+
## Multiple adapters
|
|
37
|
+
|
|
38
|
+
Flags may be combined, but each generated runtime increases maintenance surface. Generate only the integrations the consumer project actually uses.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Runtime Compatibility Matrix
|
|
2
|
+
|
|
3
|
+
## Compatibility levels
|
|
4
|
+
|
|
5
|
+
- **Primary:** native project target and most thoroughly exercised path.
|
|
6
|
+
- **Supported:** generated integration and package-level smoke coverage exist; runtime limitations are documented.
|
|
7
|
+
- **Supported with limitations:** assets are generated, but behavior is not equivalent to the primary runtime.
|
|
8
|
+
- **Experimental:** adapter exists, but real-runtime evidence is insufficient for a stronger claim.
|
|
9
|
+
|
|
10
|
+
| Runtime | Level | Generated integration | Current evidence | Known limitations |
|
|
11
|
+
| --- | --- | --- | --- | --- |
|
|
12
|
+
| OpenCode | Primary | `opencode.jsonc`, OpenCode agents, commands, and skills | init, doctor, package smoke, generated-file checks | Model may bypass canonical commands in direct conversation |
|
|
13
|
+
| Codex | Supported with limitations | `.github/agents/`, `.agents/skills/`, `.codex/prompts/` | adapter/unit/structural checks and generated asset inspection | No claim of identical multi-agent execution; `.codex/` output is optional and only generated with `--codex` |
|
|
14
|
+
| Claude Code | Supported with limitations | `CLAUDE.md`, `.claude/rules/` | adapter/unit/structural checks and generated asset inspection | Rule loading and tool permissions depend on Claude Code configuration |
|
|
15
|
+
| Gemini CLI | Experimental | `GEMINI.md`, `.gemini/agents/`, `.gemini/skills/`, `.gemini/commands/` | adapter/unit/structural checks and generated asset inspection | Native discovery and command behavior require real Gemini CLI validation before `Supported` |
|
|
16
|
+
|
|
17
|
+
## Claim policy
|
|
18
|
+
|
|
19
|
+
Compatibility levels must be based on evidence available in the release. Adapter code or generated files alone are not proof of full behavioral parity.
|
|
20
|
+
|
|
21
|
+
## Promotion requirements
|
|
22
|
+
|
|
23
|
+
A runtime may be promoted only after a clean consumer test records:
|
|
24
|
+
|
|
25
|
+
1. package installation;
|
|
26
|
+
2. `init` with the runtime flag;
|
|
27
|
+
3. expected generated assets;
|
|
28
|
+
4. runtime startup or configuration validation;
|
|
29
|
+
5. at least one quick workflow scenario;
|
|
30
|
+
6. known limitations and failures.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Consumer onboarding
|
|
2
|
+
|
|
3
|
+
Install and initialize the kit, then make a natural request to Atlas.
|
|
4
|
+
|
|
5
|
+
Atlas will:
|
|
6
|
+
|
|
7
|
+
1. inspect project context;
|
|
8
|
+
2. verify branch safety before writes;
|
|
9
|
+
3. select quick, standard, or full mode;
|
|
10
|
+
4. apply the closest domain profile;
|
|
11
|
+
5. delegate only when it improves quality;
|
|
12
|
+
6. run relevant validation;
|
|
13
|
+
7. return a concise delivery summary.
|
|
14
|
+
|
|
15
|
+
Quick and standard work do not require owner JSON, fixed workflow filenames, checklists, or `EVIDENCE.json`. Full, release, audit, security, and migration workflows may persist structured evidence.
|
|
16
|
+
|
|
17
|
+
A failed required command or unsafe protected-branch state always finishes `BLOCKED`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Contributing Guide
|
|
2
|
+
|
|
3
|
+
Contributions should preserve the AI Workflow Kit operating model: specify, plan, implement, document, test, validate, and provide evidence.
|
|
4
|
+
|
|
5
|
+
## Required evidence
|
|
6
|
+
|
|
7
|
+
- Scope and rationale.
|
|
8
|
+
- Files changed.
|
|
9
|
+
- Tests and validation commands.
|
|
10
|
+
- Documentation impact.
|
|
11
|
+
- Known risks.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Define when
|
|
5
|
+
Define when AI-assisted workflow agents may use formal design patterns.
|
|
6
6
|
|
|
7
7
|
Core decision:
|
|
8
8
|
|
|
@@ -113,7 +113,7 @@ For workflow kits, CLIs, validators, presets, templates, and npm-package-style c
|
|
|
113
113
|
|
|
114
114
|
- prefer Command for CLI actions/validation tasks;
|
|
115
115
|
- prefer Strategy for interchangeable execution modes;
|
|
116
|
-
- prefer Adapter for
|
|
116
|
+
- prefer Adapter for OpenCode/GitHub/filesystem/package-manager integrations;
|
|
117
117
|
- prefer Simple Factory for config-based creation;
|
|
118
118
|
- prefer Builder for generated documents/reports;
|
|
119
119
|
- prefer Facade for install/bootstrap/validate/audit/release workflows;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# AI Workflow Kit Full Documentation
|
|
2
|
+
|
|
3
|
+
AI Workflow Kit is an OpenCode-first workflow system for AI-assisted software delivery.
|
|
4
|
+
|
|
5
|
+
This document summarizes the current v2 runtime model. Historical roadmaps, backlog files, migration notes, and obsolete planning artifacts are intentionally not part of the active runtime context. Git history is the archive.
|
|
6
|
+
|
|
7
|
+
## Current runtime model
|
|
8
|
+
|
|
9
|
+
- Commands start operational workflows.
|
|
10
|
+
- Autopilot coordinates the safest next step.
|
|
11
|
+
- Agents execute domain-specific work.
|
|
12
|
+
- Skills standardize quality, patterns, and validation expectations.
|
|
13
|
+
- Project Memory preserves durable decisions.
|
|
14
|
+
- Validation proves the result.
|
|
15
|
+
|
|
16
|
+
## Standard delivery flow
|
|
17
|
+
|
|
18
|
+
1. Request
|
|
19
|
+
2. Discover
|
|
20
|
+
3. Spec draft
|
|
21
|
+
4. Spec review
|
|
22
|
+
5. Technical plan
|
|
23
|
+
6. PR breakdown
|
|
24
|
+
7. Implementation
|
|
25
|
+
8. Documentation
|
|
26
|
+
9. Automated tests when viable
|
|
27
|
+
10. Validation
|
|
28
|
+
11. Evidence report
|
|
29
|
+
12. Commit / push, only when explicitly requested
|
|
30
|
+
13. Merge, only when explicitly approved
|
|
31
|
+
14. Approved release, only when explicitly approved
|
|
32
|
+
|
|
33
|
+
## Non-negotiable runtime rules
|
|
34
|
+
|
|
35
|
+
- Routing is not completion.
|
|
36
|
+
- Branch Gate uses auto-recovery for safe write-capable work.
|
|
37
|
+
- Documentation is required by default for implementations.
|
|
38
|
+
- Automated tests are required when viable.
|
|
39
|
+
- Build validation does not replace automated tests.
|
|
40
|
+
- Missing viable tests must produce `FAIL_QUALITY_GATE`.
|
|
41
|
+
- Evidence reports must include branch recovery, docs, tests, validation, risks, and final status.
|
|
42
|
+
- Publish, deploy, tag, release, merge, and force-push require explicit approval.
|
|
43
|
+
|
|
44
|
+
## Active runtime references
|
|
45
|
+
|
|
46
|
+
In an initialized consumer, use:
|
|
47
|
+
|
|
48
|
+
- `.ai-workflow/AGENTS.md`
|
|
49
|
+
- `.ai-workflow/opencode/agents/*.md`
|
|
50
|
+
- `.ai-workflow/opencode/commands/*.md`
|
|
51
|
+
- `.ai-workflow/opencode/skills/*/SKILL.md`
|
|
52
|
+
- `.ai-workflow/docs/policies/*.md`
|
|
53
|
+
- `.ai-workflow/QUICKSTART.md`
|
|
54
|
+
|
|
55
|
+
Repository maintainers edit the packaged sources under `dist-assets/**`.
|
|
56
|
+
|
|
57
|
+
## Validation
|
|
58
|
+
|
|
59
|
+
Run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run validate
|
|
63
|
+
npm pack
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
For consumer smoke:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx ai-workflow --help
|
|
70
|
+
npx ai-workflow init --yes
|
|
71
|
+
npx @williambeto/ai-workflow doctor
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Active commands
|
|
75
|
+
|
|
76
|
+
- atlas
|
|
77
|
+
- run
|
|
78
|
+
- discover
|
|
79
|
+
- spec-create
|
|
80
|
+
- spec-review
|
|
81
|
+
- spec-implement
|
|
82
|
+
- plan
|
|
83
|
+
- implement
|
|
84
|
+
- validate
|
|
85
|
+
- audit
|
|
86
|
+
- optimize-tokens
|
|
87
|
+
- update-memory
|
|
88
|
+
- release
|
|
89
|
+
- deploy
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Examples and runbooks
|
|
93
|
+
|
|
94
|
+
Examples maturity: Complete (15 examples in catalog).
|
|
95
|
+
|
|
96
|
+
Current v2 runbooks:
|
|
97
|
+
|
|
98
|
+
- `runbooks/agent-delegation-workflow.md`
|
|
99
|
+
- `runbooks/apply-starter-to-real-project.md`
|
|
100
|
+
- `runbooks/branch-cleanup.md`
|
|
101
|
+
- `runbooks/commands-cheatsheet.md`
|
|
102
|
+
- `runbooks/deploy-checklist.md`
|
|
103
|
+
- `runbooks/how-to-use-skills.md`
|
|
104
|
+
- `runbooks/private-spec-publication-safety.md`
|
|
105
|
+
- `runbooks/publication-readiness-checklist.md`
|
|
106
|
+
- `runbooks/publish-package-checklist.md`
|
|
107
|
+
- `runbooks/spec-driven-development.md`
|
|
108
|
+
- `runbooks/team-governance-pr-readiness.md`
|
|
109
|
+
- `runbooks/tutorial-walkthroughs.md`
|
|
110
|
+
- `runbooks/use-linear-for-operational-planning.md`
|
|
111
|
+
- `runbooks/use-napkin-project-memory.md`
|
|
112
|
+
- `runbooks/validate-starter-in-real-project.md`
|
|
113
|
+
- `runbooks/validation-checklist.md`
|
|
@@ -45,11 +45,10 @@ npx @williambeto/ai-workflow doctor
|
|
|
45
45
|
The `init` command creates:
|
|
46
46
|
|
|
47
47
|
- `README.workflow.md` — project-local workflow instructions;
|
|
48
|
-
- `.ai-workflow.json` — install
|
|
49
|
-
- managed `opencode.jsonc` sections
|
|
50
|
-
- `.codex/prompts/README.md` — Codex prompt entrypoint reference;
|
|
48
|
+
- `.ai-workflow.json` — install metadata;
|
|
49
|
+
- managed `opencode.jsonc` sections;
|
|
51
50
|
- `opencode/README.md` — OpenCode command reference;
|
|
52
|
-
- starter agent and skill files
|
|
51
|
+
- starter agent and skill files.
|
|
53
52
|
|
|
54
53
|
Use `--dry-run` to preview changes before writing:
|
|
55
54
|
|
|
@@ -59,7 +58,7 @@ npx @williambeto/ai-workflow init --dry-run
|
|
|
59
58
|
|
|
60
59
|
## How workflow assets work
|
|
61
60
|
|
|
62
|
-
The `init` command installs workflow assets into `.ai-workflow/` and creates symlinks in expected project paths (`.
|
|
61
|
+
The `init` command installs workflow assets into `.ai-workflow/` and creates symlinks in expected project paths (`.agents/`, `opencode/`, `prompts/`, and others). These linked assets become the source of truth for workflow behavior:
|
|
63
62
|
|
|
64
63
|
- `README.workflow.md` is symlinked from `.ai-workflow/README.workflow.md` and is the first file an agent should read.
|
|
65
64
|
- Workflow-managed assets should be edited in `.ai-workflow/` when customization is intentional.
|
|
@@ -81,42 +80,16 @@ Then use these commands from the OpenCode TUI:
|
|
|
81
80
|
|
|
82
81
|
| Command | Purpose |
|
|
83
82
|
| --- | --- |
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
83
|
+
| `Atlas` | Default routing entrypoint |
|
|
84
|
+
| `discover` | Project context gathering |
|
|
85
|
+
| `spec-create` | Specification creation |
|
|
86
|
+
| `spec-review` | Specification review |
|
|
87
|
+
| `plan` | Create a plan from a requirement |
|
|
88
|
+
| `implement` | Implement one selected PR |
|
|
89
|
+
| `validate` | Validate work with evidence |
|
|
90
|
+
| `deploy` | Prepare deployment readiness |
|
|
92
91
|
|
|
93
|
-
For agent routing and subagent delegation, see `opencode/agents
|
|
94
|
-
|
|
95
|
-
## Codex quickstart
|
|
96
|
-
|
|
97
|
-
After `init`, Codex users reference the local `.codex/prompts/README.md` for available entrypoints.
|
|
98
|
-
|
|
99
|
-
Primary prompts:
|
|
100
|
-
|
|
101
|
-
| Prompt file | Use |
|
|
102
|
-
| --- | --- |
|
|
103
|
-
| `.codex/prompts/start-project.md` | Start a project workflow |
|
|
104
|
-
| `.codex/prompts/plan-from-requirement.md` | Turn a requirement into a plan |
|
|
105
|
-
| `.codex/prompts/execute-selected-pr.md` | Implement one PR |
|
|
106
|
-
| `.codex/prompts/review-implementation.md` | Review implementation |
|
|
107
|
-
| `.codex/prompts/validate-work.md` | Validate with evidence |
|
|
108
|
-
|
|
109
|
-
Copy the content of a prompt file into your Codex session, or use the CLI wrapper commands:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
npx @williambeto/ai-workflow codex:start
|
|
113
|
-
npx @williambeto/ai-workflow codex:plan
|
|
114
|
-
npx @williambeto/ai-workflow codex:execute
|
|
115
|
-
npx @williambeto/ai-workflow codex:review
|
|
116
|
-
npx @williambeto/ai-workflow codex:validate
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Codex users should treat [`AGENTS.md`](AGENTS.md) as the main operational contract.
|
|
92
|
+
For agent routing and subagent delegation, see `opencode/agents/`.
|
|
120
93
|
|
|
121
94
|
## Validation checklist
|
|
122
95
|
|
|
@@ -125,8 +98,8 @@ After `init` and `doctor`, confirm:
|
|
|
125
98
|
- [ ] `npx @williambeto/ai-workflow doctor` reports no errors
|
|
126
99
|
- [ ] `npm run validate` passes (or project-specific validation commands)
|
|
127
100
|
- [ ] `README.workflow.md` exists at the project root
|
|
128
|
-
- [ ] `opencode.jsonc` contains managed sections
|
|
129
|
-
- [ ]
|
|
101
|
+
- [ ] `opencode.jsonc` contains managed sections
|
|
102
|
+
- [ ] OpenCode config is present (`opencode.jsonc`)
|
|
130
103
|
- [ ] No unintended file changes outside workflow-managed paths
|
|
131
104
|
- [ ] Review backup files in `.ai-workflow-backups/` if any exist
|
|
132
105
|
|
|
@@ -139,7 +112,7 @@ After `init` and `doctor`, confirm:
|
|
|
139
112
|
| `doctor` reports missing files | Run `npx @williambeto/ai-workflow init --force` to regenerate. |
|
|
140
113
|
| Init fails creating symlink | Windows: enable Developer Mode or run terminal as Administrator. Linux/macOS: verify write permissions and rerun `npx @williambeto/ai-workflow init --force`. |
|
|
141
114
|
| OpenCode does not recognize commands | Confirm `opencode.jsonc` was created and contains the expected managed sections. |
|
|
142
|
-
|
|
|
115
|
+
| Commands not available | Run `npx @williambeto/ai-workflow init --force` to regenerate command files. |
|
|
143
116
|
| Conflicts with existing files | Preview with `--dry-run`, then use `--no-overwrite` to skip conflicting files. |
|
|
144
117
|
| Backup files accumulate | Clean `rm -rf .ai-workflow-backups/` when backups are no longer needed. |
|
|
145
118
|
| Package version needs update | Run `npm update @williambeto/ai-workflow`. |
|
|
@@ -159,11 +132,10 @@ After install, `init`, `doctor`, and validation pass:
|
|
|
159
132
|
|
|
160
133
|
For a guided walkthrough, see:
|
|
161
134
|
|
|
162
|
-
- [`
|
|
163
|
-
- [`runbooks/apply-starter-to-real-project.md`](runbooks/apply-starter-to-real-project.md)
|
|
135
|
+
- [`QUICKSTART.md`](QUICKSTART.md) (consolidated walkthrough)
|
|
136
|
+
- [`runbooks/apply-starter-to-real-project.md`](../runbooks/apply-starter-to-real-project.md)
|
|
164
137
|
|
|
165
138
|
## Reference
|
|
166
139
|
|
|
167
140
|
- Package source: <https://github.com/williambeto/ai-workflow>
|
|
168
141
|
- OpenCode docs: <https://opencode.ai/docs>
|
|
169
|
-
- Codex repo: <https://github.com/openai/codex>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# OpenCode Runtime Assets
|
|
2
|
+
|
|
3
|
+
- `agents/`: primary agent prompt contracts.
|
|
4
|
+
- `commands/`: runtime command contracts.
|
|
5
|
+
- `skills/`: reusable capability documents.
|
|
6
|
+
- `docs/policies/`: canonical workflow policies.
|
|
7
|
+
|
|
8
|
+
Use professional taxonomy: Primary Agents, Skill-backed Specialist Roles, Skills, and Commands.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Branch Gate Auto-Recovery
|
|
2
|
+
|
|
3
|
+
Before any write-capable action, require branch awareness:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
git branch --show-current
|
|
7
|
+
git status --short
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Branch Gate is a safety mechanism, not a dead end.
|
|
11
|
+
|
|
12
|
+
### Protected branches
|
|
13
|
+
|
|
14
|
+
`main` and `master` are protected for direct writes.
|
|
15
|
+
|
|
16
|
+
For write-capable `quick`, `standard`, or `full` workflow work invoked on `main`/`master`:
|
|
17
|
+
|
|
18
|
+
1. create a safe scoped branch when the repository state allows it;
|
|
19
|
+
2. verify the branch changed;
|
|
20
|
+
3. continue the original task from the correct owner/command;
|
|
21
|
+
4. include branch recovery evidence in the final report.
|
|
22
|
+
|
|
23
|
+
Do not stop after creating the branch. Branch recovery is not the deliverable.
|
|
24
|
+
|
|
25
|
+
### Branch naming
|
|
26
|
+
|
|
27
|
+
Use deterministic lowercase kebab-case names:
|
|
28
|
+
|
|
29
|
+
- `feat/<short-task>` for new user-facing functionality;
|
|
30
|
+
- `fix/<short-task>` for bug fixes and typos;
|
|
31
|
+
- `docs/<short-task>` for documentation-only work;
|
|
32
|
+
- `chore/<short-task>` for configuration, workflow, package, or runtime maintenance;
|
|
33
|
+
- `refactor/<short-task>` for structure changes without behavior changes;
|
|
34
|
+
- `test/<short-task>` for test-only work;
|
|
35
|
+
- `release/<short-task>` for release preparation.
|
|
36
|
+
|
|
37
|
+
Keep names short, avoid secrets/URLs, and add a numeric suffix if the branch exists.
|
|
38
|
+
|
|
39
|
+
### Dirty state handling
|
|
40
|
+
|
|
41
|
+
Classify dirty state before blocking:
|
|
42
|
+
|
|
43
|
+
- expected generated workflow files, package lock changes, or `node_modules/` noise: preserve and continue when safe;
|
|
44
|
+
- user-edited project files: create the branch preserving the state and report it;
|
|
45
|
+
- merge conflicts, unresolved rebase, partial tool output, or unsafe unknown changes: stop with reason;
|
|
46
|
+
- secrets or `.env` files: do not inspect or modify; warn and continue only if unrelated.
|
|
47
|
+
|
|
48
|
+
### Restricted actions
|
|
49
|
+
|
|
50
|
+
Do not auto-execute publish, deploy, tag, release, merge, push, force-push, broad deletion, or package-version changes without explicit approval. For restricted requests, create the preparation branch/plan if needed, but stop before the restricted action.
|
|
51
|
+
|
|
52
|
+
### Branch recovery report
|
|
53
|
+
|
|
54
|
+
Any agent/command that performs branch recovery must report:
|
|
55
|
+
|
|
56
|
+
```md
|
|
57
|
+
Branch recovery:
|
|
58
|
+
- Branch before:
|
|
59
|
+
- Dirty state:
|
|
60
|
+
- Action:
|
|
61
|
+
- Branch after:
|
|
62
|
+
- Continue original task: yes/no
|
|
63
|
+
```
|