agentme 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.github/agents/speckit.analyze.agent.md +184 -0
  2. package/.github/agents/speckit.checklist.agent.md +295 -0
  3. package/.github/agents/speckit.clarify.agent.md +181 -0
  4. package/.github/agents/speckit.constitution.agent.md +84 -0
  5. package/.github/agents/speckit.implement.agent.md +198 -0
  6. package/.github/agents/speckit.plan.agent.md +90 -0
  7. package/.github/agents/speckit.specify.agent.md +237 -0
  8. package/.github/agents/speckit.tasks.agent.md +200 -0
  9. package/.github/agents/speckit.taskstoissues.agent.md +30 -0
  10. package/.github/prompts/speckit.analyze.prompt.md +3 -0
  11. package/.github/prompts/speckit.checklist.prompt.md +3 -0
  12. package/.github/prompts/speckit.clarify.prompt.md +3 -0
  13. package/.github/prompts/speckit.constitution.prompt.md +3 -0
  14. package/.github/prompts/speckit.implement.prompt.md +3 -0
  15. package/.github/prompts/speckit.plan.prompt.md +3 -0
  16. package/.github/prompts/speckit.specify.prompt.md +3 -0
  17. package/.github/prompts/speckit.tasks.prompt.md +3 -0
  18. package/.github/prompts/speckit.taskstoissues.prompt.md +3 -0
  19. package/.specify/memory/constitution.md +119 -0
  20. package/.specify/scripts/bash/check-prerequisites.sh +190 -0
  21. package/.specify/scripts/bash/common.sh +253 -0
  22. package/.specify/scripts/bash/create-new-feature.sh +333 -0
  23. package/.specify/scripts/bash/setup-plan.sh +73 -0
  24. package/.specify/scripts/bash/update-agent-context.sh +808 -0
  25. package/.specify/templates/agent-file-template.md +28 -0
  26. package/.specify/templates/checklist-template.md +40 -0
  27. package/.specify/templates/constitution-template.md +50 -0
  28. package/.specify/templates/plan-template.md +110 -0
  29. package/.specify/templates/spec-template.md +115 -0
  30. package/.specify/templates/tasks-template.md +251 -0
  31. package/.vscode/settings.json +14 -0
  32. package/.xdrs/agentme/edrs/application/003-javascript-project-tooling.md +89 -0
  33. package/.xdrs/agentme/edrs/application/010-golang-project-tooling.md +141 -0
  34. package/.xdrs/agentme/edrs/application/skills/001-create-javascript-project/SKILL.md +360 -0
  35. package/.xdrs/agentme/edrs/application/skills/003-create-golang-project/SKILL.md +311 -0
  36. package/.xdrs/agentme/edrs/devops/005-monorepo-structure.md +104 -0
  37. package/.xdrs/agentme/edrs/devops/006-github-pipelines.md +170 -0
  38. package/.xdrs/agentme/edrs/devops/008-common-targets.md +207 -0
  39. package/.xdrs/agentme/edrs/devops/skills/002-monorepo-setup/SKILL.md +270 -0
  40. package/.xdrs/agentme/edrs/index.md +41 -0
  41. package/.xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md +78 -0
  42. package/.xdrs/agentme/edrs/principles/002-coding-best-practices.md +110 -0
  43. package/.xdrs/agentme/edrs/principles/004-unit-test-requirements.md +97 -0
  44. package/.xdrs/agentme/edrs/principles/007-project-quality-standards.md +156 -0
  45. package/.xdrs/agentme/edrs/principles/009-error-handling.md +327 -0
  46. package/.xdrs/index.md +32 -0
  47. package/README.md +119 -0
  48. package/bin/npmdata.js +3 -0
  49. package/package.json +102 -0
