project-workflow 0.2.0__py3-none-any.whl

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 (39) hide show
  1. project_workflow/__init__.py +5 -0
  2. project_workflow/_version.py +3 -0
  3. project_workflow/cli.py +10076 -0
  4. project_workflow/codex/AGENTS.md +131 -0
  5. project_workflow/codex/skills/project-backlog/SKILL.md +104 -0
  6. project_workflow/codex/skills/project-clarify/SKILL.md +47 -0
  7. project_workflow/codex/skills/project-constitution/SKILL.md +62 -0
  8. project_workflow/codex/skills/project-delegate/SKILL.md +38 -0
  9. project_workflow/codex/skills/project-epic/SKILL.md +121 -0
  10. project_workflow/codex/skills/project-fix/SKILL.md +49 -0
  11. project_workflow/codex/skills/project-implement/SKILL.md +46 -0
  12. project_workflow/codex/skills/project-planner/SKILL.md +69 -0
  13. project_workflow/codex/skills/project-qa-review/SKILL.md +44 -0
  14. project_workflow/codex/skills/project-requirements/SKILL.md +60 -0
  15. project_workflow/codex/skills/project-retro/SKILL.md +46 -0
  16. project_workflow/codex/skills/project-smoke-bomb/SKILL.md +58 -0
  17. project_workflow/codex/skills/project-task/SKILL.md +73 -0
  18. project_workflow/cursor/rules/project-workflow.mdc +75 -0
  19. project_workflow/prompts/Backlog.prompt.md +90 -0
  20. project_workflow/prompts/Clarify.prompt.md +137 -0
  21. project_workflow/prompts/Constitution.prompt.md +115 -0
  22. project_workflow/prompts/Delegate.prompt.md +48 -0
  23. project_workflow/prompts/Epic.prompt.md +210 -0
  24. project_workflow/prompts/Fix.prompt.md +58 -0
  25. project_workflow/prompts/Implement.prompt.md +99 -0
  26. project_workflow/prompts/Planner.prompt.md +157 -0
  27. project_workflow/prompts/QAReview.prompt.md +86 -0
  28. project_workflow/prompts/Requirements.prompt.md +205 -0
  29. project_workflow/prompts/Retro.prompt.md +70 -0
  30. project_workflow/prompts/SmokeBomb.prompt.md +14 -0
  31. project_workflow/prompts/Task.prompt.md +99 -0
  32. project_workflow/templates/workflow +7 -0
  33. project_workflow/templates/workflow.py +10076 -0
  34. project_workflow-0.2.0.dist-info/METADATA +599 -0
  35. project_workflow-0.2.0.dist-info/RECORD +39 -0
  36. project_workflow-0.2.0.dist-info/WHEEL +5 -0
  37. project_workflow-0.2.0.dist-info/entry_points.txt +2 -0
  38. project_workflow-0.2.0.dist-info/licenses/LICENSE +21 -0
  39. project_workflow-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: project-planner
