@williambeto/ai-workflow 1.19.1 → 2.1.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 +70 -149
- 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/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 +42 -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 +96 -0
- package/src/commands/collect-evidence.js +61 -0
- package/src/commands/doctor.js +186 -0
- package/{packages/ai-workflow/src → src}/commands/init.js +119 -20
- package/src/commands/run.js +111 -0
- package/src/core/completion-contract.js +35 -0
- package/src/core/gates/branch-gate.js +113 -0
- package/src/core/handoff/handoff-engine.js +78 -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/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 +218 -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/.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,15 @@
|
|
|
1
|
+
# 03 - Full-Stack Implementation Plan
|
|
2
|
+
|
|
3
|
+
**Agent**: Full-Stack-Engineer
|
|
4
|
+
|
|
5
|
+
## 1. Backend Implementation
|
|
6
|
+
- Create `CheckoutController.ts`.
|
|
7
|
+
- Integrate `StripeService`.
|
|
8
|
+
- Add Zod validation for cart items.
|
|
9
|
+
|
|
10
|
+
## 2. Frontend Implementation
|
|
11
|
+
- Add `checkout` action to `CartStore.ts` using `useFetch`.
|
|
12
|
+
- Update `Cart.vue` to trigger action.
|
|
13
|
+
|
|
14
|
+
## 3. Coordination Strategy
|
|
15
|
+
We will implement and test the Backend first using Postman/Supertest, then wire the Frontend.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 05 - Execution Handoff (Full-Stack)
|
|
2
|
+
|
|
3
|
+
**Agent**: Full-Stack-Engineer
|
|
4
|
+
**Task**: PR 1 + PR 2.
|
|
5
|
+
|
|
6
|
+
## Actions
|
|
7
|
+
- **Backend**: Implemented `POST /api/checkout`.
|
|
8
|
+
- **Frontend**: Updated `CartStore` and added "Checkout" button to `Cart.vue`.
|
|
9
|
+
- **Security**: Added CSRF protection to the checkout endpoint.
|
|
10
|
+
|
|
11
|
+
## Verification
|
|
12
|
+
- Backend Supertest: [PASS].
|
|
13
|
+
- Frontend Vitest: [PASS].
|
|
14
|
+
- Playwright E2E: [PASS].
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 06 - Validation Report (Sage)
|
|
2
|
+
|
|
3
|
+
**Target**: Full-Stack Checkout integration.
|
|
4
|
+
|
|
5
|
+
## Quality Dimensions
|
|
6
|
+
- **FE/BE Sync**: [PASS] - Data formats match specification.
|
|
7
|
+
- **Error Handling**: [PASS] - Correctly handles Stripe failures.
|
|
8
|
+
- **Performance**: [PASS] - Redirect happens in < 500ms.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
## Gate C Verdict
|
|
12
|
+
**[STABLE]**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Healing Cycle - Phoenix Path
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example demonstrates the autonomous self-healing capability of the AI Workflow Kit. It shows what happens when a human or agent delivers a broken PR and how the system recovers.
|
|
5
|
+
|
|
6
|
+
## The Scenario
|
|
7
|
+
A developer implemented a new utility function but forgot to export it, causing a compilation error in the tests.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Cycle Sequence
|
|
12
|
+
1. **Sage** detects the failure (test build failed).
|
|
13
|
+
2. **Phoenix** analyzes the error log.
|
|
14
|
+
3. **Phoenix** applies the missing export.
|
|
15
|
+
4. **Sage** re-runs the validation and approves.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 02 - Sage Detection (Failure)
|
|
2
|
+
|
|
3
|
+
**Agent**: Sage (Auditor)
|
|
4
|
+
**Event**: `npm test` failure detected during Gate C.
|
|
5
|
+
|
|
6
|
+
## Error Log
|
|
7
|
+
```
|
|
8
|
+
src/utils/format.spec.ts:5:10 - error TS2339: Property 'formatCurrency' does not exist on type 'typeof import("/src/utils/format")'.
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Audit Result
|
|
12
|
+
- **Status**: [FAIL]
|
|
13
|
+
- **Reason**: The function `formatCurrency` exists in `src/utils/format.ts` but is not exported.
|
|
14
|
+
- **Action**: Invoking Phoenix for autonomous healing.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 03 - Phoenix Diagnosis
|
|
2
|
+
|
|
3
|
+
**Agent**: Phoenix (Healer)
|
|
4
|
+
**Incident**: TS2339 - Missing Export.
|
|
5
|
+
|
|
6
|
+
## Analysis
|
|
7
|
+
- **File**: `src/utils/format.ts`.
|
|
8
|
+
- **Content**:
|
|
9
|
+
```typescript
|
|
10
|
+
function formatCurrency(val: number) {
|
|
11
|
+
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(val);
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
- **Finding**: The function is correctly implemented but is missing the `export` keyword. The test file `src/utils/format.spec.ts` expects it to be available.
|
|
15
|
+
|
|
16
|
+
## Hypothesis
|
|
17
|
+
Adding `export` before the function definition will resolve the compilation error and satisfy the test requirements.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# 04 - Phoenix Fix Applied
|
|
2
|
+
|
|
3
|
+
**Agent**: Phoenix (Healer)
|
|
4
|
+
**Task**: Apply atomic fix for missing export.
|
|
5
|
+
|
|
6
|
+
## Actions
|
|
7
|
+
- Applied `export` to `formatCurrency` in `src/utils/format.ts`.
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
// src/utils/format.ts
|
|
11
|
+
export function formatCurrency(val: number) {
|
|
12
|
+
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(val);
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Self-Verification
|
|
17
|
+
- Ran `npx tsc` on the file: [PASS].
|
|
18
|
+
- Requested re-audit from Sage.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 05 - Sage Re-validation (Success)
|
|
2
|
+
|
|
3
|
+
**Agent**: Sage (Auditor)
|
|
4
|
+
**Event**: Re-validation after healing.
|
|
5
|
+
|
|
6
|
+
## Audit Result
|
|
7
|
+
- **Tests**: [PASS] - `src/utils/format.spec.ts` executed successfully.
|
|
8
|
+
- **Evidence**: `EVIDENCE.json` updated with positive test logs.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
## Gate C Verdict
|
|
12
|
+
**Status**: [APPROVED] (Self-Healed)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 06 - Orchestration Decision Log
|
|
2
|
+
|
|
3
|
+
**Task**: Utility format function.
|
|
4
|
+
**Status**: [COMPLETE] (Healed)
|
|
5
|
+
|
|
6
|
+
## Lifecycle Events
|
|
7
|
+
1. **Gate A**: [PASS] - Trivial task.
|
|
8
|
+
2. **Implementation**: [FAIL] - Missing export.
|
|
9
|
+
3. **Audit**: [FAIL] - Compiler error detected.
|
|
10
|
+
4. **Healing**: [PASS] - Phoenix applied fix in 1 loop.
|
|
11
|
+
5. **Re-Audit**: [PASS] - Validation successful.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
*Maintained by Atlas — The Self-Healing Partner*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Infrastructure & Deploy - Operational Excellence
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example demonstrates how the AI Workflow Kit handles infrastructure tasks, such as Dockerization and CI/CD pipeline setup, using the `Deployment-Specialist` agent.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## The Request
|
|
9
|
+
**User**: "I want to Dockerize the application and set up a GitHub Action to automatically build and push the image to Docker Hub."
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 01 - Operational Goal: Automated Deployment
|
|
2
|
+
|
|
3
|
+
## 1. Goal
|
|
4
|
+
Containerize the app and automate the delivery pipeline.
|
|
5
|
+
|
|
6
|
+
## 2. Success Criteria
|
|
7
|
+
- [ ] Valid `Dockerfile` in root.
|
|
8
|
+
- [ ] `.github/workflows/deploy.yml` created.
|
|
9
|
+
- [ ] Image builds successfully in CI.
|
|
10
|
+
|
|
11
|
+
## 3. Security
|
|
12
|
+
- Secrets (Docker Hub Token) must be stored in GitHub Secrets, never in plain text.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 02 - Architecture Specs
|
|
2
|
+
|
|
3
|
+
**Agent**: Deployment-Specialist
|
|
4
|
+
**Status**: [APPROVED]
|
|
5
|
+
|
|
6
|
+
## 1. Container Specs
|
|
7
|
+
- Base Image: `node:20-alpine`.
|
|
8
|
+
- Multi-stage build to reduce final image size.
|
|
9
|
+
- Environment variables injected via `.env` file or CLI.
|
|
10
|
+
|
|
11
|
+
## 2. CI/CD Specs
|
|
12
|
+
- Trigger: Push to `main` branch.
|
|
13
|
+
- Step 1: Run tests.
|
|
14
|
+
- Step 2: Build Docker image.
|
|
15
|
+
- Step 3: Login and Push to registry.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 03 - Implementation Plan
|
|
2
|
+
|
|
3
|
+
**Agent**: Orion (Strategist)
|
|
4
|
+
|
|
5
|
+
## 1. Strategy
|
|
6
|
+
We will implement the Dockerfile first and test it locally before creating the GitHub Action.
|
|
7
|
+
|
|
8
|
+
## 2. Dependencies
|
|
9
|
+
- Docker installed locally for verification.
|
|
10
|
+
- GitHub repository access for secrets setup.
|
|
11
|
+
|
|
12
|
+
## 3. Risk Mitigation
|
|
13
|
+
- Use a non-root user in Docker for security.
|
|
14
|
+
- Version pin the base image.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 05 - Execution Handoff
|
|
2
|
+
|
|
3
|
+
**Agent**: Deployment-Specialist
|
|
4
|
+
**Task**: Dockerization.
|
|
5
|
+
|
|
6
|
+
## Actions
|
|
7
|
+
- Created `Dockerfile` using multi-stage build.
|
|
8
|
+
- Configured `.dockerignore` to exclude `node_modules`.
|
|
9
|
+
- Created `.github/workflows/deploy.yml` with build-and-push logic.
|
|
10
|
+
|
|
11
|
+
## Local Test
|
|
12
|
+
- Image built: [PASS].
|
|
13
|
+
- Container started: [PASS].
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 06 - Operational Report
|
|
2
|
+
|
|
3
|
+
**Task**: CI/CD Automation.
|
|
4
|
+
**Status**: [OPERATIONAL]
|
|
5
|
+
|
|
6
|
+
## Infrastructure Status
|
|
7
|
+
- Docker Hub Image: `williambeto/example-app:latest` [AVAILABLE].
|
|
8
|
+
- CI/CD Status: [GREEN] (1 successful run).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
*Maintained by Atlas — The Operations Partner*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Multi-PR Release - Complex Feature Lifecycle
|
|
2
|
+
|
|
3
|
+
## 0. Context
|
|
4
|
+
This example shows how to plan and execute a complex feature that requires multiple sequential pull requests. It demonstrates the coordination between Orion (Strategist) and Atlas (Orchestrator) to ensure a safe release.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## The Request
|
|
9
|
+
**User**: "I want to implement a complete 'Checkout Flow' including cart management, address selection, and payment integration."
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 01 - Requirement: Checkout System
|
|
2
|
+
|
|
3
|
+
## 1. Goal
|
|
4
|
+
Provide a complete checkout experience for the e-commerce platform.
|
|
5
|
+
|
|
6
|
+
## 2. Sub-Features
|
|
7
|
+
- **Cart**: Add/remove/update items.
|
|
8
|
+
- **Address**: Save and select shipping addresses.
|
|
9
|
+
- **Payment**: Integrate with Stripe API.
|
|
10
|
+
- **Order History**: Save order after payment.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
*Classification: Large / Complex*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 02 - Strategic Tech Plan
|
|
2
|
+
|
|
3
|
+
**Agent**: Orion (Strategist)
|
|
4
|
+
|
|
5
|
+
## 1. Release Strategy
|
|
6
|
+
We will use **Feature Flags** to implement the checkout flow in multiple increments without breaking the existing production site.
|
|
7
|
+
|
|
8
|
+
## 2. Infrastructure Changes
|
|
9
|
+
- New DB tables: `orders`, `addresses`.
|
|
10
|
+
- New environment variables for Stripe integration.
|
|
11
|
+
|
|
12
|
+
## 3. High-Level Dependency Graph
|
|
13
|
+
Cart Logic Address Selection Stripe Integration Final Order Persistence.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 03 - Multi-PR Breakdown
|
|
2
|
+
|
|
3
|
+
**Target Version**: v2.0.0
|
|
4
|
+
|
|
5
|
+
## PR Sequence
|
|
6
|
+
1. **PR 1**: `CartStore` refactoring + Feature Flag setup.
|
|
7
|
+
2. **PR 2**: Database schema migration (`orders`, `addresses`).
|
|
8
|
+
3. **PR 3**: UI - Shipping Address form + Validation.
|
|
9
|
+
4. **PR 4**: Backend - Stripe API Service integration.
|
|
10
|
+
5. **PR 5**: Final wiring + E2E "Happy Path" tests.
|
|
11
|
+
6. **PR 6**: Enable Feature Flag and release.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
*Estimated Duration: 2 sprints*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 04 - Release Readiness Report
|
|
2
|
+
|
|
3
|
+
**Agent**: Orion (Strategist)
|
|
4
|
+
**Status**: [READY]
|
|
5
|
+
|
|
6
|
+
## Evidence Summary
|
|
7
|
+
- [x] All 6 PRs merged and validated by Sage.
|
|
8
|
+
- [x] E2E tests passing on Staging environment.
|
|
9
|
+
- [x] Security audit on Stripe integration: [PASS].
|
|
10
|
+
|
|
11
|
+
## Rollback Plan
|
|
12
|
+
If v2.0.0 fails, disable Feature Flag `ENABLE_NEW_CHECKOUT` immediately via admin panel.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Requirement: Products Dashboard Area
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
The dashboard boilerplate needs a realistic protected products area so developers can exercise authenticated data workflows, list filtering, navigation, and CRUD-style UI decisions without connecting to a production backend.
|
|
6
|
+
|
|
7
|
+
## Goal
|
|
8
|
+
|
|
9
|
+
Build a protected products CRUD-style dashboard area backed by DummyJSON, with list, search, pagination, product detail, create/edit/delete placeholders, loading states, empty states, error states, and a layout aligned with the existing dashboard design rules.
|
|
10
|
+
|
|
11
|
+
## Users
|
|
12
|
+
|
|
13
|
+
- Authenticated dashboard users who need to browse product records.
|
|
14
|
+
- Developers extending the dashboard boilerplate.
|
|
15
|
+
- Reviewers validating that dashboard workflows stay scoped and consistent.
|
|
16
|
+
|
|
17
|
+
## Scope
|
|
18
|
+
|
|
19
|
+
- Add a protected products list page.
|
|
20
|
+
- Fetch product data from DummyJSON.
|
|
21
|
+
- Support search and pagination on the list page.
|
|
22
|
+
- Add a product detail page.
|
|
23
|
+
- Add create, edit, and delete entry points as placeholders.
|
|
24
|
+
- Show loading, empty, and error states.
|
|
25
|
+
- Keep the layout consistent with the existing dashboard shell.
|
|
26
|
+
- Preserve route middleware and authentication behavior.
|
|
27
|
+
|
|
28
|
+
## Out Of Scope
|
|
29
|
+
|
|
30
|
+
- Real product persistence.
|
|
31
|
+
- Real create, edit, or delete mutations.
|
|
32
|
+
- Role-based product permissions.
|
|
33
|
+
- Offline caching.
|
|
34
|
+
- Bulk actions.
|
|
35
|
+
- Analytics dashboards.
|
|
36
|
+
- Replacing the existing dashboard design system.
|
|
37
|
+
|
|
38
|
+
## Assumptions
|
|
39
|
+
|
|
40
|
+
- The Nuxt app already has an authenticated dashboard shell.
|
|
41
|
+
- Route middleware already protects dashboard routes.
|
|
42
|
+
- DummyJSON is acceptable for demo data.
|
|
43
|
+
- Existing components or Nuxt UI primitives should be reused before adding new abstractions.
|
|
44
|
+
- Product mutations can be represented as disabled or non-persistent placeholders.
|
|
45
|
+
|
|
46
|
+
## Constraints
|
|
47
|
+
|
|
48
|
+
- Keep changes split into small PRs.
|
|
49
|
+
- Do not introduce new frontend frameworks.
|
|
50
|
+
- Do not add a backend service.
|
|
51
|
+
- Do not store secrets or credentials.
|
|
52
|
+
- Preserve existing dashboard navigation and layout behavior.
|
|
53
|
+
- Keep DummyJSON-specific code inside the products domain or shared HTTP layer.
|
|
54
|
+
|
|
55
|
+
## Acceptance Criteria
|
|
56
|
+
|
|
57
|
+
- Authenticated users can open a products list route under the dashboard.
|
|
58
|
+
- The list displays product title, price, category, stock, and thumbnail when available.
|
|
59
|
+
- Users can search products and see updated results.
|
|
60
|
+
- Users can move through paginated results.
|
|
61
|
+
- Users can open a product detail route from the list.
|
|
62
|
+
- Loading, empty, and error states are visible and understandable.
|
|
63
|
+
- Create, edit, and delete controls are present as placeholders without claiming persistence.
|
|
64
|
+
- Unauthenticated users remain blocked by existing dashboard protection.
|
|
65
|
+
- Validation evidence is recorded before each PR is considered complete.
|
|
66
|
+
|
|
67
|
+
## Risks
|
|
68
|
+
|
|
69
|
+
| Risk | Impact | Mitigation |
|
|
70
|
+
| ---- | ------ | ---------- |
|
|
71
|
+
| DummyJSON behavior differs from a real API | Future backend migration may require data mapping changes | Keep API access behind a small products repository |
|
|
72
|
+
| Search and pagination can become coupled to page UI | Harder to test or reuse | Keep query state and fetch behavior simple and explicit |
|
|
73
|
+
| Placeholder CRUD actions may mislead users | Users may think data is persisted | Label placeholders clearly in UI and validation notes |
|
|
74
|
+
| Dashboard design may drift | Boilerplate becomes inconsistent | Reuse existing shell and component conventions |
|
|
75
|
+
|
|
76
|
+
## Open Questions
|
|
77
|
+
|
|
78
|
+
- Should product search update the URL query string?
|
|
79
|
+
- Should pagination default to 10, 12, or 20 items per page?
|
|
80
|
+
- Should product detail pages use `app/pages/dashboard/products/[id].vue` or `app/pages/dashboard/products/[id]/index.vue`?
|
|
81
|
+
- Should placeholder create and edit routes exist, or should actions open disabled dialogs?
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Functional Specification: Products Dashboard Area
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
The dashboard will include a protected products section backed by DummyJSON. Users can browse products, search by keyword, paginate results, open product details, and see create/edit/delete controls that are explicitly placeholders.
|
|
6
|
+
|
|
7
|
+
## User Stories
|
|
8
|
+
|
|
9
|
+
- As an authenticated dashboard user, I want to view products so I can inspect available catalog data.
|
|
10
|
+
- As an authenticated dashboard user, I want to search products so I can find relevant records quickly.
|
|
11
|
+
- As an authenticated dashboard user, I want to paginate products so large result sets remain manageable.
|
|
12
|
+
- As an authenticated dashboard user, I want to open a product detail page so I can inspect one product.
|
|
13
|
+
- As a developer, I want CRUD placeholders so I can see where future persistence work belongs without implementing it now.
|
|
14
|
+
|
|
15
|
+
## Functional Requirements
|
|
16
|
+
|
|
17
|
+
- The products area must live under the protected dashboard route group.
|
|
18
|
+
- The list page must fetch products from DummyJSON.
|
|
19
|
+
- The list page must display product title, price, category, stock, and thumbnail when present.
|
|
20
|
+
- The list page must support keyword search.
|
|
21
|
+
- The list page must support pagination.
|
|
22
|
+
- Search and pagination state must be understandable to the user.
|
|
23
|
+
- The detail page must fetch and display one product by ID.
|
|
24
|
+
- Create, edit, and delete controls must be visible but non-persistent.
|
|
25
|
+
- Loading states must appear while product data is being fetched.
|
|
26
|
+
- Empty states must appear when no products match the current query.
|
|
27
|
+
- Error states must appear when the product request fails.
|
|
28
|
+
|
|
29
|
+
## Screens And States
|
|
30
|
+
|
|
31
|
+
### Products List
|
|
32
|
+
|
|
33
|
+
- Default state with paginated products.
|
|
34
|
+
- Search state with filtered results.
|
|
35
|
+
- Loading state during fetch.
|
|
36
|
+
- Empty state when no results match the query.
|
|
37
|
+
- Error state when DummyJSON fails or returns an unexpected response.
|
|
38
|
+
|
|
39
|
+
### Product Detail
|
|
40
|
+
|
|
41
|
+
- Default state with product summary and key attributes.
|
|
42
|
+
- Loading state during fetch.
|
|
43
|
+
- Not found state for an invalid product ID.
|
|
44
|
+
- Error state for request failures.
|
|
45
|
+
|
|
46
|
+
### Placeholder Actions
|
|
47
|
+
|
|
48
|
+
- Create action appears from the products list.
|
|
49
|
+
- Edit action appears from the detail page or row action.
|
|
50
|
+
- Delete action appears where destructive actions are expected.
|
|
51
|
+
- Placeholder actions must not send real mutation requests.
|
|
52
|
+
|
|
53
|
+
## Errors
|
|
54
|
+
|
|
55
|
+
- Network request fails.
|
|
56
|
+
- DummyJSON returns an unexpected response shape.
|
|
57
|
+
- Product ID is missing, invalid, or not found.
|
|
58
|
+
- Search returns no products.
|
|
59
|
+
- Pagination points beyond the available result range.
|
|
60
|
+
|
|
61
|
+
## Edge Cases
|
|
62
|
+
|
|
63
|
+
- Empty search query should return the default product list.
|
|
64
|
+
- Fast search changes should not leave stale loading indicators.
|
|
65
|
+
- Pagination should reset or remain coherent when the search query changes.
|
|
66
|
+
- Missing thumbnails should not break row layout.
|
|
67
|
+
- Long product names should not overflow the table or card layout.
|
|
68
|
+
- API errors should not break dashboard navigation.
|
|
69
|
+
|
|
70
|
+
## Acceptance Criteria
|
|
71
|
+
|
|
72
|
+
- The list route is protected by existing dashboard auth behavior.
|
|
73
|
+
- Product list data loads from DummyJSON and renders key fields.
|
|
74
|
+
- Search changes the displayed product results.
|
|
75
|
+
- Pagination changes the displayed product page.
|
|
76
|
+
- Product detail navigation works for a valid product.
|
|
77
|
+
- Invalid product IDs show a not found or error state.
|
|
78
|
+
- Loading, empty, and error states are implemented for list and detail views.
|
|
79
|
+
- CRUD placeholders are visible and clearly non-persistent.
|
|
80
|
+
- Validation commands are run and reported for each PR.
|
|
81
|
+
|
|
82
|
+
## Out Of Scope
|
|
83
|
+
|
|
84
|
+
- Real create, update, or delete API calls.
|
|
85
|
+
- Custom backend API routes.
|
|
86
|
+
- Authentication redesign.
|
|
87
|
+
- Persistent filters.
|
|
88
|
+
- Advanced table features such as sorting, column customization, exports, and bulk selection.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Technical Plan: Products Dashboard Area
|
|
2
|
+
|
|
3
|
+
## Architecture Summary
|
|
4
|
+
|
|
5
|
+
Add a small products domain that isolates DummyJSON access from dashboard pages. Dashboard pages should consume typed product contracts and repository functions instead of calling `fetch` directly in every component.
|
|
6
|
+
|
|
7
|
+
The UI should reuse the existing dashboard shell, route middleware, Nuxt UI primitives, and Tailwind conventions. The plan assumes a Nuxt app may use `app/pages/dashboard/products/index.vue`, `app/pages/dashboard/products/[id].vue` or `app/pages/dashboard/products/[id]/index.vue`, `domains/products/`, shared HTTP utilities, route middleware for auth, and a componentized dashboard shell.
|
|
8
|
+
|
|
9
|
+
## Proposed Folders And Files
|
|
10
|
+
|
|
11
|
+
| Path | Purpose |
|
|
12
|
+
| ---- | ------- |
|
|
13
|
+
| `domains/products/types.ts` | Product and product list contracts |
|
|
14
|
+
| `domains/products/repository.ts` | DummyJSON product fetch functions |
|
|
15
|
+
| `domains/products/mappers.ts` | Optional response normalization if needed |
|
|
16
|
+
| `app/pages/dashboard/products/index.vue` | Products list route |
|
|
17
|
+
| `app/pages/dashboard/products/[id].vue` | Product detail route if the app uses flat dynamic pages |
|
|
18
|
+
| `app/pages/dashboard/products/[id]/index.vue` | Product detail route if the app uses folder-based dynamic pages |
|
|
19
|
+
| `components/dashboard/products/` | Product-specific UI components if page files become too large |
|
|
20
|
+
| `shared/http/` | Existing shared HTTP utilities if already present |
|
|
21
|
+
|
|
22
|
+
Do not assume all paths exist. Inspect the target repository before editing and follow the local folder pattern.
|
|
23
|
+
|
|
24
|
+
## Implementation Steps
|
|
25
|
+
|
|
26
|
+
1. Inspect the existing dashboard routes, auth middleware, component structure, and data-fetching helpers.
|
|
27
|
+
2. Add products domain types and repository functions for list, search, pagination, and detail fetches.
|
|
28
|
+
3. Implement the products list page using existing dashboard layout conventions.
|
|
29
|
+
4. Wire search and pagination state with clear loading, empty, and error states.
|
|
30
|
+
5. Add the product detail page using the repository detail fetch.
|
|
31
|
+
6. Add create, edit, and delete placeholders without real mutation calls.
|
|
32
|
+
7. Add or update focused tests where the project already has test infrastructure.
|
|
33
|
+
8. Run typecheck, lint, tests, and build before reporting completion.
|
|
34
|
+
|
|
35
|
+
## Dependencies
|
|
36
|
+
|
|
37
|
+
- Existing Nuxt 4 and Vue 3 app.
|
|
38
|
+
- Existing TypeScript configuration.
|
|
39
|
+
- Existing Nuxt UI and Tailwind setup.
|
|
40
|
+
- Existing route middleware for protected dashboard pages.
|
|
41
|
+
- DummyJSON product endpoints.
|
|
42
|
+
- Existing test and validation commands, when available.
|
|
43
|
+
|
|
44
|
+
No new runtime dependency is required for this plan.
|
|
45
|
+
|
|
46
|
+
## Risks
|
|
47
|
+
|
|
48
|
+
- DummyJSON response fields may need mapping before UI use.
|
|
49
|
+
- Product list search and pagination can produce stale results if query state is not handled carefully.
|
|
50
|
+
- Page files can become too large if list, empty, error, and placeholder action UI are all inline.
|
|
51
|
+
- Placeholder actions can be mistaken for real persistence if labels are unclear.
|
|
52
|
+
- Tests may not exist yet in the target project.
|
|
53
|
+
|
|
54
|
+
## Trade-Offs
|
|
55
|
+
|
|
56
|
+
- A small repository layer adds one extra file but keeps DummyJSON details out of pages.
|
|
57
|
+
- Keeping placeholders non-persistent limits scope but still shows intended CRUD workflow.
|
|
58
|
+
- URL query synchronization improves shareability but may be deferred if it increases PR size.
|
|
59
|
+
- Component extraction should happen only when page complexity justifies it.
|
|
60
|
+
|
|
61
|
+
## Validation Plan
|
|
62
|
+
|
|
63
|
+
- Run `npm run typecheck`.
|
|
64
|
+
- Run `npm run lint`.
|
|
65
|
+
- Run `npm run test` if the target project defines it.
|
|
66
|
+
- Run `npm run build`.
|
|
67
|
+
- Manually verify protected route behavior.
|
|
68
|
+
- Manually verify list loading, search, pagination, empty state, error state, and detail navigation.
|
|
69
|
+
- Confirm CRUD placeholders do not send mutation requests.
|
|
70
|
+
|
|
71
|
+
## Rollback Plan
|
|
72
|
+
|
|
73
|
+
- Revert the selected PR if validation fails and the fix is not small.
|
|
74
|
+
- Remove added product routes from dashboard navigation if navigation was modified.
|
|
75
|
+
- Remove the products domain files added by the failing PR.
|
|
76
|
+
- Keep unrelated dashboard routes and auth middleware unchanged.
|