diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index dbee884..0cb1fdb 100644 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -114,12 +114,19 @@ build_variant() { local plan_tpl="$base_dir/.specify/templates/plan-template.md" if [[ -f "$plan_tpl" ]]; then plan_norm=$(tr -d '\r' < "$plan_tpl") - variant_line=$(printf '%s\n' "$plan_norm" | grep -E ".*//; s/^[[:space:]]+//; s/[[:space:]]+$//") - if [[ -n $variant_line ]]; then + # 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}') + if [[ -n $script_command ]]; then + # Always prefix with .specify/ for plan usage + script_command=".specify/$script_command" tmp_file=$(mktemp) - sed "s|VARIANT-INJECT|${variant_line}|" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g" | sed '/ - +# Implementation Plan: [FEATURE] **Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link] **Input**: Feature specification from `/specs/[###-feature-name]/spec.md` @@ -13,18 +17,19 @@ 2. Fill Technical Context (scan for NEEDS CLARIFICATION) → Detect Project Type from context (web=frontend+backend, mobile=app+api) → 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 no justification possible: ERROR "Simplify approach first" → 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" -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, `GEMINI.md` for Gemini CLI, or `QWEN.md` for Qwen Code). -6. Re-evaluate Constitution Check section +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, `GEMINI.md` for Gemini CLI, or `QWEN.md` for Qwen Code). +7. Re-evaluate Constitution Check section → If new violations: Refactor design, return to Phase 1 → Update Progress Tracking: Post-Design Constitution Check -7. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md) -8. STOP - Ready for /tasks command +8. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md) +9. STOP - Ready for /tasks command ``` **IMPORTANT**: The /plan command STOPS at step 7. Phases 2-4 are executed by other commands: @@ -48,35 +53,7 @@ ## Constitution Check *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.* -**Simplicity**: -- 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) +[Gates determined based on constitution file] ## Project Structure @@ -174,7 +151,7 @@ ios/ or android/ - Quickstart test = story validation steps 5. **Update agent file incrementally** (O(1) operation): - VARIANT-INJECT + - Run `{SCRIPT}` for your AI assistant - If exists: Add only NEW tech from current plan - Preserve manual additions between markers - Update recent changes (keep last 3) @@ -187,7 +164,7 @@ ios/ or android/ *This section describes what the /tasks command will do - DO NOT execute during /plan* **Task Generation Strategy**: -- Load `/templates/tasks-template.md` as base +- Load `.specify/templates/tasks-template.md` as base - Generate tasks from Phase 1 design docs (contracts, data model, quickstart) - Each contract → contract test task [P] - Each entity → model creation task [P]