@@ -0,0 +1,84 @@
1
+ ---
2
+ description: Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
3
+ handoffs:
4
+ - label: Build Specification
5
+ agent: speckit.specify
6
+ prompt: Implement the feature specification based on the updated constitution. I want to build...
7
+ ---
8
+
9
+ ## User Input
10
+
11
+ ```text
12
+ $ARGUMENTS
13
+ ```
14
+
15
+ You **MUST** consider the user input before proceeding (if not empty).
16
+
17
+ ## Outline
18
+
19
+ You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.
20
+
21
+ **Note**: If `.specify/memory/constitution.md` does not exist yet, it should have been initialized from `.specify/templates/constitution-template.md` during project setup. If it's missing, copy the template first.
22
+
23
+ Follow this execution flow:
24
+
25
+ 1. Load the existing constitution at `.specify/memory/constitution.md`.
26
+ - Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
27
+ **IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
28
+
29
+ 2. Collect/derive values for placeholders:
30
+ - If user input (conversation) supplies a value, use it.
31
+ - Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
32
+ - For governance dates: `RATIFICATION_DATE` is the original adoption date (if unknown ask or mark TODO), `LAST_AMENDED_DATE` is today if changes are made, otherwise keep previous.
33
+ - `CONSTITUTION_VERSION` must increment according to semantic versioning rules:
34
+ - MAJOR: Backward incompatible governance/principle removals or redefinitions.
35
+ - MINOR: New principle/section added or materially expanded guidance.
36
+ - PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
37
+ - If version bump type ambiguous, propose reasoning before finalizing.
38
+
39
+ 3. Draft the updated constitution content:
40
+ - Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
41
+ - Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
42
+ - Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
43
+ - Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
44
+
45
+ 4. Consistency propagation checklist (convert prior checklist into active validations):
46
+ - Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
47
+ - Read `.specify/templates/spec-template.md` for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
48
+ - Read `.specify/templates/tasks-template.md` and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
49
+ - Read each command file in `.specify/templates/commands/*.md` (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.
50
+ - Read any runtime guidance docs (e.g., `README.md`, `docs/quickstart.md`, or agent-specific guidance files if present). Update references to principles changed.
51
+
52
+ 5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
53
+ - Version change: old → new
54
+ - List of modified principles (old title → new title if renamed)
55
+ - Added sections
56
+ - Removed sections
57
+ - Templates requiring updates (✅ updated / ⚠ pending) with file paths
58
+ - Follow-up TODOs if any placeholders intentionally deferred.
59
+
60
+ 6. Validation before final output:
61
+ - No remaining unexplained bracket tokens.
62
+ - Version line matches report.
63
+ - Dates ISO format YYYY-MM-DD.
64
+ - Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
65
+
66
+ 7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
67
+
68
+ 8. Output a final summary to the user with:
69
+ - New version and bump rationale.
70
+ - Any files flagged for manual follow-up.
71
+ - Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).
72
+
73
+ Formatting & Style Requirements:
74
+
75
+ - Use Markdown headings exactly as in the template (do not demote/promote levels).
76
+ - Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
77
+ - Keep a single blank line between sections.
78
+ - Avoid trailing whitespace.
79
+
80
+ If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.
81
+
82
+ If critical info missing (e.g., ratification date truly unknown), insert `TODO(<FIELD_NAME>): explanation` and include in the Sync Impact Report under deferred items.
83
+
84
+ Do not create a new template; always operate on the existing `.specify/memory/constitution.md` file.
@@ -0,0 +1,198 @@
1
+ ---
2
+ description: Execute the implementation plan by processing and executing all tasks defined in tasks.md
3
+ ---
4
+
5
+ ## User Input
6
+
7
+ ```text
8
+ $ARGUMENTS
9
+ ```
10
+
11
+ You **MUST** consider the user input before proceeding (if not empty).
12
+
13
+ ## Pre-Execution Checks
14
+
15
+ **Check for extension hooks (before implementation)**:
16
+ - Check if `.specify/extensions.yml` exists in the project root.
17
+ - If it exists, read it and look for entries under the `hooks.before_implement` key
18
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
19
+ - Filter to only hooks where `enabled: true`
20
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
21
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
22
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
23
+ - For each executable hook, output the following based on its `optional` flag:
24
+ - **Optional hook** (`optional: true`):
25
+ ```
26
+ ## Extension Hooks
27
+
28
+ **Optional Pre-Hook**: {extension}
29
+ Command: `/{command}`
30
+ Description: {description}
31
+
32
+ Prompt: {prompt}
33
+ To execute: `/{command}`
34
+ ```
35
+ - **Mandatory hook** (`optional: false`):
36
+ ```
37
+ ## Extension Hooks
38
+
39
+ **Automatic Pre-Hook**: {extension}
40
+ Executing: `/{command}`
41
+ EXECUTE_COMMAND: {command}
42
+
43
+ Wait for the result of the hook command before proceeding to the Outline.
44
+ ```
45
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
46
+
47
+ ## Outline
48
+
49
+ 1. Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` 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").
50
+
51
+ 2. **Check checklists status** (if FEATURE_DIR/checklists/ exists):
52
+ - Scan all checklist files in the checklists/ directory
53
+ - For each checklist, count:
54
+ - Total items: All lines matching `- [ ]` or `- [X]` or `- [x]`
55
+ - Completed items: Lines matching `- [X]` or `- [x]`
56
+ - Incomplete items: Lines matching `- [ ]`
57
+ - Create a status table:
58
+
59
+ ```text
60
+ | Checklist | Total | Completed | Incomplete | Status |
61
+ |-----------|-------|-----------|------------|--------|
62
+ | ux.md | 12 | 12 | 0 | ✓ PASS |
63
+ | test.md | 8 | 5 | 3 | ✗ FAIL |
64
+ | security.md | 6 | 6 | 0 | ✓ PASS |
65
+ ```
66
+
67
+ - Calculate overall status:
68
+ - **PASS**: All checklists have 0 incomplete items
69
+ - **FAIL**: One or more checklists have incomplete items
70
+
71
+ - **If any checklist is incomplete**:
72
+ - Display the table with incomplete item counts
73
+ - **STOP** and ask: "Some checklists are incomplete. Do you want to proceed with implementation anyway? (yes/no)"
74
+ - Wait for user response before continuing
75
+ - If user says "no" or "wait" or "stop", halt execution
76
+ - If user says "yes" or "proceed" or "continue", proceed to step 3
77
+
78
+ - **If all checklists are complete**:
79
+ - Display the table showing all checklists passed
80
+ - Automatically proceed to step 3
81
+
82
+ 3. Load and analyze the implementation context:
83
+ - **REQUIRED**: Read tasks.md for the complete task list and execution plan
84
+ - **REQUIRED**: Read plan.md for tech stack, architecture, and file structure
85
+ - **IF EXISTS**: Read data-model.md for entities and relationships
86
+ - **IF EXISTS**: Read contracts/ for API specifications and test requirements
87
+ - **IF EXISTS**: Read research.md for technical decisions and constraints
88
+ - **IF EXISTS**: Read quickstart.md for integration scenarios
89
+
90
+ 4. **Project Setup Verification**:
91
+ - **REQUIRED**: Create/verify ignore files based on actual project setup:
92
+
93
+ **Detection & Creation Logic**:
94
+ - Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
95
+
96
+ ```sh
97
+ git rev-parse --git-dir 2>/dev/null
98
+ ```
99
+
100
+ - Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
101
+ - Check if .eslintrc* exists → create/verify .eslintignore
102
+ - Check if eslint.config.* exists → ensure the config's `ignores` entries cover required patterns
103
+ - Check if .prettierrc* exists → create/verify .prettierignore
104
+ - Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
105
+ - Check if terraform files (*.tf) exist → create/verify .terraformignore
106
+ - Check if .helmignore needed (helm charts present) → create/verify .helmignore
107
+
108
+ **If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
109
+ **If ignore file missing**: Create with full pattern set for detected technology
110
+
111
+ **Common Patterns by Technology** (from plan.md tech stack):
112
+ - **Node.js/JavaScript/TypeScript**: `node_modules/`, `dist/`, `build/`, `*.log`, `.env*`
113
+ - **Python**: `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `dist/`, `*.egg-info/`
114
+ - **Java**: `target/`, `*.class`, `*.jar`, `.gradle/`, `build/`
115
+ - **C#/.NET**: `bin/`, `obj/`, `*.user`, `*.suo`, `packages/`
116
+ - **Go**: `*.exe`, `*.test`, `vendor/`, `*.out`
117
+ - **Ruby**: `.bundle/`, `log/`, `tmp/`, `*.gem`, `vendor/bundle/`
118
+ - **PHP**: `vendor/`, `*.log`, `*.cache`, `*.env`
119
+ - **Rust**: `target/`, `debug/`, `release/`, `*.rs.bk`, `*.rlib`, `*.prof*`, `.idea/`, `*.log`, `.env*`
120
+ - **Kotlin**: `build/`, `out/`, `.gradle/`, `.idea/`, `*.class`, `*.jar`, `*.iml`, `*.log`, `.env*`
121
+ - **C++**: `build/`, `bin/`, `obj/`, `out/`, `*.o`, `*.so`, `*.a`, `*.exe`, `*.dll`, `.idea/`, `*.log`, `.env*`
122
+ - **C**: `build/`, `bin/`, `obj/`, `out/`, `*.o`, `*.a`, `*.so`, `*.exe`, `*.dll`, `autom4te.cache/`, `config.status`, `config.log`, `.idea/`, `*.log`, `.env*`
123
+ - **Swift**: `.build/`, `DerivedData/`, `*.swiftpm/`, `Packages/`
124
+ - **R**: `.Rproj.user/`, `.Rhistory`, `.RData`, `.Ruserdata`, `*.Rproj`, `packrat/`, `renv/`
125
+ - **Universal**: `.DS_Store`, `Thumbs.db`, `*.tmp`, `*.swp`, `.vscode/`, `.idea/`
126
+
127
+ **Tool-Specific Patterns**:
128
+ - **Docker**: `node_modules/`, `.git/`, `Dockerfile*`, `.dockerignore`, `*.log*`, `.env*`, `coverage/`
129
+ - **ESLint**: `node_modules/`, `dist/`, `build/`, `coverage/`, `*.min.js`
130
+ - **Prettier**: `node_modules/`, `dist/`, `build/`, `coverage/`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`
131
+ - **Terraform**: `.terraform/`, `*.tfstate*`, `*.tfvars`, `.terraform.lock.hcl`
132
+ - **Kubernetes/k8s**: `*.secret.yaml`, `secrets/`, `.kube/`, `kubeconfig*`, `*.key`, `*.crt`
133
+
134
+ 5. Parse tasks.md structure and extract:
135
+ - **Task phases**: Setup, Tests, Core, Integration, Polish
136
+ - **Task dependencies**: Sequential vs parallel execution rules
137
+ - **Task details**: ID, description, file paths, parallel markers [P]
138
+ - **Execution flow**: Order and dependency requirements
139
+
140
+ 6. Execute implementation following the task plan:
141
+ - **Phase-by-phase execution**: Complete each phase before moving to the next
142
+ - **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
143
+ - **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
144
+ - **File-based coordination**: Tasks affecting the same files must run sequentially
145
+ - **Validation checkpoints**: Verify each phase completion before proceeding
146
+
147
+ 7. Implementation execution rules:
148
+ - **Setup first**: Initialize project structure, dependencies, configuration
149
+ - **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
150
+ - **Core development**: Implement models, services, CLI commands, endpoints
151
+ - **Integration work**: Database connections, middleware, logging, external services
152
+ - **Polish and validation**: Unit tests, performance optimization, documentation
153
+
154
+ 8. Progress tracking and error handling:
155
+ - Report progress after each completed task
156
+ - Halt execution if any non-parallel task fails
157
+ - For parallel tasks [P], continue with successful tasks, report failed ones
158
+ - Provide clear error messages with context for debugging
159
+ - Suggest next steps if implementation cannot proceed
160
+ - **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file.
161
+
162
+ 9. Completion validation:
163
+ - Verify all required tasks are completed
164
+ - Check that implemented features match the original specification
165
+ - Validate that tests pass and coverage meets requirements
166
+ - Confirm the implementation follows the technical plan
167
+ - Report final status with summary of completed work
168
+
169
+ Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/speckit.tasks` first to regenerate the task list.
170
+
171
+ 10. **Check for extension hooks**: After completion validation, check if `.specify/extensions.yml` exists in the project root.
172
+ - If it exists, read it and look for entries under the `hooks.after_implement` key
173
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
174
+ - Filter to only hooks where `enabled: true`
175
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
176
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
177
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
178
+ - For each executable hook, output the following based on its `optional` flag:
179
+ - **Optional hook** (`optional: true`):
180
+ ```
181
+ ## Extension Hooks
182
+
183
+ **Optional Hook**: {extension}
184
+ Command: `/{command}`
185
+ Description: {description}
186
+
187
+ Prompt: {prompt}
188
+ To execute: `/{command}`
189
+ ```
190
+ - **Mandatory hook** (`optional: false`):
191
+ ```
192
+ ## Extension Hooks
193
+
194
+ **Automatic Hook**: {extension}
195
+ Executing: `/{command}`
196
+ EXECUTE_COMMAND: {command}
197
+ ```
198
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
@@ -0,0 +1,90 @@
1
+ ---
2
+ description: Execute the implementation planning workflow using the plan template to generate design artifacts.
3
+ handoffs:
4
+ - label: Create Tasks
5
+ agent: speckit.tasks
6
+ prompt: Break the plan into tasks
7
+ send: true
8
+ - label: Create Checklist
9
+ agent: speckit.checklist
10
+ prompt: Create a checklist for the following domain...
11
+ ---
12
+
13
+ ## User Input
14
+
15
+ ```text
16
+ $ARGUMENTS
17
+ ```
18
+
19
+ You **MUST** consider the user input before proceeding (if not empty).
20
+
21
+ ## Outline
22
+
23
+ 1. **Setup**: Run `.specify/scripts/bash/setup-plan.sh --json` 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").
24
+
25
+ 2. **Load context**: Read FEATURE_SPEC and `.specify/memory/constitution.md`. Load IMPL_PLAN template (already copied).
26
+
27
+ 3. **Execute plan workflow**: Follow the structure in IMPL_PLAN template to:
28
+ - Fill Technical Context (mark unknowns as "NEEDS CLARIFICATION")
29
+ - Fill Constitution Check section from constitution
30
+ - Evaluate gates (ERROR if violations unjustified)
31
+ - Phase 0: Generate research.md (resolve all NEEDS CLARIFICATION)
32
+ - Phase 1: Generate data-model.md, contracts/, quickstart.md
33
+ - Phase 1: Update agent context by running the agent script
34
+ - Re-evaluate Constitution Check post-design
35
+
36
+ 4. **Stop and report**: Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts.
37
+
38
+ ## Phases
39
+
40
+ ### Phase 0: Outline & Research
41
+
42
+ 1. **Extract unknowns from Technical Context** above:
43
+ - For each NEEDS CLARIFICATION → research task
44
+ - For each dependency → best practices task
45
+ - For each integration → patterns task
46
+
47
+ 2. **Generate and dispatch research agents**:
48
+
49
+ ```text
50
+ For each unknown in Technical Context:
51
+ Task: "Research {unknown} for {feature context}"
52
+ For each technology choice:
53
+ Task: "Find best practices for {tech} in {domain}"
54
+ ```
55
+
56
+ 3. **Consolidate findings** in `research.md` using format:
57
+ - Decision: [what was chosen]
58
+ - Rationale: [why chosen]
59
+ - Alternatives considered: [what else evaluated]
60
+
61
+ **Output**: research.md with all NEEDS CLARIFICATION resolved
62
+
63
+ ### Phase 1: Design & Contracts
64
+
65
+ **Prerequisites:** `research.md` complete
66
+
67
+ 1. **Extract entities from feature spec** → `data-model.md`:
68
+ - Entity name, fields, relationships
69
+ - Validation rules from requirements
70
+ - State transitions if applicable
71
+
72
+ 2. **Define interface contracts** (if project has external interfaces) → `/contracts/`:
73
+ - Identify what interfaces the project exposes to users or other systems
74
+ - Document the contract format appropriate for the project type
75
+ - Examples: public APIs for libraries, command schemas for CLI tools, endpoints for web services, grammars for parsers, UI contracts for applications
76
+ - Skip if project is purely internal (build scripts, one-off tools, etc.)
77
+
78
+ 3. **Agent context update**:
79
+ - Run `.specify/scripts/bash/update-agent-context.sh copilot`
80
+ - These scripts detect which AI agent is in use
81
+ - Update the appropriate agent-specific context file
82
+ - Add only new technology from current plan
83
+ - Preserve manual additions between markers
84
+
85
+ **Output**: data-model.md, /contracts/*, quickstart.md, agent-specific file
86
+
87
+ ## Key rules
88
+
89
+ - Use absolute paths
90
+ - ERROR on gate failures or unresolved clarifications
@@ -0,0 +1,237 @@
1
+ ---
2
+ description: Create or update the feature specification from a natural language feature description.
3
+ handoffs:
4
+ - label: Build Technical Plan
5
+ agent: speckit.plan
6
+ prompt: Create a plan for the spec. I am building with...
7
+ - label: Clarify Spec Requirements
8
+ agent: speckit.clarify
9
+ prompt: Clarify specification requirements
10
+ send: true
11
+ ---
12
+
13
+ ## User Input
14
+
15
+ ```text
16
+ $ARGUMENTS
17
+ ```
18
+
19
+ You **MUST** consider the user input before proceeding (if not empty).
20
+
21
+ ## Outline
22
+
23
+ The text the user typed after `/speckit.specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
24
+
25
+ Given that feature description, do this:
26
+
27
+ 1. **Generate a concise short name** (2-4 words) for the branch:
28
+ - Analyze the feature description and extract the most meaningful keywords
29
+ - Create a 2-4 word short name that captures the essence of the feature
30
+ - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
31
+ - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
32
+ - Keep it concise but descriptive enough to understand the feature at a glance
33
+ - Examples:
34
+ - "I want to add user authentication" → "user-auth"
35
+ - "Implement OAuth2 integration for the API" → "oauth2-api-integration"
36
+ - "Create a dashboard for analytics" → "analytics-dashboard"
37
+ - "Fix payment processing timeout bug" → "fix-payment-timeout"
38
+
39
+ 2. **Create the feature branch** by running the script with `--short-name` (and `--json`), and do NOT pass `--number` (the script auto-detects the next globally available number across all branches and spec directories):
40
+
41
+ - Bash example: `.specify/scripts/bash/create-new-feature.sh "$ARGUMENTS" --json --short-name "user-auth" "Add user authentication"`
42
+ - PowerShell example: `.specify/scripts/bash/create-new-feature.sh "$ARGUMENTS" -Json -ShortName "user-auth" "Add user authentication"`
43
+
44
+ **IMPORTANT**:
45
+ - Do NOT pass `--number` — the script determines the correct next number automatically
46
+ - Always include the JSON flag (`--json` for Bash, `-Json` for PowerShell) so the output can be parsed reliably
47
+ - You must only ever run this script once per feature
48
+ - The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for
49
+ - The JSON output will contain BRANCH_NAME and SPEC_FILE paths
50
+ - 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")
51
+
52
+ 3. Load `.specify/templates/spec-template.md` to understand required sections.
53
+
54
+ 4. Follow this execution flow:
55
+
56
+ 1. Parse user description from Input
57
+ If empty: ERROR "No feature description provided"
58
+ 2. Extract key concepts from description
59
+ Identify: actors, actions, data, constraints
60
+ 3. For unclear aspects:
61
+ - Make informed guesses based on context and industry standards
62
+ - Only mark with [NEEDS CLARIFICATION: specific question] if:
63
+ - The choice significantly impacts feature scope or user experience
64
+ - Multiple reasonable interpretations exist with different implications
65
+ - No reasonable default exists
66
+ - **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers total**
67
+ - Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
68
+ 4. Fill User Scenarios & Testing section
69
+ If no clear user flow: ERROR "Cannot determine user scenarios"
70
+ 5. Generate Functional Requirements
71
+ Each requirement must be testable
72
+ Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
73
+ 6. Define Success Criteria
74
+ Create measurable, technology-agnostic outcomes
75
+ Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
76
+ Each criterion must be verifiable without implementation details
77
+ 7. Identify Key Entities (if data involved)
78
+ 8. Return: SUCCESS (spec ready for planning)
79
+
80
+ 5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
81
+
82
+ 6. **Specification Quality Validation**: After writing the initial spec, validate it against quality criteria:
83
+
84
+ a. **Create Spec Quality Checklist**: Generate a checklist file at `FEATURE_DIR/checklists/requirements.md` using the checklist template structure with these validation items:
85
+
86
+ ```markdown
87
+ # Specification Quality Checklist: [FEATURE NAME]
88
+
89
+ **Purpose**: Validate specification completeness and quality before proceeding to planning
90
+ **Created**: [DATE]
91
+ **Feature**: [Link to spec.md]
92
+
93
+ ## Content Quality
94
+
95
+ - [ ] No implementation details (languages, frameworks, APIs)
96
+ - [ ] Focused on user value and business needs
97
+ - [ ] Written for non-technical stakeholders
98
+ - [ ] All mandatory sections completed
99
+
100
+ ## Requirement Completeness
101
+
102
+ - [ ] No [NEEDS CLARIFICATION] markers remain
103
+ - [ ] Requirements are testable and unambiguous
104
+ - [ ] Success criteria are measurable
105
+ - [ ] Success criteria are technology-agnostic (no implementation details)
106
+ - [ ] All acceptance scenarios are defined
107
+ - [ ] Edge cases are identified
108
+ - [ ] Scope is clearly bounded
109
+ - [ ] Dependencies and assumptions identified
110
+
111
+ ## Feature Readiness
112
+
113
+ - [ ] All functional requirements have clear acceptance criteria
114
+ - [ ] User scenarios cover primary flows
115
+ - [ ] Feature meets measurable outcomes defined in Success Criteria
116
+ - [ ] No implementation details leak into specification
117
+
118
+ ## Notes
119
+
120
+ - Items marked incomplete require spec updates before `/speckit.clarify` or `/speckit.plan`
121
+ ```
122
+
123
+ b. **Run Validation Check**: Review the spec against each checklist item:
124
+ - For each item, determine if it passes or fails
125
+ - Document specific issues found (quote relevant spec sections)
126
+
127
+ c. **Handle Validation Results**:
128
+
129
+ - **If all items pass**: Mark checklist complete and proceed to step 7
130
+
131
+ - **If items fail (excluding [NEEDS CLARIFICATION])**:
132
+ 1. List the failing items and specific issues
133
+ 2. Update the spec to address each issue
134
+ 3. Re-run validation until all items pass (max 3 iterations)
135
+ 4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user
136
+
137
+ - **If [NEEDS CLARIFICATION] markers remain**:
138
+ 1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
139
+ 2. **LIMIT CHECK**: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
140
+ 3. For each clarification needed (max 3), present options to user in this format:
141
+
142
+ ```markdown
143
+ ## Question [N]: [Topic]
144
+
145
+ **Context**: [Quote relevant spec section]
146
+
147
+ **What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
148
+
149
+ **Suggested Answers**:
150
+
151
+ | Option | Answer | Implications |
152
+ |--------|--------|--------------|
153
+ | A | [First suggested answer] | [What this means for the feature] |
154
+ | B | [Second suggested answer] | [What this means for the feature] |
155
+ | C | [Third suggested answer] | [What this means for the feature] |
156
+ | Custom | Provide your own answer | [Explain how to provide custom input] |
157
+
158
+ **Your choice**: _[Wait for user response]_
159
+ ```
160
+
161
+ 4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
162
+ - Use consistent spacing with pipes aligned
163
+ - Each cell should have spaces around content: `| Content |` not `|Content|`
164
+ - Header separator must have at least 3 dashes: `|--------|`
165
+ - Test that the table renders correctly in markdown preview
166
+ 5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
167
+ 6. Present all questions together before waiting for responses
168
+ 7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
169
+ 8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
170
+ 9. Re-run validation after all clarifications are resolved
171
+
172
+ d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status
173
+
174
+ 7. Report completion with branch name, spec file path, checklist results, and readiness for the next phase (`/speckit.clarify` or `/speckit.plan`).
175
+
176
+ **NOTE:** The script creates and checks out the new branch and initializes the spec file before writing.
177
+
178
+ ## Quick Guidelines
179
+
180
+ - Focus on **WHAT** users need and **WHY**.
181
+ - Avoid HOW to implement (no tech stack, APIs, code structure).
182
+ - Written for business stakeholders, not developers.
183
+ - DO NOT create any checklists that are embedded in the spec. That will be a separate command.
184
+
185
+ ### Section Requirements
186
+
187
+ - **Mandatory sections**: Must be completed for every feature
188
+ - **Optional sections**: Include only when relevant to the feature
189
+ - When a section doesn't apply, remove it entirely (don't leave as "N/A")
190
+
191
+ ### For AI Generation
192
+
193
+ When creating this spec from a user prompt:
194
+
195
+ 1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
196
+ 2. **Document assumptions**: Record reasonable defaults in the Assumptions section
197
+ 3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
198
+ - Significantly impact feature scope or user experience
199
+ - Have multiple reasonable interpretations with different implications
200
+ - Lack any reasonable default
201
+ 4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
202
+ 5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
203
+ 6. **Common areas needing clarification** (only if no reasonable default exists):
204
+ - Feature scope and boundaries (include/exclude specific use cases)
205
+ - User types and permissions (if multiple conflicting interpretations possible)
206
+ - Security/compliance requirements (when legally/financially significant)
207
+
208
+ **Examples of reasonable defaults** (don't ask about these):
209
+
210
+ - Data retention: Industry-standard practices for the domain
211
+ - Performance targets: Standard web/mobile app expectations unless specified
212
+ - Error handling: User-friendly messages with appropriate fallbacks
213
+ - Authentication method: Standard session-based or OAuth2 for web apps
214
+ - Integration patterns: Use project-appropriate patterns (REST/GraphQL for web services, function calls for libraries, CLI args for tools, etc.)
215
+
216
+ ### Success Criteria Guidelines
217
+
218
+ Success criteria must be:
219
+
220
+ 1. **Measurable**: Include specific metrics (time, percentage, count, rate)
221
+ 2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
222
+ 3. **User-focused**: Describe outcomes from user/business perspective, not system internals
223
+ 4. **Verifiable**: Can be tested/validated without knowing implementation details
224
+
225
+ **Good examples**:
226
+
227
+ - "Users can complete checkout in under 3 minutes"
228
+ - "System supports 10,000 concurrent users"
229
+ - "95% of searches return results in under 1 second"
230
+ - "Task completion rate improves by 40%"
231
+
232
+ **Bad examples** (implementation-focused):
233
+
234
+ - "API response time is under 200ms" (too technical, use "Users see results instantly")
235
+ - "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
236
+ - "React components render efficiently" (framework-specific)
237
+ - "Redis cache hit rate above 80%" (technology-specific)