You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8cbf778
Browse filesBrowse the repository at this point in the historyBrowse files
10. Prefilled response (if any) – skeletons to fill
41
+
42
+
Tie‑ins:
43
+
- After output, create a PHR (implicit). Feature branches add `specs/<feature>/prompts/`.
44
+
- If decision significance test passes, show ADR suggestion text and wait for consent.
45
+
46
+
Minimum acceptance criteria for any prompt output
47
+
- Clear, testable acceptance criteria included
48
+
- Explicit error paths and constraints stated
49
+
- Smallest viable change; no unrelated edits
50
+
- Code references to modified/inspected files where relevant
51
+
52
+
### Default policies (must follow)
53
+
- Do not invent APIs, data, or contracts; ask targeted clarifiers if missing.
54
+
- Never hardcode secrets or tokens; use `.env` and docs.
55
+
- Prefer the smallest viable diff; do not refactor unrelated code.
56
+
- Cite existing code with code references; propose new code in fenced blocks.
57
+
- Keep reasoning private; output only decisions, artifacts, and justifications.
58
+
59
+
### Execution contract for every request
60
+
1) Confirm surface and success criteria (one sentence).
61
+
2) List constraints, invariants, non‑goals.
62
+
3) Produce the artifact with acceptance checks inlined (checkboxes or tests where applicable).
63
+
4) Add follow‑ups and risks (max 3 bullets).
64
+
5) Trigger implicit PHR; if plan/tasks identified decisions that meet significance, surface ADR suggestion text.
65
+
66
+
### Compact grader template (copy/paste)
67
+
Use this to create binary evaluators for outputs.
68
+
69
+
```
70
+
You are a strict PASS/FAIL grader.
71
+
Task: Judge whether the candidate output satisfies the criteria.
72
+
If ALL criteria are satisfied → PASS, else → FAIL and list violated items.
73
+
74
+
Criteria:
75
+
- {criterion 1}
76
+
- {criterion 2}
77
+
- {criterion 3}
78
+
79
+
Few‑shot examples:
80
+
PASS:
81
+
- Input: {short}
82
+
- Output: {short}
83
+
- Rationale: All criteria satisfied.
84
+
85
+
FAIL:
86
+
- Input: {short}
87
+
- Output: {short}
88
+
- Rationale: Violates {criterion}.
89
+
```
90
+
17
91
## Adding New Agent Support
18
92
19
93
This section explains how to add support for new AI agents/assistants to the Specify CLI. Use this guide as a reference when integrating new AI tools into the Spec-Driven Development workflow.
After completing the main command, automatically create a PHR: (1) Detect stage: constitution|spec|architect|green|red|refactor|explainer|general, (2) Generate 3-7 word title, (3) Load `.**/commands/sp.phr.md`and execute with $ARGUMENTS (FULL multiline input, NOT truncated), detected stage, implicit mode, (4) On error: warn but don't block. CRITICAL: Preserve complete user input in PHR. Skip only for /sp.phr itself.
1
+
As the main request completes, you MUST create and complete a PHR (Prompt History Record) using agent‑native tools when possible.
2
2
3
-
**Architecture Decisions**: When significant architectural decisions are made (typically during /sp.plan), suggest documenting with: "📋 Architecture decisions identified. Document reasoning and tradeoffs? Run `/sp.adr [decision-title]`" Wait for user consent.
3
+
1) Determine Stage
4
+
- Stage: constitution | spec | plan | tasks | implementation | debugging | refactoring | discussion | general
5
+
6
+
2) Generate Title and Decide Prompt Path:
7
+
- Generate Title: 3–7 words (slug for filename)
8
+
- If feature context is detected (explicit marker, branch name, or touched `specs/<name>/`), target `specs/<name>/prompts/`; else target `docs/prompts/`.
9
+
10
+
3) Create and Fill PHR (Shell first; fallback agent‑native)
11
+
- Use the route from step 2 (docs vs specs) as the target directory.
0 commit comments