claude-code-pilot 3.1.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +16 -11
- package/bin/install.js +127 -11
- package/manifest.json +20 -1
- package/package.json +4 -3
- package/src/agents/a11y-architect.md +141 -0
- package/src/agents/code-architect.md +71 -0
- package/src/agents/code-explorer.md +69 -0
- package/src/agents/code-simplifier.md +47 -0
- package/src/agents/comment-analyzer.md +45 -0
- package/src/agents/csharp-reviewer.md +101 -0
- package/src/agents/dart-build-resolver.md +201 -0
- package/src/agents/django-build-resolver.md +252 -0
- package/src/agents/django-reviewer.md +169 -0
- package/src/agents/fastapi-reviewer.md +79 -0
- package/src/agents/fsharp-reviewer.md +109 -0
- package/src/agents/pr-test-analyzer.md +45 -0
- package/src/agents/silent-failure-hunter.md +50 -0
- package/src/agents/swift-build-resolver.md +170 -0
- package/src/agents/swift-reviewer.md +116 -0
- package/src/agents/type-design-analyzer.md +41 -0
- package/src/available-rules/README.md +3 -1
- package/src/available-rules/dart/coding-style.md +159 -0
- package/src/available-rules/dart/hooks.md +66 -0
- package/src/available-rules/dart/patterns.md +261 -0
- package/src/available-rules/dart/security.md +135 -0
- package/src/available-rules/dart/testing.md +215 -0
- package/src/available-rules/web/coding-style.md +105 -0
- package/src/available-rules/web/design-quality.md +72 -0
- package/src/available-rules/web/hooks.md +129 -0
- package/src/available-rules/web/patterns.md +88 -0
- package/src/available-rules/web/performance.md +73 -0
- package/src/available-rules/web/security.md +66 -0
- package/src/available-rules/web/testing.md +64 -0
- package/src/commands/ccp/ai-integration-phase.md +36 -0
- package/src/commands/ccp/audit-fix.md +33 -0
- package/src/commands/ccp/code-review-fix.md +52 -0
- package/src/commands/ccp/cost-report.md +107 -0
- package/src/commands/ccp/eval-review.md +32 -0
- package/src/commands/ccp/extract_learnings.md +22 -0
- package/src/commands/ccp/import.md +37 -0
- package/src/commands/ccp/ingest-docs.md +42 -0
- package/src/commands/ccp/intel.md +179 -0
- package/src/commands/ccp/mvp-phase.md +45 -0
- package/src/commands/ccp/plan-prd.md +160 -0
- package/src/commands/ccp/plan-review-convergence.md +58 -0
- package/src/commands/ccp/pr-ecc.md +184 -0
- package/src/commands/ccp/scan.md +26 -0
- package/src/commands/ccp/security-scan.md +74 -0
- package/src/commands/ccp/sketch-wrap-up.md +31 -0
- package/src/commands/ccp/sketch.md +54 -0
- package/src/commands/ccp/spec-phase.md +62 -0
- package/src/commands/ccp/spike-wrap-up.md +31 -0
- package/src/commands/ccp/spike.md +51 -0
- package/src/commands/ccp/ultraplan-phase.md +33 -0
- package/src/hooks/ccp-bash-hook-dispatcher.js +96 -0
- package/src/hooks/ccp-context-monitor.js +23 -0
- package/src/hooks/ccp-doc-file-warning.js +93 -0
- package/src/hooks/ccp-pre-bash-dispatcher.js +24 -0
- package/src/hooks/ccp-read-injection-scanner.js +152 -0
- package/src/hooks/ccp-write-gateguard.js +868 -0
- package/src/hooks/kit-check-update.js +59 -7
- package/src/hooks/run-with-flags-shell.sh +1 -0
- package/src/hooks/run-with-flags.js +48 -1
- package/src/hooks/session-end.js +88 -1
- package/src/lib/hook-flags.js +14 -0
- package/src/lib/project-detect.js +0 -2
- package/src/lib/shell-substitution.js +499 -0
- package/src/pilot/references/agent-contracts.md +79 -0
- package/src/pilot/references/ai-evals.md +156 -0
- package/src/pilot/references/ai-frameworks.md +186 -0
- package/src/pilot/references/doc-conflict-engine.md +91 -0
- package/src/pilot/references/execute-mvp-tdd.md +81 -0
- package/src/pilot/references/gate-prompts.md +100 -0
- package/src/pilot/references/gates.md +70 -0
- package/src/pilot/references/mandatory-initial-read.md +2 -0
- package/src/pilot/references/mvp-concepts.md +49 -0
- package/src/pilot/references/planner-graphify-auto-update.md +67 -0
- package/src/pilot/references/planner-human-verify-mode.md +57 -0
- package/src/pilot/references/planner-mvp-mode.md +53 -0
- package/src/pilot/references/project-skills-discovery.md +19 -0
- package/src/pilot/references/revision-loop.md +97 -0
- package/src/pilot/references/skeleton-template.md +48 -0
- package/src/pilot/references/sketch-interactivity.md +41 -0
- package/src/pilot/references/sketch-theme-system.md +94 -0
- package/src/pilot/references/sketch-tooling.md +45 -0
- package/src/pilot/references/sketch-variant-patterns.md +81 -0
- package/src/pilot/references/spidr-splitting.md +69 -0
- package/src/pilot/references/thinking-models-debug.md +44 -0
- package/src/pilot/references/thinking-models-execution.md +50 -0
- package/src/pilot/references/thinking-models-planning.md +62 -0
- package/src/pilot/references/thinking-models-research.md +50 -0
- package/src/pilot/references/thinking-models-verification.md +55 -0
- package/src/pilot/references/user-story-template.md +58 -0
- package/src/pilot/references/verify-mvp-mode.md +85 -0
- package/src/pilot/references/worktree-path-safety.md +89 -0
- package/src/pilot/templates/AI-SPEC.md +246 -0
- package/src/pilot/templates/spec.md +307 -0
- package/src/pilot/workflows/ai-integration-phase.md +284 -0
- package/src/pilot/workflows/audit-fix.md +175 -0
- package/src/pilot/workflows/code-review-fix.md +497 -0
- package/src/pilot/workflows/eval-review.md +155 -0
- package/src/pilot/workflows/extract_learnings.md +242 -0
- package/src/pilot/workflows/help.md +5 -0
- package/src/pilot/workflows/import.md +246 -0
- package/src/pilot/workflows/ingest-docs.md +328 -0
- package/src/pilot/workflows/mvp-phase.md +199 -0
- package/src/pilot/workflows/plan-review-convergence.md +329 -0
- package/src/pilot/workflows/scan.md +102 -0
- package/src/pilot/workflows/sketch-wrap-up.md +285 -0
- package/src/pilot/workflows/sketch.md +360 -0
- package/src/pilot/workflows/spec-phase.md +262 -0
- package/src/pilot/workflows/spike-wrap-up.md +306 -0
- package/src/pilot/workflows/spike.md +452 -0
- package/src/pilot/workflows/ultraplan-phase.md +189 -0
- package/src/skills/accessibility/SKILL.md +146 -0
- package/src/skills/agent-architecture-audit/SKILL.md +256 -0
- package/src/skills/agent-eval/SKILL.md +145 -0
- package/src/skills/agent-harness-design/SKILL.md +73 -0
- package/src/skills/agent-introspection-debugging/SKILL.md +153 -0
- package/src/skills/android-clean-architecture/SKILL.md +339 -0
- package/src/skills/angular-developer/SKILL.md +154 -0
- package/src/skills/angular-developer/references/angular-animations.md +160 -0
- package/src/skills/angular-developer/references/angular-aria.md +410 -0
- package/src/skills/angular-developer/references/cli.md +86 -0
- package/src/skills/angular-developer/references/component-harnesses.md +59 -0
- package/src/skills/angular-developer/references/component-styling.md +91 -0
- package/src/skills/angular-developer/references/components.md +117 -0
- package/src/skills/angular-developer/references/creating-services.md +97 -0
- package/src/skills/angular-developer/references/data-resolvers.md +69 -0
- package/src/skills/angular-developer/references/define-routes.md +67 -0
- package/src/skills/angular-developer/references/defining-providers.md +72 -0
- package/src/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/src/skills/angular-developer/references/e2e-testing.md +56 -0
- package/src/skills/angular-developer/references/effects.md +83 -0
- package/src/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/src/skills/angular-developer/references/host-elements.md +80 -0
- package/src/skills/angular-developer/references/injection-context.md +63 -0
- package/src/skills/angular-developer/references/inputs.md +101 -0
- package/src/skills/angular-developer/references/linked-signal.md +59 -0
- package/src/skills/angular-developer/references/loading-strategies.md +61 -0
- package/src/skills/angular-developer/references/mcp.md +108 -0
- package/src/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/src/skills/angular-developer/references/outputs.md +86 -0
- package/src/skills/angular-developer/references/reactive-forms.md +122 -0
- package/src/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/src/skills/angular-developer/references/resource.md +77 -0
- package/src/skills/angular-developer/references/route-animations.md +56 -0
- package/src/skills/angular-developer/references/route-guards.md +52 -0
- package/src/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/src/skills/angular-developer/references/router-testing.md +87 -0
- package/src/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/src/skills/angular-developer/references/signal-forms.md +795 -0
- package/src/skills/angular-developer/references/signals-overview.md +94 -0
- package/src/skills/angular-developer/references/tailwind-css.md +69 -0
- package/src/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/src/skills/angular-developer/references/testing-fundamentals.md +65 -0
- package/src/skills/api-connector-builder/SKILL.md +120 -0
- package/src/skills/code-tour/SKILL.md +236 -0
- package/src/skills/compose-multiplatform-patterns/SKILL.md +299 -0
- package/src/skills/csharp-testing/SKILL.md +321 -0
- package/src/skills/dart-flutter-patterns/SKILL.md +563 -0
- package/src/skills/dashboard-builder/SKILL.md +108 -0
- package/src/skills/dotnet-patterns/SKILL.md +321 -0
- package/src/skills/error-handling/SKILL.md +376 -0
- package/src/skills/fastapi-patterns/SKILL.md +327 -0
- package/src/skills/flox-environments/SKILL.md +496 -0
- package/src/skills/frontend-design/SKILL.md +145 -0
- package/src/skills/frontend-slides/SKILL.md +184 -0
- package/src/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/src/skills/fsharp-testing/SKILL.md +280 -0
- package/src/skills/gateguard/SKILL.md +121 -0
- package/src/skills/github-ops/SKILL.md +144 -0
- package/src/skills/hookify-rules/SKILL.md +128 -0
- package/src/skills/ios-icon-gen/SKILL.md +157 -0
- package/src/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/src/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/src/skills/knowledge-ops/SKILL.md +154 -0
- package/src/skills/liquid-glass-design/SKILL.md +279 -0
- package/src/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/src/skills/mysql-patterns/SKILL.md +412 -0
- package/src/skills/nestjs-patterns/SKILL.md +230 -0
- package/src/skills/plan-orchestrate/SKILL.md +220 -0
- package/src/skills/prisma-patterns/SKILL.md +371 -0
- package/src/skills/production-audit/SKILL.md +206 -0
- package/src/skills/security-bounty-hunter/SKILL.md +99 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/candidate-playbook.md +49 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/report.json +35 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/scenario.json +62 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/trace.json +45 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/verifier-result.json +35 -0
- package/src/skills/swift-actor-persistence/SKILL.md +143 -0
- package/src/skills/swift-protocol-di-testing/SKILL.md +190 -0
- package/src/skills/swiftui-patterns/SKILL.md +259 -0
- package/src/skills/terminal-ops/SKILL.md +109 -0
- package/src/skills/ui-demo/SKILL.md +465 -0
- package/src/skills/vite-patterns/SKILL.md +449 -0
- package/src/skills/windows-desktop-e2e/SKILL.md +887 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# AI Evaluation Reference
|
|
2
|
+
|
|
3
|
+
> Reference used by `gsd-eval-planner` and `gsd-eval-auditor`.
|
|
4
|
+
> Based on "AI Evals for Everyone" course (Reganti & Badam) + industry practice.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Core Concepts
|
|
9
|
+
|
|
10
|
+
### Why Evals Exist
|
|
11
|
+
AI systems are non-deterministic. Input X does not reliably produce output Y across runs, users, or edge cases. Evals are the continuous process of assessing whether your system's behavior meets expectations under real-world conditions — unit tests and integration tests alone are insufficient.
|
|
12
|
+
|
|
13
|
+
### Model vs. Product Evaluation
|
|
14
|
+
- **Model evals** (MMLU, HumanEval, GSM8K) — measure general capability in standardized conditions. Use as initial filter only.
|
|
15
|
+
- **Product evals** — measure behavior inside your specific system, with your data, your users, your domain rules. This is where 80% of eval effort belongs.
|
|
16
|
+
|
|
17
|
+
### The Three Components of Every Eval
|
|
18
|
+
- **Input** — everything affecting the system: query, history, retrieved docs, system prompt, config
|
|
19
|
+
- **Expected** — what good behavior looks like, defined through rubrics
|
|
20
|
+
- **Actual** — what the system produced, including intermediate steps, tool calls, and reasoning traces
|
|
21
|
+
|
|
22
|
+
### Three Measurement Approaches
|
|
23
|
+
1. **Code-based metrics** — deterministic checks: JSON validation, required disclaimers, performance thresholds, classification flags. Fast, cheap, reliable. Use first.
|
|
24
|
+
2. **LLM judges** — one model evaluates another against a rubric. Powerful for subjective qualities (tone, reasoning, escalation). Requires calibration against human judgment before trusting.
|
|
25
|
+
3. **Human evaluation** — gold standard for nuanced judgment. Doesn't scale. Use for calibration, edge cases, periodic sampling, and high-stakes decisions.
|
|
26
|
+
|
|
27
|
+
Most effective systems combine all three.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Evaluation Dimensions
|
|
32
|
+
|
|
33
|
+
### Pre-Deployment (Development Phase)
|
|
34
|
+
|
|
35
|
+
| Dimension | What It Measures | When It Matters |
|
|
36
|
+
|-----------|-----------------|-----------------|
|
|
37
|
+
| **Factual accuracy** | Correctness of claims against ground truth | RAG, knowledge bases, any factual assertions |
|
|
38
|
+
| **Context faithfulness** | Response grounded in provided context vs. fabricated | RAG pipelines, document Q&A, retrieval-augmented systems |
|
|
39
|
+
| **Hallucination detection** | Plausible but unsupported claims | All generative systems, high-stakes domains |
|
|
40
|
+
| **Escalation accuracy** | Correct identification of when human intervention needed | Customer service, healthcare, financial advisory |
|
|
41
|
+
| **Policy compliance** | Adherence to business rules, legal requirements, disclaimers | Regulated industries, enterprise deployments |
|
|
42
|
+
| **Tone/style appropriateness** | Match with brand voice, audience expectations, emotional context | Customer-facing systems, content generation |
|
|
43
|
+
| **Output structure validity** | Schema compliance, required fields, format correctness | Structured extraction, API integrations, data pipelines |
|
|
44
|
+
| **Task completion** | Whether the system accomplished the stated goal | Agentic workflows, multi-step tasks |
|
|
45
|
+
| **Tool use correctness** | Correct selection and invocation of tools | Agent systems with tool calls |
|
|
46
|
+
| **Safety** | Absence of harmful, biased, or inappropriate outputs | All user-facing systems |
|
|
47
|
+
|
|
48
|
+
### Production Monitoring
|
|
49
|
+
|
|
50
|
+
| Dimension | Monitoring Approach |
|
|
51
|
+
|-----------|---------------------|
|
|
52
|
+
| **Safety violations** | Online guardrail — real-time, immediate intervention |
|
|
53
|
+
| **Compliance failures** | Online guardrail — block or escalate before user sees output |
|
|
54
|
+
| **Quality degradation trends** | Offline flywheel — batch analysis of sampled interactions |
|
|
55
|
+
| **Emerging failure modes** | Signal-metric divergence — when user behavior signals diverge from metric scores, investigate manually |
|
|
56
|
+
| **Cost/latency drift** | Code-based metrics — automated threshold alerts |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## The Guardrail vs. Flywheel Decision
|
|
61
|
+
|
|
62
|
+
Ask: "If this behavior goes wrong, would it be catastrophic for my business?"
|
|
63
|
+
|
|
64
|
+
- **Yes → Guardrail** — run online, real-time, with immediate intervention (block, escalate, hand off). Be selective: guardrails add latency.
|
|
65
|
+
- **No → Flywheel** — run offline as batch analysis feeding system refinements over time.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Rubric Design
|
|
70
|
+
|
|
71
|
+
Generic metrics are meaningless without context. "Helpfulness" in real estate means summarizing listings clearly. In healthcare it means knowing when *not* to answer.
|
|
72
|
+
|
|
73
|
+
A rubric must define:
|
|
74
|
+
1. The dimension being measured
|
|
75
|
+
2. What scores 1, 3, and 5 on a 5-point scale (or pass/fail criteria)
|
|
76
|
+
3. Domain-specific examples of acceptable vs. unacceptable behavior
|
|
77
|
+
|
|
78
|
+
Without rubrics, LLM judges produce noise rather than signal.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Reference Dataset Guidelines
|
|
83
|
+
|
|
84
|
+
- Start with **10-20 high-quality examples** — not 200 mediocre ones
|
|
85
|
+
- Cover: critical success scenarios, common user workflows, known edge cases, historical failure modes
|
|
86
|
+
- Have domain experts label the examples (not just engineers)
|
|
87
|
+
- Expand based on what you learn in production — don't build for hypothetical coverage
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Eval Tooling Guide
|
|
92
|
+
|
|
93
|
+
| Tool | Type | Best For | Key Strength |
|
|
94
|
+
|------|------|----------|-------------|
|
|
95
|
+
| **RAGAS** | Python library | RAG evaluation | Purpose-built metrics: faithfulness, answer relevance, context precision/recall |
|
|
96
|
+
| **Langfuse** | Platform (open-source, self-hostable) | All system types | Strong tracing, prompt management, good for teams wanting infrastructure control |
|
|
97
|
+
| **LangSmith** | Platform (commercial) | LangChain/LangGraph ecosystems | Tightest integration with LangChain; best if already in that ecosystem |
|
|
98
|
+
| **Arize Phoenix** | Platform (open-source + hosted) | RAG + multi-agent tracing | Strong RAG eval + trace visualization; open-source with hosted option |
|
|
99
|
+
| **Braintrust** | Platform (commercial) | Model-agnostic evaluation | Dataset and experiment management; good for comparing across frameworks |
|
|
100
|
+
| **Promptfoo** | CLI tool (open-source) | Prompt testing, CI/CD | CLI-first, excellent for CI/CD prompt regression testing |
|
|
101
|
+
|
|
102
|
+
### Tool Selection by System Type
|
|
103
|
+
|
|
104
|
+
| System Type | Recommended Tooling |
|
|
105
|
+
|-------------|---------------------|
|
|
106
|
+
| RAG / Knowledge Q&A | RAGAS + Arize Phoenix or Braintrust |
|
|
107
|
+
| Multi-agent systems | Langfuse + Arize Phoenix |
|
|
108
|
+
| Conversational / single-model | Promptfoo + Braintrust |
|
|
109
|
+
| Structured extraction | Promptfoo + code-based validators |
|
|
110
|
+
| LangChain/LangGraph projects | LangSmith (native integration) |
|
|
111
|
+
| Production monitoring (all types) | Langfuse, Arize Phoenix, or LangSmith |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Evals in the Development Lifecycle
|
|
116
|
+
|
|
117
|
+
### Plan Phase (Evaluation-Aware Design)
|
|
118
|
+
Before writing code, define:
|
|
119
|
+
1. What type of AI system is being built → determines framework and dominant eval concerns
|
|
120
|
+
2. Critical failure modes (3-5 behaviors that cannot go wrong)
|
|
121
|
+
3. Rubrics — explicit definitions of acceptable/unacceptable behavior per dimension
|
|
122
|
+
4. Evaluation strategy — which dimensions use code metrics, LLM judges, or human review
|
|
123
|
+
5. Reference dataset requirements — size, composition, labeling approach
|
|
124
|
+
6. Eval tooling selection
|
|
125
|
+
|
|
126
|
+
Output: EVALS-SPEC section of AI-SPEC.md
|
|
127
|
+
|
|
128
|
+
### Execute Phase (Instrument While Building)
|
|
129
|
+
- Add tracing from day one (Langfuse, Arize Phoenix, or LangSmith)
|
|
130
|
+
- Build reference dataset concurrently with implementation
|
|
131
|
+
- Implement code-based checks first; add LLM judges only for subjective dimensions
|
|
132
|
+
- Run evals in CI/CD via Promptfoo or Braintrust
|
|
133
|
+
|
|
134
|
+
### Verify Phase (Pre-Deployment Validation)
|
|
135
|
+
- Run full reference dataset against all metrics
|
|
136
|
+
- Conduct human review of edge cases and LLM judge disagreements
|
|
137
|
+
- Calibrate LLM judges against human scores (target ≥ 0.7 correlation before trusting)
|
|
138
|
+
- Define and configure production guardrails
|
|
139
|
+
- Establish monitoring baseline
|
|
140
|
+
|
|
141
|
+
### Monitor Phase (Production Evaluation Loop)
|
|
142
|
+
- Smart sampling — weight toward interactions with concerning signals (retries, unusual length, explicit escalations)
|
|
143
|
+
- Online guardrails on every interaction
|
|
144
|
+
- Offline flywheel on sampled batch
|
|
145
|
+
- Watch for signal-metric divergence — the early warning system for evaluation gaps
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Common Pitfalls
|
|
150
|
+
|
|
151
|
+
1. **Assuming benchmarks predict product success** — they don't; model evals are a filter, not a verdict
|
|
152
|
+
2. **Engineering evals in isolation** — domain experts must co-define rubrics; engineers alone miss critical nuances
|
|
153
|
+
3. **Building comprehensive coverage on day one** — start small (10-20 examples), expand from real failure modes
|
|
154
|
+
4. **Trusting uncalibrated LLM judges** — validate against human judgment before relying on them
|
|
155
|
+
5. **Measuring everything** — only track metrics that drive decisions; "collect it all" produces noise
|
|
156
|
+
6. **Treating evaluation as one-time setup** — user behavior evolves, requirements change, failure modes emerge; evaluation is continuous
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# AI Framework Decision Matrix
|
|
2
|
+
|
|
3
|
+
> Reference used by `gsd-framework-selector` and `gsd-ai-researcher`.
|
|
4
|
+
> Distilled from official docs, benchmarks, and developer reports (2026).
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Quick Picks
|
|
9
|
+
|
|
10
|
+
| Situation | Pick |
|
|
11
|
+
|-----------|------|
|
|
12
|
+
| Simplest path to a working agent (OpenAI) | OpenAI Agents SDK |
|
|
13
|
+
| Simplest path to a working agent (model-agnostic) | CrewAI |
|
|
14
|
+
| Production RAG / document Q&A | LlamaIndex |
|
|
15
|
+
| Complex stateful workflows with branching | LangGraph |
|
|
16
|
+
| Multi-agent teams with defined roles | CrewAI |
|
|
17
|
+
| Code-aware autonomous agents (Anthropic) | Claude Agent SDK |
|
|
18
|
+
| "I don't know my requirements yet" | LangChain |
|
|
19
|
+
| Regulated / audit-trail required | LangGraph |
|
|
20
|
+
| Enterprise Microsoft/.NET shops | AutoGen/AG2 |
|
|
21
|
+
| Google Cloud / Gemini-committed teams | Google ADK |
|
|
22
|
+
| Pure NLP pipelines with explicit control | Haystack |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Framework Profiles
|
|
27
|
+
|
|
28
|
+
### CrewAI
|
|
29
|
+
- **Type:** Multi-agent orchestration
|
|
30
|
+
- **Language:** Python only
|
|
31
|
+
- **Model support:** Model-agnostic
|
|
32
|
+
- **Learning curve:** Beginner (role/task/crew maps to real teams)
|
|
33
|
+
- **Best for:** Content pipelines, research automation, business process workflows, rapid prototyping
|
|
34
|
+
- **Avoid if:** Fine-grained state management, TypeScript, fault-tolerant checkpointing, complex conditional branching
|
|
35
|
+
- **Strengths:** Fastest multi-agent prototyping, 5.76x faster than LangGraph on QA tasks, built-in memory (short/long/entity/contextual), Flows architecture, standalone (no LangChain dep)
|
|
36
|
+
- **Weaknesses:** Limited checkpointing, coarse error handling, Python only
|
|
37
|
+
- **Eval concerns:** Task decomposition accuracy, inter-agent handoff, goal completion rate, loop detection
|
|
38
|
+
|
|
39
|
+
### LlamaIndex
|
|
40
|
+
- **Type:** RAG and data ingestion
|
|
41
|
+
- **Language:** Python + TypeScript
|
|
42
|
+
- **Model support:** Model-agnostic
|
|
43
|
+
- **Learning curve:** Intermediate
|
|
44
|
+
- **Best for:** Legal research, internal knowledge assistants, enterprise document search, any system where retrieval quality is the #1 priority
|
|
45
|
+
- **Avoid if:** Primary need is agent orchestration, multi-agent collaboration, or chatbot conversation flow
|
|
46
|
+
- **Strengths:** Best-in-class document parsing (LlamaParse), 35% retrieval accuracy improvement, 20-30% faster queries, mixed retrieval strategies (vector + graph + reranker)
|
|
47
|
+
- **Weaknesses:** Data framework first — agent orchestration is secondary
|
|
48
|
+
- **Eval concerns:** Context faithfulness, hallucination, answer relevance, retrieval precision/recall
|
|
49
|
+
|
|
50
|
+
### LangChain
|
|
51
|
+
- **Type:** General-purpose LLM framework
|
|
52
|
+
- **Language:** Python + TypeScript
|
|
53
|
+
- **Model support:** Model-agnostic (widest ecosystem)
|
|
54
|
+
- **Learning curve:** Intermediate–Advanced
|
|
55
|
+
- **Best for:** Evolving requirements, many third-party integrations, teams wanting one framework for everything, RAG + agents + chains
|
|
56
|
+
- **Avoid if:** Simple well-defined use case, RAG-primary (use LlamaIndex), complex stateful workflows (use LangGraph), performance at scale is critical
|
|
57
|
+
- **Strengths:** Largest community and integration ecosystem, 25% faster development vs scratch, covers RAG/agents/chains/memory
|
|
58
|
+
- **Weaknesses:** Abstraction overhead, p99 latency degrades under load, complexity creep risk
|
|
59
|
+
- **Eval concerns:** End-to-end task completion, chain correctness, retrieval quality
|
|
60
|
+
|
|
61
|
+
### LangGraph
|
|
62
|
+
- **Type:** Stateful agent workflows (graph-based)
|
|
63
|
+
- **Language:** Python + TypeScript (full parity)
|
|
64
|
+
- **Model support:** Model-agnostic (inherits LangChain integrations)
|
|
65
|
+
- **Learning curve:** Intermediate–Advanced (graph mental model)
|
|
66
|
+
- **Best for:** Production-grade stateful workflows, regulated industries, audit trails, human-in-the-loop flows, fault-tolerant multi-step agents
|
|
67
|
+
- **Avoid if:** Simple chatbot, purely linear workflow, rapid prototyping
|
|
68
|
+
- **Strengths:** Best checkpointing (every node), time-travel debugging, native Postgres/Redis persistence, streaming support, chosen by 62% of developers for stateful agent work (2026)
|
|
69
|
+
- **Weaknesses:** More upfront scaffolding, steeper curve, overkill for simple cases
|
|
70
|
+
- **Eval concerns:** State transition correctness, goal completion rate, tool use accuracy, safety guardrails
|
|
71
|
+
|
|
72
|
+
### OpenAI Agents SDK
|
|
73
|
+
- **Type:** Native OpenAI agent framework
|
|
74
|
+
- **Language:** Python + TypeScript
|
|
75
|
+
- **Model support:** Optimized for OpenAI (supports 100+ via Chat Completions compatibility)
|
|
76
|
+
- **Learning curve:** Beginner (4 primitives: Agents, Handoffs, Guardrails, Tracing)
|
|
77
|
+
- **Best for:** OpenAI-committed teams, rapid agent prototyping, voice agents (gpt-realtime), teams wanting visual builder (AgentKit)
|
|
78
|
+
- **Avoid if:** Model flexibility needed, complex multi-agent collaboration, persistent state management required, vendor lock-in concern
|
|
79
|
+
- **Strengths:** Simplest mental model, built-in tracing and guardrails, Handoffs for agent delegation, Realtime Agents for voice
|
|
80
|
+
- **Weaknesses:** OpenAI vendor lock-in, no built-in persistent state, younger ecosystem
|
|
81
|
+
- **Eval concerns:** Instruction following, safety guardrails, escalation accuracy, tone consistency
|
|
82
|
+
|
|
83
|
+
### Claude Agent SDK (Anthropic)
|
|
84
|
+
- **Type:** Code-aware autonomous agent framework
|
|
85
|
+
- **Language:** Python + TypeScript
|
|
86
|
+
- **Model support:** Claude models only
|
|
87
|
+
- **Learning curve:** Intermediate (18 hook events, MCP, tool decorators)
|
|
88
|
+
- **Best for:** Developer tooling, code generation/review agents, autonomous coding assistants, MCP-heavy architectures, safety-critical applications
|
|
89
|
+
- **Avoid if:** Model flexibility needed, stable/mature API required, use case unrelated to code/tool-use
|
|
90
|
+
- **Strengths:** Deepest MCP integration, built-in filesystem/shell access, 18 lifecycle hooks, automatic context compaction, extended thinking, safety-first design
|
|
91
|
+
- **Weaknesses:** Claude-only vendor lock-in, newer/evolving API, smaller community
|
|
92
|
+
- **Eval concerns:** Tool use correctness, safety, code quality, instruction following
|
|
93
|
+
|
|
94
|
+
### AutoGen / AG2 / Microsoft Agent Framework
|
|
95
|
+
- **Type:** Multi-agent conversational framework
|
|
96
|
+
- **Language:** Python (AG2), Python + .NET (Microsoft Agent Framework)
|
|
97
|
+
- **Model support:** Model-agnostic
|
|
98
|
+
- **Learning curve:** Intermediate–Advanced
|
|
99
|
+
- **Best for:** Research applications, conversational problem-solving, code generation + execution loops, Microsoft/.NET shops
|
|
100
|
+
- **Avoid if:** You want ecosystem stability, deterministic workflows, or "safest long-term bet" (fragmentation risk)
|
|
101
|
+
- **Strengths:** Most sophisticated conversational agent patterns, code generation + execution loop, async event-driven (v0.4+), cross-language interop (Microsoft Agent Framework)
|
|
102
|
+
- **Weaknesses:** Ecosystem fragmented (AutoGen maintenance mode, AG2 fork, Microsoft Agent Framework preview) — genuine long-term risk
|
|
103
|
+
- **Eval concerns:** Conversation goal completion, consensus quality, code execution correctness
|
|
104
|
+
|
|
105
|
+
### Google ADK (Agent Development Kit)
|
|
106
|
+
- **Type:** Multi-agent orchestration framework
|
|
107
|
+
- **Language:** Python + Java
|
|
108
|
+
- **Model support:** Optimized for Gemini; supports other models via LiteLLM
|
|
109
|
+
- **Learning curve:** Intermediate (agent/tool/session model, familiar if you know LangGraph)
|
|
110
|
+
- **Best for:** Google Cloud / Vertex AI shops, multi-agent workflows needing built-in session management and memory, teams already committed to Gemini, agent pipelines that need Google Search / BigQuery tool integration
|
|
111
|
+
- **Avoid if:** Model flexibility is required beyond Gemini, no Google Cloud dependency acceptable, TypeScript-only stack
|
|
112
|
+
- **Strengths:** First-party Google support, built-in session/memory/artifact management, tight Vertex AI and Google Search integration, own eval framework (RAGAS-compatible), multi-agent by design (sequential, parallel, loop patterns), Java SDK for enterprise teams
|
|
113
|
+
- **Weaknesses:** Gemini vendor lock-in in practice, younger community than LangChain/LlamaIndex, less third-party integration depth
|
|
114
|
+
- **Eval concerns:** Multi-agent task decomposition, tool use correctness, session state consistency, goal completion rate
|
|
115
|
+
|
|
116
|
+
### Haystack
|
|
117
|
+
- **Type:** NLP pipeline framework
|
|
118
|
+
- **Language:** Python
|
|
119
|
+
- **Model support:** Model-agnostic
|
|
120
|
+
- **Learning curve:** Intermediate
|
|
121
|
+
- **Best for:** Explicit, auditable NLP pipelines, document processing with fine-grained control, enterprise search, regulated industries needing transparency
|
|
122
|
+
- **Avoid if:** Rapid prototyping, multi-agent workflows, or you want a large community
|
|
123
|
+
- **Strengths:** Explicit pipeline control, strong for structured data pipelines, good documentation
|
|
124
|
+
- **Weaknesses:** Smaller community, less agent-oriented than alternatives
|
|
125
|
+
- **Eval concerns:** Extraction accuracy, pipeline output validity, retrieval quality
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Decision Dimensions
|
|
130
|
+
|
|
131
|
+
### By System Type
|
|
132
|
+
|
|
133
|
+
| System Type | Primary Framework(s) | Key Eval Concerns |
|
|
134
|
+
|-------------|---------------------|-------------------|
|
|
135
|
+
| RAG / Knowledge Q&A | LlamaIndex, LangChain | Context faithfulness, hallucination, retrieval precision/recall |
|
|
136
|
+
| Multi-agent orchestration | CrewAI, LangGraph, Google ADK | Task decomposition, handoff quality, goal completion |
|
|
137
|
+
| Conversational assistants | OpenAI Agents SDK, Claude Agent SDK | Tone, safety, instruction following, escalation |
|
|
138
|
+
| Structured data extraction | LangChain, LlamaIndex | Schema compliance, extraction accuracy |
|
|
139
|
+
| Autonomous task agents | LangGraph, OpenAI Agents SDK | Safety guardrails, tool correctness, cost adherence |
|
|
140
|
+
| Content generation | Claude Agent SDK, OpenAI Agents SDK | Brand voice, factual accuracy, tone |
|
|
141
|
+
| Code automation | Claude Agent SDK | Code correctness, safety, test pass rate |
|
|
142
|
+
|
|
143
|
+
### By Team Size and Stage
|
|
144
|
+
|
|
145
|
+
| Context | Recommendation |
|
|
146
|
+
|---------|----------------|
|
|
147
|
+
| Solo dev, prototyping | OpenAI Agents SDK or CrewAI (fastest to running) |
|
|
148
|
+
| Solo dev, RAG | LlamaIndex (batteries included) |
|
|
149
|
+
| Team, production, stateful | LangGraph (best fault tolerance) |
|
|
150
|
+
| Team, evolving requirements | LangChain (broadest escape hatches) |
|
|
151
|
+
| Team, multi-agent | CrewAI (simplest role abstraction) |
|
|
152
|
+
| Enterprise, .NET | AutoGen AG2 / Microsoft Agent Framework |
|
|
153
|
+
|
|
154
|
+
### By Model Commitment
|
|
155
|
+
|
|
156
|
+
| Preference | Framework |
|
|
157
|
+
|-----------|-----------|
|
|
158
|
+
| OpenAI-only | OpenAI Agents SDK |
|
|
159
|
+
| Anthropic/Claude-only | Claude Agent SDK |
|
|
160
|
+
| Google/Gemini-committed | Google ADK |
|
|
161
|
+
| Model-agnostic (full flexibility) | LangChain, LlamaIndex, CrewAI, LangGraph, Haystack |
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Anti-Patterns
|
|
166
|
+
|
|
167
|
+
1. **Using LangChain for simple chatbots** — Direct SDK call is less code, faster, and easier to debug
|
|
168
|
+
2. **Using CrewAI for complex stateful workflows** — Checkpointing gaps will bite you in production
|
|
169
|
+
3. **Using OpenAI Agents SDK with non-OpenAI models** — Loses the integration benefits you chose it for
|
|
170
|
+
4. **Using LlamaIndex as a multi-agent framework** — It can do agents, but that's not its strength
|
|
171
|
+
5. **Defaulting to LangChain without evaluating alternatives** — "Everyone uses it" ≠ right for your use case
|
|
172
|
+
6. **Starting a new project on AutoGen (not AG2)** — AutoGen is in maintenance mode; use AG2 or wait for Microsoft Agent Framework GA
|
|
173
|
+
7. **Choosing LangGraph for simple linear flows** — The graph overhead is not worth it; use LangChain chains instead
|
|
174
|
+
8. **Ignoring vendor lock-in** — Provider-native SDKs (OpenAI, Claude) trade flexibility for integration depth; decide consciously
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Combination Plays (Multi-Framework Stacks)
|
|
179
|
+
|
|
180
|
+
| Production Pattern | Stack |
|
|
181
|
+
|-------------------|-------|
|
|
182
|
+
| RAG with observability | LlamaIndex + LangSmith or Langfuse |
|
|
183
|
+
| Stateful agent with RAG | LangGraph + LlamaIndex |
|
|
184
|
+
| Multi-agent with tracing | CrewAI + Langfuse |
|
|
185
|
+
| OpenAI agents with evals | OpenAI Agents SDK + Promptfoo or Braintrust |
|
|
186
|
+
| Claude agents with MCP | Claude Agent SDK + LangSmith or Arize Phoenix |
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Doc Conflict Engine
|
|
2
|
+
|
|
3
|
+
Shared conflict-detection contract for workflows that ingest external content into `.planning/` (e.g., `/ccp:import`, `/ccp:ingest-docs`). Defines the report format, severity semantics, and safety-gate behavior. The specific checks that populate each severity bucket are workflow-specific and defined by the calling workflow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Severity Semantics
|
|
8
|
+
|
|
9
|
+
- **[BLOCKER]** — Unsafe to proceed. The workflow MUST exit without writing any destination files. Used for contradictions of locked decisions, missing prerequisites, and impossible targets.
|
|
10
|
+
- **[WARNING]** — Ambiguous or partially overlapping. The workflow MUST surface the warning and obtain explicit user approval before writing. Never auto-approve.
|
|
11
|
+
- **[INFO]** — Informational only. No gate; no user prompt required. Included in the report for transparency.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Report Format
|
|
16
|
+
|
|
17
|
+
Plain-text, never markdown tables (no `|---|`). The report is rendered to the user verbatim.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
## Conflict Detection Report
|
|
21
|
+
|
|
22
|
+
### BLOCKERS ({N})
|
|
23
|
+
|
|
24
|
+
[BLOCKER] {Short title}
|
|
25
|
+
Found: {what the incoming content says}
|
|
26
|
+
Expected: {what existing project context requires}
|
|
27
|
+
→ {Specific action to resolve}
|
|
28
|
+
|
|
29
|
+
### WARNINGS ({N})
|
|
30
|
+
|
|
31
|
+
[WARNING] {Short title}
|
|
32
|
+
Found: {what was detected}
|
|
33
|
+
Impact: {what could go wrong}
|
|
34
|
+
→ {Suggested action}
|
|
35
|
+
|
|
36
|
+
### INFO ({N})
|
|
37
|
+
|
|
38
|
+
[INFO] {Short title}
|
|
39
|
+
Note: {relevant information}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Every entry requires `Found:` plus one of `Expected:`/`Impact:`/`Note:` plus (for BLOCKER/WARNING) a `→` remediation line.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Safety Gate
|
|
47
|
+
|
|
48
|
+
**If any [BLOCKER] exists:**
|
|
49
|
+
|
|
50
|
+
Display:
|
|
51
|
+
```
|
|
52
|
+
GSD > BLOCKED: {N} blockers must be resolved before {operation} can proceed.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Exit WITHOUT writing any destination files. The gate must hold regardless of WARNING/INFO counts.
|
|
56
|
+
|
|
57
|
+
**If only WARNINGS and/or INFO (no blockers):**
|
|
58
|
+
|
|
59
|
+
Render the full report, then prompt for approval via the `approve-revise-abort` or `yes-no` pattern from `references/gate-prompts.md`. Respect text mode (see the workflow's own text-mode handling). If the user aborts, exit cleanly with a cancellation message.
|
|
60
|
+
|
|
61
|
+
**If the report is empty (no entries in any bucket):**
|
|
62
|
+
|
|
63
|
+
Proceed silently or display `GSD > No conflicts detected.` Either is acceptable; workflows choose based on verbosity context.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Workflow Responsibilities
|
|
68
|
+
|
|
69
|
+
Each workflow that consumes this contract must define:
|
|
70
|
+
|
|
71
|
+
1. **Its own check list per bucket** — which conditions are BLOCKER vs WARNING vs INFO. These are domain-specific (plan ingestion checks are not doc ingestion checks).
|
|
72
|
+
2. **The loaded context** — what it reads (ROADMAP.md, PROJECT.md, REQUIREMENTS.md, CONTEXT.md, intel files) before running checks.
|
|
73
|
+
3. **The operation noun** — substituted into the BLOCKED banner (`import`, `ingest`, etc.).
|
|
74
|
+
|
|
75
|
+
The workflow MUST NOT:
|
|
76
|
+
|
|
77
|
+
- Introduce new severity levels beyond BLOCKER/WARNING/INFO
|
|
78
|
+
- Render the report as a markdown table
|
|
79
|
+
- Write any destination file when BLOCKERs exist
|
|
80
|
+
- Auto-approve past WARNINGs without user input
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Anti-Patterns
|
|
85
|
+
|
|
86
|
+
Do NOT:
|
|
87
|
+
|
|
88
|
+
- Use markdown tables (`|---|`) in the conflict report — use plain-text labels as shown above
|
|
89
|
+
- Bypass the safety gate when BLOCKERs exist — no exceptions for "minor" blockers
|
|
90
|
+
- Fold WARNINGs into INFO to skip the approval prompt — if user input is needed, it is a WARNING
|
|
91
|
+
- Re-invent severity labels per workflow — the three-level taxonomy is fixed
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Execute-Phase — MVP+TDD Gate (Runtime Enforcement)
|
|
2
|
+
|
|
3
|
+
> Loaded by `execute-phase` workflow and `ccp-executor` agent only when **both** `MVP_MODE=true` AND `TDD_MODE=true` for the phase. Defines the runtime gate that blocks behavior-adding tasks until a failing-test commit exists.
|
|
4
|
+
|
|
5
|
+
## When this gate fires
|
|
6
|
+
|
|
7
|
+
- `MVP_MODE` is `true` (resolved from CLI flag → ROADMAP `**Mode:**` field → config; see `references/planner-mvp-mode.md`).
|
|
8
|
+
- `TDD_MODE` is `true` (resolved from `--tdd` flag → `workflow.tdd_mode` config).
|
|
9
|
+
- The current task being executed has `tdd="true"` in its `<task>` frontmatter (set by the planner per Phase 1).
|
|
10
|
+
- The task's `<behavior>` block lists at least one expected behavior.
|
|
11
|
+
|
|
12
|
+
If any of these is false, the gate is inactive — execution proceeds normally.
|
|
13
|
+
|
|
14
|
+
## What the gate checks
|
|
15
|
+
|
|
16
|
+
For each task gated by MVP+TDD, the executor MUST verify (before running the implementation step):
|
|
17
|
+
|
|
18
|
+
1. **A failing-test commit exists.** Search git log on the current branch for a commit matching `test({phase}-{plan})` whose subject mentions the same plan as the current task. The commit must touch a test file (`*.test.*`, `*.spec.*`, `tests/**`).
|
|
19
|
+
2. **The test was actually red.** The commit message body or the executor's recent shell history must show the test failed when first run. Acceptable evidence:
|
|
20
|
+
- Commit message contains `RED:` prefix or `(RED)` tag
|
|
21
|
+
- Recent terminal output shows `FAIL` or non-zero exit on the new test before any implementation commit
|
|
22
|
+
3. **No implementation commit yet.** No `feat({phase}-{plan})` commit may exist for the same plan ID before the failing-test commit.
|
|
23
|
+
|
|
24
|
+
If any check fails, the gate trips.
|
|
25
|
+
|
|
26
|
+
## What "behavior-adding task" means
|
|
27
|
+
|
|
28
|
+
A task is behavior-adding when:
|
|
29
|
+
- Its frontmatter has `tdd="true"` AND
|
|
30
|
+
- Its `<behavior>` block names at least one user-visible outcome (not a config-only or doc-only task) AND
|
|
31
|
+
- Its `<files>` list includes at least one source file (not exclusively docs/tests/config files such as `*.md`, `*.json`, `*.test.*`, `*.spec.*`, `*.yml`, `*.yaml`, `*.toml`, `*.ini`, `.env*`)
|
|
32
|
+
|
|
33
|
+
Pure documentation, configuration, or test-only tasks are skipped by this gate even when both modes are active.
|
|
34
|
+
|
|
35
|
+
## What happens when the gate trips
|
|
36
|
+
|
|
37
|
+
The executor MUST:
|
|
38
|
+
|
|
39
|
+
1. Halt before running the task's implementation step.
|
|
40
|
+
2. Emit a structured halt report:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
MVP+TDD GATE TRIPPED — Plan {plan_id}, Task {task_id}
|
|
45
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
46
|
+
|
|
47
|
+
Reason: {missing_red_commit | red_commit_not_failing | feat_before_test}
|
|
48
|
+
|
|
49
|
+
Behavior expected to be tested:
|
|
50
|
+
- {first behavior bullet}
|
|
51
|
+
|
|
52
|
+
Required next step:
|
|
53
|
+
1. Write a failing test for the behavior above.
|
|
54
|
+
2. Commit it as: test({phase}-{plan}): {short description}
|
|
55
|
+
3. Re-run /ccp:execute-phase
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Exit the current execution wave cleanly. Do NOT roll back any prior commits in the same wave.
|
|
59
|
+
4. Update `STATE.md` with `last_gate_trip: {plan_id}/{task_id}` so the user can resume after writing the test.
|
|
60
|
+
|
|
61
|
+
## Escalation: end-of-phase TDD review under MVP+TDD
|
|
62
|
+
|
|
63
|
+
The existing end-of-phase TDD review (in `workflows/execute-phase.md`'s `tdd_review_checkpoint` step) is normally **advisory** — it surfaces gate violations but does not block phase completion.
|
|
64
|
+
|
|
65
|
+
Under MVP+TDD, escalate this to **blocking**:
|
|
66
|
+
- If any TDD plan is missing a RED or GREEN commit, the executor MUST refuse to mark the phase complete.
|
|
67
|
+
- The user is shown the same review table, but the verdict line reads:
|
|
68
|
+
> "Phase blocked: {N} TDD plan(s) violate the RED→GREEN gate sequence under MVP+TDD. Resolve and re-run /ccp:execute-phase, or override with `/ccp:execute-phase {phase} --force-mvp-gate` to ship anyway."
|
|
69
|
+
|
|
70
|
+
The `--force-mvp-gate` flag is documented but not introduced by this plan — it is the escape hatch the spec mentions; if the user later builds it, the workflow already references the contract.
|
|
71
|
+
|
|
72
|
+
## What this gate does NOT do
|
|
73
|
+
|
|
74
|
+
- It does not enforce REFACTOR commits. REFACTOR remains optional (per `references/tdd.md`).
|
|
75
|
+
- It does not check test quality (the test could be trivially passing). That's the planner's job.
|
|
76
|
+
- It does not run tests. The executor only inspects git log + file system. Running tests is the implementation step's job.
|
|
77
|
+
- It does not gate config-only or doc-only tasks (see "behavior-adding task" definition).
|
|
78
|
+
|
|
79
|
+
## Compatibility with existing TDD discipline
|
|
80
|
+
|
|
81
|
+
This gate is additive to `references/tdd.md`. Tasks not under MVP+TDD continue to use the existing advisory TDD discipline (RED/GREEN/REFACTOR commits with end-of-phase review checkpoint). Only the runtime gate and the blocking escalation are new.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Gate Prompt Patterns
|
|
2
|
+
|
|
3
|
+
Reusable prompt patterns for structured gate checks in workflows and agents.
|
|
4
|
+
|
|
5
|
+
**For checkpoint box format details, see `references/ui-brand.md`** -- checkpoint boxes use double-line border drawing with 62-character inner width.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- `header` must be max 12 characters
|
|
10
|
+
- `multiSelect` is always `false` for gate checks
|
|
11
|
+
- Always handle the "Other" case (user typed a freeform response instead of selecting)
|
|
12
|
+
- Max 4 options per prompt -- if more are needed, use a 2-step flow
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Pattern: approve-revise-abort
|
|
17
|
+
3-option gate for plan approval, gap-closure approval.
|
|
18
|
+
- question: "Approve these {noun}?"
|
|
19
|
+
- header: "Approve?"
|
|
20
|
+
- options: Approve | Request changes | Abort
|
|
21
|
+
|
|
22
|
+
## Pattern: yes-no
|
|
23
|
+
Simple 2-option confirmation for re-planning, rebuild, replace plans, commit.
|
|
24
|
+
- question: "{Specific question about the action}"
|
|
25
|
+
- header: "Confirm"
|
|
26
|
+
- options: Yes | No
|
|
27
|
+
|
|
28
|
+
## Pattern: stale-continue
|
|
29
|
+
2-option refresh gate for staleness warnings, timestamp freshness.
|
|
30
|
+
- question: "{Artifact} may be outdated. Refresh or continue?"
|
|
31
|
+
- header: "Stale"
|
|
32
|
+
- options: Refresh | Continue anyway
|
|
33
|
+
|
|
34
|
+
## Pattern: yes-no-pick
|
|
35
|
+
3-option selection for seed selection, item inclusion.
|
|
36
|
+
- question: "Include {items} in planning?"
|
|
37
|
+
- header: "Include?"
|
|
38
|
+
- options: Yes, all | Let me pick | No
|
|
39
|
+
|
|
40
|
+
## Pattern: multi-option-failure
|
|
41
|
+
4-option failure handler for build failures.
|
|
42
|
+
- question: "Plan {id} failed. How should we proceed?"
|
|
43
|
+
- header: "Failed"
|
|
44
|
+
- options: Retry | Skip | Rollback | Abort
|
|
45
|
+
|
|
46
|
+
## Pattern: multi-option-escalation
|
|
47
|
+
4-option escalation for review escalation (max retries exceeded).
|
|
48
|
+
- question: "Phase {N} has failed verification {attempt} times. How should we proceed?"
|
|
49
|
+
- header: "Escalate"
|
|
50
|
+
- options: Accept gaps | Re-plan (via /ccp:plan-phase) | Debug (via /ccp:debug) | Retry
|
|
51
|
+
|
|
52
|
+
## Pattern: multi-option-gaps
|
|
53
|
+
4-option gap handler for review gaps-found.
|
|
54
|
+
- question: "{count} verification gaps need attention. How should we proceed?"
|
|
55
|
+
- header: "Gaps"
|
|
56
|
+
- options: Auto-fix | Override | Manual | Skip
|
|
57
|
+
|
|
58
|
+
## Pattern: multi-option-priority
|
|
59
|
+
4-option priority selection for milestone gap priority.
|
|
60
|
+
- question: "Which gaps should we address?"
|
|
61
|
+
- header: "Priority"
|
|
62
|
+
- options: Must-fix only | Must + should | Everything | Let me pick
|
|
63
|
+
|
|
64
|
+
## Pattern: toggle-confirm
|
|
65
|
+
2-option confirmation for enabling/disabling boolean features.
|
|
66
|
+
- question: "Enable {feature_name}?"
|
|
67
|
+
- header: "Toggle"
|
|
68
|
+
- options: Enable | Disable
|
|
69
|
+
|
|
70
|
+
## Pattern: action-routing
|
|
71
|
+
Up to 4 suggested next actions with selection (status, resume workflows).
|
|
72
|
+
- question: "What would you like to do next?"
|
|
73
|
+
- header: "Next Step"
|
|
74
|
+
- options: {primary action} | {alternative 1} | {alternative 2} | Something else
|
|
75
|
+
- Note: Dynamically generate options from workflow state. Always include "Something else" as last option.
|
|
76
|
+
|
|
77
|
+
## Pattern: scope-confirm
|
|
78
|
+
3-option confirmation for quick task scope validation.
|
|
79
|
+
- question: "This task looks complex. Proceed as quick task or use full planning?"
|
|
80
|
+
- header: "Scope"
|
|
81
|
+
- options: Quick task | Full plan (via /ccp:plan-phase) | Revise
|
|
82
|
+
|
|
83
|
+
## Pattern: depth-select
|
|
84
|
+
3-option depth selection for planning workflow preferences.
|
|
85
|
+
- question: "How thorough should planning be?"
|
|
86
|
+
- header: "Depth"
|
|
87
|
+
- options: Quick (3-5 phases, skip research) | Standard (5-8 phases, default) | Comprehensive (8-12 phases, deep research)
|
|
88
|
+
|
|
89
|
+
## Pattern: context-handling
|
|
90
|
+
3-option handler for existing CONTEXT.md in discuss workflow.
|
|
91
|
+
- question: "Phase {N} already has a CONTEXT.md. How should we handle it?"
|
|
92
|
+
- header: "Context"
|
|
93
|
+
- options: Overwrite | Append | Cancel
|
|
94
|
+
|
|
95
|
+
## Pattern: gray-area-option
|
|
96
|
+
Dynamic template for presenting gray area choices in discuss workflow.
|
|
97
|
+
- question: "{Gray area title}"
|
|
98
|
+
- header: "Decision"
|
|
99
|
+
- options: {Option 1} | {Option 2} | Let Claude decide
|
|
100
|
+
- Note: Options generated at runtime. Always include "Let Claude decide" as last option.
|