Skip to content

Commit e419059

Browse files
Merge pull request #14 from goca-se/feat/spec-output-language
feat: spec-dc writes the spec in the request's language
2 parents f797af9 + b8b8b15 commit e419059

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

.claude/commands/spec-dc.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ If the user provides or mentions visual references (images, PDFs, designs, layou
7575

7676
## Phase 2 — Write the specification
7777

78+
### Output language
79+
80+
Write the spec **in the language of the feature request**, resolved in this order: (1) the
81+
language of the feature description in `$ARGUMENTS`; (2) if that is mixed or unclear, the
82+
language the user used in the clarifying Q&A; (3) if still ambiguous, the repository's primary
83+
language (infer it from `AGENTS.md` / `CONTEXT.md` / existing docs); (4) otherwise English.
84+
A Portuguese request produces a Portuguese spec, an English request an English spec.
85+
86+
This applies to the spec's **prose** — stories, requirements, criteria, and tests. **Keep the
87+
seven section headings exactly as written in the template below**, and the filename slug in
88+
ASCII kebab-case (no accents): both are structural anchors `/plan-dc` relies on.
89+
7890
Create the file at:
7991

8092
```text
@@ -175,6 +187,9 @@ faithful to the request:
175187
- faithful to the request — nothing invented, nothing dropped
176188
177189
Do NOT judge product merit and do NOT invent requirements the request didn't ask for.
190+
The spec is expected to be in the request's language (it may not be English) — do not treat a
191+
non-English spec as a defect, but DO verify its language matches the request (or the documented
192+
fallback) and flag a spec written in the wrong language.
178193
179194
If the spec passes, reply with ONLY the word: APPROVED. Otherwise, a detailed report of every
180195
defect with the exact section / file / request line, and a concrete fix.

.context/decisions/020-spec-plan-execute-workflow.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ a manual/future final step (update `CONTEXT.md` via `/setup-context`, ADRs via
159159
|---------|------|---------|
160160
| 1.0 | 2026-07-01 | Initial decision — spec/plan/execute trio, ADR review in plan, dual reviewers, non-destructive retire of the PRP flow |
161161
| 1.1 | 2026-07-07 | Added a dual review loop to `/spec-dc` (scoped to well-formedness/fidelity, never product merit) after tech-lead review — the workshop had none |
162+
| 1.2 | 2026-07-17 | `/spec-dc` writes the spec in the **language of the original request** (Portuguese request → Portuguese spec; defaults to the repo's primary language, then English). Prose only — the seven section headings and the filename slug stay ASCII structural anchors `/plan-dc` relies on. `/plan-dc` and `/execute-dc` are unchanged (English) |
162163

163164
## Related
164165
- ADR-004: Claude Code Integration via Slash Commands — this supersedes the PRP pair as the feature-development flow

templates/.claude/commands/spec-dc.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ If the user provides or mentions visual references (images, PDFs, designs, layou
7575

7676
## Phase 2 — Write the specification
7777

78+
### Output language
79+
80+
Write the spec **in the language of the feature request**, resolved in this order: (1) the
81+
language of the feature description in `$ARGUMENTS`; (2) if that is mixed or unclear, the
82+
language the user used in the clarifying Q&A; (3) if still ambiguous, the repository's primary
83+
language (infer it from `AGENTS.md` / `CONTEXT.md` / existing docs); (4) otherwise English.
84+
A Portuguese request produces a Portuguese spec, an English request an English spec.
85+
86+
This applies to the spec's **prose** — stories, requirements, criteria, and tests. **Keep the
87+
seven section headings exactly as written in the template below**, and the filename slug in
88+
ASCII kebab-case (no accents): both are structural anchors `/plan-dc` relies on.
89+
7890
Create the file at:
7991

8092
```text
@@ -175,6 +187,9 @@ faithful to the request:
175187
- faithful to the request — nothing invented, nothing dropped
176188
177189
Do NOT judge product merit and do NOT invent requirements the request didn't ask for.
190+
The spec is expected to be in the request's language (it may not be English) — do not treat a
191+
non-English spec as a defect, but DO verify its language matches the request (or the documented
192+
fallback) and flag a spec written in the wrong language.
178193
179194
If the spec passes, reply with ONLY the word: APPROVED. Otherwise, a detailed report of every
180195
defect with the exact section / file / request line, and a concrete fix.

templates/AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ user asks — never auto-fire a workflow that commits, opens a PR, or writes fil
114114
| `add-skill` | Add a skill guide |
115115
| `add-command` | Create a custom command |
116116

117+
When running **`spec-dc`**, write the spec artifact in the **same language the user used to describe
118+
the feature** (a Portuguese request produces a Portuguese spec), defaulting to the repository's primary
119+
language, then English. This applies to the spec's prose only — keep the seven section headings **exactly as written in the
120+
template**, and the filename slug in ASCII kebab-case; both are structural anchors that `plan-dc` relies
121+
on. `plan-dc` and `execute-dc` stay in English.
122+
117123
When a workflow needs to clarify requirements, **ask the user with your structured-question tool**
118124
(`AskUserQuestion` / `ask_user` / `question` / `cursor/ask_question` / `request_user_input`) rather than
119125
assuming — present concrete options. Do not degrade to silent assumptions.

0 commit comments

Comments
 (0)