create-hq 5.0.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/dist/deps.d.ts +4 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +65 -0
- package/dist/deps.js.map +1 -0
- package/dist/git.d.ts +3 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +19 -0
- package/dist/git.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/scaffold.d.ts +8 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +130 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/ui.d.ts +7 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +36 -0
- package/dist/ui.js.map +1 -0
- package/package.json +41 -0
- package/template/.claude/CLAUDE.md +202 -0
- package/template/.claude/commands/checkpoint.md +127 -0
- package/template/.claude/commands/cleanup.md +307 -0
- package/template/.claude/commands/execute-task.md +440 -0
- package/template/.claude/commands/exit-plan.md +41 -0
- package/template/.claude/commands/handoff.md +97 -0
- package/template/.claude/commands/learn.md +218 -0
- package/template/.claude/commands/metrics.md +118 -0
- package/template/.claude/commands/newworker.md +162 -0
- package/template/.claude/commands/nexttask.md +67 -0
- package/template/.claude/commands/prd.md +238 -0
- package/template/.claude/commands/reanchor.md +51 -0
- package/template/.claude/commands/remember.md +126 -0
- package/template/.claude/commands/run-project.md +348 -0
- package/template/.claude/commands/run.md +110 -0
- package/template/.claude/commands/search-reindex.md +62 -0
- package/template/.claude/commands/search.md +100 -0
- package/template/.claude/commands/setup.md +381 -0
- package/template/.claude/scripts/pure-ralph-loop.ps1 +312 -0
- package/template/.claude/scripts/pure-ralph-loop.sh +859 -0
- package/template/CHANGELOG.md +220 -0
- package/template/LICENSE +21 -0
- package/template/MIGRATION.md +259 -0
- package/template/README.md +368 -0
- package/template/data/journal/.gitkeep +0 -0
- package/template/docs/images/ascii-banner-options.md +122 -0
- package/template/docs/images/hq-banner.svg +105 -0
- package/template/knowledge/Ralph/01-overview.md +71 -0
- package/template/knowledge/Ralph/02-core-concepts.md +114 -0
- package/template/knowledge/Ralph/03-how-ralph-works.md +184 -0
- package/template/knowledge/Ralph/04-back-pressure.md +222 -0
- package/template/knowledge/Ralph/05-specifications.md +210 -0
- package/template/knowledge/Ralph/06-agents-md.md +222 -0
- package/template/knowledge/Ralph/07-implementation.md +316 -0
- package/template/knowledge/Ralph/08-economics.md +182 -0
- package/template/knowledge/Ralph/09-resources.md +145 -0
- package/template/knowledge/Ralph/10-claude-code-workflow.md +212 -0
- package/template/knowledge/Ralph/11-team-training-guide.md +383 -0
- package/template/knowledge/Ralph/README.md +40 -0
- package/template/knowledge/ai-security-framework/CONTRIBUTING.md +139 -0
- package/template/knowledge/ai-security-framework/GLOSSARY.md +176 -0
- package/template/knowledge/ai-security-framework/LICENSE +21 -0
- package/template/knowledge/ai-security-framework/QUICK-START.md +172 -0
- package/template/knowledge/ai-security-framework/README.md +232 -0
- package/template/knowledge/ai-security-framework/checklists/browser-security.md +301 -0
- package/template/knowledge/ai-security-framework/checklists/credential-isolation.md +322 -0
- package/template/knowledge/ai-security-framework/checklists/incident-response.md +288 -0
- package/template/knowledge/ai-security-framework/checklists/pre-flight.md +249 -0
- package/template/knowledge/ai-security-framework/checklists/weekly-audit.md +159 -0
- package/template/knowledge/ai-security-framework/configs/audit-logging.md +372 -0
- package/template/knowledge/ai-security-framework/configs/kill-switches.md +354 -0
- package/template/knowledge/ai-security-framework/docs/01-core-principles.md +256 -0
- package/template/knowledge/ai-security-framework/docs/02-threat-landscape.md +326 -0
- package/template/knowledge/ai-security-framework/docs/03-security-posture.md +250 -0
- package/template/knowledge/ai-security-framework/templates/agents-security.md +233 -0
- package/template/knowledge/design-styles/README.md +42 -0
- package/template/knowledge/design-styles/american-industrial.md +136 -0
- package/template/knowledge/design-styles/ethereal-abstract.md +133 -0
- package/template/knowledge/design-styles/liminal-portal.md +111 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-3m4YPW0AADdu2.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-JJlt5WwAABK3K.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-JJmj5W0AEbJ-7.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ (1).jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G7fVkn3WEAAM-ST.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G8ECO5JWEAIksyn.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G9-3GQSWoAA8eqZ.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G9xEOqrXkAEZRcs.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G_MVeJrXQAA8sx4.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G_RSkmGXkAAgAVZ.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/README.md +31 -0
- package/template/knowledge/design-styles/swipes/american-industrial/qyqtg7Dq.png +0 -0
- package/template/knowledge/dev-team/README.md +35 -0
- package/template/knowledge/dev-team/patterns/README.md +34 -0
- package/template/knowledge/dev-team/patterns/frontend/react-best-practices.md +178 -0
- package/template/knowledge/dev-team/troubleshooting/README.md +31 -0
- package/template/knowledge/dev-team/workflows/README.md +49 -0
- package/template/knowledge/hq/checkpoint-schema.json +51 -0
- package/template/knowledge/hq/index-md-spec.md +74 -0
- package/template/knowledge/hq/thread-schema.md +153 -0
- package/template/knowledge/hq-core/checkpoint-schema.json +51 -0
- package/template/knowledge/hq-core/index-md-spec.md +74 -0
- package/template/knowledge/hq-core/thread-schema.md +153 -0
- package/template/knowledge/loom/README.md +51 -0
- package/template/knowledge/loom/architecture.md +125 -0
- package/template/knowledge/loom/code-style.md +169 -0
- package/template/knowledge/loom/llm-proxy.md +132 -0
- package/template/knowledge/loom/state-machine.md +131 -0
- package/template/knowledge/loom/thread-system.md +117 -0
- package/template/knowledge/loom/tools.md +94 -0
- package/template/knowledge/loom/weaver.md +96 -0
- package/template/knowledge/loom/web-frontend.md +131 -0
- package/template/knowledge/projects/README.md +72 -0
- package/template/knowledge/projects/templates/README.template.md +28 -0
- package/template/knowledge/workers/README.md +195 -0
- package/template/knowledge/workers/ralph-loop-pattern.md +157 -0
- package/template/knowledge/workers/skill-schema.md +182 -0
- package/template/knowledge/workers/state-machine.md +102 -0
- package/template/knowledge/workers/templates/base-worker.yaml +73 -0
- package/template/knowledge/workers/templates/code-worker.yaml +85 -0
- package/template/knowledge/workers/templates/skill.yaml +49 -0
- package/template/knowledge/workers/templates/social-worker.yaml +70 -0
- package/template/modules/examples/full-manifest.yaml +92 -0
- package/template/modules/examples/minimal.yaml +14 -0
- package/template/modules/modules.yaml +59 -0
- package/template/projects/.gitkeep +0 -0
- package/template/projects/incorporate-workers-into-pure-ralph/prd.json +88 -0
- package/template/projects/pure-ralph-branch-isolation/README.md +114 -0
- package/template/projects/pure-ralph-branch-isolation/prd.json +123 -0
- package/template/projects/purist-ralph-loop/README.md +148 -0
- package/template/projects/purist-ralph-loop/prd.json +135 -0
- package/template/projects/ralph-test/prd.json +50 -0
- package/template/prompts/pure-ralph-base.md +551 -0
- package/template/settings/.gitkeep +0 -0
- package/template/settings/pure-ralph.json +42 -0
- package/template/social-content/drafts/INDEX.md +21 -0
- package/template/social-content/drafts/linkedin/.gitkeep +1 -0
- package/template/social-content/drafts/x/.gitkeep +1 -0
- package/template/social-content/images/.gitkeep +1 -0
- package/template/starter-projects/code-worker/README.md +97 -0
- package/template/starter-projects/code-worker/prd.json +45 -0
- package/template/starter-projects/personal-assistant/README.md +42 -0
- package/template/starter-projects/personal-assistant/prd.json +43 -0
- package/template/starter-projects/social-media/README.md +60 -0
- package/template/starter-projects/social-media/prd.json +43 -0
- package/template/workers/content-brand/README.md +59 -0
- package/template/workers/content-brand/skills/messaging-alignment.md +91 -0
- package/template/workers/content-brand/skills/tone-check.md +76 -0
- package/template/workers/content-brand/skills/voice-analysis.md +68 -0
- package/template/workers/content-brand/worker.yaml +81 -0
- package/template/workers/content-legal/README.md +80 -0
- package/template/workers/content-legal/skills/claim-substantiation.md +150 -0
- package/template/workers/content-legal/skills/compliance-scan.md +123 -0
- package/template/workers/content-legal/skills/disclaimer-check.md +146 -0
- package/template/workers/content-legal/worker.yaml +118 -0
- package/template/workers/content-product/README.md +77 -0
- package/template/workers/content-product/skills/claim-verification.md +96 -0
- package/template/workers/content-product/skills/feature-accuracy.md +117 -0
- package/template/workers/content-product/skills/stats-check.md +128 -0
- package/template/workers/content-product/worker.yaml +97 -0
- package/template/workers/content-sales/README.md +70 -0
- package/template/workers/content-sales/skills/conversion-analysis.md +96 -0
- package/template/workers/content-sales/skills/cta-audit.md +107 -0
- package/template/workers/content-sales/skills/value-prop-check.md +114 -0
- package/template/workers/content-sales/worker.yaml +93 -0
- package/template/workers/content-shared/cli.ts +242 -0
- package/template/workers/content-shared/index.ts +234 -0
- package/template/workers/content-shared/lib/accuracy-analyzer.ts +661 -0
- package/template/workers/content-shared/lib/analyze.ts +370 -0
- package/template/workers/content-shared/lib/brand-analyzer.ts +526 -0
- package/template/workers/content-shared/lib/cms-integration.ts +446 -0
- package/template/workers/content-shared/lib/compliance-analyzer.ts +655 -0
- package/template/workers/content-shared/lib/conversion-analyzer.ts +555 -0
- package/template/workers/content-shared/lib/github-integration.ts +582 -0
- package/template/workers/content-shared/lib/output.ts +373 -0
- package/template/workers/content-shared/lib/parser.ts +771 -0
- package/template/workers/content-shared/lib/priority.ts +439 -0
- package/template/workers/content-shared/lib/recommendations.ts +512 -0
- package/template/workers/content-shared/lib/reporter.ts +749 -0
- package/template/workers/content-shared/lib/restructure.ts +664 -0
- package/template/workers/content-shared/lib/scorer.ts +140 -0
- package/template/workers/content-shared/lib/types.ts +227 -0
- package/template/workers/content-shared/lib/variants.ts +595 -0
- package/template/workers/content-shared/package.json +51 -0
- package/template/workers/content-shared/pnpm-lock.yaml +39 -0
- package/template/workers/content-shared/test/sample-page.json +115 -0
- package/template/workers/content-shared/tsconfig.json +20 -0
- package/template/workers/dev-team/README.md +166 -0
- package/template/workers/dev-team/_template.yaml +70 -0
- package/template/workers/dev-team/architect/package.json +27 -0
- package/template/workers/dev-team/architect/skills/api-design.md +89 -0
- package/template/workers/dev-team/architect/skills/refactor-plan.md +96 -0
- package/template/workers/dev-team/architect/skills/system-design.md +100 -0
- package/template/workers/dev-team/architect/src/index.ts +49 -0
- package/template/workers/dev-team/architect/src/mcp-server.ts +122 -0
- package/template/workers/dev-team/architect/src/skills/api-design.ts +316 -0
- package/template/workers/dev-team/architect/src/skills/refactor-plan.ts +264 -0
- package/template/workers/dev-team/architect/src/skills/system-design.ts +212 -0
- package/template/workers/dev-team/architect/tsconfig.json +19 -0
- package/template/workers/dev-team/architect/worker.yaml +128 -0
- package/template/workers/dev-team/backend-dev/package-lock.json +1252 -0
- package/template/workers/dev-team/backend-dev/package.json +27 -0
- package/template/workers/dev-team/backend-dev/skills/implement-endpoint.md +70 -0
- package/template/workers/dev-team/backend-dev/skills/implement-service.md +62 -0
- package/template/workers/dev-team/backend-dev/src/index.ts +51 -0
- package/template/workers/dev-team/backend-dev/src/mcp-server.ts +109 -0
- package/template/workers/dev-team/backend-dev/src/skills/implement-endpoint.ts +122 -0
- package/template/workers/dev-team/backend-dev/src/skills/implement-service.ts +126 -0
- package/template/workers/dev-team/backend-dev/tsconfig.json +19 -0
- package/template/workers/dev-team/backend-dev/worker.yaml +128 -0
- package/template/workers/dev-team/code-reviewer/package-lock.json +1080 -0
- package/template/workers/dev-team/code-reviewer/package.json +24 -0
- package/template/workers/dev-team/code-reviewer/skills/merge-to-production.md +61 -0
- package/template/workers/dev-team/code-reviewer/skills/merge-to-staging.md +54 -0
- package/template/workers/dev-team/code-reviewer/skills/request-changes.md +63 -0
- package/template/workers/dev-team/code-reviewer/skills/review-pr.md +77 -0
- package/template/workers/dev-team/code-reviewer/src/index.ts +56 -0
- package/template/workers/dev-team/code-reviewer/src/mcp-server.ts +101 -0
- package/template/workers/dev-team/code-reviewer/tsconfig.json +19 -0
- package/template/workers/dev-team/code-reviewer/worker.yaml +90 -0
- package/template/workers/dev-team/database-dev/package.json +22 -0
- package/template/workers/dev-team/database-dev/skills/create-schema.md +48 -0
- package/template/workers/dev-team/database-dev/src/index.ts +50 -0
- package/template/workers/dev-team/database-dev/src/mcp-server.ts +76 -0
- package/template/workers/dev-team/database-dev/tsconfig.json +18 -0
- package/template/workers/dev-team/database-dev/worker.yaml +90 -0
- package/template/workers/dev-team/frontend-dev/package.json +22 -0
- package/template/workers/dev-team/frontend-dev/skills/create-component.md +26 -0
- package/template/workers/dev-team/frontend-dev/src/index.ts +50 -0
- package/template/workers/dev-team/frontend-dev/src/mcp-server.ts +77 -0
- package/template/workers/dev-team/frontend-dev/tsconfig.json +18 -0
- package/template/workers/dev-team/frontend-dev/worker.yaml +132 -0
- package/template/workers/dev-team/infra-dev/package.json +24 -0
- package/template/workers/dev-team/infra-dev/skills/add-monitoring.md +73 -0
- package/template/workers/dev-team/infra-dev/skills/configure-deployment.md +80 -0
- package/template/workers/dev-team/infra-dev/skills/create-dockerfile.md +62 -0
- package/template/workers/dev-team/infra-dev/skills/setup-cicd.md +63 -0
- package/template/workers/dev-team/infra-dev/src/index.ts +55 -0
- package/template/workers/dev-team/infra-dev/src/mcp-server.ts +82 -0
- package/template/workers/dev-team/infra-dev/tsconfig.json +19 -0
- package/template/workers/dev-team/infra-dev/worker.yaml +92 -0
- package/template/workers/dev-team/knowledge-curator/package.json +24 -0
- package/template/workers/dev-team/knowledge-curator/skills/curate-troubleshooting.md +63 -0
- package/template/workers/dev-team/knowledge-curator/skills/process-learnings.md +61 -0
- package/template/workers/dev-team/knowledge-curator/skills/sync-documentation.md +76 -0
- package/template/workers/dev-team/knowledge-curator/skills/update-patterns.md +63 -0
- package/template/workers/dev-team/knowledge-curator/src/index.ts +53 -0
- package/template/workers/dev-team/knowledge-curator/src/mcp-server.ts +92 -0
- package/template/workers/dev-team/knowledge-curator/tsconfig.json +19 -0
- package/template/workers/dev-team/knowledge-curator/worker.yaml +80 -0
- package/template/workers/dev-team/motion-designer/package.json +22 -0
- package/template/workers/dev-team/motion-designer/skills/add-animation.md +25 -0
- package/template/workers/dev-team/motion-designer/skills/generate-image.md +36 -0
- package/template/workers/dev-team/motion-designer/src/index.ts +63 -0
- package/template/workers/dev-team/motion-designer/src/mcp-server.ts +79 -0
- package/template/workers/dev-team/motion-designer/tsconfig.json +18 -0
- package/template/workers/dev-team/motion-designer/worker.yaml +84 -0
- package/template/workers/dev-team/product-planner/queue.json +4 -0
- package/template/workers/dev-team/product-planner/worker.yaml +220 -0
- package/template/workers/dev-team/project-manager/package-lock.json +1252 -0
- package/template/workers/dev-team/project-manager/package.json +27 -0
- package/template/workers/dev-team/project-manager/skills/create-prd.md +66 -0
- package/template/workers/dev-team/project-manager/skills/next-issue.md +51 -0
- package/template/workers/dev-team/project-manager/skills/project-status.md +59 -0
- package/template/workers/dev-team/project-manager/skills/update-learnings.md +65 -0
- package/template/workers/dev-team/project-manager/src/index.ts +54 -0
- package/template/workers/dev-team/project-manager/src/mcp-server.ts +207 -0
- package/template/workers/dev-team/project-manager/src/skills/create-prd.ts +86 -0
- package/template/workers/dev-team/project-manager/src/skills/next-issue.ts +137 -0
- package/template/workers/dev-team/project-manager/src/skills/project-status.ts +131 -0
- package/template/workers/dev-team/project-manager/src/skills/update-learnings.ts +94 -0
- package/template/workers/dev-team/project-manager/tsconfig.json +19 -0
- package/template/workers/dev-team/project-manager/worker.yaml +96 -0
- package/template/workers/dev-team/qa-tester/package.json +24 -0
- package/template/workers/dev-team/qa-tester/skills/create-demo-account.md +36 -0
- package/template/workers/dev-team/qa-tester/skills/run-tests.md +36 -0
- package/template/workers/dev-team/qa-tester/skills/write-test.md +27 -0
- package/template/workers/dev-team/qa-tester/src/index.ts +61 -0
- package/template/workers/dev-team/qa-tester/src/mcp-server.ts +88 -0
- package/template/workers/dev-team/qa-tester/tsconfig.json +18 -0
- package/template/workers/dev-team/qa-tester/worker.yaml +116 -0
- package/template/workers/dev-team/task-executor/package-lock.json +1252 -0
- package/template/workers/dev-team/task-executor/package.json +27 -0
- package/template/workers/dev-team/task-executor/skills/analyze-issue.md +101 -0
- package/template/workers/dev-team/task-executor/skills/execute.md +133 -0
- package/template/workers/dev-team/task-executor/skills/report-learnings.md +106 -0
- package/template/workers/dev-team/task-executor/skills/validate-completion.md +121 -0
- package/template/workers/dev-team/task-executor/src/index.ts +54 -0
- package/template/workers/dev-team/task-executor/src/mcp-server.ts +139 -0
- package/template/workers/dev-team/task-executor/src/skills/analyze-issue.ts +219 -0
- package/template/workers/dev-team/task-executor/src/skills/execute.ts +132 -0
- package/template/workers/dev-team/task-executor/src/skills/report-learnings.ts +119 -0
- package/template/workers/dev-team/task-executor/src/skills/validate-completion.ts +142 -0
- package/template/workers/dev-team/task-executor/tsconfig.json +19 -0
- package/template/workers/dev-team/task-executor/worker.yaml +110 -0
- package/template/workers/registry.yaml +171 -0
- package/template/workers/security-scanner/README.md +73 -0
- package/template/workers/security-scanner/skills/pre-deploy-check.md +205 -0
- package/template/workers/security-scanner/worker.yaml +26 -0
- package/template/workspace/checkpoints/.gitkeep +0 -0
- package/template/workspace/content-ideas/inbox.jsonl +0 -0
- package/template/workspace/drafts/.gitkeep +0 -0
- package/template/workspace/learnings/.gitkeep +3 -0
- package/template/workspace/orchestrator/.gitkeep +0 -0
- package/template/workspace/ralph-test/COMPLETE.md +18 -0
- package/template/workspace/ralph-test/hello.txt +2 -0
- package/template/workspace/reports/.gitkeep +0 -0
- package/template/workspace/scratch/.gitkeep +0 -0
- package/template/workspace/threads/.gitkeep +3 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hq/project-manager",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Project orchestration: PRD lifecycle, issue selection, learning aggregation",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"project-manager": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"typecheck": "tsc --noEmit",
|
|
12
|
+
"dev": "ts-node src/index.ts",
|
|
13
|
+
"mcp": "node dist/mcp-server.js"
|
|
14
|
+
},
|
|
15
|
+
"keywords": ["hq", "worker", "project-manager", "prd", "orchestration"],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
20
|
+
"commander": "^12.1.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^22.10.0",
|
|
24
|
+
"typescript": "^5.7.2",
|
|
25
|
+
"ts-node": "^10.9.2"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# create-prd
|
|
2
|
+
|
|
3
|
+
Create new PRD from requirements input.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--name <name>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--input <file>` - Input requirements file (markdown)
|
|
11
|
+
- `--template <type>` - Template: feature|bugfix|refactor
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Read input requirements (from file or prompt)
|
|
16
|
+
2. Extract user stories from requirements
|
|
17
|
+
3. Break into epics if multiple areas
|
|
18
|
+
4. For each story:
|
|
19
|
+
- Generate acceptance criteria
|
|
20
|
+
- Estimate priority
|
|
21
|
+
- Suggest worker sequence
|
|
22
|
+
- Identify dependencies
|
|
23
|
+
5. Present draft PRD to human for review
|
|
24
|
+
6. Incorporate feedback
|
|
25
|
+
7. Write to `projects/{name}/prd.json`
|
|
26
|
+
8. Optionally create beads via `bd init --project {name}`
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
PRD JSON file with structure:
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"project": "feature-name",
|
|
34
|
+
"created": "2026-01-23",
|
|
35
|
+
"epics": [{
|
|
36
|
+
"id": "E1",
|
|
37
|
+
"title": "Epic Title",
|
|
38
|
+
"stories": [{
|
|
39
|
+
"id": "US-001",
|
|
40
|
+
"title": "Story Title",
|
|
41
|
+
"description": "As a...",
|
|
42
|
+
"acceptance_criteria": [...],
|
|
43
|
+
"priority": 1,
|
|
44
|
+
"passes": false,
|
|
45
|
+
"worker_hints": ["architect", "backend-dev"]
|
|
46
|
+
}]
|
|
47
|
+
}]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Example
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
node dist/index.js create-prd --name user-auth --input docs/auth-requirements.md
|
|
55
|
+
|
|
56
|
+
# Output:
|
|
57
|
+
# Created PRD with 1 epic, 5 user stories
|
|
58
|
+
# - E1: User Authentication (5 stories)
|
|
59
|
+
# - US-001: Login endpoint (priority 1)
|
|
60
|
+
# - US-002: Logout endpoint (priority 1)
|
|
61
|
+
# - US-003: Session management (priority 2)
|
|
62
|
+
# - US-004: Remember me (priority 3)
|
|
63
|
+
# - US-005: Password reset (priority 2)
|
|
64
|
+
#
|
|
65
|
+
# Review and approve? [y/n/edit]
|
|
66
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# next-issue
|
|
2
|
+
|
|
3
|
+
Select next issue from project PRD/beads to work on.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--project <name>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--filter <label>` - Filter by label/tag
|
|
11
|
+
- `--priority <high|medium|low>` - Filter by priority
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Load project PRD from `projects/{project}/prd.json`
|
|
16
|
+
2. Load beads from project via `bd ls --project {project}`
|
|
17
|
+
3. Filter issues where `passes: false`
|
|
18
|
+
4. Check dependencies - only issues where all `dependsOn` items pass
|
|
19
|
+
5. Score by:
|
|
20
|
+
- Priority field (higher = first)
|
|
21
|
+
- Blocking count (more blockers = first)
|
|
22
|
+
- Complexity estimate (simpler = first for momentum)
|
|
23
|
+
6. Present top 3 candidates to human
|
|
24
|
+
7. Wait for human selection or approval of recommendation
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
Selected issue with:
|
|
29
|
+
- Issue ID and title
|
|
30
|
+
- Acceptance criteria
|
|
31
|
+
- Suggested worker sequence (from `worker_hints` or auto-detected)
|
|
32
|
+
- Files likely to be modified
|
|
33
|
+
- Dependencies and blockers
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node dist/index.js next-issue --project auth-feature
|
|
39
|
+
|
|
40
|
+
# Output:
|
|
41
|
+
# Recommended: US-003 "Implement logout endpoint"
|
|
42
|
+
# Priority: 1, Blocks: 2 other stories
|
|
43
|
+
# Workers: backend-dev → qa-tester
|
|
44
|
+
# Files: src/api/auth.ts, src/middleware/session.ts
|
|
45
|
+
#
|
|
46
|
+
# Alternatives:
|
|
47
|
+
# - US-004 "Add remember me checkbox" (Priority: 2)
|
|
48
|
+
# - US-005 "Session timeout handling" (Priority: 2)
|
|
49
|
+
#
|
|
50
|
+
# Proceed with US-003? [y/n/select other]
|
|
51
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# project-status
|
|
2
|
+
|
|
3
|
+
Show project progress, blockers, and next steps.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--project <name>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--verbose` - Show detailed story status
|
|
11
|
+
- `--format <table|json|markdown>` - Output format
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Load PRD from `projects/{project}/prd.json`
|
|
16
|
+
2. Load beads status via `bd ls --project {project}`
|
|
17
|
+
3. Calculate metrics:
|
|
18
|
+
- Total stories, completed, in-progress, blocked
|
|
19
|
+
- Completion percentage
|
|
20
|
+
- Blockers (failed stories, unmet dependencies)
|
|
21
|
+
4. Identify:
|
|
22
|
+
- What's blocking progress
|
|
23
|
+
- Next recommended action
|
|
24
|
+
- Estimated remaining work
|
|
25
|
+
5. Present status summary
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
|
|
29
|
+
Status report with:
|
|
30
|
+
- Progress bar and percentage
|
|
31
|
+
- Story breakdown by status
|
|
32
|
+
- Blockers and recommendations
|
|
33
|
+
- Next steps
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node dist/index.js project-status --project auth-feature
|
|
39
|
+
|
|
40
|
+
# Output:
|
|
41
|
+
# === auth-feature ===
|
|
42
|
+
# Progress: ████████░░ 80% (4/5 stories)
|
|
43
|
+
#
|
|
44
|
+
# ✅ Completed (4):
|
|
45
|
+
# - US-001: Login endpoint
|
|
46
|
+
# - US-002: Logout endpoint
|
|
47
|
+
# - US-003: Session management
|
|
48
|
+
# - US-005: Password reset
|
|
49
|
+
#
|
|
50
|
+
# 🔄 In Progress (0)
|
|
51
|
+
#
|
|
52
|
+
# ❌ Pending (1):
|
|
53
|
+
# - US-004: Remember me (blocked by: none)
|
|
54
|
+
#
|
|
55
|
+
# 🚧 Blockers: None
|
|
56
|
+
#
|
|
57
|
+
# Next: Run task-executor on US-004
|
|
58
|
+
# Estimated: 1 more iteration
|
|
59
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# update-learnings
|
|
2
|
+
|
|
3
|
+
Route learnings from completed tasks to appropriate knowledge locations.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = learning report from task-executor (JSON or structured text)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--project <name>` - Project context
|
|
11
|
+
- `--dry-run` - Show routing without writing
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Parse learning report
|
|
16
|
+
2. Categorize each learning:
|
|
17
|
+
- **project-specific**: Unique to this project context
|
|
18
|
+
- **pattern**: Reusable code/design pattern
|
|
19
|
+
- **troubleshooting**: Error/fix that others may encounter
|
|
20
|
+
- **workflow**: Worker sequence that worked well
|
|
21
|
+
3. Route to appropriate location:
|
|
22
|
+
- Project-specific → `projects/{name}/learnings/`
|
|
23
|
+
- Pattern → `knowledge/public/dev-team/patterns/{category}/`
|
|
24
|
+
- Troubleshooting → `knowledge/public/dev-team/troubleshooting/`
|
|
25
|
+
- Workflow → `knowledge/public/dev-team/workflows/`
|
|
26
|
+
4. Format as markdown with standard template
|
|
27
|
+
5. Present routing plan to human
|
|
28
|
+
6. Write files after approval
|
|
29
|
+
7. Update relevant CLAUDE.md if patterns affect guidance
|
|
30
|
+
|
|
31
|
+
## Learning Categories
|
|
32
|
+
|
|
33
|
+
| Category | Location | Example |
|
|
34
|
+
|----------|----------|---------|
|
|
35
|
+
| project | projects/{name}/learnings/ | "API uses custom auth header X-Token" |
|
|
36
|
+
| pattern | knowledge/public/dev-team/patterns/ | "Retry pattern for flaky external APIs" |
|
|
37
|
+
| troubleshoot | knowledge/public/dev-team/troubleshooting/ | "ESLint fails on CI but not local" |
|
|
38
|
+
| workflow | knowledge/public/dev-team/workflows/ | "For DB-heavy: database-dev before architect" |
|
|
39
|
+
|
|
40
|
+
## Output
|
|
41
|
+
|
|
42
|
+
- Markdown files written to knowledge locations
|
|
43
|
+
- Summary of what was written where
|
|
44
|
+
|
|
45
|
+
## Example
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
node dist/index.js update-learnings --project auth-feature
|
|
49
|
+
|
|
50
|
+
# Input (from task-executor):
|
|
51
|
+
# {
|
|
52
|
+
# "task": "US-003",
|
|
53
|
+
# "learnings": [
|
|
54
|
+
# {"type": "pattern", "content": "Session tokens use JWT with 15m expiry"},
|
|
55
|
+
# {"type": "troubleshoot", "content": "Redis connection must be established before auth middleware"}
|
|
56
|
+
# ]
|
|
57
|
+
# }
|
|
58
|
+
|
|
59
|
+
# Output:
|
|
60
|
+
# Routing learnings:
|
|
61
|
+
# - [pattern] → knowledge/public/dev-team/patterns/backend/jwt-session-tokens.md
|
|
62
|
+
# - [troubleshoot] → knowledge/public/dev-team/troubleshooting/redis-auth-order.md
|
|
63
|
+
#
|
|
64
|
+
# Approve routing? [y/n/edit]
|
|
65
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { nextIssue } from './skills/next-issue';
|
|
4
|
+
import { createPrd } from './skills/create-prd';
|
|
5
|
+
import { updateLearnings } from './skills/update-learnings';
|
|
6
|
+
import { projectStatus } from './skills/project-status';
|
|
7
|
+
|
|
8
|
+
const program = new Command();
|
|
9
|
+
|
|
10
|
+
program
|
|
11
|
+
.name('project-manager')
|
|
12
|
+
.description('Project orchestration: PRD lifecycle, issue selection, learning aggregation')
|
|
13
|
+
.version('1.0.0');
|
|
14
|
+
|
|
15
|
+
program
|
|
16
|
+
.command('next-issue')
|
|
17
|
+
.description('Select next issue from project to work on')
|
|
18
|
+
.requiredOption('--project <name>', 'Project name')
|
|
19
|
+
.option('--filter <label>', 'Filter by label')
|
|
20
|
+
.option('--priority <level>', 'Filter by priority (high|medium|low)')
|
|
21
|
+
.action(async (options) => {
|
|
22
|
+
await nextIssue(options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
program
|
|
26
|
+
.command('create-prd')
|
|
27
|
+
.description('Create new PRD from requirements')
|
|
28
|
+
.requiredOption('--name <name>', 'Project name')
|
|
29
|
+
.option('--input <file>', 'Input requirements file')
|
|
30
|
+
.option('--template <type>', 'Template type (feature|bugfix|refactor)')
|
|
31
|
+
.action(async (options) => {
|
|
32
|
+
await createPrd(options);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
program
|
|
36
|
+
.command('update-learnings')
|
|
37
|
+
.description('Route learnings to appropriate knowledge locations')
|
|
38
|
+
.option('--project <name>', 'Project context')
|
|
39
|
+
.option('--dry-run', 'Show routing without writing')
|
|
40
|
+
.action(async (options) => {
|
|
41
|
+
await updateLearnings(options);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
program
|
|
45
|
+
.command('project-status')
|
|
46
|
+
.description('Show project progress and blockers')
|
|
47
|
+
.requiredOption('--project <name>', 'Project name')
|
|
48
|
+
.option('--verbose', 'Show detailed story status')
|
|
49
|
+
.option('--format <type>', 'Output format (table|json|markdown)')
|
|
50
|
+
.action(async (options) => {
|
|
51
|
+
await projectStatus(options);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
program.parse();
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import {
|
|
5
|
+
CallToolRequestSchema,
|
|
6
|
+
ListToolsRequestSchema,
|
|
7
|
+
} from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
+
|
|
9
|
+
const server = new Server(
|
|
10
|
+
{
|
|
11
|
+
name: 'project-manager',
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
capabilities: {
|
|
16
|
+
tools: {},
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
// List available tools
|
|
22
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
23
|
+
return {
|
|
24
|
+
tools: [
|
|
25
|
+
{
|
|
26
|
+
name: 'next_issue',
|
|
27
|
+
description: 'Select next issue from project PRD/beads to work on',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
project: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Project name',
|
|
34
|
+
},
|
|
35
|
+
filter: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Filter by label (optional)',
|
|
38
|
+
},
|
|
39
|
+
priority: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
enum: ['high', 'medium', 'low'],
|
|
42
|
+
description: 'Filter by priority (optional)',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['project'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'create_prd',
|
|
50
|
+
description: 'Create new PRD from requirements',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
name: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Project name',
|
|
57
|
+
},
|
|
58
|
+
input: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Path to input requirements file (optional)',
|
|
61
|
+
},
|
|
62
|
+
template: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
enum: ['feature', 'bugfix', 'refactor'],
|
|
65
|
+
description: 'Template type (optional, default: feature)',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
required: ['name'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'update_learnings',
|
|
73
|
+
description: 'Route learnings to appropriate knowledge locations',
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
project: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'Project context (optional)',
|
|
80
|
+
},
|
|
81
|
+
learnings: {
|
|
82
|
+
type: 'array',
|
|
83
|
+
items: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
type: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
enum: ['project', 'pattern', 'troubleshoot', 'workflow'],
|
|
89
|
+
},
|
|
90
|
+
category: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Category for patterns (e.g., backend, frontend)',
|
|
93
|
+
},
|
|
94
|
+
content: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'The learning content',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
required: ['type', 'content'],
|
|
100
|
+
},
|
|
101
|
+
description: 'Array of learnings to route',
|
|
102
|
+
},
|
|
103
|
+
dryRun: {
|
|
104
|
+
type: 'boolean',
|
|
105
|
+
description: 'Show routing without writing (optional)',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
required: ['learnings'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'project_status',
|
|
113
|
+
description: 'Show project progress and blockers',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
project: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Project name',
|
|
120
|
+
},
|
|
121
|
+
verbose: {
|
|
122
|
+
type: 'boolean',
|
|
123
|
+
description: 'Show detailed story status (optional)',
|
|
124
|
+
},
|
|
125
|
+
format: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
enum: ['table', 'json', 'markdown'],
|
|
128
|
+
description: 'Output format (optional, default: table)',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
required: ['project'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// Handle tool calls
|
|
139
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
140
|
+
const { name, arguments: args } = request.params;
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
switch (name) {
|
|
144
|
+
case 'next_issue': {
|
|
145
|
+
// Import and call the skill
|
|
146
|
+
const { nextIssue } = await import('./skills/next-issue');
|
|
147
|
+
// Capture console output
|
|
148
|
+
const result = await captureOutput(() => nextIssue(args as any));
|
|
149
|
+
return { content: [{ type: 'text', text: result }] };
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
case 'create_prd': {
|
|
153
|
+
const { createPrd } = await import('./skills/create-prd');
|
|
154
|
+
const result = await captureOutput(() => createPrd(args as any));
|
|
155
|
+
return { content: [{ type: 'text', text: result }] };
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
case 'update_learnings': {
|
|
159
|
+
const { updateLearnings } = await import('./skills/update-learnings');
|
|
160
|
+
const result = await captureOutput(() => updateLearnings(args as any));
|
|
161
|
+
return { content: [{ type: 'text', text: result }] };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
case 'project_status': {
|
|
165
|
+
const { projectStatus } = await import('./skills/project-status');
|
|
166
|
+
const result = await captureOutput(() => projectStatus(args as any));
|
|
167
|
+
return { content: [{ type: 'text', text: result }] };
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
default:
|
|
171
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
172
|
+
}
|
|
173
|
+
} catch (error) {
|
|
174
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
175
|
+
return {
|
|
176
|
+
content: [{ type: 'text', text: `Error: ${message}` }],
|
|
177
|
+
isError: true,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// Helper to capture console output
|
|
183
|
+
async function captureOutput(fn: () => Promise<void>): Promise<string> {
|
|
184
|
+
const logs: string[] = [];
|
|
185
|
+
const originalLog = console.log;
|
|
186
|
+
const originalError = console.error;
|
|
187
|
+
|
|
188
|
+
console.log = (...args) => logs.push(args.join(' '));
|
|
189
|
+
console.error = (...args) => logs.push(`ERROR: ${args.join(' ')}`);
|
|
190
|
+
|
|
191
|
+
try {
|
|
192
|
+
await fn();
|
|
193
|
+
} finally {
|
|
194
|
+
console.log = originalLog;
|
|
195
|
+
console.error = originalError;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return logs.join('\n');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Start server
|
|
202
|
+
async function main() {
|
|
203
|
+
const transport = new StdioServerTransport();
|
|
204
|
+
await server.connect(transport);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
interface CreatePrdOptions {
|
|
5
|
+
name: string;
|
|
6
|
+
input?: string;
|
|
7
|
+
template?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function createPrd(options: CreatePrdOptions): Promise<void> {
|
|
11
|
+
const { name, input, template = 'feature' } = options;
|
|
12
|
+
|
|
13
|
+
const projectDir = path.join(process.cwd(), '..', '..', '..', 'projects', name);
|
|
14
|
+
const prdPath = path.join(projectDir, 'prd.json');
|
|
15
|
+
|
|
16
|
+
// Check if PRD already exists
|
|
17
|
+
if (fs.existsSync(prdPath)) {
|
|
18
|
+
console.error(`PRD already exists at ${prdPath}`);
|
|
19
|
+
console.log('Use project-status to view current state.');
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Read input requirements if provided
|
|
24
|
+
let requirements = '';
|
|
25
|
+
if (input && fs.existsSync(input)) {
|
|
26
|
+
requirements = fs.readFileSync(input, 'utf-8');
|
|
27
|
+
console.log(`Read requirements from ${input}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Create project directory
|
|
31
|
+
if (!fs.existsSync(projectDir)) {
|
|
32
|
+
fs.mkdirSync(projectDir, { recursive: true });
|
|
33
|
+
console.log(`Created project directory: ${projectDir}`);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Create skeleton PRD
|
|
37
|
+
const prd = {
|
|
38
|
+
project: name,
|
|
39
|
+
created: new Date().toISOString().split('T')[0],
|
|
40
|
+
template,
|
|
41
|
+
epics: [
|
|
42
|
+
{
|
|
43
|
+
id: 'E1',
|
|
44
|
+
title: 'Main Epic',
|
|
45
|
+
stories: [
|
|
46
|
+
{
|
|
47
|
+
id: 'US-001',
|
|
48
|
+
title: 'First User Story',
|
|
49
|
+
description: 'As a user, I want to...',
|
|
50
|
+
acceptance_criteria: [
|
|
51
|
+
'Criterion 1',
|
|
52
|
+
'Criterion 2'
|
|
53
|
+
],
|
|
54
|
+
priority: 1,
|
|
55
|
+
passes: false,
|
|
56
|
+
worker_hints: ['architect', 'backend-dev', 'qa-tester']
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Write PRD
|
|
64
|
+
fs.writeFileSync(prdPath, JSON.stringify(prd, null, 2));
|
|
65
|
+
console.log(`\nCreated PRD at ${prdPath}`);
|
|
66
|
+
|
|
67
|
+
console.log('\n=== PRD Structure ===');
|
|
68
|
+
console.log(`Project: ${name}`);
|
|
69
|
+
console.log(`Template: ${template}`);
|
|
70
|
+
console.log(`Epics: 1`);
|
|
71
|
+
console.log(`Stories: 1 (placeholder)`);
|
|
72
|
+
|
|
73
|
+
console.log('\n[Human action required]');
|
|
74
|
+
console.log('Edit the PRD to add your user stories:');
|
|
75
|
+
console.log(` ${prdPath}`);
|
|
76
|
+
|
|
77
|
+
if (requirements) {
|
|
78
|
+
console.log('\nInput requirements were loaded. Consider:');
|
|
79
|
+
console.log(' 1. Breaking requirements into user stories');
|
|
80
|
+
console.log(' 2. Adding acceptance criteria for each');
|
|
81
|
+
console.log(' 3. Setting priorities and worker hints');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
console.log('\nOnce ready, create beads with:');
|
|
85
|
+
console.log(` bd init --project ${name}`);
|
|
86
|
+
}
|