feat: spec-dc writes the spec in the request's language - #14
Conversation
The /spec-dc output was always English. Make the spec artifact follow the language the user used to describe the feature (Portuguese request → Portuguese spec), so the human-reviewed artifact reads in the team's language — with zero config, correct for every install (no language is forced on template users). - Prose only: the seven section headings and the filename slug stay ASCII structural anchors that /plan-dc relies on to locate content. - Reviewer prompt notes the spec may not be in English, so language is never flagged as a defect. - /plan-dc and /execute-dc are unchanged (English) — the spec is what matters for human review. - Applied to both the repo's own command and the distributed template copy. - ADR-020 History updated (v1.2). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThe ChangesSpecification localization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/commands/spec-dc.md:
- Around line 189-190: Update the reviewer guidance at
.claude/commands/spec-dc.md lines 189-190 to allow specs in the original
request’s language while still requiring verification against the requested or
documented fallback language; apply the identical synchronized correction at
templates/.claude/commands/spec-dc.md lines 189-190.
- Around line 78-88: Define a deterministic language-selection rule in the
“Output language” guidance, explicitly specifying how to resolve multilingual
feature descriptions, clarifying Q&A, and conflicting repository-language
sources before applying the fallback for ambiguous input. Apply the identical
rule at .claude/commands/spec-dc.md:78-88 and
templates/.claude/commands/spec-dc.md:78-88, while preserving the fixed headings
and ASCII slug requirements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 423353ce-7b3a-4cd8-9758-1ce8994983f0
📒 Files selected for processing (3)
.claude/commands/spec-dc.md.context/decisions/020-spec-plan-execute-workflow.mdtemplates/.claude/commands/spec-dc.md
The output-language rule lived only in the spec-dc command body, so it reached Claude/opencode/Copilot but not the harnesses that run workflows from the AGENTS.md `## Workflows` section (Gemini, Cursor, Codex). Add a note there so those harnesses also write the spec in the request's language. Seed file (create-only), so this reaches new installs via `init`; existing projects keep their user-owned AGENTS.md untouched, per ADR-020. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@templates/AGENTS.md`:
- Around line 117-121: Update the language guidance in the spec-dc instructions
to explicitly require the seven section headings to remain exactly as written in
the template, while keeping the filename slug as an ASCII structural anchor;
preserve the existing language behavior for spec prose and the English-only
requirements for plan-dc and execute-dc.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 72a390da-98d2-4618-8abd-bcf827f10ddb
📒 Files selected for processing (1)
templates/AGENTS.md
- spec-dc: make output-language selection deterministic (explicit precedence: $ARGUMENTS description → clarifying Q&A → repo primary language → English) - spec-dc: reviewer now verifies the spec's language matches the request (or the documented fallback) instead of ignoring language entirely — a non-English spec is not a defect, but the wrong language is - AGENTS.md: require the seven section headings "exactly as written in the template" (only the slug is ASCII), matching the spec-dc contract plan-dc relies on Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
/spec-dcnow writes the spec artifact in the same language the user used to describe the feature — a Portuguese request produces a Portuguese spec, an English request an English spec. Ambiguous → repo's primary language, then English.Only the spec is localized (as discussed).
/plan-dcand/execute-dcstay English — the spec is the artifact that matters for human review.Why this approach
The spec command is a static markdown prompt with no notion of locale, and there are two copies (the repo's own
.claude/commands/and the distributedtemplates/). Hardcoding Portuguese would ship Portuguese to every install of the toolkit. "Follow the request's language" is instead zero-config, globally correct (no language forced on any template user), and naturally gives the team Portuguese specs.Changes
spec-dc.md→ new "Output language" subsection: write the spec in the request's language; prose only — the seven section headings and the filename slug stay ASCII structural anchors/plan-dcrelies on to locate content.templates/AGENTS.md→ Workflows note: carries the same rule to the harnesses that have no per-repo command file and run workflows from the## Workflowssection (Gemini, Cursor, Codex), for cross-harness parity.How it reaches users
mainat runtime, so this is live on merge.spec-dc.mdis already in theupdate.shmanaged set → existing projects get it viadotcontext update(diff + prompt); new installs viadotcontext init. Nosrc/change needed; thedotcontextbinary stays in sync (CI sync gate passes).update(re-init or manual edit); new installs get it.AGENTS.mdnote above (seed/create-only → new installs viainit; existing user-ownedAGENTS.mduntouched, per ADR-020).Out of scope
Localizing plan/execute; config/locale machinery. A separate analysis of
mattpocock/skillssurfaced a skill-authoring quality rubric worth considering later — intentionally not in this PR.🤖 Generated with Claude Code
Summary by CodeRabbit