This commit is contained in:
2026-05-11 22:58:01 +03:00
parent 2abba06e52
commit fefdee98d0
30 changed files with 1681 additions and 1222 deletions

View File

@@ -1,13 +1,13 @@
---
description: Generate an actionable, dependency-ordered tasks.md for the active Python/Svelte feature.
description: Generate an actionable, dependency-ordered tasks.md for the active ss-tools feature (Python backend + Svelte frontend).
handoffs:
- label: Analyze For Consistency
agent: speckit.analyze
prompt: Run a cross-artifact consistency analysis for the Python/Svelte feature
prompt: Run a cross-artifact consistency analysis for the feature
send: true
- label: Implement Project
agent: speckit.implement
prompt: Start implementation in phases for the Python/Svelte feature
prompt: Start implementation in phases for the feature
send: true
---
@@ -31,9 +31,9 @@ You **MUST** consider the user input before proceeding (if not empty).
3. **Build the task model**:
- Extract user stories and priorities from `spec.md`
- Extract repository structure, backend/frontend scope, verification stack, and semantic constraints from `plan.md`
- Extract repository structure, tool/resource scope, verification stack, and semantic constraints from `plan.md`
- Extract accepted-path and rejected-path memory from ADRs and `contracts/modules.md`
- Map entities, API payloads, UI components, and verification scenarios to stories
- Map entities to stories
- Generate tasks grouped by story and ordered by dependency
- Validate that no task schedules an ADR-rejected path
@@ -67,59 +67,42 @@ Every task MUST follow:
```
Rules:
1. `- [ ]` checkbox is mandatory
2. sequential task IDs (`T001`, `T002`, ...)
3. `[P]` only for truly parallelizable tasks
4. `[USx]` required only for user-story phases
5. exact file paths required in the description
### Python / Svelte Pathing
### ss-tools Pathing
Prefer real repository paths such as:
**Backend (Python):**
- `backend/src/api/*.py` (FastAPI routes)
- `backend/src/core/**/*.py` (core services, task manager, auth, migration, plugins)
- `backend/src/core/**/*.py` (business logic, plugins)
- `backend/src/models/*.py` (SQLAlchemy models)
- `backend/src/services/*.py` (business logic)
- `backend/src/services/*.py` (service layer)
- `backend/src/schemas/*.py` (Pydantic schemas)
- `backend/tests/*.py` (pytest tests)
**Frontend (Svelte):**
- `backend/tests/*.py` (pytest)
- `frontend/src/routes/**/*.svelte` (SvelteKit pages)
- `frontend/src/lib/components/**/*.svelte` (reusable Svelte 5 components)
- `frontend/src/lib/stores/*.svelte.js` (Svelte rune stores)
- `frontend/src/lib/api/*.js` (API client modules)
- `frontend/tests/**/*.test.js` (vitest tests)
- `frontend/src/lib/components/*.svelte` (UI components)
- `frontend/src/lib/stores/*.js` (Svelte stores)
- `frontend/src/lib/api/*.js` (API client)
- `frontend/src/lib/**/__tests__/*.test.js` (vitest)
- `docs/adr/*.md` (architecture decisions)
- `specs/<feature>/contracts/*.md` (design contracts)
**Shared/Infrastructure:**
- `docs/adr/*.md`
- `docker/*`
- `specs/<feature>/contracts/*.md`
Do **not** generate default tasks for:
- `src/**/*.rs` or `tests/*.rs`
- `Cargo.toml`
- `cargo` commands
- MCP server/tool/resource syntax unless the feature actually introduces them
Do NOT generate default tasks for Rust/MCP paths (`src/server/`, `*.rs`, `cargo`).
### Verification Discipline
Each story phase must end with:
- a verification task against `ux_reference.md` interpreted as the API caller, CLI operator, or Svelte UX interaction contract
- a verification task against `ux_reference.md` interpreted as the operator/caller interaction contract
- a semantic audit / verification task tied to repository validators and touched contracts
Typical verification tasks may include:
- focused `pytest backend/tests/test_<module>.py` commands
- `cd backend && pytest` (full backend suite)
- `cd frontend && npm run test` (vitest suite)
- `ruff check backend/` (Python lint)
- `cd frontend && npm run build` (Svelte build validation)
- `python3 scripts/static_verify.py` (semantic static verification)
- `cd backend && source .venv/bin/activate && python -m pytest backend/tests/test_*.py -v`
- `python -m ruff check backend/src/ backend/tests/`
- `cd frontend && npm run test`
- `cd frontend && npm run build`
Only include the commands that are truly required by the feature scope.
@@ -128,20 +111,16 @@ Only include the commands that are truly required by the feature scope.
If a task implements or depends on a guarded contract, append a concise guardrail summary derived from `@RATIONALE` and `@REJECTED`.
Examples:
- `- [ ] T021 [US1] Implement report generation endpoint in backend/src/api/reports.py (RATIONALE: unified report envelope preserves task-shaped parity; REJECTED: ad-hoc per-endpoint response shapes)`
- `- [ ] T033 [US2] Add WebSocket logging handler in backend/src/core/task_manager/ws_handler.py (RATIONALE: C4/C5 flows must expose real-time log streaming; REJECTED: polling-based log retrieval)`
- `- [ ] T040 [US3] Create DashboardCard component in frontend/src/lib/components/DashboardCard.svelte (RATIONALE: @UX_STATE must cover Idle/Loading/Error/Empty; REJECTED: single-state inline rendering without recovery)`
- `- [ ] T021 [US1] Implement dashboard migration service in backend/src/core/migration/service.py (RATIONALE: full scan ensures consistency; REJECTED: incremental-only update leaves stale entries)`
- `- [ ] T033 [US2] Add WebSocket event handler in frontend/src/lib/stores/taskDrawer.js (RATIONALE: real-time feedback prevents polling; REJECTED: interval polling for task status)`
If no safe executable task wording exists because the accepted path is still unclear, stop and emit `[NEED_CONTEXT: target]`.
### Test Tasks
Tests are optional only when the feature truly has no new verification surface. In this repository, test tasks are usually expected for:
- new FastAPI endpoints / WebSocket handlers
- new plugin or service modules
- new Svelte components with `@UX_STATE` contracts
Tests are optional only when the feature truly has no new verification surface. Test tasks are usually expected for:
- new API endpoints
- new database models or queries
- C4/C5 semantic contracts
- runtime evidence / belief-state behavior
- rejected-path regression coverage
@@ -149,8 +128,7 @@ Tests are optional only when the feature truly has no new verification surface.
### Decision-Memory Validation Gate
Before finalizing `tasks.md`, verify that:
- blocking ADRs are inherited into setup/foundational or downstream story tasks
- no task text schedules a rejected path
- story tasks remain executable within the actual Python/Svelte repository structure
- story tasks remain executable within the actual Python/Svelte project structure
- at least one explicit verification task protects against rejected-path regression