3
+ description: Use when turning confirmed project-workflow requirements into a phased implementation plan and testable work-item table.
4
+ ---
5
+
6
+ # Project Planner
7
+
8
+ Turn confirmed requirements into a safe, incremental implementation plan.
9
+
10
+ ## Invocation Rules
11
+
12
+ - Use this skill whenever the user asks for an implementation plan, phases, or testable work items for a project-workflow task, even if they ask in natural language.
13
+ - Read `AGENTS.md` and `.project-workflow/guidance.md` if present, then follow the project-workflow managed block and CLI requirements.
14
+ - If the task folder does not exist, use `project-task` first so the CLI creates the required files and tracker row.
15
+ - If requirements are missing or unclear, use `project-requirements` or `project-clarify` before planning.
16
+ - Verify the owner-approved requirements/AC envelope before planning. Planning must not be used to
17
+ manufacture or infer that approval.
18
+ - Planning is a document workflow unless the CLI adds an explicit planner command.
19
+
20
+ ## Required Files
21
+
22
+ - `.project-workflow/tasks/<TASK>/REQUIREMENTS.md`
23
+ - `.project-workflow/tasks/<TASK>/IMPLEMENTATION.md`
24
+ - `.project-workflow/TRACKER.md`
25
+ - `.project-workflow/CONSTITUTION.md` if present
26
+ - `AGENTS.md` and other repo instructions if present
27
+
28
+ ## Workflow
29
+
30
+ 1. Read requirements first and treat them as the source of truth.
31
+ 2. If requirements are missing, unclear, or internally inconsistent, stop and use `project-requirements` or `project-clarify`.
32
+ 3. Produce or update `IMPLEMENTATION.md` with:
33
+ - `## User Story` at the top
34
+ - `## Goal`
35
+ - `## Approach`
36
+ - `## Phases`
37
+ - `## Tasks`
38
+ 4. Assign or preserve stable acceptance criteria IDs (`AC1`, `AC2`, etc.) from
39
+ `REQUIREMENTS.md` and the `## Acceptance Criteria` section in
40
+ `IMPLEMENTATION.md`.
41
+ 5. Make every task independently testable and outcome-based.
42
+ 6. Map every task row to one or more AC IDs, and ensure every AC ID is covered
43
+ by at least one task row.
44
+ If a row claims visual/reference fidelity, external contract alignment,
45
+ deployed/published artifact alignment, runtime target/source verification,
46
+ or responsive/multi-context behavior, include the matching proof recipe and
47
+ evidence artifact expectation in the row. Do not use code review, tests,
48
+ builds, surrogate surfaces, or related environments as recipe substitutes.
49
+ 7. Use this table shape for tasks:
50
+
51
+ ```md
52
+ | ID | Title | Description | Acceptance Criteria | User Verification | Status |
53
+ | --: | ----- | ----------- | ------------------- | ----------------- | ------ |
54
+ | 1 | <Outcome> | <What changes for the user/system?> | AC1: <observable pass/fail criteria> | <steps or command> | To Do |
55
+ ```
56
+
57
+ 8. Keep each table row on one physical line. Use `<br>` for multiple items
58
+ inside a cell and escape literal `|` characters.
59
+ 9. Include validation steps for each phase.
60
+ 10. Move to `Analysing`, write the plan, then run `project-clarify` as a post-plan consistency pass.
61
+ 11. Run `./.project-workflow/cli/workflow task ready --id <TASK-ID>` and fix repo-gatherable
62
+ gaps. If it passes, move to `Ready` and continue inside the approved envelope. `Plan Confirmed`
63
+ remains legacy-compatible; explicit human plan review is optional for requested or exceptional
64
+ high-risk plans, not the default checkpoint.
65
+ 12. Return to the owner if the plan exposes material scope drift, a new product decision,
66
+ exceptional authority, or changed proof obligations/artifact identity.
67
+ 13. Include QA/code review as the required gate after implementation validation
68
+ and before completion.
69
+ 14. Do not implement code during planning.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: project-qa-review
3
+ description: Use after implementation validation to run the QA and code review gate before a project-workflow task is completed.
4
+ ---
5
+
6
+ # Project QA & Code Review
7
+
8
+ Run the post-implementation quality gate for a project-workflow task.
9
+
10
+ ## Invocation Rules
11
+
12
+ - Use this skill whenever the user asks for QA, review, code review, verification, release readiness, or completion approval for a project-workflow task.
13
+ - Read `AGENTS.md` and `.project-workflow/guidance.md` if present, then follow the project-workflow managed block and CLI requirements.
14
+ - If implementation has not reached `Testing`, use `project-implement` first.
15
+ - QA/code review is a document and validation workflow unless the CLI adds an explicit review command.
16
+
17
+ ## Required Files
18
+
19
+ - `.project-workflow/tasks/<TASK>/REQUIREMENTS.md`
20
+ - `.project-workflow/tasks/<TASK>/IMPLEMENTATION.md`
21
+ - `.project-workflow/TRACKER.md`
22
+ - Repo instruction files such as `AGENTS.md` or `.github/copilot-instructions.md`
23
+
24
+ ## Workflow
25
+
26
+ 1. Infer the task ID from the user prompt or current branch if possible. Ask only if it cannot be inferred.
27
+ 2. Read requirements, implementation notes, tracker status, and the current diff before reviewing.
28
+ 3. Confirm the task or work item is in `Testing`. If not, stop and route to `project-implement`.
29
+ 4. Run `./.project-workflow/cli/workflow task status --id <TASK-ID> --to Review` before review work begins.
30
+ 5. Map every relevant acceptance criterion ID to validation evidence.
31
+ 6. If requirements or claims trigger a proof recipe, verify child-local `EVIDENCE.json` has passing structured claim records. QA prose cannot satisfy recipe-triggered visual/reference fidelity, external contract alignment, deployed artifact alignment, runtime target/source, or responsive visual behavior claims.
32
+ 7. Run any missing narrow validation needed to support the review. Do not ask the user to manually test behavior that the agent can validate directly with available commands, tests, scripts, or local tools.
33
+ 8. Review the changed code for correctness, scope control, maintainability, edge cases, tests, docs, security, permissions, privacy, data integrity, and operational risk.
34
+ 9. Record results in `IMPLEMENTATION.md` under `## QA & Code Review` with date, reviewed areas, validation evidence, findings, and verdict. Clearly separate verified evidence from deferred setup, owner-only actions, unavailable connector/OAuth checks, and invalid substitutes.
35
+ 10. Run `./.project-workflow/cli/workflow doctor` and include any workflow-state warnings or errors in the review output.
36
+ 11. If findings exist, report them first with severity and file references. Keep status as `Review` or set `Blocked` for release-blocking issues.
37
+ 12. If review passes, say so. Run `./.project-workflow/cli/workflow task status --id <TASK-ID> --to Complete` only when the user explicitly asks to complete the task after review.
38
+ 13. After completion, route to `project-retro`.
39
+
40
+ ## Verdicts
41
+
42
+ - `Pass`: no blocking findings and validation evidence covers the acceptance criteria by AC ID.
43
+ - `Pass with follow-ups`: safe to complete, but separate follow-up work is recommended.
44
+ - `Changes requested`: completion is blocked until findings are addressed.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: project-requirements
3
+ description: Use when drafting or updating project-workflow REQUIREMENTS.md with user story, scope, acceptance criteria, decisions, and open questions.
4
+ ---
5
+
6
+ # Project Requirements
7
+
8
+ Capture what is being built before planning or coding.
9
+
10
+ Project Workflow is owner-directed and agent-operated. The owner provides product context and decisions conversationally; the agent extracts them into workflow artifacts and asks focused questions only when needed.
11
+
12
+ Requirements capture must end with one explicit owner confirmation of requirements and acceptance
13
+ criteria before planning. Record that authority with `task approve-requirements` or
14
+ `epic approve-requirements` after confirmation. Do not treat an agent draft, silence, or
15
+ implementation request as approval. After approval, normally continue autonomously through
16
+ Planner, post-plan Clarify, `task ready`, and `Ready`; pause only for material drift, exceptional
17
+ authority, requested/high-risk plan review, or an explicit setup-only boundary.
18
+
19
+ ## Invocation Rules
20
+
21
+ - Use this skill whenever the user asks for requirements, scope, acceptance criteria, open questions, decisions, or a validation plan, even if they ask in natural language.
22
+ - Read `AGENTS.md` and `.project-workflow/guidance.md` if present, then follow the project-workflow managed block and CLI requirements.
23
+ - If the task folder does not exist, use `project-task` first so the CLI creates the required files and tracker row.
24
+ - After the task exists, requirements capture is a document workflow unless the CLI adds an explicit requirements command.
25
+
26
+ ## Required Files
27
+
28
+ - `.project-workflow/tasks/<TASK>/REQUIREMENTS.md`
29
+ - `.project-workflow/tasks/<TASK>/IMPLEMENTATION.md`
30
+ - `.project-workflow/CONSTITUTION.md` if present
31
+ - `.github/copilot-instructions.md` or `AGENTS.md` if present
32
+
33
+ ## Workflow
34
+
35
+ 1. Identify the task folder. If it does not exist, use `project-task` first.
36
+ 2. Read existing `REQUIREMENTS.md` and the `## User Story` section of `IMPLEMENTATION.md`.
37
+ 3. If the feature or bugfix is not clear, ask only for discovery context: what change, where in the product, who is affected, and what success looks like.
38
+ Minimum context should cover problem/opportunity, desired outcome, affected user or system, scope boundaries, acceptance signal, constraints, priority/risk, and examples or failure modes.
39
+ 4. Draft or update `REQUIREMENTS.md` with:
40
+ - Overview
41
+ - User Story
42
+ - Goal
43
+ - Non-Goals
44
+ - Users & Context
45
+ - Outcome-focused requirements
46
+ - Verifiable acceptance criteria with stable IDs (`AC1`, `AC2`, etc.)
47
+ - Open questions
48
+ - Resolved decisions
49
+ - Validation plan
50
+ 5. Preserve existing AC IDs when requirements change. Do not renumber existing
51
+ ACs unless the user explicitly approves the requirements change.
52
+ 6. If requirements mention matching a visual/reference, deployed/runtime behavior, external contract, or responsive/multi-context behavior, record the relevant proof recipe, artifact identity, and invalid substitutes in the validation plan.
53
+ 7. Keep only the `## User Story` section in `IMPLEMENTATION.md` synced with `REQUIREMENTS.md`. Do not add implementation tasks here.
54
+ 8. If critical requirements are ambiguous, record them as open questions in `REQUIREMENTS.md`, then ask the user the minimum questions needed.
55
+ 9. Do not proceed to planning or implementation until open questions are resolved or explicitly accepted as risks and recorded.
56
+ 10. After requirements and ACs are complete, ask the owner to confirm that exact requirements/AC envelope once, then record approval with the workflow CLI. Downstream work inside that unchanged envelope should not ask for repeated approval.
57
+ 11. After approval, move to `Analysing`, run `project-planner`, run a post-plan
58
+ `project-clarify` pass, validate with `task ready`, and move to `Ready` without another generic
59
+ approval request.
60
+ 12. If the work is intentionally exploratory, record it as discovery with a question, decision enabled, boundary, output artifact, and validation signal.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: project-retro
3
+ description: Use after a project-workflow task is complete to update durable conventions, agent guidance, and follow-up tasks.
4
+ ---
5
+
6
+ # Project Retro
7
+
8
+ Run the post-completion retro for a project-workflow task.
9
+
10
+ ## Invocation Rules
11
+
12
+ - Use this skill whenever the user asks for a retro, retrospective, lessons learned, convention updates, agent updates, prompt updates, or post-completion cleanup for a project-workflow task.
13
+ - Read `AGENTS.md` and `.project-workflow/guidance.md` if present, then follow the project-workflow managed block and CLI requirements.
14
+ - Only run after QA/code review has passed and the task is marked `Complete`.
15
+ - Retro is a maintenance workflow unless the CLI adds an explicit retro command.
16
+
17
+ ## Required Files
18
+
19
+ - `.project-workflow/tasks/<TASK>/REQUIREMENTS.md`
20
+ - `.project-workflow/tasks/<TASK>/IMPLEMENTATION.md`
21
+ - `.project-workflow/TRACKER.md`
22
+ - Repo instruction files and agent assets such as `AGENTS.md`, `.github/copilot-instructions.md`, `.github/prompts/`, `.agents/skills/`, and `.cursor/rules/` when present
23
+
24
+ ## Workflow
25
+
26
+ 1. Infer the task ID from the user prompt or current branch if possible. Ask only if it cannot be inferred.
27
+ 2. Read the completed task docs, QA/code review notes, tracker row, final diff, and repo guidance.
28
+ 3. Confirm the task is `Complete`. If not, stop and route to `project-qa-review`.
29
+ 4. Identify reusable lessons:
30
+ - repo conventions or coding patterns that should be documented
31
+ - validation or QA checks that should become standard
32
+ - agent prompt, skill, or rule gaps that caused drift or rework
33
+ - follow-up work that should become a separate task
34
+ - missed in-scope work that should have blocked completion unless explicitly deferred
35
+ 5. Update the narrowest durable guidance file that owns each lesson. Do not add one-off task details to global instructions.
36
+ 6. Record the retro in `IMPLEMENTATION.md` under `## Retro` with date, lessons, updated assets, follow-up suggestions, and a separate note for any missed in-scope work.
37
+ 7. Leave tracker status as `Complete` unless the user explicitly asks to reopen the task.
38
+
39
+ ## Placement Rules
40
+
41
+ - Product outcome changes belong in `.project-workflow/CONSTITUTION.md`.
42
+ - Technical workflow conventions belong in `.project-workflow/guidance.md`, or the narrowest equivalent repo guidance file.
43
+ - Copilot workflow behavior belongs in `.github/prompts/*.prompt.md`.
44
+ - Codex workflow behavior belongs in `.agents/skills/project-*/SKILL.md`.
45
+ - Cursor workflow behavior belongs in `.cursor/rules/project-workflow.mdc`.
46
+ - Packaged project-workflow behavior belongs in `src/project_workflow/**` when working in this repository.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: project-smoke-bomb
3
+ description: Use when preparing a sanitized client ZIP from an agency-owned project-workflow repository.
4
+ ---
5
+
6
+ <!-- project-workflow:generated -->
7
+
8
+ # Project Smoke Bomb
9
+
10
+ Prepare a deliberate client handoff without transferring agency-only workflow state or stripping the project of useful human and agent context.
11
+
12
+ ## Invocation Rules
13
+
14
+ - Use this skill when the user asks for a Smoke Bomb, sanitized client handoff, clean client ZIP, or removal of project-workflow from a delivery copy.
15
+ - Read `AGENTS.md`, `.project-workflow/guidance.md`, `README.md`, the active task state, and repository-specific delivery instructions before preparing the handoff.
16
+ - Use the canonical `project smoke-bomb` command for planning, mutation, validation, and export. Do not imitate it with broad deletion commands or an unconstrained ZIP operation.
17
+
18
+ ## Workflow
19
+
20
+ 1. Confirm the agency-owned repository is authoritative and identify the exact client, intended client agent targets, and ZIP output path.
21
+ 2. Recommend a disposable branch such as `smoke-bomb/<client-or-handoff>`. Branch creation, commits, pushes, and deletion remain normal user-controlled Git operations; do not force them inside Smoke Bomb.
22
+ 3. Review and prepare client-facing context before cleanup:
23
+ - keep a substantive `README.md` with purpose, setup, architecture pointers, validation, and delivery guidance;
24
+ - retain substantive user-authored `AGENTS.md` content outside the project-workflow managed block, or place verified repository guidance in `.project-workflow/guidance.md` so the command can produce the canonical client agent guide;
25
+ - choose only the client agent targets actually needed: `codex`, `claude-code`, `cursor`, or `github-copilot`;
26
+ - identify explicit non-interactive validation commands; never invent a command or claim undocumented architecture.
27
+ 4. Commit or otherwise clean the dedicated worktree before planning. Smoke Bomb refuses dirty worktrees so the reviewed plan has an exact source state.
28
+ 5. Run a non-mutating plan, preferably JSON for automation:
29
+
30
+ ```bash
31
+ project smoke-bomb \
32
+ --client-agent codex \
33
+ --validation-command "<reviewed command>" \
34
+ --output "<path outside the repository>/client-handoff.zip" \
35
+ --plan --format json
36
+ ```
37
+
38
+ 6. Review repository and branch identity, every delete/replace/create action, ownership evidence, README and agent targets, validation commands, exclusions, blockers, warnings, and the plan fingerprint.
39
+ 7. Resolve every blocker in the source branch and regenerate the plan. Never bypass an ambiguous ownership, secret-like path, unsafe file type, missing guidance, dirty state, or residual project-workflow reference finding.
40
+ 8. Apply only the exact reviewed plan. Authorized non-interactive agents add `--yes`; human invocation confirms interactively:
41
+
42
+ ```bash
43
+ project smoke-bomb \
44
+ --client-agent codex \
45
+ --validation-command "<reviewed command>" \
46
+ --output "<path outside the repository>/client-handoff.zip" \
47
+ --apply --plan-fingerprint <SHA256> --yes --format json
48
+ ```
49
+
50
+ 9. Verify the result reports `exported`, all reviewed validations passed, the ZIP path and SHA-256 are present, the inventory contains no `.git` or `.project-workflow`, and the intended README and client-agent instructions are included.
51
+ 10. Hand over the ZIP and its SHA-256. Keep the agency repository and normal branches intact; the client may initialize its own repository from the snapshot.
52
+
53
+ ## Guardrails
54
+
55
+ - Smoke Bomb is not a secret scanner, legal review, license audit, or proof that every file is client-appropriate. Resolve those responsibilities separately before handoff.
56
+ - Do not hand over the agency Git repository or history when the agreed deliverable is the sanitized ZIP.
57
+ - Do not treat the absence of the string `project-workflow` as sufficient proof; rely on the reviewed action inventory, exact Git-visible archive inventory, validation results, and client guidance checks.
58
+ - If validation fails, no ZIP is produced. Inspect the failure and the branch diff before deciding whether to restore, amend, or rerun.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: project-task
3
+ description: Use when creating a new project-workflow task folder, tracker row, and optional branch for a feature or bugfix.
4
+ ---
5
+
6
+ # Project Task
7
+
8
+ Create the minimal workflow artifacts for one new task.
9
+
10
+ Project Workflow is owner-directed and agent-operated: the owner provides product context and decisions conversationally, while the agent runs commands and records workflow state.
11
+
12
+ Task creation is only scaffolding. Requirements and ACs still need one explicit owner confirmation
13
+ before planning; record that confirmation with `task approve-requirements` after requirements are
14
+ ready. The agent then normally plans, clarifies, validates readiness, and moves to `Ready`
15
+ autonomously. Do not repeatedly ask for approval inside the unchanged envelope.
16
+
17
+ ## Invocation Rules
18
+
19
+ - Use this skill whenever the user asks to create a project-workflow task, story, feature folder, tracker row, or new tracked work item, even if they ask in natural language.
20
+ - Read `AGENTS.md` and `.project-workflow/guidance.md` if present, then follow the project-workflow managed block and CLI requirements.
21
+ - The local workflow CLI is mandatory for supported task scaffold operations. Do not manually create task folders, starter files, or tracker rows when the CLI command is available.
22
+ - If another project-workflow skill needs a task folder that does not exist, route through this skill first.
23
+
24
+ ## Inputs
25
+
26
+ Determine these from the user prompt, current branch, or follow-up questions:
27
+
28
+ - Task title, such as `Account Usage Export`
29
+ - Whether to create a branch
30
+ - If creating a branch: base branch, default `develop`, and branch prefix, default `feature/`
31
+
32
+ Minimum context to gather before planning or implementation:
33
+
34
+ - Problem or opportunity
35
+ - Desired outcome
36
+ - Affected user, actor, or system
37
+ - Scope boundaries and non-goals
38
+ - Acceptance signal for done
39
+ - Constraints, priority/risk, and examples or failure modes
40
+
41
+ ## Workflow
42
+
43
+ 1. Confirm `.project-workflow/TRACKER.md` exists. If missing, tell the user to run `project init` first.
44
+ 2. If creating a branch, ensure the working tree is clean before switching branches.
45
+ 3. Run the local scaffolder from the repo root and let it assign the next ID.
46
+ Repositories may choose task ID namespaces and ID generation in
47
+ `.project-workflow/config.json`; pass `--prefix <PREFIX>` only when the user
48
+ or repo guidance calls for a configured non-default prefix.
49
+
50
+ Without branch:
51
+
52
+ ```bash
53
+ ./.project-workflow/cli/workflow task init --title "<TITLE>" --update-tracker
54
+ ```
55
+
56
+ Configured prefix:
57
+
58
+ ```bash
59
+ ./.project-workflow/cli/workflow task init --prefix <PREFIX> --title "<TITLE>" --update-tracker
60
+ ```
61
+
62
+ With branch:
63
+
64
+ ```bash
65
+ ./.project-workflow/cli/workflow task init --title "<TITLE>" --update-tracker --create-branch --base-branch <BASE> --branch-prefix <PREFIX>
66
+ ```
67
+
68
+ 4. Run `./.project-workflow/cli/workflow doctor` and report any workflow-state warnings or errors.
69
+ 5. Report the created task folder, assigned task ID, tracker update, and branch name if one was created.
70
+ 6. Continue to requirements capture when the user is ready, then proceed through owner
71
+ confirmation, `task approve-requirements`, planning, post-plan clarification, `task ready`,
72
+ `Ready`, implementation, QA/code review, and retro. Pause after scaffolding only when the user
73
+ explicitly requested setup/review-only work.
@@ -0,0 +1,75 @@
1
+ ---
2
+ description: Project Workflow for routing, Fix/task/epic scaffolding, requirements authority, planning, implementation, QA, and validation.
3
+ globs:
4
+ alwaysApply: true
5
+ ---
6
+
7
+ # Project Workflow
8
+
9
+ This repository uses project-workflow for spec-driven development. Keep workflow artifacts in `.project-workflow/` as the shared source of truth, and read `.project-workflow/guidance.md` for repo-specific workflow guidance when present.
10
+
11
+ Project Workflow is owner-directed and agent-operated. The owner supplies product context, constraints, examples, decisions, and approvals; the agent runs commands, drafts artifacts, asks targeted questions, validates readiness, implements, reviews, and records evidence.
12
+
13
+ ## Workflow Order
14
+
15
+ 1. Constitution: establish or update `.project-workflow/CONSTITUTION.md` for product outcomes.
16
+ 2. Backlog: optionally capture future intent in `.project-workflow/BACKLOG.md` before it becomes committed task or epic workflow state.
17
+ 3. Route: keep in-scope corrections in active work; use one lightweight Fix for a bounded
18
+ post-completion correction, a Task for a new outcome/multiple independent items, and an Epic for
19
+ coordinated workstreams. The agent recommends the route from evidence; the user's label is not
20
+ binding.
21
+ 4. Requirements: capture the task outcome, scope, acceptance criteria, decisions, and validation.
22
+ 5. Owner approval: record the requirements/AC envelope before planning with
23
+ `task approve-requirements` or `epic approve-requirements`.
24
+ 6. Planner: autonomously turn the approved envelope into testable work items.
25
+ 7. Clarify: run a post-plan consistency pass; return to the owner only for material drift.
26
+ 8. Ready: run `task ready` and move new tasks to `Ready`; `Plan Confirmed` is legacy-compatible.
27
+ 9. Implement: make the smallest scoped change, validate it, and move it to testing.
28
+ 10. QA & Code Review: independently verify acceptance criteria and review code before completion.
29
+ 11. Retro: after completion, record reusable lessons or follow-up work when present.
30
+
31
+ ## Cursor Usage
32
+
33
+ - Read `.project-workflow/guidance.md` before changing workflow state when the file exists.
34
+ - Use `.project-workflow/BACKLOG.md` for future intent, rough priority, options, and promotion history. Backlog is optional; direct task/epic creation is still valid for clear immediate work.
35
+ - For broad future objectives, draft outcome-focused backlog candidates from project context and ask for owner review before accepting or promoting rows.
36
+ - Promoted rows remain in the backlog with `Promoted To` pointing at the created task or epic ID. Active execution status belongs only in `.project-workflow/TRACKER.md`, epic trackers, and task/epic docs.
37
+ - Existing roadmap/backlog documents outside `.project-workflow/BACKLOG.md` are preserved. Do not import or transform them automatically; create a repo-local migration task if needed.
38
+ - Read `.project-workflow/config.json` for repo-owned task ID namespaces, ID generation, and accepted doctor warning fingerprints when it exists. Sequential IDs look like `TASK-001`; unique IDs keep the prefix and use a 5-character base36 suffix by default, such as `WF-K7F3Q`.
39
+ - Do not report accepted doctor warnings as active issues after `doctor` hides them. Use `doctor --show-accepted` only when auditing accepted workflow debt.
40
+ - If a task folder does not exist, run `./.project-workflow/cli/workflow task init --title "<TITLE>" --update-tracker` from the repo root and let the CLI assign the next configured task ID. Add `--prefix <PREFIX>` only when the user or repo guidance calls for a configured non-default prefix.
41
+ - For one bounded correction against delivered/accepted behavior, run
42
+ `./.project-workflow/cli/workflow fix init --title "<TITLE>"`. Fixes use one `FIX.md`, the shared
43
+ tasks directory, and the global tracker. Do not create a separate fixes directory/tracker.
44
+ - Read `.project-workflow/tasks/<ID>-*/REQUIREMENTS.md` before planning, implementing, reviewing, or running retro.
45
+ - Read `.project-workflow/tasks/<ID>-*/IMPLEMENTATION.md` before implementing, reviewing, or running retro for a work item.
46
+ - When planning, make every implementation task row map to one or more stable acceptance criteria IDs (`AC1`, `AC2`, etc.) from the task requirements or implementation acceptance criteria section.
47
+ - If requirements, acceptance criteria, child charters, epic contracts, or material claims trigger a proof recipe, record structured evidence in `EVIDENCE.json` and verify the referenced artifact. Visual/reference fidelity needs rendered comparison against the delivered user-facing artifact; runtime target/source proof needs the exact execution target, source/artifact under test, observation method, and positive proof that the target used that source.
48
+ - For epic-managed work, keep parent epic AC coverage visible from the epic tracker through child requirements, implementation, QA evidence, and closeout. New epic trackers use `Parent ACs`; legacy trackers may carry coverage in `Notes` as `Covers AC1, AC3`.
49
+ - Before implementation-oriented status transitions, run `task ready`, `epic ready`, or `epic ready-child` where applicable. If a gate fails, fix repo-gatherable gaps directly and ask the owner only for missing product decisions, initial requirements/AC approval, amendments, deviations, changed artifact identity, changed proof obligations, or deferrals. Do not ask for repeated approval when the work remains inside the unchanged approved envelope.
50
+ - For new tasks, owner approval comes before planning. After approval, run Planner, post-plan
51
+ Clarify, `task ready`, and move to `Ready` autonomously unless material drift or exceptional risk
52
+ requires owner input.
53
+ - For new/adopted epics, `EPIC-CONTRACT.md` and `DECOMPOSITION.md` are authority artifacts. Child rows must come from the approved decomposition plan or an `AMENDMENTS.md` record; direct tracker edits outside that authority cannot advance through gated transitions.
54
+ - The global tracker summarizes epic rows; each epic `TRACKER.md` owns child rows. Proposed child rows stay in the epic tracker until approved and scaffolded.
55
+ - Keep `.project-workflow/TRACKER.md` status aligned with the current workflow state using `./.project-workflow/cli/workflow task status --id <TASK-ID> --to <STATUS>` when the command is available.
56
+ - Do not mark a task or work item `Complete` unless implementation validation and QA/code review have passed and the user explicitly asks for completion.
57
+
58
+ ## Status Rules
59
+
60
+ - New scaffolded tasks start as `To Do`.
61
+ - Move new tasks to `Analysing` only after requirements/AC approval; move them to `Ready` after
62
+ planning, clarification, and `task ready` pass.
63
+ - Run `./.project-workflow/cli/workflow task status --id <TASK-ID> --to "In Progress"` before implementation work begins.
64
+ - Run `./.project-workflow/cli/workflow task status --id <TASK-ID> --to Testing` after implementation and validation have been run.
65
+ - Run `./.project-workflow/cli/workflow task status --id <TASK-ID> --to Review` while QA/code review is running.
66
+ - Run `./.project-workflow/cli/workflow task status --id <TASK-ID> --to Complete` only after QA/code review passes and the user explicitly requests it.
67
+ - Leave the tracker row as `Complete` during retro unless the user explicitly asks to reopen the task.
68
+
69
+ ## Validation
70
+
71
+ - Run `.project-workflow/cli/workflow doctor` when workflow state is uncertain or before continuing after tracker/task doc edits.
72
+ - Use `.project-workflow/cli/workflow doctor --strict` when safety warnings should block autonomous work.
73
+ - Keep command ownership explicit: init creates a new installation, Doctor diagnoses without mutation, and canonical UVX upgrade plans and applies managed assets and repository schema together. Existing repositories must not run init first. Use `--yes` for authorized one-command agent operation or `--plan` plus `--apply --plan-fingerprint <SHA256>` for separate automation review.
74
+ - Run the most relevant available tests, type checks, linters, or manual verification steps for the changed work.
75
+ - If broad validation fails for unrelated pre-existing reasons, run the narrowest meaningful checks and report the limitation.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: project.backlog
3
+ description: Capture, refine, validate, and promote optional project backlog items before they become task or epic workflow state.
4
+ argument-hint: action=add|list|status|update|validate|promote title="..." id=BL-001
5
+ agent: agent
6
+ ---
7
+
8
+ Use this prompt to operate the optional project backlog in `.project-workflow/BACKLOG.md`.
9
+
10
+ Reference docs:
11
+
12
+ - Repo-specific workflow guidance: [../../.project-workflow/guidance.md](../../.project-workflow/guidance.md)
13
+ - Project outcomes: [../../.project-workflow/CONSTITUTION.md](../../.project-workflow/CONSTITUTION.md)
14
+ - Backlog: [../../.project-workflow/BACKLOG.md](../../.project-workflow/BACKLOG.md)
15
+ - Active tracker: [../../.project-workflow/TRACKER.md](../../.project-workflow/TRACKER.md)
16
+
17
+ Inputs:
18
+
19
+ - Action: `${input:action:add|list|status|update|validate|promote}`
20
+ - Backlog ID: `${input:id:BL-001}`
21
+ - Title: `${input:title:}`
22
+ - Outcome: `${input:outcome:}`
23
+ - Type: `${input:type:Idea|Task Candidate|Epic Candidate|Discovery|Follow-Up}`
24
+ - Priority: `${input:priority:High|Medium|Low|Unset}`
25
+ - Status: `${input:status:Proposed|Accepted|Deferred|Rejected|Superseded|Promoted}`
26
+ - Promotion target: `${input:promoteTo:task|epic}`
27
+
28
+ Backlog purpose:
29
+
30
+ - `CONSTITUTION.md` records durable product outcomes and principles.
31
+ - `BACKLOG.md` records future intent, rough priority, options, and promotion history.
32
+ - `TRACKER.md` and epic trackers record committed execution lifecycle state.
33
+ - Task/epic folders record executable requirements, plans, validation evidence, QA, and retros.
34
+
35
+ Rules:
36
+
37
+ - Backlog use is optional. If work is already clear and immediate, `project.task` or `project.epic` may be used directly.
38
+ - Do not use the backlog as a second active tracker.
39
+ - `Accepted` means worth keeping or preparing; it does not mean ready to implement.
40
+ - Promoted rows stay in the backlog with status `Promoted` and `Promoted To` set to the created task or epic ID.
41
+ - Existing roadmap/backlog documents outside `.project-workflow/BACKLOG.md` must be preserved. Do not import or transform them automatically; create a repo-local migration task if needed.
42
+ - Promotion requires owner confirmation. If the owner explicitly asks to accept and promote in one operation, pass `--accept`.
43
+
44
+ Broad-objective workflow:
45
+
46
+ 1. Read project context first: `CONSTITUTION.md`, `BACKLOG.md` if present, `TRACKER.md`, active epic trackers, and `.project-workflow/guidance.md` if present.
47
+ 2. Draft one or more outcome-focused candidate rows using the canonical schema: ID, Title, Type, Priority, Status, Outcome, Promoted To, Notes.
48
+ 3. Recommend whether each candidate should remain an idea, become a task, become an epic, or require discovery.
49
+ 4. Do not create tracker rows, task folders, or epic folders while only proposing candidates.
50
+ 5. Ask for owner review before accepting rows or promoting them.
51
+ 6. If context is insufficient, ask focused questions instead of inventing strategy.
52
+
53
+ CLI operations:
54
+
55
+ - Initialize backlog if missing:
56
+
57
+ `./.project-workflow/cli/workflow backlog init`
58
+
59
+ - Add a row:
60
+
61
+ `./.project-workflow/cli/workflow backlog add --title "<TITLE>" --outcome "<OUTCOME>" --type "Idea" --priority Unset`
62
+
63
+ - List rows:
64
+
65
+ `./.project-workflow/cli/workflow backlog list`
66
+
67
+ - Update status:
68
+
69
+ `./.project-workflow/cli/workflow backlog status --id BL-001 --to Accepted`
70
+
71
+ - Update fields:
72
+
73
+ `./.project-workflow/cli/workflow backlog update --id BL-001 --priority High --notes "<NOTES>"`
74
+
75
+ - Validate backlog:
76
+
77
+ `./.project-workflow/cli/workflow backlog validate`
78
+
79
+ - Promote an accepted row:
80
+
81
+ `./.project-workflow/cli/workflow backlog promote --id BL-001 --to task`
82
+
83
+ `./.project-workflow/cli/workflow backlog promote --id BL-001 --to epic`
84
+
85
+ Output:
86
+
87
+ - Report the exact command run.
88
+ - Summarize created or updated rows.
89
+ - For promotion, report the created task or epic ID, generated files, and backlog `Promoted To` reference.
90
+ - Run `./.project-workflow/cli/workflow doctor` after promotion or structural backlog edits and report warnings/errors.