eai-cli 0.0.0-bootstrap.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/LICENSE +183 -0
- package/NOTICE +4 -0
- package/README.md +14 -0
- package/dist/commands/agent.d.ts +3 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +69 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/blocks.d.ts +3 -0
- package/dist/commands/blocks.d.ts.map +1 -0
- package/dist/commands/blocks.js +249 -0
- package/dist/commands/blocks.js.map +1 -0
- package/dist/commands/chat.d.ts +6 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +105 -0
- package/dist/commands/chat.js.map +1 -0
- package/dist/commands/deploy.d.ts +36 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +712 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dev.d.ts +15 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +133 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/docs.d.ts +6 -0
- package/dist/commands/docs.d.ts.map +1 -0
- package/dist/commands/docs.js +118 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/env.d.ts +10 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +200 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/errors.d.ts +3 -0
- package/dist/commands/errors.d.ts.map +1 -0
- package/dist/commands/errors.js +72 -0
- package/dist/commands/errors.js.map +1 -0
- package/dist/commands/gofer.d.ts +3 -0
- package/dist/commands/gofer.d.ts.map +1 -0
- package/dist/commands/gofer.js +134 -0
- package/dist/commands/gofer.js.map +1 -0
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1437 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +7 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +117 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/provision.d.ts +6 -0
- package/dist/commands/provision.d.ts.map +1 -0
- package/dist/commands/provision.js +855 -0
- package/dist/commands/provision.js.map +1 -0
- package/dist/commands/publicapi.d.ts +6 -0
- package/dist/commands/publicapi.d.ts.map +1 -0
- package/dist/commands/publicapi.js +184 -0
- package/dist/commands/publicapi.js.map +1 -0
- package/dist/commands/resources.d.ts +38 -0
- package/dist/commands/resources.d.ts.map +1 -0
- package/dist/commands/resources.js +1010 -0
- package/dist/commands/resources.js.map +1 -0
- package/dist/commands/runtime.d.ts +3 -0
- package/dist/commands/runtime.d.ts.map +1 -0
- package/dist/commands/runtime.js +78 -0
- package/dist/commands/runtime.js.map +1 -0
- package/dist/commands/template.d.ts +3 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +365 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/tenant.d.ts +45 -0
- package/dist/commands/tenant.d.ts.map +1 -0
- package/dist/commands/tenant.js +1036 -0
- package/dist/commands/tenant.js.map +1 -0
- package/dist/commands/types.d.ts +130 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +1636 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/update.d.ts +13 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +163 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/user.d.ts +6 -0
- package/dist/commands/user.d.ts.map +1 -0
- package/dist/commands/user.js +359 -0
- package/dist/commands/user.js.map +1 -0
- package/dist/commands/verify.d.ts +40 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +1442 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/vertical.d.ts +24 -0
- package/dist/commands/vertical.d.ts.map +1 -0
- package/dist/commands/vertical.js +301 -0
- package/dist/commands/vertical.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +73 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/commands/workflow.d.ts +6 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +400 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +272 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/agent-guide.d.ts +24 -0
- package/dist/lib/agent-guide.d.ts.map +1 -0
- package/dist/lib/agent-guide.js +155 -0
- package/dist/lib/agent-guide.js.map +1 -0
- package/dist/lib/api.d.ts +338 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +991 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/auth.d.ts +65 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +592 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/azure-cli.d.ts +6 -0
- package/dist/lib/azure-cli.d.ts.map +1 -0
- package/dist/lib/azure-cli.js +13 -0
- package/dist/lib/azure-cli.js.map +1 -0
- package/dist/lib/block-catalog-normalize.d.ts +47 -0
- package/dist/lib/block-catalog-normalize.d.ts.map +1 -0
- package/dist/lib/block-catalog-normalize.js +355 -0
- package/dist/lib/block-catalog-normalize.js.map +1 -0
- package/dist/lib/block-catalog-types.d.ts +111 -0
- package/dist/lib/block-catalog-types.d.ts.map +1 -0
- package/dist/lib/block-catalog-types.js +41 -0
- package/dist/lib/block-catalog-types.js.map +1 -0
- package/dist/lib/block-catalog-utils.d.ts +7 -0
- package/dist/lib/block-catalog-utils.d.ts.map +1 -0
- package/dist/lib/block-catalog-utils.js +47 -0
- package/dist/lib/block-catalog-utils.js.map +1 -0
- package/dist/lib/block-catalog-validation.d.ts +5 -0
- package/dist/lib/block-catalog-validation.d.ts.map +1 -0
- package/dist/lib/block-catalog-validation.js +112 -0
- package/dist/lib/block-catalog-validation.js.map +1 -0
- package/dist/lib/block-catalog.d.ts +3 -0
- package/dist/lib/block-catalog.d.ts.map +1 -0
- package/dist/lib/block-catalog.js +284 -0
- package/dist/lib/block-catalog.js.map +1 -0
- package/dist/lib/cloud-env.d.ts +25 -0
- package/dist/lib/cloud-env.d.ts.map +1 -0
- package/dist/lib/cloud-env.js +79 -0
- package/dist/lib/cloud-env.js.map +1 -0
- package/dist/lib/config.d.ts +116 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +195 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/context.d.ts +43 -0
- package/dist/lib/context.d.ts.map +1 -0
- package/dist/lib/context.js +68 -0
- package/dist/lib/context.js.map +1 -0
- package/dist/lib/error-codes.d.ts +56 -0
- package/dist/lib/error-codes.d.ts.map +1 -0
- package/dist/lib/error-codes.js +211 -0
- package/dist/lib/error-codes.js.map +1 -0
- package/dist/lib/error-guidance/catalog.d.ts +648 -0
- package/dist/lib/error-guidance/catalog.d.ts.map +1 -0
- package/dist/lib/error-guidance/catalog.js +940 -0
- package/dist/lib/error-guidance/catalog.js.map +1 -0
- package/dist/lib/error-guidance/match.d.ts +3 -0
- package/dist/lib/error-guidance/match.d.ts.map +1 -0
- package/dist/lib/error-guidance/match.js +46 -0
- package/dist/lib/error-guidance/match.js.map +1 -0
- package/dist/lib/error-guidance/render.d.ts +5 -0
- package/dist/lib/error-guidance/render.d.ts.map +1 -0
- package/dist/lib/error-guidance/render.js +92 -0
- package/dist/lib/error-guidance/render.js.map +1 -0
- package/dist/lib/error-guidance/types.d.ts +76 -0
- package/dist/lib/error-guidance/types.d.ts.map +1 -0
- package/dist/lib/error-guidance/types.js +2 -0
- package/dist/lib/error-guidance/types.js.map +1 -0
- package/dist/lib/error-guidance/validate.d.ts +3 -0
- package/dist/lib/error-guidance/validate.d.ts.map +1 -0
- package/dist/lib/error-guidance/validate.js +59 -0
- package/dist/lib/error-guidance/validate.js.map +1 -0
- package/dist/lib/gofer-installer.d.ts +32 -0
- package/dist/lib/gofer-installer.d.ts.map +1 -0
- package/dist/lib/gofer-installer.js +589 -0
- package/dist/lib/gofer-installer.js.map +1 -0
- package/dist/lib/gofer-refresh.d.ts +46 -0
- package/dist/lib/gofer-refresh.d.ts.map +1 -0
- package/dist/lib/gofer-refresh.js +536 -0
- package/dist/lib/gofer-refresh.js.map +1 -0
- package/dist/lib/next-route-exports.d.ts +6 -0
- package/dist/lib/next-route-exports.d.ts.map +1 -0
- package/dist/lib/next-route-exports.js +127 -0
- package/dist/lib/next-route-exports.js.map +1 -0
- package/dist/lib/npm.d.ts +2 -0
- package/dist/lib/npm.d.ts.map +1 -0
- package/dist/lib/npm.js +4 -0
- package/dist/lib/npm.js.map +1 -0
- package/dist/lib/object-type-defaults.d.ts +4 -0
- package/dist/lib/object-type-defaults.d.ts.map +1 -0
- package/dist/lib/object-type-defaults.js +72 -0
- package/dist/lib/object-type-defaults.js.map +1 -0
- package/dist/lib/output.d.ts +35 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +166 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/profile.d.ts +52 -0
- package/dist/lib/profile.d.ts.map +1 -0
- package/dist/lib/profile.js +116 -0
- package/dist/lib/profile.js.map +1 -0
- package/dist/lib/project-manifest.d.ts +42 -0
- package/dist/lib/project-manifest.d.ts.map +1 -0
- package/dist/lib/project-manifest.js +191 -0
- package/dist/lib/project-manifest.js.map +1 -0
- package/dist/lib/resourceapi-bundle.d.ts +33 -0
- package/dist/lib/resourceapi-bundle.d.ts.map +1 -0
- package/dist/lib/resourceapi-bundle.js +79 -0
- package/dist/lib/resourceapi-bundle.js.map +1 -0
- package/dist/lib/runtime-contract.d.ts +84 -0
- package/dist/lib/runtime-contract.d.ts.map +1 -0
- package/dist/lib/runtime-contract.js +318 -0
- package/dist/lib/runtime-contract.js.map +1 -0
- package/dist/lib/schema-builder.d.ts +28 -0
- package/dist/lib/schema-builder.d.ts.map +1 -0
- package/dist/lib/schema-builder.js +69 -0
- package/dist/lib/schema-builder.js.map +1 -0
- package/dist/lib/tenant-context.d.ts +127 -0
- package/dist/lib/tenant-context.d.ts.map +1 -0
- package/dist/lib/tenant-context.js +573 -0
- package/dist/lib/tenant-context.js.map +1 -0
- package/dist/lib/update-check.d.ts +52 -0
- package/dist/lib/update-check.d.ts.map +1 -0
- package/dist/lib/update-check.js +271 -0
- package/dist/lib/update-check.js.map +1 -0
- package/dist/lib/update-maintenance.d.ts +15 -0
- package/dist/lib/update-maintenance.d.ts.map +1 -0
- package/dist/lib/update-maintenance.js +187 -0
- package/dist/lib/update-maintenance.js.map +1 -0
- package/dist/lib/utils.d.ts +23 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +48 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/workflow-provisioning.d.ts +54 -0
- package/dist/lib/workflow-provisioning.d.ts.map +1 -0
- package/dist/lib/workflow-provisioning.js +281 -0
- package/dist/lib/workflow-provisioning.js.map +1 -0
- package/package.json +51 -0
- package/resources/gofer/.gofer-version +7 -0
- package/resources/gofer/agents-skills/0_gofer_start/SKILL.md +1287 -0
- package/resources/gofer/agents-skills/0a_problem_validation/SKILL.md +429 -0
- package/resources/gofer/agents-skills/10_gofer_cloud/SKILL.md +635 -0
- package/resources/gofer/agents-skills/1_gofer_research/SKILL.md +1159 -0
- package/resources/gofer/agents-skills/2_gofer_specify/SKILL.md +860 -0
- package/resources/gofer/agents-skills/3_gofer_plan/SKILL.md +886 -0
- package/resources/gofer/agents-skills/4_gofer_tasks/SKILL.md +748 -0
- package/resources/gofer/agents-skills/5_gofer_implement/SKILL.md +924 -0
- package/resources/gofer/agents-skills/6_gofer_validate/SKILL.md +2269 -0
- package/resources/gofer/agents-skills/7_gofer_save/SKILL.md +423 -0
- package/resources/gofer/agents-skills/7a_stakeholder_comms/SKILL.md +508 -0
- package/resources/gofer/agents-skills/8_gofer_branding/SKILL.md +315 -0
- package/resources/gofer/agents-skills/9_gofer_tests/SKILL.md +558 -0
- package/resources/gofer/agents-skills/gofer_bootstrap_workspace/SKILL.md +148 -0
- package/resources/gofer/agents-skills/gofer_check_workspace/SKILL.md +119 -0
- package/resources/gofer/agents-skills/gofer_constitution/SKILL.md +612 -0
- package/resources/gofer/agents-skills/gofer_diagnose/SKILL.md +114 -0
- package/resources/gofer/agents-skills/gofer_eai_first_run/SKILL.md +397 -0
- package/resources/gofer/agents-skills/gofer_hydrate/SKILL.md +561 -0
- package/resources/gofer/agents-skills/gofer_personality/SKILL.md +44 -0
- package/resources/gofer/agents-skills/gofer_plan/SKILL.md +40 -0
- package/resources/gofer/agents-skills/gofer_side/SKILL.md +45 -0
- package/resources/gofer/agents-skills/gofer_spec_summary/SKILL.md +112 -0
- package/resources/gofer/agents-skills/gofer_tdd/SKILL.md +112 -0
- package/resources/gofer/agents-skills/gofer_vocabulary/SKILL.md +112 -0
- package/resources/gofer/agents-skills/gofer_zoom_out/SKILL.md +112 -0
- package/resources/gofer/bash-scripts/check-context-health.sh +365 -0
- package/resources/gofer/bash-scripts/check-persona-pack.sh +81 -0
- package/resources/gofer/bash-scripts/check-prerequisites.sh +168 -0
- package/resources/gofer/bash-scripts/common.sh +192 -0
- package/resources/gofer/bash-scripts/create-new-feature.sh +260 -0
- package/resources/gofer/bash-scripts/install-optional-tools.sh +270 -0
- package/resources/gofer/bash-scripts/log-stage.sh +224 -0
- package/resources/gofer/bash-scripts/mark-task-complete.sh +74 -0
- package/resources/gofer/bash-scripts/pipeline-state.sh +306 -0
- package/resources/gofer/bash-scripts/read-failed-approaches.sh +114 -0
- package/resources/gofer/bash-scripts/read-session-memories.sh +96 -0
- package/resources/gofer/bash-scripts/save-checkpoint.sh +407 -0
- package/resources/gofer/bash-scripts/setup-plan.sh +62 -0
- package/resources/gofer/bash-scripts/sync-implementation-status.sh +47 -0
- package/resources/gofer/bash-scripts/update-agent-context.sh +772 -0
- package/resources/gofer/bash-scripts/validate-artifact.sh +335 -0
- package/resources/gofer/bash-scripts/verify-task.sh +384 -0
- package/resources/gofer/bash-scripts/write-failed-approach.sh +110 -0
- package/resources/gofer/bash-scripts/write-periodic-checkpoint.sh +128 -0
- package/resources/gofer/bash-scripts/write-session-memory.sh +118 -0
- package/resources/gofer/claude-agents/assumption-tracker.md +168 -0
- package/resources/gofer/claude-agents/business-metrics-analyzer.md +169 -0
- package/resources/gofer/claude-agents/business-problem-validator.md +168 -0
- package/resources/gofer/claude-agents/codebase-analyzer.md +124 -0
- package/resources/gofer/claude-agents/codebase-locator.md +95 -0
- package/resources/gofer/claude-agents/codebase-pattern-finder.md +180 -0
- package/resources/gofer/claude-agents/comms-writer.md +158 -0
- package/resources/gofer/claude-agents/engineer-review.md +169 -0
- package/resources/gofer/claude-agents/implement-bug-triangulator.md +94 -0
- package/resources/gofer/claude-agents/implement-code-review-council.md +89 -0
- package/resources/gofer/claude-agents/implement-doc-writer.md +89 -0
- package/resources/gofer/claude-agents/implement-error-hardener.md +84 -0
- package/resources/gofer/claude-agents/implement-performance-explorer.md +95 -0
- package/resources/gofer/claude-agents/implement-test-diversifier.md +82 -0
- package/resources/gofer/claude-agents/implement-variant-generator.md +80 -0
- package/resources/gofer/claude-agents/multi-perspective-judge.md +114 -0
- package/resources/gofer/claude-agents/plan-api-comparator.md +90 -0
- package/resources/gofer/claude-agents/plan-architecture-diverger.md +100 -0
- package/resources/gofer/claude-agents/plan-data-model-stress-tester.md +95 -0
- package/resources/gofer/claude-agents/plan-migration-path-finder.md +95 -0
- package/resources/gofer/claude-agents/plan-refactor-rewrite-advisor.md +97 -0
- package/resources/gofer/claude-agents/research-dependency-evaluator.md +106 -0
- package/resources/gofer/claude-agents/research-horizon-scanner.md +100 -0
- package/resources/gofer/claude-agents/research-market-scanner.md +137 -0
- package/resources/gofer/claude-agents/research-perspective-multiplier.md +102 -0
- package/resources/gofer/claude-agents/scope-creep-detector.md +152 -0
- package/resources/gofer/claude-agents/specify-ambiguity-detector.md +95 -0
- package/resources/gofer/claude-agents/specify-journey-stress-tester.md +92 -0
- package/resources/gofer/claude-agents/tasks-cross-cutting-scanner.md +91 -0
- package/resources/gofer/claude-agents/tasks-rollback-planner.md +89 -0
- package/resources/gofer/claude-agents/validate-security-red-team.md +102 -0
- package/resources/gofer/claude-agents/validation-correctness.md +103 -0
- package/resources/gofer/claude-agents/validation-integration.md +129 -0
- package/resources/gofer/claude-agents/validation-performance.md +120 -0
- package/resources/gofer/claude-agents/validation-security.md +115 -0
- package/resources/gofer/claude-agents/validation-standards.md +151 -0
- package/resources/gofer/claude-agents/validation-test-quality.md +146 -0
- package/resources/gofer/claude-agents/visual-bounded-context-writer.md +40 -0
- package/resources/gofer/claude-agents/visual-c4-writer.md +45 -0
- package/resources/gofer/claude-agents/visual-erd-writer.md +34 -0
- package/resources/gofer/claude-agents/visual-heatmap-writer.md +63 -0
- package/resources/gofer/claude-agents/visual-risk-writer.md +64 -0
- package/resources/gofer/claude-commands/0_gofer_start.md +1282 -0
- package/resources/gofer/claude-commands/0a_problem_validation.md +424 -0
- package/resources/gofer/claude-commands/10_gofer_cloud.md +630 -0
- package/resources/gofer/claude-commands/1_gofer_research.md +1154 -0
- package/resources/gofer/claude-commands/2_gofer_specify.md +855 -0
- package/resources/gofer/claude-commands/3_gofer_plan.md +881 -0
- package/resources/gofer/claude-commands/4_gofer_tasks.md +743 -0
- package/resources/gofer/claude-commands/5_gofer_implement.md +919 -0
- package/resources/gofer/claude-commands/6_gofer_validate.md +2264 -0
- package/resources/gofer/claude-commands/7_gofer_save.md +418 -0
- package/resources/gofer/claude-commands/7a_stakeholder_comms.md +503 -0
- package/resources/gofer/claude-commands/8_gofer_branding.md +310 -0
- package/resources/gofer/claude-commands/9_gofer_tests.md +553 -0
- package/resources/gofer/claude-commands/gofer_bootstrap_workspace.md +143 -0
- package/resources/gofer/claude-commands/gofer_check_workspace.md +114 -0
- package/resources/gofer/claude-commands/gofer_constitution.md +607 -0
- package/resources/gofer/claude-commands/gofer_diagnose.md +109 -0
- package/resources/gofer/claude-commands/gofer_eai_first_run.md +392 -0
- package/resources/gofer/claude-commands/gofer_hydrate.md +556 -0
- package/resources/gofer/claude-commands/gofer_personality.md +39 -0
- package/resources/gofer/claude-commands/gofer_plan.md +35 -0
- package/resources/gofer/claude-commands/gofer_side.md +40 -0
- package/resources/gofer/claude-commands/gofer_spec_summary.md +107 -0
- package/resources/gofer/claude-commands/gofer_tdd.md +107 -0
- package/resources/gofer/claude-commands/gofer_vocabulary.md +107 -0
- package/resources/gofer/claude-commands/gofer_zoom_out.md +107 -0
- package/resources/gofer/claude-skills/eai-gofer/SKILL.md +56 -0
- package/resources/gofer/commands/.gitkeep +0 -0
- package/resources/gofer/commands/0_gofer_start.md +1299 -0
- package/resources/gofer/commands/0a_problem_validation.md +405 -0
- package/resources/gofer/commands/10_gofer_cloud.md +611 -0
- package/resources/gofer/commands/1_gofer_research.md +1135 -0
- package/resources/gofer/commands/2_gofer_specify.md +836 -0
- package/resources/gofer/commands/3_gofer_plan.md +862 -0
- package/resources/gofer/commands/4_gofer_tasks.md +724 -0
- package/resources/gofer/commands/5_gofer_implement.md +900 -0
- package/resources/gofer/commands/6_gofer_validate.md +2245 -0
- package/resources/gofer/commands/7_gofer_save.md +399 -0
- package/resources/gofer/commands/7a_stakeholder_comms.md +484 -0
- package/resources/gofer/commands/8_gofer_branding.md +291 -0
- package/resources/gofer/commands/9_gofer_tests.md +534 -0
- package/resources/gofer/commands/gofer_bootstrap_workspace.md +159 -0
- package/resources/gofer/commands/gofer_check_workspace.md +130 -0
- package/resources/gofer/commands/gofer_constitution.md +588 -0
- package/resources/gofer/commands/gofer_diagnose.md +89 -0
- package/resources/gofer/commands/gofer_eai_first_run.md +392 -0
- package/resources/gofer/commands/gofer_hydrate.md +537 -0
- package/resources/gofer/commands/gofer_personality.md +61 -0
- package/resources/gofer/commands/gofer_plan.md +51 -0
- package/resources/gofer/commands/gofer_side.md +56 -0
- package/resources/gofer/commands/gofer_spec_summary.md +87 -0
- package/resources/gofer/commands/gofer_tdd.md +87 -0
- package/resources/gofer/commands/gofer_vocabulary.md +87 -0
- package/resources/gofer/commands/gofer_zoom_out.md +87 -0
- package/resources/gofer/copilot-instructions/gofer-cost.instructions.md +13 -0
- package/resources/gofer/copilot-instructions/language-server.instructions.md +49 -0
- package/resources/gofer/copilot-instructions/typescript.instructions.md +47 -0
- package/resources/gofer/copilot-instructions/vscode-extension.instructions.md +46 -0
- package/resources/gofer/copilot-prompts/0_gofer_start.prompt.md +1308 -0
- package/resources/gofer/copilot-prompts/0a_problem_validation.prompt.md +429 -0
- package/resources/gofer/copilot-prompts/10_gofer_cloud.prompt.md +644 -0
- package/resources/gofer/copilot-prompts/1_gofer_research.prompt.md +1177 -0
- package/resources/gofer/copilot-prompts/2_gofer_specify.prompt.md +878 -0
- package/resources/gofer/copilot-prompts/3_gofer_plan.prompt.md +904 -0
- package/resources/gofer/copilot-prompts/4_gofer_tasks.prompt.md +766 -0
- package/resources/gofer/copilot-prompts/5_gofer_implement.prompt.md +942 -0
- package/resources/gofer/copilot-prompts/6_gofer_validate.prompt.md +2277 -0
- package/resources/gofer/copilot-prompts/7_gofer_save.prompt.md +433 -0
- package/resources/gofer/copilot-prompts/7a_stakeholder_comms.prompt.md +516 -0
- package/resources/gofer/copilot-prompts/8_gofer_branding.prompt.md +323 -0
- package/resources/gofer/copilot-prompts/9_gofer_tests.prompt.md +566 -0
- package/resources/gofer/copilot-prompts/gofer_bootstrap_workspace.prompt.md +161 -0
- package/resources/gofer/copilot-prompts/gofer_check_workspace.prompt.md +132 -0
- package/resources/gofer/copilot-prompts/gofer_constitution.prompt.md +621 -0
- package/resources/gofer/copilot-prompts/gofer_diagnose.prompt.md +127 -0
- package/resources/gofer/copilot-prompts/gofer_eai_first_run.prompt.md +410 -0
- package/resources/gofer/copilot-prompts/gofer_hydrate.prompt.md +571 -0
- package/resources/gofer/copilot-prompts/gofer_personality.prompt.md +57 -0
- package/resources/gofer/copilot-prompts/gofer_plan.prompt.md +53 -0
- package/resources/gofer/copilot-prompts/gofer_side.prompt.md +58 -0
- package/resources/gofer/copilot-prompts/gofer_spec_summary.prompt.md +125 -0
- package/resources/gofer/copilot-prompts/gofer_tdd.prompt.md +125 -0
- package/resources/gofer/copilot-prompts/gofer_vocabulary.prompt.md +125 -0
- package/resources/gofer/copilot-prompts/gofer_zoom_out.prompt.md +125 -0
- package/resources/gofer/gemini/agents/assumption-tracker.md +171 -0
- package/resources/gofer/gemini/agents/business-metrics-analyzer.md +172 -0
- package/resources/gofer/gemini/agents/business-problem-validator.md +171 -0
- package/resources/gofer/gemini/agents/codebase-analyzer.md +127 -0
- package/resources/gofer/gemini/agents/codebase-locator.md +98 -0
- package/resources/gofer/gemini/agents/codebase-pattern-finder.md +183 -0
- package/resources/gofer/gemini/agents/comms-writer.md +161 -0
- package/resources/gofer/gemini/agents/engineer-review.md +172 -0
- package/resources/gofer/gemini/agents/implement-bug-triangulator.md +97 -0
- package/resources/gofer/gemini/agents/implement-code-review-council.md +92 -0
- package/resources/gofer/gemini/agents/implement-doc-writer.md +92 -0
- package/resources/gofer/gemini/agents/implement-error-hardener.md +87 -0
- package/resources/gofer/gemini/agents/implement-performance-explorer.md +98 -0
- package/resources/gofer/gemini/agents/implement-test-diversifier.md +85 -0
- package/resources/gofer/gemini/agents/implement-variant-generator.md +83 -0
- package/resources/gofer/gemini/agents/multi-perspective-judge.md +117 -0
- package/resources/gofer/gemini/agents/plan-api-comparator.md +93 -0
- package/resources/gofer/gemini/agents/plan-architecture-diverger.md +103 -0
- package/resources/gofer/gemini/agents/plan-data-model-stress-tester.md +98 -0
- package/resources/gofer/gemini/agents/plan-migration-path-finder.md +98 -0
- package/resources/gofer/gemini/agents/plan-refactor-rewrite-advisor.md +100 -0
- package/resources/gofer/gemini/agents/research-dependency-evaluator.md +109 -0
- package/resources/gofer/gemini/agents/research-horizon-scanner.md +103 -0
- package/resources/gofer/gemini/agents/research-market-scanner.md +140 -0
- package/resources/gofer/gemini/agents/research-perspective-multiplier.md +105 -0
- package/resources/gofer/gemini/agents/scope-creep-detector.md +155 -0
- package/resources/gofer/gemini/agents/specify-ambiguity-detector.md +98 -0
- package/resources/gofer/gemini/agents/specify-journey-stress-tester.md +95 -0
- package/resources/gofer/gemini/agents/tasks-cross-cutting-scanner.md +94 -0
- package/resources/gofer/gemini/agents/tasks-rollback-planner.md +92 -0
- package/resources/gofer/gemini/agents/validate-security-red-team.md +105 -0
- package/resources/gofer/gemini/agents/validation-correctness.md +106 -0
- package/resources/gofer/gemini/agents/validation-integration.md +132 -0
- package/resources/gofer/gemini/agents/validation-performance.md +123 -0
- package/resources/gofer/gemini/agents/validation-security.md +118 -0
- package/resources/gofer/gemini/agents/validation-standards.md +154 -0
- package/resources/gofer/gemini/agents/validation-test-quality.md +149 -0
- package/resources/gofer/gemini/agents/visual-bounded-context-writer.md +40 -0
- package/resources/gofer/gemini/agents/visual-c4-writer.md +44 -0
- package/resources/gofer/gemini/agents/visual-erd-writer.md +36 -0
- package/resources/gofer/gemini/agents/visual-heatmap-writer.md +63 -0
- package/resources/gofer/gemini/agents/visual-risk-writer.md +64 -0
- package/resources/gofer/gemini/commands/gofer/.gitkeep +0 -0
- package/resources/gofer/gemini/commands/gofer/0_gofer_start.md +1282 -0
- package/resources/gofer/gemini/commands/gofer/0_gofer_start.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/0a_problem_validation.md +424 -0
- package/resources/gofer/gemini/commands/gofer/0a_problem_validation.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.md +630 -0
- package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/1_gofer_research.md +1154 -0
- package/resources/gofer/gemini/commands/gofer/1_gofer_research.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/2_gofer_specify.md +855 -0
- package/resources/gofer/gemini/commands/gofer/2_gofer_specify.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/3_gofer_plan.md +881 -0
- package/resources/gofer/gemini/commands/gofer/3_gofer_plan.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.md +743 -0
- package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/5_gofer_implement.md +919 -0
- package/resources/gofer/gemini/commands/gofer/5_gofer_implement.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/6_gofer_validate.md +2264 -0
- package/resources/gofer/gemini/commands/gofer/6_gofer_validate.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/7_gofer_save.md +418 -0
- package/resources/gofer/gemini/commands/gofer/7_gofer_save.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.md +503 -0
- package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/8_gofer_branding.md +310 -0
- package/resources/gofer/gemini/commands/gofer/8_gofer_branding.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/9_gofer_tests.md +553 -0
- package/resources/gofer/gemini/commands/gofer/9_gofer_tests.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.md +143 -0
- package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.md +114 -0
- package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_constitution.md +607 -0
- package/resources/gofer/gemini/commands/gofer/gofer_constitution.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_diagnose.md +109 -0
- package/resources/gofer/gemini/commands/gofer/gofer_diagnose.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.md +392 -0
- package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_hydrate.md +556 -0
- package/resources/gofer/gemini/commands/gofer/gofer_hydrate.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_personality.md +39 -0
- package/resources/gofer/gemini/commands/gofer/gofer_personality.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_plan.md +35 -0
- package/resources/gofer/gemini/commands/gofer/gofer_plan.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_side.md +40 -0
- package/resources/gofer/gemini/commands/gofer/gofer_side.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_tdd.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_tdd.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/manifest.json +32 -0
- package/resources/gofer/gemini/extension.json +16 -0
- package/resources/gofer/github-agents/gofer-business.agent.md +20 -0
- package/resources/gofer/github-agents/gofer-implement.agent.md +15 -0
- package/resources/gofer/github-agents/gofer-plan.agent.md +15 -0
- package/resources/gofer/github-agents/gofer-research.agent.md +15 -0
- package/resources/gofer/github-agents/gofer-validate.agent.md +10 -0
- package/resources/gofer/github-skills/eai-gofer/SKILL.md +56 -0
- package/resources/gofer/hook-scripts/agent-stop.mjs +655 -0
- package/resources/gofer/hook-scripts/log-stage-launch-time.mjs +77 -0
- package/resources/gofer/hook-scripts/post-tool-use.mjs +333 -0
- package/resources/gofer/hook-scripts/queued-input.mjs +188 -0
- package/resources/gofer/hook-scripts/session-lifecycle.mjs +93 -0
- package/resources/gofer/hook-scripts/user-prompt-submit.mjs +228 -0
- package/resources/gofer/instruction-templates/base/agents-base.md +37 -0
- package/resources/gofer/instruction-templates/base/claude-base.md +7 -0
- package/resources/gofer/instruction-templates/base/copilot-base.md +26 -0
- package/resources/gofer/instruction-templates/gofer/gofer-claude.md +5 -0
- package/resources/gofer/instruction-templates/gofer/gofer-copilot.md +9 -0
- package/resources/gofer/instruction-templates/languages/generic.md +7 -0
- package/resources/gofer/instruction-templates/languages/go.md +8 -0
- package/resources/gofer/instruction-templates/languages/java.md +8 -0
- package/resources/gofer/instruction-templates/languages/python.md +9 -0
- package/resources/gofer/instruction-templates/languages/rust.md +9 -0
- package/resources/gofer/instruction-templates/languages/typescript.md +19 -0
- package/resources/gofer/instruction-templates/workflow/principles.md +52 -0
- package/resources/gofer/memory/constitution.md +391 -0
- package/resources/gofer/memory/context-profiles.yaml +74 -0
- package/resources/gofer/memory/decisions/000-use-adr-for-decisions.md +67 -0
- package/resources/gofer/memory/decisions/001-di-framework.md +190 -0
- package/resources/gofer/memory/decisions/002-module-extraction.md +305 -0
- package/resources/gofer/memory/decisions/003-error-handling.md +368 -0
- package/resources/gofer/memory/decisions/004-cache-eviction.md +436 -0
- package/resources/gofer/memory/decisions/005-constants-management.md +520 -0
- package/resources/gofer/memory/decisions/README.md +129 -0
- package/resources/gofer/memory/diagrams/di-container.mmd +321 -0
- package/resources/gofer/memory/diagrams/extension-activation.mmd +184 -0
- package/resources/gofer/memory/diagrams/module-dependencies.mmd +264 -0
- package/resources/gofer/memory/gofer-model-policy.yaml +97 -0
- package/resources/gofer/memory/lessons.md +46 -0
- package/resources/gofer/node-scripts/canonical-descriptions.mjs +86 -0
- package/resources/gofer/node-scripts/check-version-alignment.mjs +131 -0
- package/resources/gofer/node-scripts/codex-doctor.mjs +425 -0
- package/resources/gofer/node-scripts/generate-commands.mjs +1366 -0
- package/resources/gofer/node-scripts/generate-issues.js +563 -0
- package/resources/gofer/node-scripts/gofer-closed-loop-audit.mjs +893 -0
- package/resources/gofer/node-scripts/gofer-loop-audit.mjs +541 -0
- package/resources/gofer/node-scripts/gofer-performance-report.mjs +306 -0
- package/resources/gofer/node-scripts/gofer-workspace-bootstrap.mjs +56 -0
- package/resources/gofer/node-scripts/gofer-workspace-check.mjs +56 -0
- package/resources/gofer/node-scripts/lib/ai-leverage-tagger.mjs +103 -0
- package/resources/gofer/node-scripts/lib/assemble-stakeholder-pack.mjs +114 -0
- package/resources/gofer/node-scripts/lib/marp-deck.mjs +87 -0
- package/resources/gofer/node-scripts/lib/mermaid-tabular-fallback.mjs +264 -0
- package/resources/gofer/node-scripts/lib/render-visual.mjs +54 -0
- package/resources/gofer/node-scripts/lib/validate-aliases.mjs +85 -0
- package/resources/gofer/node-scripts/lib/visual-counts.mjs +44 -0
- package/resources/gofer/node-scripts/lib/visual-pass-pipeline.mjs +134 -0
- package/resources/gofer/node-scripts/mermaid-export.mjs +72 -0
- package/resources/gofer/node-scripts/package-agent-plugin.mjs +940 -0
- package/resources/gofer/node-scripts/parse-stage-command.mjs +211 -0
- package/resources/gofer/node-scripts/schemas/.gitkeep +0 -0
- package/resources/gofer/node-scripts/schemas/stage-command.schema.json +72 -0
- package/resources/gofer/node-scripts/sync-extension-resources.mjs +110 -0
- package/resources/gofer/node-scripts/workspace-bootstrap-lib.mjs +1166 -0
- package/resources/gofer/powershell-scripts/install-optional-tools.ps1 +214 -0
- package/resources/gofer/references/platform/README.md +17 -0
- package/resources/gofer/references/platform/deployment-repo.md +9 -0
- package/resources/gofer/references/platform/eai-app-template.md +45 -0
- package/resources/gofer/references/platform/eai-config-driven-ui.md +156 -0
- package/resources/gofer/references/platform/eai-error-catalog.yaml +197 -0
- package/resources/gofer/references/platform/eai-repo-contract.md +134 -0
- package/resources/gofer/references/platform/eai-service-patterns.md +56 -0
- package/resources/gofer/references/platform/eai.md +85 -0
- package/resources/gofer/references/platform/vertical-template.md +49 -0
- package/resources/gofer/specify-commands/.gitkeep +0 -0
- package/resources/gofer/specify-commands/0_gofer_start.md +1299 -0
- package/resources/gofer/specify-commands/0a_problem_validation.md +405 -0
- package/resources/gofer/specify-commands/10_gofer_cloud.md +611 -0
- package/resources/gofer/specify-commands/1_gofer_research.md +1135 -0
- package/resources/gofer/specify-commands/2_gofer_specify.md +836 -0
- package/resources/gofer/specify-commands/3_gofer_plan.md +862 -0
- package/resources/gofer/specify-commands/4_gofer_tasks.md +724 -0
- package/resources/gofer/specify-commands/5_gofer_implement.md +900 -0
- package/resources/gofer/specify-commands/6_gofer_validate.md +2245 -0
- package/resources/gofer/specify-commands/7_gofer_save.md +399 -0
- package/resources/gofer/specify-commands/7a_stakeholder_comms.md +484 -0
- package/resources/gofer/specify-commands/8_gofer_branding.md +291 -0
- package/resources/gofer/specify-commands/9_gofer_tests.md +534 -0
- package/resources/gofer/specify-commands/gofer_bootstrap_workspace.md +159 -0
- package/resources/gofer/specify-commands/gofer_check_workspace.md +130 -0
- package/resources/gofer/specify-commands/gofer_constitution.md +588 -0
- package/resources/gofer/specify-commands/gofer_diagnose.md +89 -0
- package/resources/gofer/specify-commands/gofer_eai_first_run.md +392 -0
- package/resources/gofer/specify-commands/gofer_hydrate.md +537 -0
- package/resources/gofer/specify-commands/gofer_personality.md +61 -0
- package/resources/gofer/specify-commands/gofer_plan.md +51 -0
- package/resources/gofer/specify-commands/gofer_side.md +56 -0
- package/resources/gofer/specify-commands/gofer_spec_summary.md +87 -0
- package/resources/gofer/specify-commands/gofer_tdd.md +87 -0
- package/resources/gofer/specify-commands/gofer_vocabulary.md +87 -0
- package/resources/gofer/specify-commands/gofer_zoom_out.md +87 -0
- package/resources/gofer/system-skills/0_gofer_start/SKILL.md +1287 -0
- package/resources/gofer/system-skills/0a_problem_validation/SKILL.md +429 -0
- package/resources/gofer/system-skills/10_gofer_cloud/SKILL.md +635 -0
- package/resources/gofer/system-skills/1_gofer_research/SKILL.md +1159 -0
- package/resources/gofer/system-skills/2_gofer_specify/SKILL.md +860 -0
- package/resources/gofer/system-skills/3_gofer_plan/SKILL.md +886 -0
- package/resources/gofer/system-skills/4_gofer_tasks/SKILL.md +748 -0
- package/resources/gofer/system-skills/5_gofer_implement/SKILL.md +924 -0
- package/resources/gofer/system-skills/6_gofer_validate/SKILL.md +2269 -0
- package/resources/gofer/system-skills/7_gofer_save/SKILL.md +423 -0
- package/resources/gofer/system-skills/7a_stakeholder_comms/SKILL.md +508 -0
- package/resources/gofer/system-skills/8_gofer_branding/SKILL.md +315 -0
- package/resources/gofer/system-skills/9_gofer_tests/SKILL.md +558 -0
- package/resources/gofer/system-skills/gofer_bootstrap_workspace/SKILL.md +148 -0
- package/resources/gofer/system-skills/gofer_check_workspace/SKILL.md +119 -0
- package/resources/gofer/system-skills/gofer_constitution/SKILL.md +612 -0
- package/resources/gofer/system-skills/gofer_diagnose/SKILL.md +114 -0
- package/resources/gofer/system-skills/gofer_eai_first_run/SKILL.md +397 -0
- package/resources/gofer/system-skills/gofer_hydrate/SKILL.md +561 -0
- package/resources/gofer/system-skills/gofer_personality/SKILL.md +44 -0
- package/resources/gofer/system-skills/gofer_plan/SKILL.md +40 -0
- package/resources/gofer/system-skills/gofer_side/SKILL.md +45 -0
- package/resources/gofer/system-skills/gofer_spec_summary/SKILL.md +112 -0
- package/resources/gofer/system-skills/gofer_tdd/SKILL.md +112 -0
- package/resources/gofer/system-skills/gofer_vocabulary/SKILL.md +112 -0
- package/resources/gofer/system-skills/gofer_zoom_out/SKILL.md +112 -0
- package/resources/gofer/templates/agent-file-template.md +28 -0
- package/resources/gofer/templates/assumptions-template.md +94 -0
- package/resources/gofer/templates/audit-history-template.md +35 -0
- package/resources/gofer/templates/brand/brand-profile-template.json +45 -0
- package/resources/gofer/templates/brand/document-style-template.md +50 -0
- package/resources/gofer/templates/brand/marp-theme-template.css +58 -0
- package/resources/gofer/templates/brownfield-analysis.md +44 -0
- package/resources/gofer/templates/business-metrics-template.md +120 -0
- package/resources/gofer/templates/business-owner-summary-template.md +83 -0
- package/resources/gofer/templates/checklist-template.md +40 -0
- package/resources/gofer/templates/ciso-security-summary-template.md +70 -0
- package/resources/gofer/templates/context-bundle-template.md +76 -0
- package/resources/gofer/templates/contract-pack-template.md +109 -0
- package/resources/gofer/templates/cto-architecture-summary-template.md +83 -0
- package/resources/gofer/templates/discovery-template.md +92 -0
- package/resources/gofer/templates/eai-preflight-template.md +144 -0
- package/resources/gofer/templates/goal-ledger-template.json +69 -0
- package/resources/gofer/templates/gofer-model-policy.yaml +97 -0
- package/resources/gofer/templates/issues-template.md +106 -0
- package/resources/gofer/templates/journey/base-journey.md +95 -0
- package/resources/gofer/templates/journey/industry-variants.yaml +277 -0
- package/resources/gofer/templates/loop-contract-template.json +68 -0
- package/resources/gofer/templates/plan-template.md +215 -0
- package/resources/gofer/templates/problem-brief-template.md +85 -0
- package/resources/gofer/templates/proposal-review-template.md +79 -0
- package/resources/gofer/templates/research-template.md +222 -0
- package/resources/gofer/templates/reuse-scan-template.md +43 -0
- package/resources/gofer/templates/sequence-diagrams/option-spectrum.yaml +178 -0
- package/resources/gofer/templates/service-fit-matrix-template.md +29 -0
- package/resources/gofer/templates/session-handoff-template.md +172 -0
- package/resources/gofer/templates/spec-summary-template.md +118 -0
- package/resources/gofer/templates/spec-template.md +196 -0
- package/resources/gofer/templates/stakeholder-comms-template.md +330 -0
- package/resources/gofer/templates/stakeholder-review-index-template.md +54 -0
- package/resources/gofer/templates/tasks-template.md +323 -0
- package/resources/gofer/templates/ui-approval-template.md +32 -0
- package/resources/gofer/templates/ui-preview-brief-template.md +65 -0
- package/resources/gofer/templates/ui-review-log-template.md +11 -0
- package/resources/gofer/templates/visuals/.gitkeep +0 -0
- package/resources/gofer/templates/visuals/bounded-context-map.md +19 -0
- package/resources/gofer/templates/visuals/bounded-context-template.md +47 -0
- package/resources/gofer/templates/visuals/c4-container-template.md +38 -0
- package/resources/gofer/templates/visuals/c4-container.md +20 -0
- package/resources/gofer/templates/visuals/c4-context-template.md +46 -0
- package/resources/gofer/templates/visuals/capability-heatmap-template.md +54 -0
- package/resources/gofer/templates/visuals/data-model-erd-template.md +41 -0
- package/resources/gofer/templates/visuals/erd.md +19 -0
- package/resources/gofer/templates/visuals/impact-canvas.md +40 -0
- package/resources/gofer/templates/visuals/risk-heatmap-template.md +51 -0
- package/resources/gofer/templates/visuals/roi-projection.md +17 -0
- package/resources/gofer/templates/visuals/value-stream-asis.md +16 -0
- package/resources/gofer/templates/visuals/value-stream-tobe.md +18 -0
- package/resources/gofer/templates/working-backwards-prfaq-template.md +165 -0
- package/resources/linked-sources.json +25 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* marp-deck.mjs
|
|
4
|
+
*
|
|
5
|
+
* Optional Marp deck generator (FR-030). Reads `<featureDir>/visuals/*.md`
|
|
6
|
+
* in deterministic alphabetical order and emits a single Marp slide deck:
|
|
7
|
+
* Marp frontmatter, then each visual as its own slide, separated by `---`.
|
|
8
|
+
*
|
|
9
|
+
* Public API:
|
|
10
|
+
* generateMarpDeck(featureDir, outputPath)
|
|
11
|
+
* -> Promise<{ ok: true, slides: number, written: string } |
|
|
12
|
+
* { ok: false, reason: string }>
|
|
13
|
+
*
|
|
14
|
+
* CLI usage:
|
|
15
|
+
* node marp-deck.mjs <featureDir> <outputPath>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { readdir, readFile, writeFile } from 'node:fs/promises';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
|
|
21
|
+
const MARP_FRONTMATTER = `---
|
|
22
|
+
marp: true
|
|
23
|
+
theme: default
|
|
24
|
+
paginate: true
|
|
25
|
+
---
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @param {string} featureDir Absolute path to the feature directory
|
|
30
|
+
* @param {string} outputPath Absolute path for the .marp.md output
|
|
31
|
+
*/
|
|
32
|
+
export async function generateMarpDeck(featureDir, outputPath) {
|
|
33
|
+
const visualsDir = path.join(featureDir, 'visuals');
|
|
34
|
+
|
|
35
|
+
let entries;
|
|
36
|
+
try {
|
|
37
|
+
entries = await readdir(visualsDir, { withFileTypes: true });
|
|
38
|
+
} catch (err) {
|
|
39
|
+
if (err && /** @type {any} */ (err).code === 'ENOENT') {
|
|
40
|
+
return { ok: false, reason: 'visuals-dir-missing' };
|
|
41
|
+
}
|
|
42
|
+
return { ok: false, reason: `readdir-error: ${err.message}` };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const mdFiles = entries
|
|
46
|
+
.filter((e) => e.isFile() && e.name.endsWith('.md'))
|
|
47
|
+
.map((e) => e.name)
|
|
48
|
+
.sort(); // deterministic alphabetical order
|
|
49
|
+
|
|
50
|
+
if (mdFiles.length === 0) {
|
|
51
|
+
return { ok: false, reason: 'no-visuals' };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const slideContents = [];
|
|
55
|
+
for (const name of mdFiles) {
|
|
56
|
+
const raw = await readFile(path.join(visualsDir, name), 'utf8');
|
|
57
|
+
slideContents.push(raw.trimEnd());
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const body = [MARP_FRONTMATTER, ...slideContents].join('\n\n---\n\n') + '\n';
|
|
61
|
+
|
|
62
|
+
await writeFile(outputPath, body, 'utf8');
|
|
63
|
+
|
|
64
|
+
return { ok: true, slides: slideContents.length, written: outputPath };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// CLI entrypoint
|
|
68
|
+
const isMain =
|
|
69
|
+
process.argv[1] &&
|
|
70
|
+
(process.argv[1].endsWith('marp-deck.mjs') ||
|
|
71
|
+
process.argv[1] === new URL(import.meta.url).pathname);
|
|
72
|
+
|
|
73
|
+
if (isMain) {
|
|
74
|
+
const [, , featureDir, outputPath] = process.argv;
|
|
75
|
+
if (!featureDir || !outputPath) {
|
|
76
|
+
console.error('Usage: marp-deck.mjs <featureDir> <outputPath>');
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
const result = await generateMarpDeck(path.resolve(featureDir), path.resolve(outputPath));
|
|
80
|
+
if (result.ok) {
|
|
81
|
+
console.log(`marp-deck: wrote ${result.written} (${result.slides} slides)`);
|
|
82
|
+
process.exit(0);
|
|
83
|
+
} else {
|
|
84
|
+
console.error(`marp-deck failed: ${result.reason}`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mermaid-tabular-fallback.mjs
|
|
3
|
+
*
|
|
4
|
+
* Provides a markdown-table fallback for Mermaid diagrams when the Mermaid
|
|
5
|
+
* renderer is unavailable, fails, or the consumer surface does not support
|
|
6
|
+
* Mermaid (e.g. plain-text release notes, terminal output).
|
|
7
|
+
*
|
|
8
|
+
* Supported chart types:
|
|
9
|
+
* - quadrantChart → | Item | X | Y | Quadrant |
|
|
10
|
+
* - xychart-beta → | X | Y |
|
|
11
|
+
* - C4Context → | Element | Type | Description |
|
|
12
|
+
* - C4Container → | Element | Type | Description |
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* import { tabularFallback } from './mermaid-tabular-fallback.mjs';
|
|
16
|
+
* const md = tabularFallback(blockString, 'quadrantChart');
|
|
17
|
+
*
|
|
18
|
+
* If the input cannot be parsed for the declared chart type, the module
|
|
19
|
+
* returns a rescue block containing the original Mermaid source verbatim,
|
|
20
|
+
* preceded by a notice. This guarantees no information is lost.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const SUPPORTED = new Set([
|
|
24
|
+
'xychart-beta',
|
|
25
|
+
'quadrantChart',
|
|
26
|
+
'C4Context',
|
|
27
|
+
'C4Container',
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Render a Mermaid block as a markdown-table fallback.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} mermaidBlock The Mermaid source. May or may not be wrapped
|
|
34
|
+
* in a ```` ```mermaid ```` code fence; the wrapper is stripped if present.
|
|
35
|
+
* @param {('xychart-beta'|'quadrantChart'|'C4Context'|'C4Container')} chartType
|
|
36
|
+
* @returns {string} Markdown table or a rescue block.
|
|
37
|
+
*/
|
|
38
|
+
export function tabularFallback(mermaidBlock, chartType) {
|
|
39
|
+
if (typeof mermaidBlock !== 'string' || mermaidBlock.length === 0) {
|
|
40
|
+
return rescue(mermaidBlock ?? '');
|
|
41
|
+
}
|
|
42
|
+
if (!SUPPORTED.has(chartType)) {
|
|
43
|
+
return rescue(mermaidBlock);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const source = stripFence(mermaidBlock);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
switch (chartType) {
|
|
50
|
+
case 'quadrantChart':
|
|
51
|
+
return renderQuadrant(source);
|
|
52
|
+
case 'xychart-beta':
|
|
53
|
+
return renderXyChart(source);
|
|
54
|
+
case 'C4Context':
|
|
55
|
+
case 'C4Container':
|
|
56
|
+
return renderC4(source);
|
|
57
|
+
default:
|
|
58
|
+
return rescue(mermaidBlock);
|
|
59
|
+
}
|
|
60
|
+
} catch (_err) {
|
|
61
|
+
return rescue(mermaidBlock);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default tabularFallback;
|
|
66
|
+
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
// Helpers
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
|
|
71
|
+
function stripFence(input) {
|
|
72
|
+
const fenceRe = /^```mermaid\s*\n([\s\S]*?)\n```\s*$/m;
|
|
73
|
+
const m = input.match(fenceRe);
|
|
74
|
+
return m ? m[1] : input;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function rescue(original) {
|
|
78
|
+
const trimmed = (original ?? '').trimEnd();
|
|
79
|
+
return (
|
|
80
|
+
'_Diagram unavailable; see source._\n\n' +
|
|
81
|
+
'```\n' +
|
|
82
|
+
trimmed +
|
|
83
|
+
'\n```\n'
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function nonEmptyLines(source) {
|
|
88
|
+
return source
|
|
89
|
+
.split(/\r?\n/)
|
|
90
|
+
.map((l) => l.trim())
|
|
91
|
+
.filter((l) => l.length > 0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// quadrantChart
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Parses a Mermaid quadrantChart definition into a markdown table.
|
|
100
|
+
*
|
|
101
|
+
* Rows shaped like `Label: [0.3, 0.7]` are extracted. Quadrant assignment
|
|
102
|
+
* follows Mermaid's convention:
|
|
103
|
+
* - x ≥ 0.5 && y ≥ 0.5 → quadrant-1 (declared)
|
|
104
|
+
* - x < 0.5 && y ≥ 0.5 → quadrant-2
|
|
105
|
+
* - x < 0.5 && y < 0.5 → quadrant-3
|
|
106
|
+
* - x ≥ 0.5 && y < 0.5 → quadrant-4
|
|
107
|
+
*/
|
|
108
|
+
function renderQuadrant(source) {
|
|
109
|
+
const lines = nonEmptyLines(source);
|
|
110
|
+
if (lines.length === 0 || !lines[0].toLowerCase().startsWith('quadrantchart')) {
|
|
111
|
+
throw new Error('Not a quadrantChart');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const quadrantNames = { 1: 'Q1', 2: 'Q2', 3: 'Q3', 4: 'Q4' };
|
|
115
|
+
const ITEM_RE = /^([^:]+?):\s*\[\s*([0-9.]+)\s*,\s*([0-9.]+)\s*\]\s*$/;
|
|
116
|
+
const QUAD_DECL = /^quadrant-([1-4])\s+(.+)$/i;
|
|
117
|
+
|
|
118
|
+
const items = [];
|
|
119
|
+
for (const line of lines) {
|
|
120
|
+
const qmatch = line.match(QUAD_DECL);
|
|
121
|
+
if (qmatch) {
|
|
122
|
+
quadrantNames[Number(qmatch[1])] = qmatch[2].trim();
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
const im = line.match(ITEM_RE);
|
|
126
|
+
if (im) {
|
|
127
|
+
const label = im[1].trim();
|
|
128
|
+
const x = Number(im[2]);
|
|
129
|
+
const y = Number(im[3]);
|
|
130
|
+
items.push({ label, x, y });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let body =
|
|
135
|
+
'| Item | X | Y | Quadrant |\n' +
|
|
136
|
+
'|------|---|---|----------|\n';
|
|
137
|
+
if (items.length === 0) {
|
|
138
|
+
body += '| _none_ | _n/a_ | _n/a_ | _n/a_ |\n';
|
|
139
|
+
return body;
|
|
140
|
+
}
|
|
141
|
+
for (const it of items) {
|
|
142
|
+
const q = quadrantOf(it.x, it.y, quadrantNames);
|
|
143
|
+
body += `| ${escapeCell(it.label)} | ${it.x} | ${it.y} | ${escapeCell(q)} |\n`;
|
|
144
|
+
}
|
|
145
|
+
return body;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function quadrantOf(x, y, names) {
|
|
149
|
+
if (x >= 0.5 && y >= 0.5) return names[1];
|
|
150
|
+
if (x < 0.5 && y >= 0.5) return names[2];
|
|
151
|
+
if (x < 0.5 && y < 0.5) return names[3];
|
|
152
|
+
return names[4];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// xychart-beta
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Parses a Mermaid xychart-beta block. Extracts:
|
|
161
|
+
* - x-axis labels: `x-axis [a, b, c]` or `x-axis "Title" [a, b, c]`
|
|
162
|
+
* - bar/line series: `bar [n, n, ...]` / `line [n, n, ...]`
|
|
163
|
+
*/
|
|
164
|
+
function renderXyChart(source) {
|
|
165
|
+
const lines = nonEmptyLines(source);
|
|
166
|
+
if (lines.length === 0 || !lines[0].toLowerCase().startsWith('xychart-beta')) {
|
|
167
|
+
throw new Error('Not an xychart-beta');
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const X_AXIS_RE = /^x-axis(?:\s+"[^"]*")?\s*\[([^\]]+)\]\s*$/i;
|
|
171
|
+
const SERIES_RE = /^(?:bar|line)\s+\[([^\]]+)\]\s*$/i;
|
|
172
|
+
|
|
173
|
+
let xLabels = [];
|
|
174
|
+
let yValues = [];
|
|
175
|
+
for (const line of lines) {
|
|
176
|
+
const xm = line.match(X_AXIS_RE);
|
|
177
|
+
if (xm) {
|
|
178
|
+
xLabels = splitArray(xm[1]).map(stripQuotes);
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
const sm = line.match(SERIES_RE);
|
|
182
|
+
if (sm && yValues.length === 0) {
|
|
183
|
+
yValues = splitArray(sm[1]).map(Number);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let body =
|
|
188
|
+
'| X | Y |\n' +
|
|
189
|
+
'|---|---|\n';
|
|
190
|
+
|
|
191
|
+
const rows = Math.max(xLabels.length, yValues.length);
|
|
192
|
+
if (rows === 0) {
|
|
193
|
+
body += '| _none_ | _n/a_ |\n';
|
|
194
|
+
return body;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
for (let i = 0; i < rows; i += 1) {
|
|
198
|
+
const x = xLabels[i] ?? `_row ${i + 1}_`;
|
|
199
|
+
const y = yValues[i] ?? '_n/a_';
|
|
200
|
+
body += `| ${escapeCell(String(x))} | ${escapeCell(String(y))} |\n`;
|
|
201
|
+
}
|
|
202
|
+
return body;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function splitArray(inner) {
|
|
206
|
+
return inner
|
|
207
|
+
.split(',')
|
|
208
|
+
.map((s) => s.trim())
|
|
209
|
+
.filter((s) => s.length > 0);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function stripQuotes(s) {
|
|
213
|
+
return s.replace(/^"(.*)"$/, '$1');
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// ---------------------------------------------------------------------------
|
|
217
|
+
// C4Context / C4Container
|
|
218
|
+
// ---------------------------------------------------------------------------
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Parses Person/System/System_Ext/Container declarations into a table.
|
|
222
|
+
* Lines look like:
|
|
223
|
+
* Person(alias, "label")
|
|
224
|
+
* System(alias, "label")
|
|
225
|
+
* System_Ext(alias, "label")
|
|
226
|
+
* Container(alias, "label", "tech")
|
|
227
|
+
*/
|
|
228
|
+
function renderC4(source) {
|
|
229
|
+
const lines = nonEmptyLines(source);
|
|
230
|
+
if (lines.length === 0 || !/^c4(context|container)/i.test(lines[0])) {
|
|
231
|
+
throw new Error('Not a C4 block');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const ELEMENT_RE = /^(Person|Person_Ext|System|System_Ext|Container|Container_Ext|ContainerDb|SystemDb)\s*\(\s*([A-Za-z0-9_]+)\s*,\s*"([^"]*)"(?:\s*,\s*"([^"]*)")?\s*\)\s*$/;
|
|
235
|
+
|
|
236
|
+
const rows = [];
|
|
237
|
+
for (const line of lines) {
|
|
238
|
+
const m = line.match(ELEMENT_RE);
|
|
239
|
+
if (m) {
|
|
240
|
+
const type = m[1];
|
|
241
|
+
const alias = m[2];
|
|
242
|
+
const label = m[3];
|
|
243
|
+
const tech = m[4];
|
|
244
|
+
const desc = tech ? `${label} — ${tech}` : label;
|
|
245
|
+
rows.push({ alias, type, desc });
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
let body =
|
|
250
|
+
'| Element | Type | Description |\n' +
|
|
251
|
+
'|---------|------|-------------|\n';
|
|
252
|
+
if (rows.length === 0) {
|
|
253
|
+
body += '| _none_ | _n/a_ | _n/a_ |\n';
|
|
254
|
+
return body;
|
|
255
|
+
}
|
|
256
|
+
for (const r of rows) {
|
|
257
|
+
body += `| ${escapeCell(r.alias)} | ${escapeCell(r.type)} | ${escapeCell(r.desc)} |\n`;
|
|
258
|
+
}
|
|
259
|
+
return body;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function escapeCell(value) {
|
|
263
|
+
return String(value).replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
|
|
264
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* render-visual.mjs
|
|
3
|
+
*
|
|
4
|
+
* Simple template renderer for visual templates under
|
|
5
|
+
* `.specify/templates/visuals/`.
|
|
6
|
+
*
|
|
7
|
+
* - Reads a template file from disk.
|
|
8
|
+
* - Replaces every `{{KEY}}` token with `data[KEY]` when present.
|
|
9
|
+
* - Leaves unmatched `{{KEY}}` placeholders in place untouched.
|
|
10
|
+
* - Returns the rendered markdown as a string.
|
|
11
|
+
*
|
|
12
|
+
* Used by the two-pass canvas pipeline (visual-pass-pipeline.mjs) and
|
|
13
|
+
* directly by stage commands that need to produce visual artefacts.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { readFile } from 'node:fs/promises';
|
|
17
|
+
|
|
18
|
+
const PLACEHOLDER_RE = /\{\{([A-Z0-9_]+)\}\}/g;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Render a template by substituting `{{KEY}}` placeholders with values from
|
|
22
|
+
* `data`. Unmatched placeholders are preserved verbatim.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} templatePath Absolute path to the template file.
|
|
25
|
+
* @param {Record<string, string|number>} data Substitution map keyed by
|
|
26
|
+
* placeholder name (without braces).
|
|
27
|
+
* @returns {Promise<string>} Rendered markdown content.
|
|
28
|
+
*/
|
|
29
|
+
export async function renderVisual(templatePath, data = {}) {
|
|
30
|
+
const raw = await readFile(templatePath, 'utf8');
|
|
31
|
+
return renderString(raw, data);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Render an in-memory string with the same substitution rules. Exposed for
|
|
36
|
+
* tests and for callers that have already loaded the template (e.g. pass-2
|
|
37
|
+
* canvas refresh re-uses the existing on-disk artefact rather than the
|
|
38
|
+
* pristine template).
|
|
39
|
+
*
|
|
40
|
+
* @param {string} input Raw template content.
|
|
41
|
+
* @param {Record<string, string|number>} data Substitution map.
|
|
42
|
+
* @returns {string} Rendered string.
|
|
43
|
+
*/
|
|
44
|
+
export function renderString(input, data = {}) {
|
|
45
|
+
return input.replace(PLACEHOLDER_RE, (match, key) => {
|
|
46
|
+
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
47
|
+
const value = data[key];
|
|
48
|
+
return value === undefined || value === null ? match : String(value);
|
|
49
|
+
}
|
|
50
|
+
return match;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default renderVisual;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* validate-aliases.mjs
|
|
3
|
+
*
|
|
4
|
+
* Loads all `.specify/commands/*.md` source-of-truth files (via parseStageCommand)
|
|
5
|
+
* and validates that every alias and `name` is unique across the set.
|
|
6
|
+
*
|
|
7
|
+
* Used by `tests/unit/scripts/alias-uniqueness.test.ts` and by the source-of-truth
|
|
8
|
+
* generator's pre-flight check (so we never emit two providers that claim the same
|
|
9
|
+
* `gofer:*` namespace).
|
|
10
|
+
*
|
|
11
|
+
* Public API:
|
|
12
|
+
* loadStages(commandsDir)
|
|
13
|
+
* -> Promise<Array<{ filePath, name, aliases }>>
|
|
14
|
+
*
|
|
15
|
+
* validateAliases(stages)
|
|
16
|
+
* -> { ok: boolean, conflicts: Array<{ alias, owners: string[] }> }
|
|
17
|
+
*
|
|
18
|
+
* The two are split so tests can feed synthetic stage arrays into validateAliases
|
|
19
|
+
* without touching the filesystem.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { readdir } from 'fs/promises';
|
|
23
|
+
import path from 'path';
|
|
24
|
+
import { parseStageCommand } from '../parse-stage-command.mjs';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Load every `.md` file in `commandsDir` (non-recursive) and return a normalized
|
|
28
|
+
* stage descriptor: { filePath, name, aliases }.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} commandsDir Absolute path to `.specify/commands`
|
|
31
|
+
* @returns {Promise<Array<{ filePath: string, name: string, aliases: string[] }>>}
|
|
32
|
+
*/
|
|
33
|
+
export async function loadStages(commandsDir) {
|
|
34
|
+
const entries = await readdir(commandsDir, { withFileTypes: true });
|
|
35
|
+
const mdFiles = entries
|
|
36
|
+
.filter((e) => e.isFile() && e.name.endsWith('.md'))
|
|
37
|
+
.map((e) => path.join(commandsDir, e.name));
|
|
38
|
+
|
|
39
|
+
const stages = [];
|
|
40
|
+
for (const filePath of mdFiles) {
|
|
41
|
+
const { frontmatter } = await parseStageCommand(filePath);
|
|
42
|
+
const aliases = Array.isArray(frontmatter.aliases) ? frontmatter.aliases : [];
|
|
43
|
+
stages.push({
|
|
44
|
+
filePath,
|
|
45
|
+
name: String(frontmatter.name),
|
|
46
|
+
aliases,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return stages;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Detect duplicate identifiers across a set of stages.
|
|
54
|
+
*
|
|
55
|
+
* The "identifier set" for a stage is its `name` plus every entry in its
|
|
56
|
+
* `aliases` array. Two stages may not share any identifier; if they do, the
|
|
57
|
+
* conflict is reported.
|
|
58
|
+
*
|
|
59
|
+
* @param {Array<{ filePath: string, name: string, aliases: string[] }>} stages
|
|
60
|
+
* @returns {{ ok: boolean, conflicts: Array<{ alias: string, owners: string[] }> }}
|
|
61
|
+
*/
|
|
62
|
+
export function validateAliases(stages) {
|
|
63
|
+
/** @type {Map<string, string[]>} */
|
|
64
|
+
const owners = new Map();
|
|
65
|
+
|
|
66
|
+
for (const stage of stages) {
|
|
67
|
+
const ids = [stage.name, ...stage.aliases];
|
|
68
|
+
for (const id of ids) {
|
|
69
|
+
if (!id) continue;
|
|
70
|
+
if (!owners.has(id)) {
|
|
71
|
+
owners.set(id, []);
|
|
72
|
+
}
|
|
73
|
+
owners.get(id).push(stage.filePath);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const conflicts = [];
|
|
78
|
+
for (const [alias, files] of owners.entries()) {
|
|
79
|
+
if (files.length > 1) {
|
|
80
|
+
conflicts.push({ alias, owners: files });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return { ok: conflicts.length === 0, conflicts };
|
|
85
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* visual-counts.mjs
|
|
3
|
+
*
|
|
4
|
+
* Walks a TO-BE value-stream markdown document and counts how many steps
|
|
5
|
+
* carry each AI-leverage verb tag (Replace / Augment / Automate / Observe).
|
|
6
|
+
*
|
|
7
|
+
* The convention enforced by `visual-value-stream-writer` and the persona-pack
|
|
8
|
+
* gate is that every TO-BE step renders the verb inline as `AI: <Verb>` —
|
|
9
|
+
* either inside a Mermaid node (`S1[Step text<br/>AI: Augment]`) or in the
|
|
10
|
+
* surrounding markdown. This function detects the inline tag with a
|
|
11
|
+
* case-insensitive regex and returns a totals object suitable for feeding
|
|
12
|
+
* directly into the Impact Canvas pie chart.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { VERBS, validateVerb } from './ai-leverage-tagger.mjs';
|
|
16
|
+
|
|
17
|
+
const TAG_RE = /AI:\s*(Replace|Augment|Automate|Observe)\b/gi;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Count AI-leverage verbs in a TO-BE value-stream markdown string.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} valueStreamMarkdown Raw markdown content of `value-stream-tobe.md`.
|
|
23
|
+
* @returns {{ replace: number, augment: number, automate: number, observe: number }}
|
|
24
|
+
* Totals keyed by lowercased verb name. Missing verbs are reported as 0.
|
|
25
|
+
*/
|
|
26
|
+
export function countVerbs(valueStreamMarkdown) {
|
|
27
|
+
const totals = { replace: 0, augment: 0, automate: 0, observe: 0 };
|
|
28
|
+
if (typeof valueStreamMarkdown !== 'string' || valueStreamMarkdown.length === 0) {
|
|
29
|
+
return totals;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
for (const match of valueStreamMarkdown.matchAll(TAG_RE)) {
|
|
33
|
+
const raw = match[1];
|
|
34
|
+
const canonical = raw.charAt(0).toUpperCase() + raw.slice(1).toLowerCase();
|
|
35
|
+
validateVerb(canonical); // Defensive: never count a non-canonical verb.
|
|
36
|
+
const key = canonical.toLowerCase();
|
|
37
|
+
totals[key] += 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return totals;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { VERBS };
|
|
44
|
+
export default countVerbs;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* visual-pass-pipeline.mjs
|
|
3
|
+
*
|
|
4
|
+
* Two-pass canvas pipeline for the Impact Canvas visual.
|
|
5
|
+
*
|
|
6
|
+
* Pass 1 runs inside `/2_gofer_specify`: a fresh `impact-canvas.md` is
|
|
7
|
+
* rendered from the template using heuristic risks pulled from the spec's
|
|
8
|
+
* NFR + Out-of-Scope sections.
|
|
9
|
+
*
|
|
10
|
+
* Pass 2 runs inside `/6_gofer_validate`: the existing `impact-canvas.md` is
|
|
11
|
+
* read back, and ONLY the "Top Three Risks" block is rewritten with the
|
|
12
|
+
* validation council's output. Every other byte (header, problem statement,
|
|
13
|
+
* personas, AI-leverage pie, outcomes) is preserved. The frontmatter
|
|
14
|
+
* `pass:` marker is bumped from 1 to 2 so consumers can tell which pass
|
|
15
|
+
* produced the artefact.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
import { fileURLToPath } from 'node:url';
|
|
21
|
+
|
|
22
|
+
import { renderVisual } from './render-visual.mjs';
|
|
23
|
+
|
|
24
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
const TEMPLATE_PATH = path.resolve(
|
|
26
|
+
__dirname,
|
|
27
|
+
'../../../templates/visuals/impact-canvas.md'
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// Match the full "## Top Three Risks" section greedily, stopping at the next
|
|
31
|
+
// `## ` heading or end-of-file. Using a greedy `[\s\S]*` plus a positive
|
|
32
|
+
// lookahead avoids the degenerate non-greedy zero-width match that would
|
|
33
|
+
// only consume the heading itself.
|
|
34
|
+
const RISKS_BLOCK_RE = /## Top Three Risks[\s\S]*?(?=\n## |$)/;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Build the canonical "Top Three Risks" markdown block from a list of risks.
|
|
38
|
+
*
|
|
39
|
+
* @param {string[]} risks Array of three risk descriptions.
|
|
40
|
+
* @param {'pass-1'|'pass-2'} source Which pass produced the risks.
|
|
41
|
+
* @returns {string} Markdown block ending without a trailing blank line.
|
|
42
|
+
*/
|
|
43
|
+
function buildRisksBlock(risks, source) {
|
|
44
|
+
const safeRisks = [risks[0] ?? '', risks[1] ?? '', risks[2] ?? ''];
|
|
45
|
+
const passComment =
|
|
46
|
+
source === 'pass-2'
|
|
47
|
+
? '<!-- pass-2: validation council output -->'
|
|
48
|
+
: '<!-- pass-1: heuristic from spec NFRs and Out-of-Scope -->';
|
|
49
|
+
return [
|
|
50
|
+
'## Top Three Risks',
|
|
51
|
+
passComment,
|
|
52
|
+
`1. ${safeRisks[0]}`,
|
|
53
|
+
`2. ${safeRisks[1]}`,
|
|
54
|
+
`3. ${safeRisks[2]}`,
|
|
55
|
+
'',
|
|
56
|
+
].join('\n');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Pass 1 — render a complete Impact Canvas with heuristic risks.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} featureDir Absolute path to `.specify/specs/<feature>/`.
|
|
63
|
+
* @param {object} specData Substitution payload.
|
|
64
|
+
* @param {string} specData.FEATURE_NAME
|
|
65
|
+
* @param {string} specData.DATE ISO date string.
|
|
66
|
+
* @param {string} specData.PROBLEM_STATEMENT
|
|
67
|
+
* @param {string} specData.PERSONA_LIST
|
|
68
|
+
* @param {number} specData.REPLACE_COUNT
|
|
69
|
+
* @param {number} specData.AUGMENT_COUNT
|
|
70
|
+
* @param {number} specData.AUTOMATE_COUNT
|
|
71
|
+
* @param {number} specData.OBSERVE_COUNT
|
|
72
|
+
* @param {string[]} specData.HEURISTIC_RISKS Length-3 array.
|
|
73
|
+
* @param {string} specData.OUTCOMES
|
|
74
|
+
* @returns {Promise<string>} Absolute path of the written canvas.
|
|
75
|
+
*/
|
|
76
|
+
export async function runPass1(featureDir, specData) {
|
|
77
|
+
const visualsDir = path.join(featureDir, 'visuals');
|
|
78
|
+
await mkdir(visualsDir, { recursive: true });
|
|
79
|
+
|
|
80
|
+
const data = {
|
|
81
|
+
PASS: 1,
|
|
82
|
+
FEATURE_NAME: specData.FEATURE_NAME ?? '',
|
|
83
|
+
DATE: specData.DATE ?? new Date().toISOString().slice(0, 10),
|
|
84
|
+
PROBLEM_STATEMENT: specData.PROBLEM_STATEMENT ?? '',
|
|
85
|
+
PERSONA_LIST: specData.PERSONA_LIST ?? '',
|
|
86
|
+
REPLACE_COUNT: specData.REPLACE_COUNT ?? 0,
|
|
87
|
+
AUGMENT_COUNT: specData.AUGMENT_COUNT ?? 0,
|
|
88
|
+
AUTOMATE_COUNT: specData.AUTOMATE_COUNT ?? 0,
|
|
89
|
+
OBSERVE_COUNT: specData.OBSERVE_COUNT ?? 0,
|
|
90
|
+
RISK_1: (specData.HEURISTIC_RISKS ?? [])[0] ?? '',
|
|
91
|
+
RISK_2: (specData.HEURISTIC_RISKS ?? [])[1] ?? '',
|
|
92
|
+
RISK_3: (specData.HEURISTIC_RISKS ?? [])[2] ?? '',
|
|
93
|
+
OUTCOMES: specData.OUTCOMES ?? '',
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const rendered = await renderVisual(TEMPLATE_PATH, data);
|
|
97
|
+
const outPath = path.join(visualsDir, 'impact-canvas.md');
|
|
98
|
+
await writeFile(outPath, rendered, 'utf8');
|
|
99
|
+
return outPath;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Pass 2 — re-read the existing canvas, swap ONLY the Top Three Risks block,
|
|
104
|
+
* and bump the `pass:` field. Throws if `impact-canvas.md` does not exist.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} featureDir Absolute path to `.specify/specs/<feature>/`.
|
|
107
|
+
* @param {object} validationData
|
|
108
|
+
* @param {string[]} validationData.VALIDATED_RISKS Length-3 array from the
|
|
109
|
+
* validation council.
|
|
110
|
+
* @returns {Promise<string>} Absolute path of the rewritten canvas.
|
|
111
|
+
*/
|
|
112
|
+
export async function runPass2(featureDir, validationData) {
|
|
113
|
+
const canvasPath = path.join(featureDir, 'visuals', 'impact-canvas.md');
|
|
114
|
+
const original = await readFile(canvasPath, 'utf8');
|
|
115
|
+
|
|
116
|
+
const risks = validationData?.VALIDATED_RISKS ?? [];
|
|
117
|
+
const newBlock = buildRisksBlock(risks, 'pass-2');
|
|
118
|
+
|
|
119
|
+
if (!RISKS_BLOCK_RE.test(original)) {
|
|
120
|
+
throw new Error(
|
|
121
|
+
`runPass2: impact-canvas.md at ${canvasPath} is missing the "## Top Three Risks" section`
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
let updated = original.replace(RISKS_BLOCK_RE, `${newBlock}\n`);
|
|
126
|
+
|
|
127
|
+
// Bump `pass:` field in frontmatter from 1 to 2 (or any other digit -> 2).
|
|
128
|
+
updated = updated.replace(/^(pass:\s*).*$/m, `$12`);
|
|
129
|
+
|
|
130
|
+
await writeFile(canvasPath, updated, 'utf8');
|
|
131
|
+
return canvasPath;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export default { runPass1, runPass2 };
|