Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b18ef208cb | ||
|
|
5828e58f84 |
@@ -116,11 +116,15 @@ build_variant() {
|
|||||||
plan_norm=$(tr -d '\r' < "$plan_tpl")
|
plan_norm=$(tr -d '\r' < "$plan_tpl")
|
||||||
# Extract script command from YAML frontmatter
|
# Extract script command from YAML frontmatter
|
||||||
script_command=$(printf '%s\n' "$plan_norm" | awk -v sv="$script" '/^[[:space:]]*'"$script"':[[:space:]]*/ {sub(/^[[:space:]]*'"$script"':[[:space:]]*/, ""); print; exit}')
|
script_command=$(printf '%s\n' "$plan_norm" | awk -v sv="$script" '/^[[:space:]]*'"$script"':[[:space:]]*/ {sub(/^[[:space:]]*'"$script"':[[:space:]]*/, ""); print; exit}')
|
||||||
|
|
||||||
if [[ -n $script_command ]]; then
|
if [[ -n $script_command ]]; then
|
||||||
|
# Always prefix with .specify/ for plan usage
|
||||||
|
script_command=".specify/$script_command"
|
||||||
tmp_file=$(mktemp)
|
tmp_file=$(mktemp)
|
||||||
# Replace {SCRIPT} placeholder with the script command and __AGENT__ with agent name
|
# Replace {SCRIPT} placeholder with the script command and __AGENT__ with agent name
|
||||||
sed "s|{SCRIPT}|${script_command}|g" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g" > "$tmp_file" && mv "$tmp_file" "$plan_tpl"
|
substituted=$(sed "s|{SCRIPT}|${script_command}|g" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g")
|
||||||
|
# Strip YAML frontmatter from plan template output (keep body only)
|
||||||
|
stripped=$(printf '%s\n' "$substituted" | awk 'BEGIN{fm=0;dash=0} /^---$/ {dash++; if(dash==1){fm=1; next} else if(dash==2){fm=0; next}} {if(!fm) print}')
|
||||||
|
printf '%s\n' "$stripped" > "$plan_tpl"
|
||||||
else
|
else
|
||||||
echo "Warning: no plan-template script command found for $script in YAML frontmatter" >&2
|
echo "Warning: no plan-template script command found for $script in YAML frontmatter" >&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Given the implementation details provided as an argument, do this:
|
|||||||
4. Execute the implementation plan template:
|
4. Execute the implementation plan template:
|
||||||
- Load `/templates/plan-template.md` (already copied to IMPL_PLAN path)
|
- Load `/templates/plan-template.md` (already copied to IMPL_PLAN path)
|
||||||
- Set Input path to FEATURE_SPEC
|
- Set Input path to FEATURE_SPEC
|
||||||
- Run the Execution Flow (main) function steps 1-10
|
- Run the Execution Flow (main) function steps 1-9
|
||||||
- The template is self-contained and executable
|
- The template is self-contained and executable
|
||||||
- Follow error handling and gate checks as specified
|
- Follow error handling and gate checks as specified
|
||||||
- Let the template guide artifact generation in $SPECS_DIR:
|
- Let the template guide artifact generation in $SPECS_DIR:
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
description: Create or update the feature specification from a natural language feature description.
|
description: Create or update the feature specification from a natural language feature description.
|
||||||
scripts:
|
scripts:
|
||||||
sh: .specify/scripts/bash/create-new-feature.sh --json "{ARGS}"
|
sh: scripts/bash/create-new-feature.sh --json "{ARGS}"
|
||||||
ps: .specify/scripts/powershell/create-new-feature.ps1 -Json "{ARGS}"
|
ps: scripts/powershell/create-new-feature.ps1 -Json "{ARGS}"
|
||||||
---
|
---
|
||||||
|
|
||||||
Given the feature description provided as an argument, do this:
|
Given the feature description provided as an argument, do this:
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
|
description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
|
||||||
scripts:
|
scripts:
|
||||||
sh: .specify/scripts/bash/check-task-prerequisites.sh --json
|
sh: scripts/bash/check-task-prerequisites.sh --json
|
||||||
ps: .specify/scripts/powershell/check-task-prerequisites.ps1 -Json
|
ps: scripts/powershell/check-task-prerequisites.ps1 -Json
|
||||||
---
|
---
|
||||||
|
|
||||||
Given the context provided as an argument, do this:
|
Given the context provided as an argument, do this:
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
description: "Implementation plan template for feature development"
|
description: "Implementation plan template for feature development"
|
||||||
scripts:
|
scripts:
|
||||||
sh: .specify/scripts/bash/update-agent-context.sh __AGENT__
|
sh: scripts/bash/update-agent-context.sh __AGENT__
|
||||||
ps: .specify/scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__
|
ps: scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__
|
||||||
---
|
---
|
||||||
|
|
||||||
# Implementation Plan: [FEATURE]
|
# Implementation Plan: [FEATURE]
|
||||||
@@ -17,18 +17,19 @@ scripts:
|
|||||||
2. Fill Technical Context (scan for NEEDS CLARIFICATION)
|
2. Fill Technical Context (scan for NEEDS CLARIFICATION)
|
||||||
→ Detect Project Type from context (web=frontend+backend, mobile=app+api)
|
→ Detect Project Type from context (web=frontend+backend, mobile=app+api)
|
||||||
→ Set Structure Decision based on project type
|
→ Set Structure Decision based on project type
|
||||||
3. Evaluate Constitution Check section below
|
3. Fill the Constitution Check section based on the content of the constitution document.
|
||||||
|
4. Evaluate Constitution Check section below
|
||||||
→ If violations exist: Document in Complexity Tracking
|
→ If violations exist: Document in Complexity Tracking
|
||||||
→ If no justification possible: ERROR "Simplify approach first"
|
→ If no justification possible: ERROR "Simplify approach first"
|
||||||
→ Update Progress Tracking: Initial Constitution Check
|
→ Update Progress Tracking: Initial Constitution Check
|
||||||
4. Execute Phase 0 → research.md
|
5. Execute Phase 0 → research.md
|
||||||
→ If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns"
|
→ If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns"
|
||||||
5. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, or `GEMINI.md` for Gemini CLI).
|
6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, or `GEMINI.md` for Gemini CLI).
|
||||||
6. Re-evaluate Constitution Check section
|
7. Re-evaluate Constitution Check section
|
||||||
→ If new violations: Refactor design, return to Phase 1
|
→ If new violations: Refactor design, return to Phase 1
|
||||||
→ Update Progress Tracking: Post-Design Constitution Check
|
→ Update Progress Tracking: Post-Design Constitution Check
|
||||||
7. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md)
|
8. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md)
|
||||||
8. STOP - Ready for /tasks command
|
9. STOP - Ready for /tasks command
|
||||||
```
|
```
|
||||||
|
|
||||||
**IMPORTANT**: The /plan command STOPS at step 7. Phases 2-4 are executed by other commands:
|
**IMPORTANT**: The /plan command STOPS at step 7. Phases 2-4 are executed by other commands:
|
||||||
@@ -52,35 +53,7 @@ scripts:
|
|||||||
## Constitution Check
|
## Constitution Check
|
||||||
*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
|
*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
|
||||||
|
|
||||||
**Simplicity**:
|
[Gates determined based on constitution file]
|
||||||
- Projects: [#] (max 3 - e.g., api, cli, tests)
|
|
||||||
- Using framework directly? (no wrapper classes)
|
|
||||||
- Single data model? (no DTOs unless serialization differs)
|
|
||||||
- Avoiding patterns? (no Repository/UoW without proven need)
|
|
||||||
|
|
||||||
**Architecture**:
|
|
||||||
- EVERY feature as library? (no direct app code)
|
|
||||||
- Libraries listed: [name + purpose for each]
|
|
||||||
- CLI per library: [commands with --help/--version/--format]
|
|
||||||
- Library docs: llms.txt format planned?
|
|
||||||
|
|
||||||
**Testing (NON-NEGOTIABLE)**:
|
|
||||||
- RED-GREEN-Refactor cycle enforced? (test MUST fail first)
|
|
||||||
- Git commits show tests before implementation?
|
|
||||||
- Order: Contract→Integration→E2E→Unit strictly followed?
|
|
||||||
- Real dependencies used? (actual DBs, not mocks)
|
|
||||||
- Integration tests for: new libraries, contract changes, shared schemas?
|
|
||||||
- FORBIDDEN: Implementation before test, skipping RED phase
|
|
||||||
|
|
||||||
**Observability**:
|
|
||||||
- Structured logging included?
|
|
||||||
- Frontend logs → backend? (unified stream)
|
|
||||||
- Error context sufficient?
|
|
||||||
|
|
||||||
**Versioning**:
|
|
||||||
- Version number assigned? (MAJOR.MINOR.BUILD)
|
|
||||||
- BUILD increments on every change?
|
|
||||||
- Breaking changes handled? (parallel tests, migration plan)
|
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user