From af2b14e9bed0fff3b957f492857c5538d64826e2 Mon Sep 17 00:00:00 2001 From: Daniil Sobolev Date: Wed, 8 Oct 2025 18:00:14 +0300 Subject: [PATCH] Add escaping guidelines to command templates --- templates/commands/analyze.md | 1 + templates/commands/checklist.md | 1 + templates/commands/clarify.md | 1 + templates/commands/implement.md | 4 ++-- templates/commands/plan.md | 2 +- templates/commands/specify.md | 2 +- templates/commands/tasks.md | 2 +- 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/templates/commands/analyze.md b/templates/commands/analyze.md index ab11284c..473339fc 100644 --- a/templates/commands/analyze.md +++ b/templates/commands/analyze.md @@ -34,6 +34,7 @@ Run `{SCRIPT}` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_ - TASKS = FEATURE_DIR/tasks.md Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command). +For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). ### 2. Load Artifacts (Progressive Disclosure) diff --git a/templates/commands/checklist.md b/templates/commands/checklist.md index b148b2d8..036988d0 100644 --- a/templates/commands/checklist.md +++ b/templates/commands/checklist.md @@ -36,6 +36,7 @@ You **MUST** consider the user input before proceeding (if not empty). 1. **Setup**: Run `{SCRIPT}` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list. - All file paths must be absolute. + - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). 2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST: - Be generated from the user's phrasing + extracted signals from spec/plan/tasks diff --git a/templates/commands/clarify.md b/templates/commands/clarify.md index 9d84a3c4..6fe439cb 100644 --- a/templates/commands/clarify.md +++ b/templates/commands/clarify.md @@ -26,6 +26,7 @@ Execution steps: - `FEATURE_SPEC` - (Optionally capture `IMPL_PLAN`, `TASKS` for future chained flows.) - If JSON parsing fails, abort and instruct user to re-run `/speckit.specify` or verify feature branch environment. + - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). 2. Load the current spec file. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing. Produce an internal coverage map used for prioritization (do not output raw map unless no questions will be asked). diff --git a/templates/commands/implement.md b/templates/commands/implement.md index 6478e9e7..da8021e4 100644 --- a/templates/commands/implement.md +++ b/templates/commands/implement.md @@ -15,7 +15,7 @@ You **MUST** consider the user input before proceeding (if not empty). ## Outline -1. Run `{SCRIPT}` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. +1. Run `{SCRIPT}` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). 2. **Check checklists status** (if FEATURE_DIR/checklists/ exists): - Scan all checklist files in the checklists/ directory @@ -89,4 +89,4 @@ You **MUST** consider the user input before proceeding (if not empty). - Confirm the implementation follows the technical plan - Report final status with summary of completed work -Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/tasks` first to regenerate the task list. \ No newline at end of file +Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/tasks` first to regenerate the task list. diff --git a/templates/commands/plan.md b/templates/commands/plan.md index 7c378fd4..f65ad38f 100644 --- a/templates/commands/plan.md +++ b/templates/commands/plan.md @@ -18,7 +18,7 @@ You **MUST** consider the user input before proceeding (if not empty). ## Outline -1. **Setup**: Run `{SCRIPT}` from repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. +1. **Setup**: Run `{SCRIPT}` from repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). 2. **Load context**: Read FEATURE_SPEC and `.specify/memory/constitution.md`. Load IMPL_PLAN template (already copied). diff --git a/templates/commands/specify.md b/templates/commands/specify.md index 3edce410..7f5f1799 100644 --- a/templates/commands/specify.md +++ b/templates/commands/specify.md @@ -20,7 +20,7 @@ The text the user typed after `/speckit.specify` in the triggering message **is* Given that feature description, do this: 1. Run the script `{SCRIPT}` from repo root and parse its JSON output for BRANCH_NAME and SPEC_FILE. All file paths must be absolute. - **IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for. + **IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). 2. Load `templates/spec-template.md` to understand required sections. 3. Follow this execution flow: diff --git a/templates/commands/tasks.md b/templates/commands/tasks.md index f2bafadc..46c3ba74 100644 --- a/templates/commands/tasks.md +++ b/templates/commands/tasks.md @@ -15,7 +15,7 @@ You **MUST** consider the user input before proceeding (if not empty). ## Outline -1. **Setup**: Run `{SCRIPT}` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. +1. **Setup**: Run `{SCRIPT}` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). 2. **Load design documents**: Read from FEATURE_DIR: - **Required**: plan.md (tech stack, libraries, structure), spec.md (user stories with priorities)