code-ai-installer 4.0.0 → 4.0.1-b
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/README.md +83 -67
- package/dist/index.js +2 -0
- package/dist/mcp/audit_ledger.d.ts +12 -0
- package/dist/mcp/audit_ledger.js +82 -0
- package/dist/mcp/cli.js +7 -1
- package/dist/mcp/config.d.ts +23 -0
- package/dist/mcp/config.js +44 -6
- package/dist/mcp/index.d.ts +1 -2
- package/dist/mcp/index.js +1 -2
- package/dist/mcp/paths.d.ts +20 -2
- package/dist/mcp/paths.js +29 -5
- package/dist/mcp/proposal_dedup.d.ts +32 -0
- package/dist/mcp/proposal_dedup.js +102 -0
- package/dist/mcp/proposal_store.d.ts +18 -0
- package/dist/mcp/proposal_store.js +74 -0
- package/dist/mcp/scorecard.d.ts +140 -0
- package/dist/mcp/scorecard.js +103 -0
- package/dist/mcp/skill_invocations.d.ts +15 -0
- package/dist/mcp/skill_invocations.js +28 -0
- package/dist/mcp/task_state.d.ts +77 -2
- package/dist/mcp/tools/_subprocess.d.ts +16 -0
- package/dist/mcp/tools/_subprocess.js +56 -0
- package/dist/mcp/tools/advance_gate.js +2 -2
- package/dist/mcp/tools/aggregate_run_metrics.d.ts +19 -0
- package/dist/mcp/tools/aggregate_run_metrics.js +139 -0
- package/dist/mcp/tools/apply_diff.d.ts +2 -0
- package/dist/mcp/tools/apply_diff.js +29 -0
- package/dist/mcp/tools/audit_bilocale_parity.d.ts +2 -0
- package/dist/mcp/tools/audit_bilocale_parity.js +146 -0
- package/dist/mcp/tools/audit_budget_compliance.d.ts +35 -0
- package/dist/mcp/tools/audit_budget_compliance.js +172 -0
- package/dist/mcp/tools/build.d.ts +2 -0
- package/dist/mcp/tools/build.js +47 -0
- package/dist/mcp/tools/check_lint.d.ts +2 -0
- package/dist/mcp/tools/check_lint.js +23 -0
- package/dist/mcp/tools/classify_gate.js +2 -2
- package/dist/mcp/tools/current_gate.js +2 -2
- package/dist/mcp/tools/dependency_supply_chain.d.ts +2 -0
- package/dist/mcp/tools/dependency_supply_chain.js +59 -0
- package/dist/mcp/tools/docker_compose.d.ts +2 -0
- package/dist/mcp/tools/docker_compose.js +24 -0
- package/dist/mcp/tools/e2e_playwright.d.ts +2 -0
- package/dist/mcp/tools/e2e_playwright.js +88 -0
- package/dist/mcp/tools/get_skill.js +17 -0
- package/dist/mcp/tools/git_commit.d.ts +2 -0
- package/dist/mcp/tools/git_commit.js +30 -0
- package/dist/mcp/tools/list_proposals.d.ts +6 -0
- package/dist/mcp/tools/list_proposals.js +16 -0
- package/dist/mcp/tools/list_skills.js +9 -1
- package/dist/mcp/tools/load_role.d.ts +3 -4
- package/dist/mcp/tools/load_role.js +11 -13
- package/dist/mcp/tools/propose_change.d.ts +8 -0
- package/dist/mcp/tools/propose_change.js +36 -0
- package/dist/mcp/tools/record_decision.js +25 -25
- package/dist/mcp/tools/review_proposal.d.ts +17 -0
- package/dist/mcp/tools/review_proposal.js +99 -0
- package/dist/mcp/tools/run_drift_audit.d.ts +11 -0
- package/dist/mcp/tools/run_drift_audit.js +79 -0
- package/dist/mcp/tools/run_tests.d.ts +2 -0
- package/dist/mcp/tools/run_tests.js +92 -0
- package/dist/mcp/tools/sign_off.js +14 -2
- package/dist/mcp/tools/stubs.js +30 -9
- package/dist/mcp/tools/verify_claim.js +33 -6
- package/dist/mcp_setup.d.ts +14 -3
- package/dist/mcp_setup.js +15 -6
- package/dist/shared/frontmatter.d.ts +44 -2
- package/dist/shared/frontmatter.js +54 -6
- package/dist/shared/index.d.ts +0 -5
- package/dist/shared/index.js +0 -5
- package/dist/shared/persona.d.ts +2 -2
- package/dist/shared/persona.js +1 -1
- package/dist/shared/pipeline.d.ts +46 -1
- package/dist/shared/tools.d.ts +1382 -16
- package/dist/shared/tools.js +229 -0
- package/dist/shared/vocabulary.d.ts +99 -4
- package/dist/shared/vocabulary.js +94 -5
- package/domains/analytics/.agents/skills/ansoff-matrix/SKILL.md +316 -300
- package/domains/analytics/.agents/skills/bcg-matrix/SKILL.md +345 -329
- package/domains/analytics/.agents/skills/blue-ocean-strategy/SKILL.md +432 -416
- package/domains/analytics/.agents/skills/board/SKILL.md +22 -0
- package/domains/analytics/.agents/skills/cohort-analysis/SKILL.md +338 -322
- package/domains/analytics/.agents/skills/competitive-analysis/SKILL.md +413 -395
- package/domains/analytics/.agents/skills/customer-journey-mapping/SKILL.md +347 -331
- package/domains/analytics/.agents/skills/gates/SKILL.md +388 -366
- package/domains/analytics/.agents/skills/handoff/SKILL.md +402 -380
- package/domains/analytics/.agents/skills/html-pdf-report/SKILL.md +21 -289
- package/domains/analytics/.agents/skills/html-pdf-report-reference/SKILL.md +325 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
- package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/skill.yaml +23 -0
- package/domains/analytics/.agents/skills/icp-buyer-persona/SKILL.md +407 -390
- package/domains/analytics/.agents/skills/jtbd-analysis/SKILL.md +357 -341
- package/domains/analytics/.agents/skills/karpathy-guidelines/SKILL.md +32 -0
- package/domains/analytics/.agents/skills/pest-analysis/SKILL.md +324 -305
- package/domains/analytics/.agents/skills/porters-five-forces/SKILL.md +377 -361
- package/domains/analytics/.agents/skills/report-design/SKILL.md +416 -398
- package/domains/analytics/.agents/skills/rfm-analysis/SKILL.md +330 -314
- package/domains/analytics/.agents/skills/session-prompt-generator/SKILL.md +400 -378
- package/domains/analytics/.agents/skills/swot-analysis/SKILL.md +340 -324
- package/domains/analytics/.agents/skills/tam-sam-som/SKILL.md +329 -312
- package/domains/analytics/.agents/skills/trend-analysis/SKILL.md +347 -331
- package/domains/analytics/.agents/skills/unit-economics/SKILL.md +430 -413
- package/domains/analytics/.agents/skills/value-chain-analysis/SKILL.md +346 -330
- package/domains/analytics/.agents/skills/web-research/SKILL.md +323 -308
- package/domains/analytics/AGENTS.md +1 -0
- package/domains/analytics/agents/auditor.md +76 -0
- package/domains/analytics/agents/conductor.md +11 -0
- package/domains/analytics/agents/data_analyst.md +11 -0
- package/domains/analytics/agents/designer.md +11 -0
- package/domains/analytics/agents/interviewer.md +11 -0
- package/domains/analytics/agents/layouter.md +11 -0
- package/domains/analytics/agents/mediator.md +11 -0
- package/domains/analytics/agents/researcher.md +11 -0
- package/domains/analytics/agents/strategist.md +11 -0
- package/domains/analytics/locales/en/.agents/skills/ansoff-matrix/SKILL.md +316 -300
- package/domains/analytics/locales/en/.agents/skills/bcg-matrix/SKILL.md +345 -329
- package/domains/analytics/locales/en/.agents/skills/blue-ocean-strategy/SKILL.md +432 -416
- package/domains/analytics/locales/en/.agents/skills/board/SKILL.md +22 -0
- package/domains/analytics/locales/en/.agents/skills/cohort-analysis/SKILL.md +338 -322
- package/domains/analytics/locales/en/.agents/skills/competitive-analysis/SKILL.md +413 -395
- package/domains/analytics/locales/en/.agents/skills/customer-journey-mapping/SKILL.md +347 -331
- package/domains/analytics/locales/en/.agents/skills/gates/SKILL.md +388 -366
- package/domains/analytics/locales/en/.agents/skills/handoff/SKILL.md +402 -380
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report/SKILL.md +21 -289
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/SKILL.md +325 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
- package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/skill.yaml +29 -0
- package/domains/analytics/locales/en/.agents/skills/icp-buyer-persona/SKILL.md +407 -390
- package/domains/analytics/locales/en/.agents/skills/jtbd-analysis/SKILL.md +357 -341
- package/domains/analytics/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +32 -0
- package/domains/analytics/locales/en/.agents/skills/pest-analysis/SKILL.md +324 -305
- package/domains/analytics/locales/en/.agents/skills/porters-five-forces/SKILL.md +377 -361
- package/domains/analytics/locales/en/.agents/skills/report-design/SKILL.md +416 -398
- package/domains/analytics/locales/en/.agents/skills/rfm-analysis/SKILL.md +330 -314
- package/domains/analytics/locales/en/.agents/skills/session-prompt-generator/SKILL.md +400 -378
- package/domains/analytics/locales/en/.agents/skills/swot-analysis/SKILL.md +340 -324
- package/domains/analytics/locales/en/.agents/skills/tam-sam-som/SKILL.md +329 -312
- package/domains/analytics/locales/en/.agents/skills/trend-analysis/SKILL.md +347 -331
- package/domains/analytics/locales/en/.agents/skills/unit-economics/SKILL.md +430 -413
- package/domains/analytics/locales/en/.agents/skills/value-chain-analysis/SKILL.md +366 -350
- package/domains/analytics/locales/en/.agents/skills/web-research/SKILL.md +324 -309
- package/domains/analytics/locales/en/AGENTS.md +1 -0
- package/domains/analytics/locales/en/agents/auditor.md +76 -0
- package/domains/analytics/locales/en/agents/conductor.md +27 -0
- package/domains/analytics/locales/en/agents/data_analyst.md +29 -0
- package/domains/analytics/locales/en/agents/designer.md +27 -0
- package/domains/analytics/locales/en/agents/interviewer.md +11 -0
- package/domains/analytics/locales/en/agents/layouter.md +11 -0
- package/domains/analytics/locales/en/agents/mediator.md +11 -0
- package/domains/analytics/locales/en/agents/researcher.md +11 -0
- package/domains/analytics/locales/en/agents/strategist.md +11 -0
- package/domains/analytics/persona/persona-base.md +94 -0
- package/domains/analytics/pipeline.yaml +102 -0
- package/domains/content/.agents/skills/audience-analysis/SKILL.md +15 -0
- package/domains/content/.agents/skills/board/SKILL.md +20 -0
- package/domains/content/.agents/skills/brand-compliance/SKILL.md +15 -0
- package/domains/content/.agents/skills/brand-guidelines/SKILL.md +17 -0
- package/domains/content/.agents/skills/competitor-content-analysis/SKILL.md +15 -0
- package/domains/content/.agents/skills/content-brief/SKILL.md +15 -0
- package/domains/content/.agents/skills/content-calendar/SKILL.md +15 -0
- package/domains/content/.agents/skills/content-release-gate/SKILL.md +15 -0
- package/domains/content/.agents/skills/content-review-checklist/SKILL.md +15 -0
- package/domains/content/.agents/skills/cta-optimization/SKILL.md +15 -0
- package/domains/content/.agents/skills/data-storytelling/SKILL.md +15 -0
- package/domains/content/.agents/skills/email-copywriting/SKILL.md +15 -0
- package/domains/content/.agents/skills/email-engagement-tiers/SKILL.md +15 -0
- package/domains/content/.agents/skills/fact-checking/SKILL.md +15 -0
- package/domains/content/.agents/skills/gates/SKILL.md +20 -0
- package/domains/content/.agents/skills/google-stitch-content/SKILL.md +15 -0
- package/domains/content/.agents/skills/handoff/SKILL.md +24 -0
- package/domains/content/.agents/skills/headline-formulas/SKILL.md +15 -0
- package/domains/content/.agents/skills/image-prompt-engineering/SKILL.md +15 -0
- package/domains/content/.agents/skills/karpathy-guidelines/SKILL.md +28 -0
- package/domains/content/.agents/skills/mailerlite-email-ops/SKILL.md +15 -0
- package/domains/content/.agents/skills/marketing-psychology/SKILL.md +15 -0
- package/domains/content/.agents/skills/moodboard/SKILL.md +15 -0
- package/domains/content/.agents/skills/platform-compliance/SKILL.md +15 -0
- package/domains/content/.agents/skills/platform-strategy/SKILL.md +15 -0
- package/domains/content/.agents/skills/platform-visual-specs/SKILL.md +15 -0
- package/domains/content/.agents/skills/readability-scoring/SKILL.md +15 -0
- package/domains/content/.agents/skills/seo-copywriting/SKILL.md +15 -0
- package/domains/content/.agents/skills/social-media-formats/SKILL.md +15 -0
- package/domains/content/.agents/skills/source-verification/SKILL.md +15 -0
- package/domains/content/.agents/skills/storytelling-framework/SKILL.md +15 -0
- package/domains/content/.agents/skills/tone-of-voice/SKILL.md +15 -0
- package/domains/content/.agents/skills/topic-research/SKILL.md +15 -0
- package/domains/content/.agents/skills/trend-research/SKILL.md +15 -0
- package/domains/content/.agents/skills/visual-brief/SKILL.md +15 -0
- package/domains/content/AGENTS.md +4 -0
- package/domains/content/agents/auditor.md +76 -0
- package/domains/content/agents/conductor.md +11 -0
- package/domains/content/agents/copywriter.md +11 -0
- package/domains/content/agents/researcher.md +11 -0
- package/domains/content/agents/reviewer.md +11 -0
- package/domains/content/agents/strategist.md +11 -0
- package/domains/content/agents/visual_concept.md +11 -0
- package/domains/content/locales/en/.agents/skills/audience-analysis/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/board/SKILL.md +20 -0
- package/domains/content/locales/en/.agents/skills/brand-compliance/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/brand-guidelines/SKILL.md +17 -0
- package/domains/content/locales/en/.agents/skills/competitor-content-analysis/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/content-brief/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/content-calendar/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/content-release-gate/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/content-review-checklist/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/cta-optimization/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/data-storytelling/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/email-copywriting/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/email-engagement-tiers/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/fact-checking/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/gates/SKILL.md +20 -0
- package/domains/content/locales/en/.agents/skills/google-stitch-content/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/handoff/SKILL.md +24 -0
- package/domains/content/locales/en/.agents/skills/headline-formulas/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/image-prompt-engineering/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +30 -1
- package/domains/content/locales/en/.agents/skills/mailerlite-email-ops/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/marketing-psychology/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/moodboard/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/platform-compliance/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/platform-strategy/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/platform-visual-specs/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/readability-scoring/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/seo-copywriting/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/social-media-formats/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/source-verification/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/storytelling-framework/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/tone-of-voice/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/topic-research/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/trend-research/SKILL.md +15 -0
- package/domains/content/locales/en/.agents/skills/visual-brief/SKILL.md +15 -0
- package/domains/content/locales/en/AGENTS.md +4 -0
- package/domains/content/locales/en/agents/auditor.md +76 -0
- package/domains/content/locales/en/agents/conductor.md +12 -0
- package/domains/content/locales/en/agents/copywriter.md +12 -0
- package/domains/content/locales/en/agents/researcher.md +12 -0
- package/domains/content/locales/en/agents/reviewer.md +12 -0
- package/domains/content/locales/en/agents/strategist.md +12 -0
- package/domains/content/locales/en/agents/visual_concept.md +12 -0
- package/domains/content/persona/persona-base.md +94 -0
- package/domains/content/pipeline.yaml +96 -0
- package/domains/development/.agents/skills/adr-log/SKILL.md +1 -0
- package/domains/development/.agents/skills/design-intake/SKILL.md +0 -4
- package/domains/development/.agents/skills/karpathy-guidelines/SKILL.md +2 -1
- package/domains/development/.agents/skills/lava-flow-legacy-detection/SKILL.md +15 -1
- package/domains/development/.agents/skills/mcp-integration/SKILL.md +211 -0
- package/domains/development/.agents/skills/mcp-integration/agents/claude.json +22 -0
- package/domains/development/.agents/skills/mcp-integration/agents/copilot.json +22 -0
- package/domains/development/.agents/skills/mcp-integration/agents/gemini.json +22 -0
- package/domains/development/.agents/skills/mcp-integration/agents/kimi.yaml +18 -0
- package/domains/development/.agents/skills/mcp-integration/agents/openai.yaml +8 -0
- package/domains/development/.agents/skills/mcp-integration/agents/qwen.json +22 -0
- package/domains/development/.agents/skills/mcp-integration/agents/skill.yaml +26 -0
- package/domains/development/.agents/skills/qa-ui-a11y-smoke/SKILL.md +1 -1
- package/domains/development/.agents/skills/ui-a11y-smoke-review/SKILL.md +1 -1
- package/domains/development/AGENTS.md +1 -0
- package/domains/development/AGENTS.yaml +1 -0
- package/domains/development/agents/architect.md +13 -1
- package/domains/development/agents/auditor.md +74 -0
- package/domains/development/agents/conductor.md +14 -3
- package/domains/development/agents/devops.md +8 -9
- package/domains/development/agents/reviewer.md +12 -0
- package/domains/development/agents/senior_full_stack.md +12 -0
- package/domains/development/agents/tester.md +10 -16
- package/domains/development/locales/en/.agents/skills/adr-log/SKILL.md +1 -0
- package/domains/development/locales/en/.agents/skills/current-state-analysis/SKILL.md +256 -172
- package/domains/development/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +2 -1
- package/domains/development/locales/en/.agents/skills/lava-flow-legacy-detection/SKILL.md +15 -1
- package/domains/development/locales/en/.agents/skills/mcp-integration/SKILL.md +211 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/claude.json +22 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/copilot.json +22 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/gemini.json +22 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/kimi.yaml +18 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/openai.yaml +8 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/qwen.json +22 -0
- package/domains/development/locales/en/.agents/skills/mcp-integration/agents/skill.yaml +26 -0
- package/domains/development/locales/en/.agents/skills/qa-ui-a11y-smoke/SKILL.md +1 -1
- package/domains/development/locales/en/.agents/skills/ui-a11y-smoke-review/SKILL.md +1 -1
- package/domains/development/locales/en/AGENTS.md +5 -0
- package/domains/development/locales/en/AGENTS.yaml +1 -0
- package/domains/development/locales/en/agents/architect.md +13 -1
- package/domains/development/locales/en/agents/auditor.md +74 -0
- package/domains/development/locales/en/agents/conductor.md +14 -3
- package/domains/development/locales/en/agents/devops.md +8 -9
- package/domains/development/locales/en/agents/reviewer.md +12 -0
- package/domains/development/locales/en/agents/senior_full_stack.md +12 -0
- package/domains/development/locales/en/agents/tester.md +10 -16
- package/domains/development/persona/persona-base.md +94 -0
- package/domains/product/.agents/skills/aarrr-metrics/SKILL.md +451 -433
- package/domains/product/.agents/skills/ab-test-design/SKILL.md +428 -412
- package/domains/product/.agents/skills/acceptance-criteria/SKILL.md +422 -406
- package/domains/product/.agents/skills/assumption-mapping/SKILL.md +323 -307
- package/domains/product/.agents/skills/board/SKILL.md +24 -0
- package/domains/product/.agents/skills/design-brief/SKILL.md +433 -418
- package/domains/product/.agents/skills/epic-breakdown/SKILL.md +435 -420
- package/domains/product/.agents/skills/gates/SKILL.md +470 -446
- package/domains/product/.agents/skills/gtm-brief/SKILL.md +18 -321
- package/domains/product/.agents/skills/gtm-brief-reference/SKILL.md +348 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/claude.json +17 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/copilot.json +17 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/gemini.json +17 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/kimi.yaml +15 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/openai.yaml +10 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/qwen.json +17 -0
- package/domains/product/.agents/skills/gtm-brief-reference/agents/skill.yaml +22 -0
- package/domains/product/.agents/skills/handoff/SKILL.md +463 -439
- package/domains/product/.agents/skills/html-pdf-report/SKILL.md +21 -663
- package/domains/product/.agents/skills/html-pdf-report-reference/SKILL.md +699 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
- package/domains/product/.agents/skills/html-pdf-report-reference/agents/skill.yaml +22 -0
- package/domains/product/.agents/skills/hypothesis-template/SKILL.md +484 -469
- package/domains/product/.agents/skills/jtbd-canvas/SKILL.md +274 -258
- package/domains/product/.agents/skills/kano-model/SKILL.md +370 -355
- package/domains/product/.agents/skills/karpathy-guidelines/SKILL.md +36 -0
- package/domains/product/.agents/skills/launch-checklist/SKILL.md +434 -419
- package/domains/product/.agents/skills/moscow-prioritization/SKILL.md +407 -392
- package/domains/product/.agents/skills/north-star-metric/SKILL.md +317 -301
- package/domains/product/.agents/skills/okr-framework/SKILL.md +299 -284
- package/domains/product/.agents/skills/opportunity-solution-tree/SKILL.md +472 -456
- package/domains/product/.agents/skills/prd-template/SKILL.md +18 -258
- package/domains/product/.agents/skills/prd-template-reference/SKILL.md +285 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/claude.json +17 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/copilot.json +17 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/gemini.json +17 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/kimi.yaml +16 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/openai.yaml +10 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/qwen.json +17 -0
- package/domains/product/.agents/skills/prd-template-reference/agents/skill.yaml +23 -0
- package/domains/product/.agents/skills/problem-statement/SKILL.md +327 -312
- package/domains/product/.agents/skills/product-roadmap/SKILL.md +320 -304
- package/domains/product/.agents/skills/product-vision/SKILL.md +409 -394
- package/domains/product/.agents/skills/release-notes/SKILL.md +18 -258
- package/domains/product/.agents/skills/release-notes-reference/SKILL.md +285 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/claude.json +17 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/copilot.json +17 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/gemini.json +17 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/kimi.yaml +15 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/openai.yaml +10 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/qwen.json +17 -0
- package/domains/product/.agents/skills/release-notes-reference/agents/skill.yaml +22 -0
- package/domains/product/.agents/skills/report-design/SKILL.md +17 -307
- package/domains/product/.agents/skills/report-design-reference/SKILL.md +331 -0
- package/domains/product/.agents/skills/report-design-reference/agents/claude.json +17 -0
- package/domains/product/.agents/skills/report-design-reference/agents/copilot.json +17 -0
- package/domains/product/.agents/skills/report-design-reference/agents/gemini.json +17 -0
- package/domains/product/.agents/skills/report-design-reference/agents/kimi.yaml +15 -0
- package/domains/product/.agents/skills/report-design-reference/agents/openai.yaml +10 -0
- package/domains/product/.agents/skills/report-design-reference/agents/qwen.json +17 -0
- package/domains/product/.agents/skills/report-design-reference/agents/skill.yaml +22 -0
- package/domains/product/.agents/skills/rice-scoring/SKILL.md +266 -251
- package/domains/product/.agents/skills/saas-metrics/SKILL.md +422 -404
- package/domains/product/.agents/skills/session-prompt-generator/SKILL.md +474 -450
- package/domains/product/.agents/skills/user-flow/SKILL.md +491 -476
- package/domains/product/.agents/skills/user-interview-script/SKILL.md +315 -298
- package/domains/product/.agents/skills/user-story/SKILL.md +401 -385
- package/domains/product/.agents/skills/wsjf-scoring/SKILL.md +333 -315
- package/domains/product/AGENTS.md +5 -0
- package/domains/product/AGENTS.yaml +1 -0
- package/domains/product/agents/auditor.md +76 -0
- package/domains/product/agents/conductor.md +11 -0
- package/domains/product/agents/data_analyst.md +11 -0
- package/domains/product/agents/designer.md +11 -0
- package/domains/product/agents/discovery.md +11 -0
- package/domains/product/agents/layouter.md +11 -0
- package/domains/product/agents/mediator.md +11 -0
- package/domains/product/agents/pm.md +11 -0
- package/domains/product/agents/product_strategist.md +11 -0
- package/domains/product/agents/tech_lead.md +11 -0
- package/domains/product/agents/ux_designer.md +11 -0
- package/domains/product/locales/en/.agents/skills/aarrr-metrics/SKILL.md +451 -433
- package/domains/product/locales/en/.agents/skills/ab-test-design/SKILL.md +428 -412
- package/domains/product/locales/en/.agents/skills/acceptance-criteria/SKILL.md +422 -406
- package/domains/product/locales/en/.agents/skills/assumption-mapping/SKILL.md +323 -307
- package/domains/product/locales/en/.agents/skills/board/SKILL.md +24 -0
- package/domains/product/locales/en/.agents/skills/design-brief/SKILL.md +433 -418
- package/domains/product/locales/en/.agents/skills/epic-breakdown/SKILL.md +435 -420
- package/domains/product/locales/en/.agents/skills/gates/SKILL.md +470 -446
- package/domains/product/locales/en/.agents/skills/gtm-brief/SKILL.md +18 -321
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/SKILL.md +348 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/claude.json +17 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/copilot.json +17 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/gemini.json +17 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/kimi.yaml +15 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/openai.yaml +10 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/qwen.json +17 -0
- package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/skill.yaml +22 -0
- package/domains/product/locales/en/.agents/skills/handoff/SKILL.md +463 -439
- package/domains/product/locales/en/.agents/skills/html-pdf-report/SKILL.md +21 -663
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/SKILL.md +699 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
- package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/skill.yaml +22 -0
- package/domains/product/locales/en/.agents/skills/hypothesis-template/SKILL.md +484 -469
- package/domains/product/locales/en/.agents/skills/jtbd-canvas/SKILL.md +273 -257
- package/domains/product/locales/en/.agents/skills/kano-model/SKILL.md +370 -355
- package/domains/product/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +36 -0
- package/domains/product/locales/en/.agents/skills/launch-checklist/SKILL.md +434 -419
- package/domains/product/locales/en/.agents/skills/moscow-prioritization/SKILL.md +407 -392
- package/domains/product/locales/en/.agents/skills/north-star-metric/SKILL.md +317 -301
- package/domains/product/locales/en/.agents/skills/okr-framework/SKILL.md +299 -284
- package/domains/product/locales/en/.agents/skills/opportunity-solution-tree/SKILL.md +472 -456
- package/domains/product/locales/en/.agents/skills/prd-template/SKILL.md +18 -258
- package/domains/product/locales/en/.agents/skills/prd-template-reference/SKILL.md +285 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/claude.json +16 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/copilot.json +16 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/gemini.json +16 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/kimi.yaml +15 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/openai.yaml +10 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/qwen.json +16 -0
- package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/skill.yaml +22 -0
- package/domains/product/locales/en/.agents/skills/problem-statement/SKILL.md +327 -312
- package/domains/product/locales/en/.agents/skills/product-roadmap/SKILL.md +321 -305
- package/domains/product/locales/en/.agents/skills/product-vision/SKILL.md +410 -395
- package/domains/product/locales/en/.agents/skills/release-notes/SKILL.md +18 -258
- package/domains/product/locales/en/.agents/skills/release-notes-reference/SKILL.md +285 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/claude.json +16 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/copilot.json +16 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/gemini.json +16 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/kimi.yaml +14 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/openai.yaml +10 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/qwen.json +16 -0
- package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/skill.yaml +21 -0
- package/domains/product/locales/en/.agents/skills/report-design/SKILL.md +17 -307
- package/domains/product/locales/en/.agents/skills/report-design-reference/SKILL.md +331 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/claude.json +17 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/copilot.json +17 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/gemini.json +17 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/kimi.yaml +15 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/openai.yaml +10 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/qwen.json +17 -0
- package/domains/product/locales/en/.agents/skills/report-design-reference/agents/skill.yaml +22 -0
- package/domains/product/locales/en/.agents/skills/rice-scoring/SKILL.md +266 -251
- package/domains/product/locales/en/.agents/skills/saas-metrics/SKILL.md +422 -404
- package/domains/product/locales/en/.agents/skills/session-prompt-generator/SKILL.md +474 -450
- package/domains/product/locales/en/.agents/skills/user-flow/SKILL.md +491 -476
- package/domains/product/locales/en/.agents/skills/user-interview-script/SKILL.md +314 -297
- package/domains/product/locales/en/.agents/skills/user-story/SKILL.md +401 -385
- package/domains/product/locales/en/.agents/skills/wsjf-scoring/SKILL.md +333 -315
- package/domains/product/locales/en/AGENTS.md +5 -0
- package/domains/product/locales/en/agents/auditor.md +76 -0
- package/domains/product/locales/en/agents/conductor.md +11 -0
- package/domains/product/locales/en/agents/data_analyst.md +11 -0
- package/domains/product/locales/en/agents/designer.md +11 -0
- package/domains/product/locales/en/agents/discovery.md +11 -0
- package/domains/product/locales/en/agents/layouter.md +11 -0
- package/domains/product/locales/en/agents/mediator.md +11 -0
- package/domains/product/locales/en/agents/pm.md +11 -0
- package/domains/product/locales/en/agents/product_strategist.md +11 -0
- package/domains/product/locales/en/agents/tech_lead.md +11 -0
- package/domains/product/locales/en/agents/ux_designer.md +11 -0
- package/domains/product/persona/persona-base.md +94 -0
- package/domains/product/pipeline.yaml +115 -0
- package/package.json +72 -70
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { npmCommand, spawnWithOutput, tail } from "./_subprocess.js";
|
|
2
|
+
export async function checkLint(input) {
|
|
3
|
+
const cwd = input.cwd ?? process.cwd();
|
|
4
|
+
const result = await spawnWithOutput(npmCommand(), ["run", "lint"], { cwd });
|
|
5
|
+
if (result.exitCode === 0) {
|
|
6
|
+
return { clean: true, issues: [] };
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
clean: false,
|
|
10
|
+
issues: [
|
|
11
|
+
{
|
|
12
|
+
code: "lint-failure",
|
|
13
|
+
message: `lint command exited with code ${result.exitCode}`,
|
|
14
|
+
evidence: {
|
|
15
|
+
stdout: tail(result.stdout, 4000),
|
|
16
|
+
stderr: tail(result.stderr, 4000),
|
|
17
|
+
duration_ms: result.durationMs,
|
|
18
|
+
spawnError: result.spawnError?.message,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadPipeline, getInitialGate } from "../pipeline.js";
|
|
2
2
|
import { createTaskState, readTaskState, writeTaskState, } from "../task_state.js";
|
|
3
|
-
|
|
3
|
+
import { resolveActiveDomain } from "../config.js";
|
|
4
4
|
/**
|
|
5
5
|
* Records the classification for the current gate. Must be called before the
|
|
6
6
|
* artifact is produced when the gate has classify_required=true.
|
|
@@ -14,7 +14,7 @@ const DEFAULT_DOMAIN = "development";
|
|
|
14
14
|
* a new classification entry. latestClassification() returns the most recent.
|
|
15
15
|
*/
|
|
16
16
|
export async function classifyGate(input) {
|
|
17
|
-
const pipeline = await loadPipeline(
|
|
17
|
+
const pipeline = await loadPipeline(await resolveActiveDomain());
|
|
18
18
|
let state = await readTaskState(input.task_id);
|
|
19
19
|
if (!state) {
|
|
20
20
|
state = await createTaskState({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadPipeline, getGateConfig, getInitialGate } from "../pipeline.js";
|
|
2
2
|
import { createTaskState, latestClassification, readTaskState } from "../task_state.js";
|
|
3
|
-
|
|
3
|
+
import { resolveActiveDomain } from "../config.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns the task's current gate. Auto-creates the task state with the
|
|
6
6
|
* pipeline's default_mode and initial gate if no state file exists yet —
|
|
@@ -14,7 +14,7 @@ const DEFAULT_DOMAIN = "development";
|
|
|
14
14
|
* classification_pending: true if classify_required && no classification yet.
|
|
15
15
|
*/
|
|
16
16
|
export async function currentGate(input) {
|
|
17
|
-
const pipeline = await loadPipeline(
|
|
17
|
+
const pipeline = await loadPipeline(await resolveActiveDomain());
|
|
18
18
|
let state = await readTaskState(input.task_id);
|
|
19
19
|
if (!state) {
|
|
20
20
|
state = await createTaskState({
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { npmCommand, spawnWithOutput, tail } from "./_subprocess.js";
|
|
2
|
+
export async function dependencySupplyChain(input) {
|
|
3
|
+
const cwd = input.cwd ?? process.cwd();
|
|
4
|
+
const result = await spawnWithOutput(npmCommand(), ["audit", "--json"], { cwd });
|
|
5
|
+
if (!result.stdout.trim()) {
|
|
6
|
+
return {
|
|
7
|
+
vulnerabilities: [
|
|
8
|
+
{
|
|
9
|
+
code: "subprocess-error",
|
|
10
|
+
message: `npm audit produced no output (exit=${result.exitCode})`,
|
|
11
|
+
evidence: {
|
|
12
|
+
stderr: tail(result.stderr, 2000),
|
|
13
|
+
spawnError: result.spawnError?.message,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
total_deps: 0,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
let report;
|
|
21
|
+
try {
|
|
22
|
+
report = JSON.parse(result.stdout);
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
return {
|
|
26
|
+
vulnerabilities: [
|
|
27
|
+
{
|
|
28
|
+
code: "json-parse-error",
|
|
29
|
+
message: `Failed to parse npm audit JSON: ${err.message}`,
|
|
30
|
+
evidence: { raw: result.stdout.slice(0, 500) },
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
total_deps: 0,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const vulnerabilities = [];
|
|
37
|
+
for (const [pkg, info] of Object.entries(report.vulnerabilities ?? {})) {
|
|
38
|
+
const severity = info.severity ?? "unknown";
|
|
39
|
+
const range = info.range ?? "";
|
|
40
|
+
const viaList = (info.via ?? [])
|
|
41
|
+
.map((v) => typeof v === "string" ? v : (v.title ?? v.name ?? ""))
|
|
42
|
+
.filter(Boolean);
|
|
43
|
+
vulnerabilities.push({
|
|
44
|
+
code: `npm-audit-${severity}-${pkg}`,
|
|
45
|
+
message: `${pkg}${range ? ` ${range}` : ""} — ${severity} severity${viaList.length ? `: ${viaList[0]}` : ""}`,
|
|
46
|
+
evidence: {
|
|
47
|
+
package: pkg,
|
|
48
|
+
severity,
|
|
49
|
+
range,
|
|
50
|
+
via: info.via,
|
|
51
|
+
effects: info.effects,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
vulnerabilities,
|
|
57
|
+
total_deps: report.metadata?.dependencies?.total ?? 0,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { spawnWithOutput } from "./_subprocess.js";
|
|
2
|
+
const DOCKER = process.platform === "win32" ? "docker.exe" : "docker";
|
|
3
|
+
export async function dockerCompose(input) {
|
|
4
|
+
const cwd = input.cwd ?? process.cwd();
|
|
5
|
+
const args = buildArgs(input.command);
|
|
6
|
+
const result = await spawnWithOutput(DOCKER, args, { cwd });
|
|
7
|
+
return {
|
|
8
|
+
exit_code: result.exitCode ?? -1,
|
|
9
|
+
stdout: result.stdout,
|
|
10
|
+
stderr: result.stderr,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function buildArgs(command) {
|
|
14
|
+
switch (command) {
|
|
15
|
+
case "up":
|
|
16
|
+
return ["compose", "up", "-d"];
|
|
17
|
+
case "down":
|
|
18
|
+
return ["compose", "down"];
|
|
19
|
+
case "ps":
|
|
20
|
+
return ["compose", "ps"];
|
|
21
|
+
case "logs":
|
|
22
|
+
return ["compose", "logs", "--no-color", "--tail=200"];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { readFile, unlink } from "node:fs/promises";
|
|
5
|
+
import { npmCommand, spawnWithOutput, tail } from "./_subprocess.js";
|
|
6
|
+
export async function e2ePlaywright(input) {
|
|
7
|
+
const cwd = input.cwd ?? process.cwd();
|
|
8
|
+
const outFile = join(tmpdir(), `code-ai-playwright-${randomUUID()}.json`);
|
|
9
|
+
const args = ["exec", "--", "playwright", "test", "--reporter=json"];
|
|
10
|
+
if (input.spec)
|
|
11
|
+
args.push("--grep", input.spec);
|
|
12
|
+
const result = await spawnWithOutput(npmCommand(), args, {
|
|
13
|
+
cwd,
|
|
14
|
+
env: { PLAYWRIGHT_JSON_OUTPUT_NAME: outFile },
|
|
15
|
+
});
|
|
16
|
+
let raw = null;
|
|
17
|
+
try {
|
|
18
|
+
raw = await readFile(outFile, "utf8");
|
|
19
|
+
await unlink(outFile).catch(() => undefined);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
raw = result.stdout.trim() || null;
|
|
23
|
+
}
|
|
24
|
+
if (!raw) {
|
|
25
|
+
return {
|
|
26
|
+
passed: 0,
|
|
27
|
+
failed: 0,
|
|
28
|
+
failures: [
|
|
29
|
+
{
|
|
30
|
+
code: "subprocess-error",
|
|
31
|
+
message: `playwright did not produce a JSON report (exit=${result.exitCode})`,
|
|
32
|
+
evidence: {
|
|
33
|
+
stderr: tail(result.stderr, 2000),
|
|
34
|
+
stdout: tail(result.stdout, 2000),
|
|
35
|
+
spawnError: result.spawnError?.message,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
let report;
|
|
42
|
+
try {
|
|
43
|
+
report = JSON.parse(raw);
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
return {
|
|
47
|
+
passed: 0,
|
|
48
|
+
failed: 0,
|
|
49
|
+
failures: [
|
|
50
|
+
{
|
|
51
|
+
code: "json-parse-error",
|
|
52
|
+
message: `Failed to parse playwright JSON report: ${err.message}`,
|
|
53
|
+
evidence: { raw: raw.slice(0, 500) },
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return mapReport(report);
|
|
59
|
+
}
|
|
60
|
+
function mapReport(report) {
|
|
61
|
+
const passed = report.stats?.expected ?? 0;
|
|
62
|
+
const failed = (report.stats?.unexpected ?? 0) + (report.stats?.flaky ?? 0);
|
|
63
|
+
const failures = [];
|
|
64
|
+
walkSuites(report.suites ?? [], failures);
|
|
65
|
+
return { passed, failed, failures };
|
|
66
|
+
}
|
|
67
|
+
function walkSuites(suites, failures) {
|
|
68
|
+
for (const suite of suites) {
|
|
69
|
+
for (const spec of suite.specs ?? []) {
|
|
70
|
+
if (spec.ok === false) {
|
|
71
|
+
const lastTest = spec.tests?.[spec.tests.length - 1];
|
|
72
|
+
const lastResult = lastTest?.results?.[lastTest.results.length - 1];
|
|
73
|
+
const msg = (lastResult?.error?.message ?? "(no error message)").split("\n")[0] ??
|
|
74
|
+
"";
|
|
75
|
+
failures.push({
|
|
76
|
+
code: "playwright-test-failed",
|
|
77
|
+
message: `${spec.file ?? suite.file ?? "<unknown>"} > ${spec.title ?? "<untitled>"}: ${msg}`,
|
|
78
|
+
evidence: {
|
|
79
|
+
file: spec.file ?? suite.file,
|
|
80
|
+
title: spec.title,
|
|
81
|
+
error: lastResult?.error,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
walkSuites(suite.suites ?? [], failures);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -3,6 +3,7 @@ import { join } from "node:path";
|
|
|
3
3
|
import { parse as parseYaml } from "yaml";
|
|
4
4
|
import { SkillFrontmatter, } from "../../shared/index.js";
|
|
5
5
|
import { resolveSkillsRoot } from "../paths.js";
|
|
6
|
+
import { recordSkillInvocation } from "../skill_invocations.js";
|
|
6
7
|
/**
|
|
7
8
|
* Reads a single SKILL.md from disk, validates its frontmatter against
|
|
8
9
|
* SkillFrontmatter (zod), and returns { frontmatter, body }.
|
|
@@ -43,5 +44,21 @@ export async function getSkill(input) {
|
|
|
43
44
|
throw new Error(`get_skill: frontmatter validation failed for ${file} — ${fm.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ")}`);
|
|
44
45
|
}
|
|
45
46
|
const body = stripped.slice(m[0].length);
|
|
47
|
+
// Auditor telemetry (ADR-DEV-121): when associated with a run, log the fetch
|
|
48
|
+
// as a skill invocation. Best-effort — a logging failure must never break a
|
|
49
|
+
// read (telemetry is not load-bearing for get_skill).
|
|
50
|
+
if (input.task_id !== undefined) {
|
|
51
|
+
try {
|
|
52
|
+
await recordSkillInvocation({
|
|
53
|
+
task_id: input.task_id,
|
|
54
|
+
gate: input.gate ?? null,
|
|
55
|
+
skill: input.name,
|
|
56
|
+
timestamp: new Date().toISOString(),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
/* swallow */
|
|
61
|
+
}
|
|
62
|
+
}
|
|
46
63
|
return { frontmatter: fm.data, body };
|
|
47
64
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { writeFile, unlink } from "node:fs/promises";
|
|
5
|
+
import { spawnWithOutput, tail } from "./_subprocess.js";
|
|
6
|
+
const GIT = process.platform === "win32" ? "git.exe" : "git";
|
|
7
|
+
export async function gitCommit(input) {
|
|
8
|
+
const cwd = input.cwd ?? process.cwd();
|
|
9
|
+
if (input.paths.length > 0) {
|
|
10
|
+
const add = await spawnWithOutput(GIT, ["add", "--", ...input.paths], { cwd });
|
|
11
|
+
if (add.exitCode !== 0) {
|
|
12
|
+
throw new Error(`git add failed (exit=${add.exitCode}): ${tail(add.stderr, 2000) || tail(add.stdout, 2000)}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const msgPath = join(tmpdir(), `code-ai-commit-msg-${randomUUID()}.txt`);
|
|
16
|
+
await writeFile(msgPath, input.message, "utf8");
|
|
17
|
+
const args = input.paths.length === 0
|
|
18
|
+
? ["commit", "-a", "-F", msgPath]
|
|
19
|
+
: ["commit", "-F", msgPath];
|
|
20
|
+
const commit = await spawnWithOutput(GIT, args, { cwd });
|
|
21
|
+
await unlink(msgPath).catch(() => undefined);
|
|
22
|
+
if (commit.exitCode !== 0) {
|
|
23
|
+
throw new Error(`git commit failed (exit=${commit.exitCode}): ${tail(commit.stderr, 2000) || tail(commit.stdout, 2000)}`);
|
|
24
|
+
}
|
|
25
|
+
const sha = await spawnWithOutput(GIT, ["rev-parse", "HEAD"], { cwd });
|
|
26
|
+
if (sha.exitCode !== 0) {
|
|
27
|
+
throw new Error(`git rev-parse HEAD failed: ${tail(sha.stderr, 1000)}`);
|
|
28
|
+
}
|
|
29
|
+
return { sha: sha.stdout.trim() };
|
|
30
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ListProposalsInput, type ListProposalsOutput } from "../../shared/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* List stored proposals, newest first, with optional surfacing filters
|
|
4
|
+
* (status / risk / domain). Read-only — never mutates the store.
|
|
5
|
+
*/
|
|
6
|
+
export declare function listProposals(input: ListProposalsInput): Promise<ListProposalsOutput>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { readProposals } from "../proposal_store.js";
|
|
2
|
+
/**
|
|
3
|
+
* List stored proposals, newest first, with optional surfacing filters
|
|
4
|
+
* (status / risk / domain). Read-only — never mutates the store.
|
|
5
|
+
*/
|
|
6
|
+
export async function listProposals(input) {
|
|
7
|
+
let proposals = await readProposals();
|
|
8
|
+
if (input.status)
|
|
9
|
+
proposals = proposals.filter((p) => p.status === input.status);
|
|
10
|
+
if (input.risk)
|
|
11
|
+
proposals = proposals.filter((p) => p.risk === input.risk);
|
|
12
|
+
if (input.domain)
|
|
13
|
+
proposals = proposals.filter((p) => p.target.domain === input.domain);
|
|
14
|
+
proposals.sort((a, b) => b.created_at.localeCompare(a.created_at));
|
|
15
|
+
return { proposals };
|
|
16
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readdir, readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { parse as parseYaml } from "yaml";
|
|
4
|
+
import { SkillFrontmatter, } from "../../shared/index.js";
|
|
4
5
|
import { resolveSkillsRoot } from "../paths.js";
|
|
5
6
|
/**
|
|
6
7
|
* Reads every SKILL.md under the given domain's `.agents/skills/<name>/SKILL.md`
|
|
@@ -45,10 +46,17 @@ function parseFrontmatter(raw) {
|
|
|
45
46
|
const m = stripped.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
46
47
|
if (!m)
|
|
47
48
|
return null;
|
|
49
|
+
let parsed;
|
|
48
50
|
try {
|
|
49
|
-
|
|
51
|
+
parsed = parseYaml(m[1]);
|
|
50
52
|
}
|
|
51
53
|
catch {
|
|
52
54
|
return null;
|
|
53
55
|
}
|
|
56
|
+
// Strict validation — skills with garbage frontmatter (missing type, bad
|
|
57
|
+
// enum, etc.) are silently skipped. Drift detection is run_drift_audit's job;
|
|
58
|
+
// list_skills returns only schema-conformant skills so downstream output.parse
|
|
59
|
+
// never sees a partially-typed entry.
|
|
60
|
+
const result = SkillFrontmatter.safeParse(parsed);
|
|
61
|
+
return result.success ? result.data : null;
|
|
54
62
|
}
|
|
@@ -2,10 +2,9 @@ import { type LoadRoleInput, type LoadRoleOutput } from "../../shared/index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* SessionStart loader for an agent role.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* the installer ship.
|
|
5
|
+
* Base persona ships inside the package at
|
|
6
|
+
* `domains/<domain>/persona/persona-base.md` (resolved per active domain via
|
|
7
|
+
* resolvePersonaBase); absent file degrades gracefully to no base layer.
|
|
9
8
|
*
|
|
10
9
|
* User-layer persona is currently always absent (persona-user-denis.md is
|
|
11
10
|
* gitignored and not loaded by name match). Future versions read the user
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
2
|
import { parse as parseYaml } from "yaml";
|
|
4
3
|
import { RoleFrontmatter, } from "../../shared/index.js";
|
|
5
|
-
import {
|
|
4
|
+
import { resolvePersonaBase, resolveAgentMd } from "../paths.js";
|
|
6
5
|
import { listSkills } from "./list_skills.js";
|
|
7
|
-
const PERSONA_BASE = join(PERSONA_ROOT, "persona-base.md");
|
|
8
6
|
/**
|
|
9
7
|
* SessionStart loader for an agent role.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* the installer ship.
|
|
9
|
+
* Base persona ships inside the package at
|
|
10
|
+
* `domains/<domain>/persona/persona-base.md` (resolved per active domain via
|
|
11
|
+
* resolvePersonaBase); absent file degrades gracefully to no base layer.
|
|
15
12
|
*
|
|
16
13
|
* User-layer persona is currently always absent (persona-user-denis.md is
|
|
17
14
|
* gitignored and not loaded by name match). Future versions read the user
|
|
@@ -19,7 +16,7 @@ const PERSONA_BASE = join(PERSONA_ROOT, "persona-base.md");
|
|
|
19
16
|
*/
|
|
20
17
|
export async function loadRole(input) {
|
|
21
18
|
const roleMd = await readFile(resolveAgentMd(input.domain, input.role_name), "utf8");
|
|
22
|
-
const personaBase = await loadPersonaBase();
|
|
19
|
+
const personaBase = await loadPersonaBase(input.domain);
|
|
23
20
|
const personaUser = await loadPersonaUserLayer();
|
|
24
21
|
const persona = mergePersona(personaBase, personaUser);
|
|
25
22
|
const skillsForRole = await listSkills({
|
|
@@ -34,6 +31,7 @@ export async function loadRole(input) {
|
|
|
34
31
|
name: input.role_name,
|
|
35
32
|
description: extractFirstHeading(roleMd) ?? `Agent: ${input.role_name}`,
|
|
36
33
|
domain: input.domain,
|
|
34
|
+
kind: "gate",
|
|
37
35
|
signs_off_at: inferSignsOffAt(input.role_name),
|
|
38
36
|
tool_allowlist: `role:${input.role_name}`,
|
|
39
37
|
budget_lines: 250,
|
|
@@ -79,13 +77,13 @@ function stripFrontmatter(raw) {
|
|
|
79
77
|
const m = stripped.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n+/);
|
|
80
78
|
return m ? stripped.slice(m[0].length) : stripped;
|
|
81
79
|
}
|
|
82
|
-
async function loadPersonaBase() {
|
|
83
|
-
const raw = await readFile(
|
|
80
|
+
async function loadPersonaBase(domain) {
|
|
81
|
+
const raw = await readFile(resolvePersonaBase(domain), "utf8").catch(() => null);
|
|
84
82
|
if (!raw)
|
|
85
83
|
return null;
|
|
86
|
-
// Persona files
|
|
87
|
-
//
|
|
88
|
-
//
|
|
84
|
+
// Persona files are markdown with section headings, not yaml: extract
|
|
85
|
+
// sections by heading and treat each list item as a PersonaProperty with
|
|
86
|
+
// manual provenance.
|
|
89
87
|
return parsePersonaMarkdown(raw, "base");
|
|
90
88
|
}
|
|
91
89
|
async function loadPersonaUserLayer() {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ProposeChangeInput, type ProposeChangeOutput } from "../../shared/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Record an Auditor proposal as a pending entry in the local proposal store.
|
|
4
|
+
*
|
|
5
|
+
* Pure surfacing: writing a proposal changes NO asset — it is inert until the
|
|
6
|
+
* approval/apply layer (item 4b) acts on it. Status is always "pending" here.
|
|
7
|
+
*/
|
|
8
|
+
export declare function proposeChange(input: ProposeChangeInput): Promise<ProposeChangeOutput>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { appendProposal, nextProposalId } from "../proposal_store.js";
|
|
2
|
+
import { resolveProposalsPath } from "../paths.js";
|
|
3
|
+
/** Map a change kind to its autonomy-matrix risk tier (ADR-DEV-122). */
|
|
4
|
+
function riskFor(kind) {
|
|
5
|
+
switch (kind) {
|
|
6
|
+
case "edit_minor":
|
|
7
|
+
return "low";
|
|
8
|
+
case "add_asset":
|
|
9
|
+
return "additive";
|
|
10
|
+
case "destructive":
|
|
11
|
+
return "high";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Record an Auditor proposal as a pending entry in the local proposal store.
|
|
16
|
+
*
|
|
17
|
+
* Pure surfacing: writing a proposal changes NO asset — it is inert until the
|
|
18
|
+
* approval/apply layer (item 4b) acts on it. Status is always "pending" here.
|
|
19
|
+
*/
|
|
20
|
+
export async function proposeChange(input) {
|
|
21
|
+
const id = await nextProposalId();
|
|
22
|
+
const risk = riskFor(input.change_kind);
|
|
23
|
+
await appendProposal({
|
|
24
|
+
id,
|
|
25
|
+
created_at: new Date().toISOString(),
|
|
26
|
+
status: "pending",
|
|
27
|
+
risk,
|
|
28
|
+
target: input.target,
|
|
29
|
+
change_kind: input.change_kind,
|
|
30
|
+
rationale: input.rationale,
|
|
31
|
+
evidence: input.evidence,
|
|
32
|
+
threshold_met: input.threshold_met,
|
|
33
|
+
draft: input.draft,
|
|
34
|
+
});
|
|
35
|
+
return { id, status: "pending", risk, path: resolveProposalsPath() };
|
|
36
|
+
}
|
|
@@ -4,7 +4,7 @@ import { resolveAdrRoot } from "../paths.js";
|
|
|
4
4
|
import { loadPipeline } from "../pipeline.js";
|
|
5
5
|
import { readTaskState, writeTaskState } from "../task_state.js";
|
|
6
6
|
import { buildDecisionStore } from "../stores/index.js";
|
|
7
|
-
|
|
7
|
+
import { resolveActiveDomain } from "../config.js";
|
|
8
8
|
/**
|
|
9
9
|
* Atomic 3-place ADR write:
|
|
10
10
|
* 1. docs/adr/ADR-{DOMAIN}-{NNN}.md — versioned on disk
|
|
@@ -74,7 +74,7 @@ async function maybeResetCircuitBreaker(taskId, gate) {
|
|
|
74
74
|
return;
|
|
75
75
|
let pipeline;
|
|
76
76
|
try {
|
|
77
|
-
pipeline = await loadPipeline(
|
|
77
|
+
pipeline = await loadPipeline(await resolveActiveDomain());
|
|
78
78
|
}
|
|
79
79
|
catch {
|
|
80
80
|
return; // No pipeline → nothing to reset against.
|
|
@@ -117,29 +117,29 @@ function renderAdr(a) {
|
|
|
117
117
|
const supersedesBlock = a.supersedes
|
|
118
118
|
? `\n\n## Supersedes\n${a.supersedes}\n`
|
|
119
119
|
: "";
|
|
120
|
-
return `# ${a.adrId}: ${a.question}
|
|
121
|
-
|
|
122
|
-
- **Status:** Accepted
|
|
123
|
-
- **Date:** ${a.today}
|
|
124
|
-
- **Task:** ${a.task_id}
|
|
125
|
-
- **Gate:** ${a.gate}
|
|
126
|
-
- **Signer:** ${a.signer}
|
|
127
|
-
|
|
128
|
-
## Question
|
|
129
|
-
|
|
130
|
-
${a.question}
|
|
131
|
-
|
|
132
|
-
## Options Considered
|
|
133
|
-
|
|
134
|
-
${optionsList}
|
|
135
|
-
|
|
136
|
-
## Decision
|
|
137
|
-
|
|
138
|
-
Chose **${a.chosen.id}**${a.chosen.label ? `: ${a.chosen.label}` : ""}.
|
|
139
|
-
|
|
140
|
-
## Rationale
|
|
141
|
-
|
|
142
|
-
${a.rationale}
|
|
120
|
+
return `# ${a.adrId}: ${a.question}
|
|
121
|
+
|
|
122
|
+
- **Status:** Accepted
|
|
123
|
+
- **Date:** ${a.today}
|
|
124
|
+
- **Task:** ${a.task_id}
|
|
125
|
+
- **Gate:** ${a.gate}
|
|
126
|
+
- **Signer:** ${a.signer}
|
|
127
|
+
|
|
128
|
+
## Question
|
|
129
|
+
|
|
130
|
+
${a.question}
|
|
131
|
+
|
|
132
|
+
## Options Considered
|
|
133
|
+
|
|
134
|
+
${optionsList}
|
|
135
|
+
|
|
136
|
+
## Decision
|
|
137
|
+
|
|
138
|
+
Chose **${a.chosen.id}**${a.chosen.label ? `: ${a.chosen.label}` : ""}.
|
|
139
|
+
|
|
140
|
+
## Rationale
|
|
141
|
+
|
|
142
|
+
${a.rationale}
|
|
143
143
|
${supersedesBlock}`;
|
|
144
144
|
}
|
|
145
145
|
function shortHash(s) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReviewProposalInput, type ReviewProposalOutput } from "../../shared/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Authorize a proposal status transition, enforcing the autonomy matrix + toggle.
|
|
4
|
+
*
|
|
5
|
+
* 4b is the AUTHORIZATION seam, not the write seam (mirrors sign_off: it authorizes a gate
|
|
6
|
+
* without doing the gate's work). The actual byte write into the asset is a separate
|
|
7
|
+
* submit_artifact/edit step the caller performs after approval — see next_step.
|
|
8
|
+
*
|
|
9
|
+
* Transitions:
|
|
10
|
+
* approve pending → approved (matrix/toggle-gated when decided_by=auditor_auto)
|
|
11
|
+
* reject pending → rejected
|
|
12
|
+
* applied approved → applied (bookkeeping marker after the caller wrote the asset)
|
|
13
|
+
*
|
|
14
|
+
* Matrix (ADR-DEV-122): auditor_auto may approve only low/additive AND only when the approval
|
|
15
|
+
* gate is OFF; destructive (high) and gate-ON always require den. den may always act.
|
|
16
|
+
*/
|
|
17
|
+
export declare function reviewProposal(input: ReviewProposalInput): Promise<ReviewProposalOutput>;
|