Skip to content

Commit e5f1313

Browse files
authored
docs(common): update speckit (#203)
1 parent d5d0682 commit e5f1313

File tree

4 files changed

+69
-13
lines changed

4 files changed

+69
-13
lines changed

.cursor/commands/speckit.clarify.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,15 @@ Execution steps:
9494

9595
4. Sequential questioning loop (interactive):
9696
- Present EXACTLY ONE question at a time.
97-
- For multiple‑choice questions render options as a Markdown table:
97+
- For multiple‑choice questions:
98+
* **Analyze all options** and determine the **most suitable option** based on:
99+
- Best practices for the project type
100+
- Common patterns in similar implementations
101+
- Risk reduction (security, performance, maintainability)
102+
- Alignment with any explicit project goals or constraints visible in the spec
103+
* Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice).
104+
* Format as: `**Recommended:** Option [X] - <reasoning>`
105+
* Then render all options as a Markdown table:
98106

99107
| Option | Description |
100108
|--------|-------------|
@@ -103,9 +111,14 @@ Execution steps:
103111
| C | <Option C description> | (add D/E as needed up to 5)
104112
| Short | Provide a different short answer (<=5 words) | (Include only if free-form alternative is appropriate)
105113

106-
- For short‑answer style (no meaningful discrete options), output a single line after the question: `Format: Short answer (<=5 words)`.
114+
* After the table, add: `You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.`
115+
- For short‑answer style (no meaningful discrete options):
116+
* Provide your **suggested answer** based on best practices and context.
117+
* Format as: `**Suggested:** <your proposed answer> - <brief reasoning>`
118+
* Then output: `Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.`
107119
- After the user answers:
108-
* Validate the answer maps to one option or fits the <=5 word constraint.
120+
* If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer.
121+
* Otherwise, validate the answer maps to one option or fits the <=5 word constraint.
109122
* If ambiguous, ask for a quick disambiguation (count still belongs to same question; do not advance).
110123
* Once satisfactory, record it in working memory (do not yet write to disk) and move to the next queued question.
111124
- Stop asking further questions when:

.cursor/commands/speckit.implement.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,68 @@ You **MUST** consider the user input before proceeding (if not empty).
5151
- **IF EXISTS**: Read research.md for technical decisions and constraints
5252
- **IF EXISTS**: Read quickstart.md for integration scenarios
5353
54-
4. Parse tasks.md structure and extract:
54+
4. **Project Setup Verification**:
55+
- **REQUIRED**: Create/verify ignore files based on actual project setup:
56+
57+
**Detection & Creation Logic**:
58+
- Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
59+
60+
```sh
61+
git rev-parse --git-dir 2>/dev/null
62+
```
63+
- Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
64+
- Check if .eslintrc* or eslint.config.* exists → create/verify .eslintignore
65+
- Check if .prettierrc* exists → create/verify .prettierignore
66+
- Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
67+
- Check if terraform files (*.tf) exist → create/verify .terraformignore
68+
- Check if .helmignore needed (helm charts present) → create/verify .helmignore
69+
70+
**If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
71+
**If ignore file missing**: Create with full pattern set for detected technology
72+
73+
**Common Patterns by Technology** (from plan.md tech stack):
74+
- **Node.js/JavaScript**: `node_modules/`, `dist/`, `build/`, `*.log`, `.env*`
75+
- **Python**: `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `dist/`, `*.egg-info/`
76+
- **Java**: `target/`, `*.class`, `*.jar`, `.gradle/`, `build/`
77+
- **C#/.NET**: `bin/`, `obj/`, `*.user`, `*.suo`, `packages/`
78+
- **Go**: `*.exe`, `*.test`, `vendor/`, `*.out`
79+
- **Universal**: `.DS_Store`, `Thumbs.db`, `*.tmp`, `*.swp`, `.vscode/`, `.idea/`
80+
81+
**Tool-Specific Patterns**:
82+
- **Docker**: `node_modules/`, `.git/`, `Dockerfile*`, `.dockerignore`, `*.log*`, `.env*`, `coverage/`
83+
- **ESLint**: `node_modules/`, `dist/`, `build/`, `coverage/`, `*.min.js`
84+
- **Prettier**: `node_modules/`, `dist/`, `build/`, `coverage/`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`
85+
- **Terraform**: `.terraform/`, `*.tfstate*`, `*.tfvars`, `.terraform.lock.hcl`
86+
87+
5. Parse tasks.md structure and extract:
5588
- **Task phases**: Setup, Tests, Core, Integration, Polish
5689
- **Task dependencies**: Sequential vs parallel execution rules
5790
- **Task details**: ID, description, file paths, parallel markers [P]
5891
- **Execution flow**: Order and dependency requirements
5992
60-
5. Execute implementation following the task plan:
93+
6. Execute implementation following the task plan:
6194
- **Phase-by-phase execution**: Complete each phase before moving to the next
6295
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
6396
- **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
6497
- **File-based coordination**: Tasks affecting the same files must run sequentially
6598
- **Validation checkpoints**: Verify each phase completion before proceeding
6699
67-
6. Implementation execution rules:
100+
7. Implementation execution rules:
68101
- **Setup first**: Initialize project structure, dependencies, configuration
69102
- **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
70103
- **Core development**: Implement models, services, CLI commands, endpoints
71104
- **Integration work**: Database connections, middleware, logging, external services
72105
- **Polish and validation**: Unit tests, performance optimization, documentation
73106
74-
7. Progress tracking and error handling:
107+
8. Progress tracking and error handling:
75108
- Report progress after each completed task
76109
- Halt execution if any non-parallel task fails
77110
- For parallel tasks [P], continue with successful tasks, report failed ones
78111
- Provide clear error messages with context for debugging
79112
- Suggest next steps if implementation cannot proceed
80113
- **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file.
81114
82-
8. Completion validation:
115+
9. Completion validation:
83116
- Verify all required tasks are completed
84117
- Check that implemented features match the original specification
85118
- Validate that tests pass and coverage meets requirements

