create-hq 6.0.0 → 7.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/__tests__/scaffold.test.d.ts +2 -0
- package/dist/__tests__/scaffold.test.d.ts.map +1 -0
- package/dist/__tests__/scaffold.test.js +150 -0
- package/dist/__tests__/scaffold.test.js.map +1 -0
- package/dist/cloud-sync.d.ts +11 -0
- package/dist/cloud-sync.d.ts.map +1 -0
- package/dist/cloud-sync.js +25 -0
- package/dist/cloud-sync.js.map +1 -0
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +7 -1
- package/dist/deps.js.map +1 -1
- package/dist/fetch-template.d.ts +14 -0
- package/dist/fetch-template.d.ts.map +1 -0
- package/dist/fetch-template.js +136 -0
- package/dist/fetch-template.js.map +1 -0
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/scaffold.d.ts +2 -2
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +95 -286
- package/dist/scaffold.js.map +1 -1
- package/dist/ui.d.ts +2 -3
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +90 -44
- package/dist/ui.js.map +1 -1
- package/package.json +48 -40
- package/template/.claude/CLAUDE.md +0 -202
- package/template/.claude/commands/checkpoint.md +0 -127
- package/template/.claude/commands/cleanup.md +0 -307
- package/template/.claude/commands/execute-task.md +0 -440
- package/template/.claude/commands/exit-plan.md +0 -41
- package/template/.claude/commands/handoff.md +0 -97
- package/template/.claude/commands/learn.md +0 -218
- package/template/.claude/commands/metrics.md +0 -118
- package/template/.claude/commands/newworker.md +0 -162
- package/template/.claude/commands/nexttask.md +0 -67
- package/template/.claude/commands/prd.md +0 -238
- package/template/.claude/commands/reanchor.md +0 -51
- package/template/.claude/commands/remember.md +0 -126
- package/template/.claude/commands/run-project.md +0 -348
- package/template/.claude/commands/run.md +0 -110
- package/template/.claude/commands/search-reindex.md +0 -62
- package/template/.claude/commands/search.md +0 -100
- package/template/.claude/commands/setup.md +0 -381
- package/template/.claude/scripts/pure-ralph-loop.ps1 +0 -312
- package/template/.claude/scripts/pure-ralph-loop.sh +0 -859
- package/template/CHANGELOG.md +0 -220
- package/template/LICENSE +0 -21
- package/template/MIGRATION.md +0 -259
- package/template/README.md +0 -368
- package/template/data/journal/.gitkeep +0 -0
- package/template/docs/images/ascii-banner-options.md +0 -122
- package/template/docs/images/hq-banner.svg +0 -105
- package/template/knowledge/Ralph/01-overview.md +0 -71
- package/template/knowledge/Ralph/02-core-concepts.md +0 -114
- package/template/knowledge/Ralph/03-how-ralph-works.md +0 -184
- package/template/knowledge/Ralph/04-back-pressure.md +0 -222
- package/template/knowledge/Ralph/05-specifications.md +0 -210
- package/template/knowledge/Ralph/06-agents-md.md +0 -222
- package/template/knowledge/Ralph/07-implementation.md +0 -316
- package/template/knowledge/Ralph/08-economics.md +0 -182
- package/template/knowledge/Ralph/09-resources.md +0 -145
- package/template/knowledge/Ralph/10-claude-code-workflow.md +0 -212
- package/template/knowledge/Ralph/11-team-training-guide.md +0 -383
- package/template/knowledge/Ralph/README.md +0 -40
- package/template/knowledge/ai-security-framework/CONTRIBUTING.md +0 -139
- package/template/knowledge/ai-security-framework/GLOSSARY.md +0 -176
- package/template/knowledge/ai-security-framework/LICENSE +0 -21
- package/template/knowledge/ai-security-framework/QUICK-START.md +0 -172
- package/template/knowledge/ai-security-framework/README.md +0 -232
- package/template/knowledge/ai-security-framework/checklists/browser-security.md +0 -301
- package/template/knowledge/ai-security-framework/checklists/credential-isolation.md +0 -322
- package/template/knowledge/ai-security-framework/checklists/incident-response.md +0 -288
- package/template/knowledge/ai-security-framework/checklists/pre-flight.md +0 -249
- package/template/knowledge/ai-security-framework/checklists/weekly-audit.md +0 -159
- package/template/knowledge/ai-security-framework/configs/audit-logging.md +0 -372
- package/template/knowledge/ai-security-framework/configs/kill-switches.md +0 -354
- package/template/knowledge/ai-security-framework/docs/01-core-principles.md +0 -256
- package/template/knowledge/ai-security-framework/docs/02-threat-landscape.md +0 -326
- package/template/knowledge/ai-security-framework/docs/03-security-posture.md +0 -250
- package/template/knowledge/ai-security-framework/templates/agents-security.md +0 -233
- package/template/knowledge/design-styles/README.md +0 -42
- package/template/knowledge/design-styles/american-industrial.md +0 -136
- package/template/knowledge/design-styles/ethereal-abstract.md +0 -133
- package/template/knowledge/design-styles/liminal-portal.md +0 -111
- 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 +0 -31
- package/template/knowledge/design-styles/swipes/american-industrial/qyqtg7Dq.png +0 -0
- package/template/knowledge/dev-team/README.md +0 -35
- package/template/knowledge/dev-team/patterns/README.md +0 -34
- package/template/knowledge/dev-team/patterns/frontend/react-best-practices.md +0 -178
- package/template/knowledge/dev-team/troubleshooting/README.md +0 -31
- package/template/knowledge/dev-team/workflows/README.md +0 -49
- package/template/knowledge/hq/checkpoint-schema.json +0 -51
- package/template/knowledge/hq/index-md-spec.md +0 -74
- package/template/knowledge/hq/thread-schema.md +0 -153
- package/template/knowledge/hq-core/checkpoint-schema.json +0 -51
- package/template/knowledge/hq-core/index-md-spec.md +0 -74
- package/template/knowledge/hq-core/thread-schema.md +0 -153
- package/template/knowledge/loom/README.md +0 -51
- package/template/knowledge/loom/architecture.md +0 -125
- package/template/knowledge/loom/code-style.md +0 -169
- package/template/knowledge/loom/llm-proxy.md +0 -132
- package/template/knowledge/loom/state-machine.md +0 -131
- package/template/knowledge/loom/thread-system.md +0 -117
- package/template/knowledge/loom/tools.md +0 -94
- package/template/knowledge/loom/weaver.md +0 -96
- package/template/knowledge/loom/web-frontend.md +0 -131
- package/template/knowledge/projects/README.md +0 -72
- package/template/knowledge/projects/templates/README.template.md +0 -28
- package/template/knowledge/workers/README.md +0 -195
- package/template/knowledge/workers/ralph-loop-pattern.md +0 -157
- package/template/knowledge/workers/skill-schema.md +0 -182
- package/template/knowledge/workers/state-machine.md +0 -102
- package/template/knowledge/workers/templates/base-worker.yaml +0 -73
- package/template/knowledge/workers/templates/code-worker.yaml +0 -85
- package/template/knowledge/workers/templates/skill.yaml +0 -49
- package/template/knowledge/workers/templates/social-worker.yaml +0 -70
- package/template/modules/examples/full-manifest.yaml +0 -92
- package/template/modules/examples/minimal.yaml +0 -14
- package/template/modules/modules.yaml +0 -59
- package/template/projects/.gitkeep +0 -0
- package/template/projects/incorporate-workers-into-pure-ralph/prd.json +0 -88
- package/template/projects/pure-ralph-branch-isolation/README.md +0 -114
- package/template/projects/pure-ralph-branch-isolation/prd.json +0 -123
- package/template/projects/purist-ralph-loop/README.md +0 -148
- package/template/projects/purist-ralph-loop/prd.json +0 -135
- package/template/projects/ralph-test/prd.json +0 -50
- package/template/prompts/pure-ralph-base.md +0 -551
- package/template/settings/.gitkeep +0 -0
- package/template/settings/pure-ralph.json +0 -42
- package/template/social-content/drafts/INDEX.md +0 -21
- package/template/social-content/drafts/linkedin/.gitkeep +0 -1
- package/template/social-content/drafts/x/.gitkeep +0 -1
- package/template/social-content/images/.gitkeep +0 -1
- package/template/starter-projects/code-worker/README.md +0 -97
- package/template/starter-projects/code-worker/prd.json +0 -45
- package/template/starter-projects/personal-assistant/README.md +0 -42
- package/template/starter-projects/personal-assistant/prd.json +0 -43
- package/template/starter-projects/social-media/README.md +0 -60
- package/template/starter-projects/social-media/prd.json +0 -43
- package/template/workers/content-brand/README.md +0 -59
- package/template/workers/content-brand/skills/messaging-alignment.md +0 -91
- package/template/workers/content-brand/skills/tone-check.md +0 -76
- package/template/workers/content-brand/skills/voice-analysis.md +0 -68
- package/template/workers/content-brand/worker.yaml +0 -81
- package/template/workers/content-legal/README.md +0 -80
- package/template/workers/content-legal/skills/claim-substantiation.md +0 -150
- package/template/workers/content-legal/skills/compliance-scan.md +0 -123
- package/template/workers/content-legal/skills/disclaimer-check.md +0 -146
- package/template/workers/content-legal/worker.yaml +0 -118
- package/template/workers/content-product/README.md +0 -77
- package/template/workers/content-product/skills/claim-verification.md +0 -96
- package/template/workers/content-product/skills/feature-accuracy.md +0 -117
- package/template/workers/content-product/skills/stats-check.md +0 -128
- package/template/workers/content-product/worker.yaml +0 -97
- package/template/workers/content-sales/README.md +0 -70
- package/template/workers/content-sales/skills/conversion-analysis.md +0 -96
- package/template/workers/content-sales/skills/cta-audit.md +0 -107
- package/template/workers/content-sales/skills/value-prop-check.md +0 -114
- package/template/workers/content-sales/worker.yaml +0 -93
- package/template/workers/content-shared/cli.ts +0 -242
- package/template/workers/content-shared/index.ts +0 -234
- package/template/workers/content-shared/lib/accuracy-analyzer.ts +0 -661
- package/template/workers/content-shared/lib/analyze.ts +0 -370
- package/template/workers/content-shared/lib/brand-analyzer.ts +0 -526
- package/template/workers/content-shared/lib/cms-integration.ts +0 -446
- package/template/workers/content-shared/lib/compliance-analyzer.ts +0 -655
- package/template/workers/content-shared/lib/conversion-analyzer.ts +0 -555
- package/template/workers/content-shared/lib/github-integration.ts +0 -582
- package/template/workers/content-shared/lib/output.ts +0 -373
- package/template/workers/content-shared/lib/parser.ts +0 -771
- package/template/workers/content-shared/lib/priority.ts +0 -439
- package/template/workers/content-shared/lib/recommendations.ts +0 -512
- package/template/workers/content-shared/lib/reporter.ts +0 -749
- package/template/workers/content-shared/lib/restructure.ts +0 -664
- package/template/workers/content-shared/lib/scorer.ts +0 -140
- package/template/workers/content-shared/lib/types.ts +0 -227
- package/template/workers/content-shared/lib/variants.ts +0 -595
- package/template/workers/content-shared/package.json +0 -51
- package/template/workers/content-shared/pnpm-lock.yaml +0 -39
- package/template/workers/content-shared/test/sample-page.json +0 -115
- package/template/workers/content-shared/tsconfig.json +0 -20
- package/template/workers/dev-team/README.md +0 -166
- package/template/workers/dev-team/_template.yaml +0 -70
- package/template/workers/dev-team/architect/package.json +0 -27
- package/template/workers/dev-team/architect/skills/api-design.md +0 -89
- package/template/workers/dev-team/architect/skills/refactor-plan.md +0 -96
- package/template/workers/dev-team/architect/skills/system-design.md +0 -100
- package/template/workers/dev-team/architect/src/index.ts +0 -49
- package/template/workers/dev-team/architect/src/mcp-server.ts +0 -122
- package/template/workers/dev-team/architect/src/skills/api-design.ts +0 -316
- package/template/workers/dev-team/architect/src/skills/refactor-plan.ts +0 -264
- package/template/workers/dev-team/architect/src/skills/system-design.ts +0 -212
- package/template/workers/dev-team/architect/tsconfig.json +0 -19
- package/template/workers/dev-team/architect/worker.yaml +0 -128
- package/template/workers/dev-team/backend-dev/package-lock.json +0 -1252
- package/template/workers/dev-team/backend-dev/package.json +0 -27
- package/template/workers/dev-team/backend-dev/skills/implement-endpoint.md +0 -70
- package/template/workers/dev-team/backend-dev/skills/implement-service.md +0 -62
- package/template/workers/dev-team/backend-dev/src/index.ts +0 -51
- package/template/workers/dev-team/backend-dev/src/mcp-server.ts +0 -109
- package/template/workers/dev-team/backend-dev/src/skills/implement-endpoint.ts +0 -122
- package/template/workers/dev-team/backend-dev/src/skills/implement-service.ts +0 -126
- package/template/workers/dev-team/backend-dev/tsconfig.json +0 -19
- package/template/workers/dev-team/backend-dev/worker.yaml +0 -128
- package/template/workers/dev-team/code-reviewer/package-lock.json +0 -1080
- package/template/workers/dev-team/code-reviewer/package.json +0 -24
- package/template/workers/dev-team/code-reviewer/skills/merge-to-production.md +0 -61
- package/template/workers/dev-team/code-reviewer/skills/merge-to-staging.md +0 -54
- package/template/workers/dev-team/code-reviewer/skills/request-changes.md +0 -63
- package/template/workers/dev-team/code-reviewer/skills/review-pr.md +0 -77
- package/template/workers/dev-team/code-reviewer/src/index.ts +0 -56
- package/template/workers/dev-team/code-reviewer/src/mcp-server.ts +0 -101
- package/template/workers/dev-team/code-reviewer/tsconfig.json +0 -19
- package/template/workers/dev-team/code-reviewer/worker.yaml +0 -90
- package/template/workers/dev-team/database-dev/package.json +0 -22
- package/template/workers/dev-team/database-dev/skills/create-schema.md +0 -48
- package/template/workers/dev-team/database-dev/src/index.ts +0 -50
- package/template/workers/dev-team/database-dev/src/mcp-server.ts +0 -76
- package/template/workers/dev-team/database-dev/tsconfig.json +0 -18
- package/template/workers/dev-team/database-dev/worker.yaml +0 -90
- package/template/workers/dev-team/frontend-dev/package.json +0 -22
- package/template/workers/dev-team/frontend-dev/skills/create-component.md +0 -26
- package/template/workers/dev-team/frontend-dev/src/index.ts +0 -50
- package/template/workers/dev-team/frontend-dev/src/mcp-server.ts +0 -77
- package/template/workers/dev-team/frontend-dev/tsconfig.json +0 -18
- package/template/workers/dev-team/frontend-dev/worker.yaml +0 -132
- package/template/workers/dev-team/infra-dev/package.json +0 -24
- package/template/workers/dev-team/infra-dev/skills/add-monitoring.md +0 -73
- package/template/workers/dev-team/infra-dev/skills/configure-deployment.md +0 -80
- package/template/workers/dev-team/infra-dev/skills/create-dockerfile.md +0 -62
- package/template/workers/dev-team/infra-dev/skills/setup-cicd.md +0 -63
- package/template/workers/dev-team/infra-dev/src/index.ts +0 -55
- package/template/workers/dev-team/infra-dev/src/mcp-server.ts +0 -82
- package/template/workers/dev-team/infra-dev/tsconfig.json +0 -19
- package/template/workers/dev-team/infra-dev/worker.yaml +0 -92
- package/template/workers/dev-team/knowledge-curator/package.json +0 -24
- package/template/workers/dev-team/knowledge-curator/skills/curate-troubleshooting.md +0 -63
- package/template/workers/dev-team/knowledge-curator/skills/process-learnings.md +0 -61
- package/template/workers/dev-team/knowledge-curator/skills/sync-documentation.md +0 -76
- package/template/workers/dev-team/knowledge-curator/skills/update-patterns.md +0 -63
- package/template/workers/dev-team/knowledge-curator/src/index.ts +0 -53
- package/template/workers/dev-team/knowledge-curator/src/mcp-server.ts +0 -92
- package/template/workers/dev-team/knowledge-curator/tsconfig.json +0 -19
- package/template/workers/dev-team/knowledge-curator/worker.yaml +0 -80
- package/template/workers/dev-team/motion-designer/package.json +0 -22
- package/template/workers/dev-team/motion-designer/skills/add-animation.md +0 -25
- package/template/workers/dev-team/motion-designer/skills/generate-image.md +0 -36
- package/template/workers/dev-team/motion-designer/src/index.ts +0 -63
- package/template/workers/dev-team/motion-designer/src/mcp-server.ts +0 -79
- package/template/workers/dev-team/motion-designer/tsconfig.json +0 -18
- package/template/workers/dev-team/motion-designer/worker.yaml +0 -84
- package/template/workers/dev-team/product-planner/queue.json +0 -4
- package/template/workers/dev-team/product-planner/worker.yaml +0 -220
- package/template/workers/dev-team/project-manager/package-lock.json +0 -1252
- package/template/workers/dev-team/project-manager/package.json +0 -27
- package/template/workers/dev-team/project-manager/skills/create-prd.md +0 -66
- package/template/workers/dev-team/project-manager/skills/next-issue.md +0 -51
- package/template/workers/dev-team/project-manager/skills/project-status.md +0 -59
- package/template/workers/dev-team/project-manager/skills/update-learnings.md +0 -65
- package/template/workers/dev-team/project-manager/src/index.ts +0 -54
- package/template/workers/dev-team/project-manager/src/mcp-server.ts +0 -207
- package/template/workers/dev-team/project-manager/src/skills/create-prd.ts +0 -86
- package/template/workers/dev-team/project-manager/src/skills/next-issue.ts +0 -137
- package/template/workers/dev-team/project-manager/src/skills/project-status.ts +0 -131
- package/template/workers/dev-team/project-manager/src/skills/update-learnings.ts +0 -94
- package/template/workers/dev-team/project-manager/tsconfig.json +0 -19
- package/template/workers/dev-team/project-manager/worker.yaml +0 -96
- package/template/workers/dev-team/qa-tester/package.json +0 -24
- package/template/workers/dev-team/qa-tester/skills/create-demo-account.md +0 -36
- package/template/workers/dev-team/qa-tester/skills/run-tests.md +0 -36
- package/template/workers/dev-team/qa-tester/skills/write-test.md +0 -27
- package/template/workers/dev-team/qa-tester/src/index.ts +0 -61
- package/template/workers/dev-team/qa-tester/src/mcp-server.ts +0 -88
- package/template/workers/dev-team/qa-tester/tsconfig.json +0 -18
- package/template/workers/dev-team/qa-tester/worker.yaml +0 -116
- package/template/workers/dev-team/task-executor/package-lock.json +0 -1252
- package/template/workers/dev-team/task-executor/package.json +0 -27
- package/template/workers/dev-team/task-executor/skills/analyze-issue.md +0 -101
- package/template/workers/dev-team/task-executor/skills/execute.md +0 -133
- package/template/workers/dev-team/task-executor/skills/report-learnings.md +0 -106
- package/template/workers/dev-team/task-executor/skills/validate-completion.md +0 -121
- package/template/workers/dev-team/task-executor/src/index.ts +0 -54
- package/template/workers/dev-team/task-executor/src/mcp-server.ts +0 -139
- package/template/workers/dev-team/task-executor/src/skills/analyze-issue.ts +0 -219
- package/template/workers/dev-team/task-executor/src/skills/execute.ts +0 -132
- package/template/workers/dev-team/task-executor/src/skills/report-learnings.ts +0 -119
- package/template/workers/dev-team/task-executor/src/skills/validate-completion.ts +0 -142
- package/template/workers/dev-team/task-executor/tsconfig.json +0 -19
- package/template/workers/dev-team/task-executor/worker.yaml +0 -110
- package/template/workers/registry.yaml +0 -171
- package/template/workers/security-scanner/README.md +0 -73
- package/template/workers/security-scanner/skills/pre-deploy-check.md +0 -205
- package/template/workers/security-scanner/worker.yaml +0 -26
- 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 +0 -3
- package/template/workspace/orchestrator/.gitkeep +0 -0
- package/template/workspace/ralph-test/COMPLETE.md +0 -18
- package/template/workspace/ralph-test/hello.txt +0 -2
- package/template/workspace/reports/.gitkeep +0 -0
- package/template/workspace/scratch/.gitkeep +0 -0
- package/template/workspace/threads/.gitkeep +0 -3
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAiB,MAAM,KAAK,CAAC;AAEpC,gFAAgF;AAEhF,MAAM,UAAU,MAAM,CAAC,gBAAyB,EAAE,SAAkB;IAClE,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;IACpB,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;IAC3B,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO;IAE9B,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,iCAAiC,CAAC,GAAG,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,iCAAiC,CAAC,GAAG,CAAC,CAAC,yBAAyB,CAAC,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 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-hq",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Create a new HQ — Personal OS for AI Workers",
|
|
5
|
-
"bin": {
|
|
6
|
-
"create-hq": "./dist/index.js"
|
|
7
|
-
},
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/fs-extra": "^11.0.4",
|
|
26
|
-
"@types/node": "^22.0.0",
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "create-hq",
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"description": "Create a new HQ — Personal OS for AI Workers",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-hq": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"clean": "rm -rf dist",
|
|
15
|
+
"prepack": "tsc",
|
|
16
|
+
"test": "vitest run"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"chalk": "^5.3.0",
|
|
20
|
+
"commander": "^12.1.0",
|
|
21
|
+
"fs-extra": "^11.2.0",
|
|
22
|
+
"ora": "^8.1.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/fs-extra": "^11.0.4",
|
|
26
|
+
"@types/node": "^22.0.0",
|
|
27
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
28
|
+
"typescript": "^5.7.0",
|
|
29
|
+
"vitest": "^4.1.2"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18.0.0"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/indigoai-us/hq.git",
|
|
37
|
+
"directory": "packages/create-hq"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"hq",
|
|
41
|
+
"ai",
|
|
42
|
+
"workers",
|
|
43
|
+
"claude",
|
|
44
|
+
"personal-os"
|
|
45
|
+
],
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"type": "module"
|
|
48
|
+
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
# HQ - Personal OS for AI Workers
|
|
2
|
-
|
|
3
|
-
Personal OS for orchestrating work across companies, workers, and AI.
|
|
4
|
-
|
|
5
|
-
## Key Files
|
|
6
|
-
|
|
7
|
-
- `INDEX.md` - Root directory map, recent threads, workers (start here)
|
|
8
|
-
- `USER-GUIDE.md` - Commands, workers, typical session
|
|
9
|
-
- `agents.md` - Your profile, preferences, companies (load for writing/communication tasks)
|
|
10
|
-
- `workers/registry.yaml` - Worker index
|
|
11
|
-
|
|
12
|
-
## INDEX.md System
|
|
13
|
-
|
|
14
|
-
Hierarchical INDEX.md files provide a navigable map of HQ. Read parent INDEX before diving into subdirectories.
|
|
15
|
-
|
|
16
|
-
**Key indexes:** `projects/INDEX.md`, `workspace/orchestrator/INDEX.md`, `companies/*/knowledge/INDEX.md`, `workers/*/INDEX.md`, `knowledge/INDEX.md`, `workspace/reports/INDEX.md`
|
|
17
|
-
|
|
18
|
-
**Spec:** `knowledge/hq-core/index-md-spec.md`
|
|
19
|
-
**Rebuild all:** `/cleanup --reindex`
|
|
20
|
-
**Auto-updated by:** `/checkpoint`, `/handoff`, `/reanchor`, `/prd`, `/run-project`, `/newworker`, content commands
|
|
21
|
-
|
|
22
|
-
## Structure
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
HQ/
|
|
26
|
-
├── .claude/commands/ # Slash commands (17, visibility: public|private in frontmatter)
|
|
27
|
-
├── agents.md # Your profile
|
|
28
|
-
├── companies/ # Company-scoped resources (optional)
|
|
29
|
-
│ └── {company}/ # settings/, data/, knowledge/
|
|
30
|
-
├── knowledge/ # HQ-level (Ralph, workers, security, projects)
|
|
31
|
-
├── projects/ # Project PRDs
|
|
32
|
-
├── workers/ # Worker definitions
|
|
33
|
-
│ ├── dev-team/ # 12 code workers
|
|
34
|
-
│ └── content-*/ # 5 content workers
|
|
35
|
-
├── social-content/ # Content drafts
|
|
36
|
-
│ └── drafts/ # x/, linkedin/
|
|
37
|
-
└── workspace/
|
|
38
|
-
├── checkpoints/ # Manual saves
|
|
39
|
-
├── threads/ # Auto-saved sessions
|
|
40
|
-
├── orchestrator/ # Project state
|
|
41
|
-
├── learnings/ # Task insights (event log)
|
|
42
|
-
└── content-ideas/ # Idea capture
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Workers
|
|
46
|
-
|
|
47
|
-
Workers are autonomous agents with defined skills. They *do things*.
|
|
48
|
-
|
|
49
|
-
| Type | Purpose | Examples |
|
|
50
|
-
|------|---------|----------|
|
|
51
|
-
| CodeWorker | Implement features, fix bugs | dev-team/* |
|
|
52
|
-
| ContentWorker | Draft content, maintain voice | content-brand, content-sales |
|
|
53
|
-
| SocialWorker | Post to platforms | x-worker |
|
|
54
|
-
| ResearchWorker | Analysis, market research | analyst |
|
|
55
|
-
| OpsWorker | Reports, automation | cfo-worker |
|
|
56
|
-
|
|
57
|
-
**Run a worker:** `/run {worker} {skill}`
|
|
58
|
-
|
|
59
|
-
**Build a worker:** `/newworker`
|
|
60
|
-
|
|
61
|
-
## Commands
|
|
62
|
-
|
|
63
|
-
### Session Management
|
|
64
|
-
| Command | Purpose |
|
|
65
|
-
|---------|---------|
|
|
66
|
-
| `/checkpoint` | Save state + context status |
|
|
67
|
-
| `/handoff` | Prepare for fresh session |
|
|
68
|
-
| `/reanchor` | Pause and realign |
|
|
69
|
-
| `/nexttask` | Find next thing to work on |
|
|
70
|
-
| `/remember` | Capture learnings as rules in relevant files |
|
|
71
|
-
| `/learn` | Auto-capture and classify learnings from task execution |
|
|
72
|
-
|
|
73
|
-
### Projects
|
|
74
|
-
| Command | Purpose |
|
|
75
|
-
|---------|---------|
|
|
76
|
-
| `/prd` | Generate PRD through discovery |
|
|
77
|
-
| `/run-project` | Execute project via Ralph loop |
|
|
78
|
-
| `/execute-task` | Run single task with workers |
|
|
79
|
-
|
|
80
|
-
### Workers
|
|
81
|
-
| Command | Purpose |
|
|
82
|
-
|---------|---------|
|
|
83
|
-
| `/run` | List/execute workers |
|
|
84
|
-
| `/newworker` | Create new worker |
|
|
85
|
-
| `/metrics` | View execution metrics |
|
|
86
|
-
|
|
87
|
-
### System
|
|
88
|
-
| Command | Purpose |
|
|
89
|
-
|---------|---------|
|
|
90
|
-
| `/search` | Semantic + full-text search across HQ (qmd-powered) |
|
|
91
|
-
| `/search-reindex` | Reindex and re-embed HQ for qmd search |
|
|
92
|
-
| `/cleanup` | Audit and clean HQ |
|
|
93
|
-
| `/setup` | Interactive setup wizard |
|
|
94
|
-
| `/exit-plan` | Force exit from plan mode |
|
|
95
|
-
|
|
96
|
-
## Knowledge Repos
|
|
97
|
-
|
|
98
|
-
Knowledge folders can be their own git repos, symlinked into HQ. This enables independent versioning, sharing, and publishing per knowledge base.
|
|
99
|
-
|
|
100
|
-
**Convention:** Repos live in `repos/public/` or `repos/private/`. Symlinks in `knowledge/` and `companies/*/knowledge` point to them. The symlinks are tracked by HQ git; the repo contents are gitignored.
|
|
101
|
-
|
|
102
|
-
**Reading/searching:** Transparent. `qmd`, `Glob`, `Grep`, `Read` all follow symlinks.
|
|
103
|
-
|
|
104
|
-
**Committing knowledge changes:** Changes show in `git status` of the *target repo* (not HQ). To commit:
|
|
105
|
-
1. `cd` to the symlink target (e.g. `repos/public/knowledge-ralph/`)
|
|
106
|
-
2. `git add`, `git commit`, `git push` in that repo
|
|
107
|
-
|
|
108
|
-
**Adding new knowledge:** Create repo in `repos/{public|private}/knowledge-{name}`, symlink into the appropriate knowledge path.
|
|
109
|
-
|
|
110
|
-
## Search (qmd)
|
|
111
|
-
|
|
112
|
-
HQ can be indexed with [qmd](https://github.com/tobi/qmd) for local semantic + full-text search.
|
|
113
|
-
|
|
114
|
-
**When to search:** Before any planning, research, or context-gathering task, search HQ first with `qmd` to find relevant knowledge, workers, skills, and prior work.
|
|
115
|
-
|
|
116
|
-
**Commands (run via Bash tool):**
|
|
117
|
-
- `qmd search "<query>" --json -n 10` — BM25 keyword search (fast, default)
|
|
118
|
-
- `qmd vsearch "<query>" --json -n 10` — semantic/conceptual search
|
|
119
|
-
- `qmd query "<query>" --json -n 10` — hybrid BM25 + vector + re-ranking (best quality, slower)
|
|
120
|
-
|
|
121
|
-
**Slash commands:** `/search <query>`, `/search-reindex`
|
|
122
|
-
|
|
123
|
-
### Search rules (all commands/skills must follow)
|
|
124
|
-
|
|
125
|
-
| Need | Tool | Example |
|
|
126
|
-
|------|------|---------|
|
|
127
|
-
| Find HQ content by topic | `qmd search` or `qmd vsearch` | "Find knowledge about API integration" |
|
|
128
|
-
| Find files by path pattern | `Glob` | `workers/*/worker.yaml`, `projects/*/prd.json` |
|
|
129
|
-
| Search code in `repos/` | `Grep` | Pattern matching in source code |
|
|
130
|
-
| Validate structured files | `grep` in Bash | Checking YAML fields, git branch filtering |
|
|
131
|
-
|
|
132
|
-
**Never use Grep/Glob to search HQ content by topic.** That's what qmd does. Commands and skills that scan HQ for related context must use `qmd vsearch` (semantic) or `qmd search` (keyword), not Grep.
|
|
133
|
-
|
|
134
|
-
## Learned Rules
|
|
135
|
-
|
|
136
|
-
<!-- Max 20. Overflow removed (rule still lives in its source file). -->
|
|
137
|
-
<!-- Auto-managed by /learn. Manual: /remember -->
|
|
138
|
-
|
|
139
|
-
(none yet — rules accumulate as the system runs)
|
|
140
|
-
|
|
141
|
-
## Learning System
|
|
142
|
-
|
|
143
|
-
Learnings are rules injected directly into the files they govern:
|
|
144
|
-
- Worker rules → `worker.yaml` `instructions:` block
|
|
145
|
-
- Command rules → command `.md` `## Rules` section
|
|
146
|
-
- Knowledge rules → relevant knowledge file
|
|
147
|
-
- Global rules → this file `## Learned Rules`
|
|
148
|
-
|
|
149
|
-
- `/learn` captures and classifies learnings automatically after task execution
|
|
150
|
-
- `/remember` delegates to `/learn` — user corrections always promote to Tier 1
|
|
151
|
-
|
|
152
|
-
Event log: `workspace/learnings/*.json` (append-only, for analysis/dedup).
|
|
153
|
-
|
|
154
|
-
## Auto-Learn (Build Activities)
|
|
155
|
-
|
|
156
|
-
When building HQ infrastructure (new workers, knowledge bases, commands, projects), auto-capture structural changes so future sessions know what exists:
|
|
157
|
-
|
|
158
|
-
**Triggers:**
|
|
159
|
-
- `/newworker` completes → `/learn` with scope: global, rule: "Worker {id} exists at {path} for {purpose}"
|
|
160
|
-
- `/prd` completes → `/learn` with scope: global, rule: "Project {name} exists with {N} stories targeting {repo}"
|
|
161
|
-
- New knowledge files created → `/learn` with scope: global, rule: "Knowledge {topic} available at {path}"
|
|
162
|
-
- New command created → `/learn` with scope: global, rule: "Command /{name} available for {purpose}"
|
|
163
|
-
|
|
164
|
-
**Why:** Fresh sessions load CLAUDE.md but don't scan every directory. Learned rules act as an index of what has been built, preventing re-creation of existing resources and enabling discovery.
|
|
165
|
-
|
|
166
|
-
**Also:** After any structural change, run `qmd update 2>/dev/null || true` to keep search current.
|
|
167
|
-
|
|
168
|
-
## Auto-Checkpoint (PostToolsHook)
|
|
169
|
-
|
|
170
|
-
After completing any of these actions, automatically save thread state to `workspace/threads/`:
|
|
171
|
-
|
|
172
|
-
**Triggers:**
|
|
173
|
-
- Worker skill completion (via `/run`)
|
|
174
|
-
- Git commit
|
|
175
|
-
- File generation (reports, social drafts)
|
|
176
|
-
- Significant file edits in project repos
|
|
177
|
-
|
|
178
|
-
**Thread Format:** See `knowledge/hq-core/thread-schema.md`
|
|
179
|
-
|
|
180
|
-
**Why:** Prevents lost work, enables session resumption, provides audit trail.
|
|
181
|
-
|
|
182
|
-
**How:** After a triggering action, capture git state + summary and write to `workspace/threads/T-{timestamp}-{slug}.json`
|
|
183
|
-
|
|
184
|
-
**Knowledge repos:** When edits touch knowledge files (symlinked to `repos/`), commit those changes to the knowledge repo — not HQ git. See "Knowledge Repos" section above for commit instructions.
|
|
185
|
-
|
|
186
|
-
## Auto-Handoff (Context Limit)
|
|
187
|
-
|
|
188
|
-
When context usage reaches 70% (remaining drops to 30%), automatically run `/handoff`.
|
|
189
|
-
|
|
190
|
-
**Rules:**
|
|
191
|
-
- Check context status line — when `remaining_percentage` ≤ 30, trigger handoff
|
|
192
|
-
- Before handoff, finish current atomic task (don't interrupt mid-edit)
|
|
193
|
-
- Notify user: "Context at {X}% remaining. Running /handoff to preserve continuity."
|
|
194
|
-
- Run `/handoff` with summary of remaining work
|
|
195
|
-
- This overrides manual handoff — don't wait for user to request it
|
|
196
|
-
|
|
197
|
-
## Core Principles
|
|
198
|
-
|
|
199
|
-
1. **Infrastructure scales, effort doesn't** - Build reusable systems
|
|
200
|
-
2. **Workers should grow smarter** - Capture learnings in knowledge bases
|
|
201
|
-
3. **Context is precious** - Checkpoint often, don't let work evaporate
|
|
202
|
-
4. **Ship, then iterate** - Working > perfect
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Save checkpoint and check context status
|
|
3
|
-
allowed-tools: Write, Bash, Read
|
|
4
|
-
argument-hint: [task-id]
|
|
5
|
-
visibility: public
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# /checkpoint - Save Progress
|
|
9
|
-
|
|
10
|
-
Save current work state as a thread to survive context loss.
|
|
11
|
-
|
|
12
|
-
**Task ID (optional):** $ARGUMENTS
|
|
13
|
-
|
|
14
|
-
## Process
|
|
15
|
-
|
|
16
|
-
1. **Generate thread ID** if not provided
|
|
17
|
-
- Format: `T-{YYYYMMDD}-{HHMMSS}-{slug}`
|
|
18
|
-
- Derive slug from recent work (e.g., `mrr-report`, `email-fix`)
|
|
19
|
-
|
|
20
|
-
2. **Capture git state**
|
|
21
|
-
```bash
|
|
22
|
-
git rev-parse --abbrev-ref HEAD # branch
|
|
23
|
-
git remote get-url origin 2>/dev/null # remote
|
|
24
|
-
git rev-parse --short HEAD # current commit
|
|
25
|
-
git log --oneline -5 # recent commits
|
|
26
|
-
git diff --name-only HEAD~3 # recently touched files
|
|
27
|
-
git status --porcelain # dirty check
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
3. **Capture knowledge repo git states**
|
|
31
|
-
Knowledge folders are separate git repos (symlinked). For any knowledge path in files_touched, capture its repo state:
|
|
32
|
-
```bash
|
|
33
|
-
# For each knowledge repo with changes:
|
|
34
|
-
for symlink in knowledge/public/* knowledge/private/* companies/*/knowledge; do
|
|
35
|
-
[ -L "$symlink" ] || continue
|
|
36
|
-
repo_dir=$(cd "$symlink" && git rev-parse --show-toplevel 2>/dev/null) || continue
|
|
37
|
-
dirty=$(cd "$repo_dir" && git status --porcelain)
|
|
38
|
-
[ -z "$dirty" ] && continue
|
|
39
|
-
echo "$symlink: $(cd "$repo_dir" && git rev-parse --short HEAD) (dirty)"
|
|
40
|
-
done
|
|
41
|
-
```
|
|
42
|
-
Include dirty knowledge repos in the thread JSON under `git.knowledge_repos`.
|
|
43
|
-
|
|
44
|
-
4. **Gather session state**
|
|
45
|
-
- Summarize what was accomplished
|
|
46
|
-
- List files touched
|
|
47
|
-
- Identify next steps
|
|
48
|
-
|
|
49
|
-
5. **Write thread** to `workspace/threads/{thread_id}.json` (include knowledge_repos from step 3):
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"thread_id": "T-20260123-143052-mrr-report",
|
|
53
|
-
"version": 1,
|
|
54
|
-
"created_at": "ISO8601",
|
|
55
|
-
"updated_at": "ISO8601",
|
|
56
|
-
|
|
57
|
-
"workspace_root": "~/Documents/HQ",
|
|
58
|
-
"cwd": "current/working/dir",
|
|
59
|
-
|
|
60
|
-
"git": {
|
|
61
|
-
"branch": "main",
|
|
62
|
-
"remote_url": "git@github.com:...",
|
|
63
|
-
"initial_commit": "abc1234",
|
|
64
|
-
"current_commit": "def5678",
|
|
65
|
-
"commits_made": ["hash: message"],
|
|
66
|
-
"dirty": false,
|
|
67
|
-
"knowledge_repos": {
|
|
68
|
-
"knowledge-acme": {"commit": "abc1234", "dirty": true},
|
|
69
|
-
"knowledge-ralph": {"commit": "def5678", "dirty": false}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
"worker": {
|
|
74
|
-
"id": "worker-id or null",
|
|
75
|
-
"skill": "skill-name or null",
|
|
76
|
-
"state": "completed"
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
"conversation_summary": "1-2 sentence summary",
|
|
80
|
-
"files_touched": ["relative/paths"],
|
|
81
|
-
"next_steps": ["remaining tasks"],
|
|
82
|
-
|
|
83
|
-
"metadata": {
|
|
84
|
-
"title": "Human-readable title",
|
|
85
|
-
"tags": ["searchable", "tags"]
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
6. **Also write legacy checkpoint** to `workspace/checkpoints/{task-id}.json` for backward compat
|
|
91
|
-
|
|
92
|
-
7. **Update INDEX.md files**
|
|
93
|
-
- Regenerate `INDEX.md` at HQ root with current:
|
|
94
|
-
- Workers from `workers/registry.yaml`
|
|
95
|
-
- Recent threads from `workspace/threads/`
|
|
96
|
-
- Update timestamp
|
|
97
|
-
- Regenerate `workspace/threads/INDEX.md` (all threads, full table)
|
|
98
|
-
- Check files_touched for any `companies/*/knowledge/` paths — if found, regenerate that company's `knowledge/INDEX.md`
|
|
99
|
-
- See `knowledge/public/hq-core/index-md-spec.md` for INDEX format
|
|
100
|
-
|
|
101
|
-
8. **Report**
|
|
102
|
-
```
|
|
103
|
-
Thread saved: workspace/threads/{thread_id}.json
|
|
104
|
-
|
|
105
|
-
Summary: {summary}
|
|
106
|
-
Git: {branch} @ {commit} ({dirty ? "dirty" : "clean"})
|
|
107
|
-
Files: {count} files touched
|
|
108
|
-
Next: {next_steps or "Work complete"}
|
|
109
|
-
|
|
110
|
-
To hand off to fresh session: /handoff
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Thread vs Checkpoint
|
|
114
|
-
|
|
115
|
-
| Feature | Thread (new) | Checkpoint (legacy) |
|
|
116
|
-
|---------|--------------|---------------------|
|
|
117
|
-
| Git context | Full (branch, commits, dirty) | Minimal |
|
|
118
|
-
| Worker state | Captured | Not captured |
|
|
119
|
-
| Location | workspace/threads/ | workspace/checkpoints/ |
|
|
120
|
-
| Format | Rich JSON | Simple JSON |
|
|
121
|
-
|
|
122
|
-
## Notes
|
|
123
|
-
|
|
124
|
-
- Threads ensure work survives context clears
|
|
125
|
-
- Run frequently during long sessions
|
|
126
|
-
- If session feels long, suggest `/handoff`
|
|
127
|
-
- Threads are searchable via `/search`
|