@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,76 @@
|
|
|
1
|
+
# Visual E2E Validation & Semantic UX Quality Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to extend the **AI Workflow Kit** to automate visual regression testing and UX aesthetic audits using Playwright and multimodal vision LLMs.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Automated Visual E2E Validation
|
|
8
|
+
|
|
9
|
+
By default, the kit flags UI changes without screenshots as `PASS_WITH_NOTES`. To turn this into a strict, blocking quality gate, you can set up automated visual regression tests.
|
|
10
|
+
|
|
11
|
+
### Step 1: Install Playwright
|
|
12
|
+
Install Playwright in the consumer project:
|
|
13
|
+
```bash
|
|
14
|
+
npm install -D @playwright/test
|
|
15
|
+
npx playwright install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Step 2: Configure Visual Regression Specs
|
|
19
|
+
Create a Playwright visual spec (e.g., `tests/visual/landing-page.spec.js`):
|
|
20
|
+
```javascript
|
|
21
|
+
import { test, expect } from '@playwright/test';
|
|
22
|
+
|
|
23
|
+
test('landing page visual regression', async ({ page }) => {
|
|
24
|
+
// 1. Navigate to the local server
|
|
25
|
+
await page.goto('http://localhost:5173');
|
|
26
|
+
|
|
27
|
+
// 2. Capture and compare screenshots (Desktop & Mobile viewports)
|
|
28
|
+
await expect(page).toHaveScreenshot('landing-page-desktop.png', {
|
|
29
|
+
fullPage: true,
|
|
30
|
+
maxDiffPixels: 50 // Tolerable pixel variance
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
await page.setViewportSize({ width: 375, height: 812 });
|
|
34
|
+
await expect(page).toHaveScreenshot('landing-page-mobile.png', {
|
|
35
|
+
fullPage: true
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 3: Link to the Quality Gate
|
|
41
|
+
Add a `test:visual` script to your `package.json`:
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"scripts": {
|
|
45
|
+
"test:visual": "playwright test tests/visual"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
During the `QualityGuard` verification phase, the framework runs all test scripts. If a layout shift or visual bug occurs, Playwright will fail, and the kit will transition to `BLOCKED`, preventing implementation changes from being approved.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 2. Semantic and Aesthetic Auditing (Vision LLM)
|
|
54
|
+
|
|
55
|
+
Subjective quality (color harmony, readable contrast, visual hierarchy) cannot be checked by raw pixel diffs. Multimodal vision models (like Gemini Pro or Claude 3.5 Sonnet) can act as automated **UX Auditors**.
|
|
56
|
+
|
|
57
|
+
### Architecture Workflow
|
|
58
|
+
```text
|
|
59
|
+
[Astra (Builder)]
|
|
60
|
+
└── Generates Page HTML/CSS
|
|
61
|
+
[Playwright Runner]
|
|
62
|
+
└── Launches headless browser & takes screenshots
|
|
63
|
+
[Sage (UX Auditor)]
|
|
64
|
+
└── Sends screenshots to Vision LLM with Design Checklist
|
|
65
|
+
└── Returns PASS or FAIL_QUALITY_GATE with layout feedback
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Prompt-Based UX Auditor Checklist
|
|
69
|
+
You can configure a specialized `ux-auditor` agent or load a skill containing these rules:
|
|
70
|
+
|
|
71
|
+
1. **Hierarchy & Composition**: The first fold must look like a cohesive layout. Check that headings, buttons, and graphics do not overlap or look cluttered.
|
|
72
|
+
2. **Color Contrast & Accessibility**: Ensure contrast between text and background is high. Avoid using unstyled bright primary colors (e.g., plain red/blue/green) without proper styling.
|
|
73
|
+
3. **Typography**: Typography must use a modern system (e.g., Google Fonts) instead of browser defaults. Line heights should be balanced.
|
|
74
|
+
4. **Responsiveness**: Verify that the mobile render does not cut off text or overflow horizontally.
|
|
75
|
+
|
|
76
|
+
If the Vision LLM finds aesthetic defects, it outputs a `FAIL_QUALITY_GATE` status along with coordinates or descriptions of the design bugs, which are then passed to the `HealerEngine` for remediation.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
Examples demonstrate AI Workflow Kit delivery flows:
|
|
4
|
+
|
|
5
|
+
- requirement to implementation;
|
|
6
|
+
- implementation to validation;
|
|
7
|
+
- remediation and revalidation;
|
|
8
|
+
- evidence-driven delivery.
|
|
9
|
+
|
|
10
|
+
Examples are illustrative and must follow the current runtime contract.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Requirement: Product Category Search Filter
|
|
2
|
+
|
|
3
|
+
## 1. Goal
|
|
4
|
+
Add a search filter to the dashboard allowing users to filter products by category.
|
|
5
|
+
|
|
6
|
+
## 2. Success Criteria
|
|
7
|
+
- [ ] User can select a category from a dropdown.
|
|
8
|
+
- [ ] List updates immediately with filtered results.
|
|
9
|
+
- [ ] No regression on existing text search.
|
|
10
|
+
|
|
11
|
+
## 3. Risks
|
|
12
|
+
- Performance bottleneck if many products.
|
|
13
|
+
- Mobile UI overlap.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
*Status: [APPROVED] by Atlas*
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Gate A Log - Atlas
|
|
2
|
+
|
|
3
|
+
**Timestamp**: 2026-05-29T10:00:00Z
|
|
4
|
+
**Agent**: Atlas (Orchestrator)
|
|
5
|
+
**Command**: `ai-workflow run --spec-path=examples/autopilot-cycle/01-requirement.md`
|
|
6
|
+
|
|
7
|
+
## Branch Verification
|
|
8
|
+
- **Current Branch**: `feat/category-search`
|
|
9
|
+
- **Target Branch**: `main`
|
|
10
|
+
- **Status**: [PASS] (Not on main)
|
|
11
|
+
|
|
12
|
+
## Spec Validation
|
|
13
|
+
- **File**: `01-requirement.md`
|
|
14
|
+
- **Content Check**:
|
|
15
|
+
- Goal section: OK
|
|
16
|
+
- Criteria section: OK
|
|
17
|
+
- Risks section: OK
|
|
18
|
+
- **Status**: [PASS]
|
|
19
|
+
|
|
20
|
+
## Delegation
|
|
21
|
+
- **Classification**: New Feature / Intermediate
|
|
22
|
+
- **Route**: Orion (Strategist)
|
|
23
|
+
- **Instruction**: Create Technical Plan and PR Breakdown for category search.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Technical Plan & PR Breakdown - Orion
|
|
2
|
+
|
|
3
|
+
## 1. Technical Strategy
|
|
4
|
+
- Create `CategoryFilter.vue` component.
|
|
5
|
+
- Update `ProductStore.ts` to include category filter logic.
|
|
6
|
+
- Use `computed` properties for real-time reactive filtering.
|
|
7
|
+
|
|
8
|
+
## 2. PR Breakdown
|
|
9
|
+
- **PR 1**: `ProductStore` logic + Unit tests.
|
|
10
|
+
- **PR 2**: `CategoryFilter` UI component.
|
|
11
|
+
- **PR 3**: Dashboard integration + E2E tests.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Gate B Self-Review (Orion)
|
|
16
|
+
- [x] Plan is atomic and sequential.
|
|
17
|
+
- [x] No broad refactoring included.
|
|
18
|
+
- [x] Testing strategy defined.
|
|
19
|
+
|
|
20
|
+
**Status**: Ready for Implementation (Astra)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Implementation Log - Astra
|
|
2
|
+
|
|
3
|
+
**Task**: PR 1 - ProductStore logic + Unit tests.
|
|
4
|
+
|
|
5
|
+
## Actions Taken
|
|
6
|
+
- Added `selectedCategory` state to `ProductStore.ts`.
|
|
7
|
+
- Implemented `setCategory(id)` action.
|
|
8
|
+
- Updated `filteredProducts` getter to include category logic.
|
|
9
|
+
- Created `tests/store/ProductStore.spec.ts`.
|
|
10
|
+
|
|
11
|
+
## Local Verification
|
|
12
|
+
- `npm test` passed.
|
|
13
|
+
- Lint clean.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
## Ready for Audit (Sage)
|
|
17
|
+
- Handoff file generated: `HANDOFF-PR1.md`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Validation Report - Sage
|
|
2
|
+
|
|
3
|
+
**Timestamp**: 2026-05-29T11:00:00Z
|
|
4
|
+
**Agent**: Sage (Auditor)
|
|
5
|
+
|
|
6
|
+
## Quality Dimensions
|
|
7
|
+
1. **Correctness**: [PASS] - Logic matches spec.
|
|
8
|
+
2. **Maintainability**: [PASS] - Clean separation of concerns.
|
|
9
|
+
3. **Validation**: [PASS] - New unit tests cover category filtering.
|
|
10
|
+
4. **No regression**: [PASS] - Existing search tests still pass.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
## Gate C Verdict
|
|
14
|
+
**Status**: [APPROVED]
|
|
15
|
+
**Evidence Artifact**: `EVIDENCE.json` updated with test logs.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Healing Log (Simulation) - Phoenix
|
|
2
|
+
|
|
3
|
+
**Event**: Validation Failed (Step 5 retry 1).
|
|
4
|
+
**Root Cause**: CSS collision in category dropdown.
|
|
5
|
+
|
|
6
|
+
## Phoenix Action
|
|
7
|
+
1. Analyzed `CategoryFilter.vue` vs global `reset.css`.
|
|
8
|
+
2. Found conflicting `z-index`.
|
|
9
|
+
3. Applied scoped CSS fix.
|
|
10
|
+
4. Requested re-validation from Sage.
|
|
11
|
+
|
|
12
|
+
**Status**: [HEALED]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Orchestration Report - Orion
|
|
2
|
+
|
|
3
|
+
**Task**: Product Category Search Filter.
|
|
4
|
+
**Status**: [COMPLETE]
|
|
5
|
+
|
|
6
|
+
## Lifecycle Summary
|
|
7
|
+
1. **Planning**: 20 mins (Orion).
|
|
8
|
+
2. **Implementation**: 45 mins (Astra).
|
|
9
|
+
3. **Audit**: 10 mins (Sage).
|
|
10
|
+
4. **Healing**: 5 mins (Phoenix).
|
|
11
|
+
|
|
12
|
+
## Final Evidence
|
|
13
|
+
- Total PRs: 3 (PR 1 merged).
|
|
14
|
+
- Test Coverage: +5%.
|
|
15
|
+
- Evidence Pack: `EVIDENCE.json`.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
*Maintained by Atlas — The Senior Engineering Partner*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Backend API Example - Product Management
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example demonstrates how to use the AI Workflow Kit for backend development using Node.js, Fastify, and a Repository Pattern.
|
|
5
|
+
|
|
6
|
+
## The Request
|
|
7
|
+
**User**: "Create a secure API for managing products with CRUD operations and category-based searching."
|
|
8
|
+
|
|
9
|
+
## Key Learning Points
|
|
10
|
+
- **Schema Validation**: Using Zod for request/response contracts.
|
|
11
|
+
- **Architecture**: Separating Routes, Services, and Repositories.
|
|
12
|
+
- **Quality**: Integration testing with Supertest.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Requirement: Product CRUD API
|
|
2
|
+
|
|
3
|
+
## 1. Goal
|
|
4
|
+
Provide a set of REST endpoints to manage a product catalog.
|
|
5
|
+
|
|
6
|
+
## 2. Requirements
|
|
7
|
+
- **Create**: POST `/products` with name, price, and category.
|
|
8
|
+
- **Read**: GET `/products/:id` and GET `/products` (with filtering).
|
|
9
|
+
- **Update**: PUT `/products/:id`.
|
|
10
|
+
- **Delete**: DELETE `/products/:id`.
|
|
11
|
+
- **Search**: Support query param `?category=electronics`.
|
|
12
|
+
|
|
13
|
+
## 3. Constraints
|
|
14
|
+
- Use Fastify for performance.
|
|
15
|
+
- Validate all inputs using Zod.
|
|
16
|
+
- Use an in-memory repository for this MVP.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
*Status: [APPROVED]*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Functional Specification: Product API
|
|
2
|
+
|
|
3
|
+
## 1. Interface (Contract)
|
|
4
|
+
|
|
5
|
+
### POST /products
|
|
6
|
+
- **Input**: `{ "name": string, "price": number, "category": string }`
|
|
7
|
+
- **Output**: `201 Created` with the product object including a generated UUID.
|
|
8
|
+
|
|
9
|
+
### GET /products
|
|
10
|
+
- **Query**: `?category=[string]`
|
|
11
|
+
- **Output**: Array of products.
|
|
12
|
+
|
|
13
|
+
## 2. Business Rules
|
|
14
|
+
- Product name must be at least 3 characters.
|
|
15
|
+
- Price must be positive.
|
|
16
|
+
- Categories are case-insensitive.
|
|
17
|
+
|
|
18
|
+
## 3. Error Handling
|
|
19
|
+
- `400 Bad Request` for validation failures (Zod errors).
|
|
20
|
+
- `404 Not Found` for missing IDs.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Technical Plan - Product API
|
|
2
|
+
|
|
3
|
+
## 1. Architecture
|
|
4
|
+
- **Layer 1: Routes** (Fastify handlers).
|
|
5
|
+
- **Layer 2: Services** (Business logic + validation).
|
|
6
|
+
- **Layer 3: Repository** (Persistence interface).
|
|
7
|
+
|
|
8
|
+
## 2. Tech Stack
|
|
9
|
+
- Fastify.
|
|
10
|
+
- Zod (Validation).
|
|
11
|
+
- Vitest (Testing).
|
|
12
|
+
|
|
13
|
+
## 3. Design Trade-offs
|
|
14
|
+
- **In-memory repo**: Chosen for speed of MVP. Will require a database migration (SQL/NoSQL) in the future.
|
|
15
|
+
- **Zod schemas**: Used both for request validation and type inference.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# PR Breakdown - Product API
|
|
2
|
+
|
|
3
|
+
## Sequence
|
|
4
|
+
1. **PR 1: Core Definitions**: Zod schemas and Repository interface.
|
|
5
|
+
2. **PR 2: Base CRUD**: Create and Read implementations.
|
|
6
|
+
3. **PR 3: Search & Filters**: Query parameters logic.
|
|
7
|
+
4. **PR 4: Error Handling**: Global Fastify error handler.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
*Managed by Orion (Strategist)*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Execution Handoff - PR 1
|
|
2
|
+
|
|
3
|
+
**Agent**: Astra (Developer)
|
|
4
|
+
**Task**: PR 1 (Schemas + Repo).
|
|
5
|
+
|
|
6
|
+
## Changes
|
|
7
|
+
- Created `src/domain/product.schema.ts`.
|
|
8
|
+
- Created `src/repositories/product.repository.ts`.
|
|
9
|
+
- Created `src/repositories/memory/product.inmemory.repo.ts`.
|
|
10
|
+
|
|
11
|
+
## Verification Done
|
|
12
|
+
- Unit tests passed for in-memory storage.
|
|
13
|
+
- Schema validation covers all business rules.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Validation Report - Sage
|
|
2
|
+
|
|
3
|
+
**Target**: PR 1.
|
|
4
|
+
|
|
5
|
+
## Audit Findings
|
|
6
|
+
- **Security**: [PASS] - No injection risks found.
|
|
7
|
+
- **Contract Compliance**: [PASS] - API matches spec exactly.
|
|
8
|
+
- **Test Coverage**: 95% on repository logic.
|
|
9
|
+
|
|
10
|
+
## Evidence
|
|
11
|
+
`EVIDENCE.json` generated.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Blocked Scenarios - Understanding the Gates
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example demonstrates the defensive nature of the AI Workflow Kit. It shows what happens when a developer (human or agent) attempts to bypass the engineering standards and how the Atlas gates protect the repository.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## The Request
|
|
9
|
+
**Astra**: "I'm going to quickly fix this bug directly on `main` branch to save time."
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 01 - Branch Gate Block
|
|
2
|
+
|
|
3
|
+
**Agent**: Atlas (Orchestrator)
|
|
4
|
+
**Command**: `ai-workflow run`
|
|
5
|
+
|
|
6
|
+
## Gate A Evaluation
|
|
7
|
+
- **Current Branch**: `main`
|
|
8
|
+
- **Rule**: `01-BRANCH_GATE.md` - Direct modification to `main` is strictly prohibited.
|
|
9
|
+
|
|
10
|
+
## Verdict
|
|
11
|
+
**Status**: [BLOCKED]
|
|
12
|
+
**Message**: "You are currently on the 'main' branch. Engineering governance requires all changes to occur in feature branches. Please create a branch (e.g., `git checkout -b fix/issue`) before proceeding."
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 02 - Quality Gate Block
|
|
2
|
+
|
|
3
|
+
**Agent**: Sage (Auditor)
|
|
4
|
+
**Event**: Implementation Handoff review.
|
|
5
|
+
|
|
6
|
+
## Gate C Evaluation
|
|
7
|
+
- **Task**: Implement search logic.
|
|
8
|
+
- **Evidence Provided**: None.
|
|
9
|
+
- **Rule**: `03-QUALITY_GATE.md` - No success claim is valid without physical evidence (`EVIDENCE.json`).
|
|
10
|
+
|
|
11
|
+
## Verdict
|
|
12
|
+
**Status**: [BLOCKED]
|
|
13
|
+
**Message**: "Implementation rejected. You claimed success but failed to provide an updated EVIDENCE.json with test logs. Audit cannot proceed without verification data."
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 03 - Scope Creep Block
|
|
2
|
+
|
|
3
|
+
**Agent**: Atlas (Orchestrator)
|
|
4
|
+
**Gate**: B (Pre-Implementation)
|
|
5
|
+
|
|
6
|
+
## Gate B Evaluation
|
|
7
|
+
- **Approved PR**: "Fix typo in login screen".
|
|
8
|
+
- **Astra Plan**: "Fix typo, refactor the entire auth service, and upgrade Nuxt".
|
|
9
|
+
- **Rule**: `ORCHESTRATION_PROTOCOL.md` - No unrelated refactors allowed in a feature branch.
|
|
10
|
+
|
|
11
|
+
## Verdict
|
|
12
|
+
**Status**: [BLOCKED]
|
|
13
|
+
**Message**: "Scope Creep detected. Your plan includes changes outside the approved requirement. Refactoring the auth service and upgrading Nuxt must be handled as separate requirements. Re-align your plan with the original PR scope."
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 04 - Unblock Resolution Path
|
|
2
|
+
|
|
3
|
+
## How to resolve a Block
|
|
4
|
+
- **Branch Gate**: Run `git checkout -b <name>` and restart the command.
|
|
5
|
+
- **Quality Gate**: Run your tests, update `EVIDENCE.json`, and re-submit the handoff.
|
|
6
|
+
- **Scope Creep**: Remove unrelated changes from your plan and only focus on the specific PR task.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
*Status: Understanding restored.*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 05 - Orchestration Decision Log
|
|
2
|
+
|
|
3
|
+
**Project**: Secure Dashboard.
|
|
4
|
+
**Overall Status**: [RESOLVED] after 3 blocks.
|
|
5
|
+
|
|
6
|
+
## Lessons Learned
|
|
7
|
+
- **Astra**: "I learned that speed is not a substitute for quality. The gates forced me to follow the correct protocol, which saved us from a broken deployment."
|
|
8
|
+
- **Atlas**: "Enforcing the gates maintained the integrity of the `main` branch despite high pressure."
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
*Maintained by Atlas — The Governance Partner*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Bugfix Critical - Authentication Regression
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example demonstrates how the AI Workflow Kit handles emergency fixes and regressions using a hypothesis-led approach and the Phoenix healing agent.
|
|
5
|
+
|
|
6
|
+
## The Problem
|
|
7
|
+
Users report that they are suddenly unable to log in, receiving a generic "Network Error" after the latest deployment.
|
|
8
|
+
|
|
9
|
+
## Workflow Path
|
|
10
|
+
1. **Bug Report**: Collecting user symptoms.
|
|
11
|
+
2. **Diagnosis**: Identifying the root cause (JWT expiration).
|
|
12
|
+
3. **Healing**: Applying the fix and validating the recovery.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 01 - Bug Report: Login Failure Regression
|
|
2
|
+
|
|
3
|
+
## 1. Description
|
|
4
|
+
Login functionality is broken on the production environment.
|
|
5
|
+
|
|
6
|
+
## 2. Evidence
|
|
7
|
+
- **Log**: `TypeError: Cannot read property 'id' of undefined at auth.middleware.ts:45`.
|
|
8
|
+
- **Environment**: Production (current release).
|
|
9
|
+
|
|
10
|
+
## 3. Severity
|
|
11
|
+
[CRITICAL] - Complete service blockage.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 02 - Diagnosis & Hypothesis
|
|
2
|
+
|
|
3
|
+
## 1. Analysis
|
|
4
|
+
The error occurs in the authentication middleware. It seems the user object is not being correctly decoded from the JWT token.
|
|
5
|
+
|
|
6
|
+
## 2. Hypothesis
|
|
7
|
+
A recent change in the JWT secret environment variable configuration caused old tokens to be invalid, but the error handling does not catch the "invalid signature" state, leading to a crash.
|
|
8
|
+
|
|
9
|
+
## 3. Verification Plan
|
|
10
|
+
- [x] Reproduce locally by forcing an invalid signature.
|
|
11
|
+
- [ ] Verify if `process.env.JWT_SECRET` is correctly loaded.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 03 - Technical Plan: Authentication Fix
|
|
2
|
+
|
|
3
|
+
## 1. Mitigation
|
|
4
|
+
Add a explicit try-catch block around the JWT verification logic.
|
|
5
|
+
|
|
6
|
+
## 2. Implementation
|
|
7
|
+
- Wrap `jwt.verify()` in a try-catch.
|
|
8
|
+
- If it fails, return a `401 Unauthorized` with a clear message instead of crashing.
|
|
9
|
+
- Log the specific error (expired, invalid signature, etc.) for internal telemetry.
|
|
10
|
+
|
|
11
|
+
## 3. Rollback Plan
|
|
12
|
+
Revert to the previous known-good release if this fix does not resolve the crash within 10 minutes of deploy.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CLI Package - Dogfooding Example
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example demonstrates how to use the AI Workflow Kit for developing a Node.js library or CLI tool, focusing on semantic versioning and changelog management.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## The Request
|
|
9
|
+
**User**: "I want to add a new command `ai-workflow doctor` to the CLI package to help users diagnose installation issues."
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 01 - Requirement: Doctor Command
|
|
2
|
+
|
|
3
|
+
## 1. Goal
|
|
4
|
+
Provide a built-in diagnostic tool for the CLI.
|
|
5
|
+
|
|
6
|
+
## 2. Requirements
|
|
7
|
+
- Command: `ai-workflow doctor`.
|
|
8
|
+
- Checks for `.ai-workflow.json` presence.
|
|
9
|
+
- Validates `opencode.jsonc` format.
|
|
10
|
+
- Checks if necessary agents are registered.
|
|
11
|
+
- Reports [PASS/FAIL] for each step.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
*Status: [APPROVED]*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 02 - Technical Specification
|
|
2
|
+
|
|
3
|
+
**Agent**: Nexus (Spec Architect)
|
|
4
|
+
|
|
5
|
+
## 1. Interface
|
|
6
|
+
- New command added to `bin/ai-workflow.js`.
|
|
7
|
+
- Logic implemented in `src/commands/doctor.js`.
|
|
8
|
+
|
|
9
|
+
## 2. Validation Logic
|
|
10
|
+
- **Check 1**: Check if `cwd` has `.ai-workflow.json`.
|
|
11
|
+
- **Check 2**: Parse `opencode.jsonc` and verify if it has at least the `Atlas` agent.
|
|
12
|
+
- **Check 3**: Verify if `templates/` directory is not empty.
|
|
13
|
+
|
|
14
|
+
## 3. Exit Codes
|
|
15
|
+
- `0`: All checks passed.
|
|
16
|
+
- `1`: One or more failures detected.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 03 - Technical Plan
|
|
2
|
+
|
|
3
|
+
**Agent**: Orion (Strategist)
|
|
4
|
+
|
|
5
|
+
## 1. Implementation Detail
|
|
6
|
+
- Use `node:fs` for path checks.
|
|
7
|
+
- Use `JSON.parse` with comment stripping for `opencode.jsonc`.
|
|
8
|
+
- Output formatted using ANSI colors (Chalk).
|
|
9
|
+
|
|
10
|
+
## 2. Test Plan
|
|
11
|
+
- Create mock project structures (one valid, one broken).
|
|
12
|
+
- Run `doctor` against mocks and verify exit codes.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 05 - Release Report (v2)
|
|
2
|
+
|
|
3
|
+
**Agent**: Orion (Strategist)
|
|
4
|
+
|
|
5
|
+
## Version Bump
|
|
6
|
+
- New Version: `3.1.0`.
|
|
7
|
+
- Type: `minor` (New feature: Doctor command).
|
|
8
|
+
|
|
9
|
+
## Changelog Entry
|
|
10
|
+
### Added
|
|
11
|
+
- `ai-workflow doctor`: A diagnostic tool to verify project integrity and OpenCode configuration.
|
|
12
|
+
|
|
13
|
+
## Deployment Status
|
|
14
|
+
- Tarball generated: [SUCCESS].
|
|
15
|
+
- Published to NPM (simulated): [SUCCESS].
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Requirement
|
|
2
|
+
|
|
3
|
+
## Title
|
|
4
|
+
Add API Authentication Documentation
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
The project has authentication endpoints but no clear documentation for request/response, headers, and common errors.
|
|
8
|
+
|
|
9
|
+
## Target user
|
|
10
|
+
Developers integrating with the API.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Provide clear and testable API auth docs to reduce integration errors.
|
|
14
|
+
|
|
15
|
+
## Scope
|
|
16
|
+
### Included
|
|
17
|
+
- Authentication overview
|
|
18
|
+
- Login endpoint documentation
|
|
19
|
+
- Token usage examples
|
|
20
|
+
- Common auth error responses
|
|
21
|
+
|
|
22
|
+
### Not included
|
|
23
|
+
- API behavior changes
|
|
24
|
+
- New endpoints
|
|
25
|
+
- SDK generation
|
|
26
|
+
|
|
27
|
+
## Acceptance criteria
|
|
28
|
+
- Login endpoint docs include method, path, payload, and response.
|
|
29
|
+
- Auth header usage is documented with examples.
|
|
30
|
+
- 401 and 403 error responses are documented.
|
|
31
|
+
- Documentation is linked from main README.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Functional Specification
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Define documentation behavior for API authentication usage.
|
|
5
|
+
|
|
6
|
+
## Main flow
|
|
7
|
+
1. User opens API docs.
|
|
8
|
+
2. User finds authentication section.
|
|
9
|
+
3. User reads login endpoint contract.
|
|
10
|
+
4. User applies token to protected endpoints.
|
|
11
|
+
|
|
12
|
+
## System states
|
|
13
|
+
- Success examples: valid login and token usage.
|
|
14
|
+
- Error examples: invalid credentials, missing token, expired token.
|
|
15
|
+
|
|
16
|
+
## Data requirements
|
|
17
|
+
- Endpoint path
|
|
18
|
+
- Request schema
|
|
19
|
+
- Response schema
|
|
20
|
+
- Error payload examples
|
|
21
|
+
|
|
22
|
+
## Acceptance criteria
|
|
23
|
+
- Auth section is discoverable from docs index.
|
|
24
|
+
- Endpoint examples are copy/paste-safe.
|
|
25
|
+
- Error examples match API contract.
|