.cursor/commands/speckit.plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ You **MUST** consider the user input before proceeding (if not empty).
6767
- Output OpenAPI/GraphQL schema to `/contracts/`
6868

6969
3. **Agent context update**:
70-
- Run `.specify/scripts/bash/update-agent-context.sh cursor`
70+
- Run `.specify/scripts/bash/update-agent-context.sh cursor-agent`
7171
- These scripts detect which AI agent is in use
7272
- Update the appropriate agent-specific context file
7373
- Add only new technology from current plan

.specify/scripts/bash/update-agent-context.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# - Creates default Claude file if no agent files exist
3636
#
3737
# Usage: ./update-agent-context.sh [agent_type]
38-
# Agent types: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|q
38+
# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|q
3939
# Leave empty to update all existing agent files
4040

4141
set -e
@@ -69,6 +69,7 @@ WINDSURF_FILE="$REPO_ROOT/.windsurf/rules/specify-rules.md"
6969
KILOCODE_FILE="$REPO_ROOT/.kilocode/rules/specify-rules.md"
7070
AUGGIE_FILE="$REPO_ROOT/.augment/rules/specify-rules.md"
7171
ROO_FILE="$REPO_ROOT/.roo/rules/specify-rules.md"
72+
CODEBUDDY_FILE="$REPO_ROOT/.codebuddy/rules/specify-rules.md"
7273
Q_FILE="$REPO_ROOT/AGENTS.md"
7374

7475
# Template file
@@ -557,7 +558,7 @@ update_specific_agent() {
557558
copilot)
558559
update_agent_file "$COPILOT_FILE" "GitHub Copilot"
559560
;;
560-
cursor)
561+
cursor-agent)
561562
update_agent_file "$CURSOR_FILE" "Cursor IDE"
562563
;;
563564
qwen)
@@ -581,12 +582,15 @@ update_specific_agent() {
581582
roo)
582583
update_agent_file "$ROO_FILE" "Roo Code"
583584
;;
585+
codebuddy)
586+
update_agent_file "$CODEBUDDY_FILE" "CodeBuddy"
587+
;;
584588
q)
585589
update_agent_file "$Q_FILE" "Amazon Q Developer CLI"
586590
;;
587591
*)
588592
log_error "Unknown agent type '$agent_type'"
589-
log_error "Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|q"
593+
log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|q"
590594
exit 1
591595
;;
592596
esac
@@ -646,6 +650,11 @@ update_all_existing_agents() {
646650
found_agent=true
647651
fi
648652

653+
if [[ -f "$CODEBUDDY_FILE" ]]; then
654+
update_agent_file "$CODEBUDDY_FILE" "CodeBuddy"
655+
found_agent=true
656+
fi
657+
649658
if [[ -f "$Q_FILE" ]]; then
650659
update_agent_file "$Q_FILE" "Amazon Q Developer CLI"
651660
found_agent=true
@@ -674,7 +683,8 @@ print_summary() {
674683
fi
675684

676685
echo
677-
log_info "Usage: $0 [claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|q]"
686+
687+
log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|codebuddy|q]"
678688
}
679689

680690
#==============================================================================

0 commit comments

Comments
 (0)