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,137 @@
1
+ ---
2
+ name: project.clarify
3
+ description: Ask the minimum set of questions needed to remove ambiguity before planning/implementing.
4
+ argument-hint: topic="..." taskId=TASK-330-Superuser
5
+ agent: agent
6
+ ---
7
+
8
+ Use this prompt when requirements, a generated plan, or repo constraints are unclear. It may run
9
+ before owner approval to resolve product questions or immediately after Planner as an autonomous
10
+ consistency pass.
11
+
12
+ Reference docs:
13
+
14
+ - Technical constraints/instructions: [../copilot-instructions.md](../copilot-instructions.md)
15
+ - Repo-specific workflow guidance: [../../.project-workflow/guidance.md](../../.project-workflow/guidance.md)
16
+ - Project outcomes: [../../.project-workflow/CONSTITUTION.md](../../.project-workflow/CONSTITUTION.md)
17
+ - User story tracker: [../../.project-workflow/TRACKER.md](../../.project-workflow/TRACKER.md)
18
+ - Canonical task docs:
19
+ - `/.project-workflow/tasks/${input:taskId}/IMPLEMENTATION.md` (must include `## User Story` at the top)
20
+ - `/.project-workflow/tasks/${input:taskId}/REQUIREMENTS.md` (source of truth for agreed outcomes/expectations)
21
+
22
+ Inputs:
23
+
24
+ - Task (optional): `${input:taskId:TASK-000-Example}`
25
+ - Topic: `${input:topic:What needs clarifying?}`
26
+
27
+ Output (Markdown):
28
+
29
+ Workflow (must follow):
30
+
31
+ 1. Read context first
32
+
33
+ - Read the `## User Story` section from `/.project-workflow/tasks/${input:taskId}/IMPLEMENTATION.md`.
34
+ - Read `/.project-workflow/tasks/${input:taskId}/REQUIREMENTS.md` (if it exists) and treat it as the source of truth for what’s already been agreed.
35
+ - Cross-check against repo constraints in `../copilot-instructions.md`, repo-specific workflow guidance in `../../.project-workflow/guidance.md`, and project outcomes in `../../.project-workflow/CONSTITUTION.md`.
36
+
37
+ Guardrail:
38
+
39
+ - If `IMPLEMENTATION.md` does not have a usable `## User Story` yet, STOP and instruct the user to run the `project.requirements` prompt first. Do not invent clarifying questions without a user story anchor.
40
+
41
+ 2. Proactively log questions BEFORE asking the user
42
+
43
+ - Identify every ambiguity/conflict that would change scope, safety, security, billing attribution, data correctness, or user-visible behavior.
44
+ - For each ambiguity, write it into `/.project-workflow/tasks/${input:taskId}/REQUIREMENTS.md` as a numbered open question (e.g. `Q1`, `Q2`, …) with 2–4 options labeled `A/B/C/...`.
45
+ - Each question must be explicitly anchored to the current user story and include a short “why it matters”.
46
+
47
+ 3. Work through questions item-by-item until resolved
48
+
49
+ - Ask the user ONE unresolved question per response (default) so decisions are made sequentially.
50
+ - If there are many low-risk questions and the user explicitly asks for batching, you may ask up to 2–3 at a time.
51
+ - After the user answers:
52
+ - Update `REQUIREMENTS.md` immediately: record the decision in a decisions log, mark the question resolved, and remove/strike it from open questions.
53
+ - Preserve existing acceptance criteria IDs (`AC1`, `AC2`, etc.). Do not renumber ACs unless the user explicitly approves that requirements change.
54
+ - Keep `IMPLEMENTATION.md` in sync with the confirmed decisions.
55
+ - Keep the `IMPLEMENTATION.md` task list in sync:
56
+ - If `IMPLEMENTATION.md` has a `## Tasks` or `## Task List` section, update it to reflect the confirmed decisions and preserve AC-to-task mappings.
57
+ - If `IMPLEMENTATION.md` does NOT yet have a `## Tasks` section, you MAY add a minimal `## Tasks` section limited to tracking clarification work (e.g., “Resolve Q1…Qn”). Do NOT invent a full implementation plan here — the `project.planner` prompt owns full task planning.
58
+ - Repeat until `REQUIREMENTS.md` has no unresolved open questions (or the user explicitly accepts remaining items as risks and that acceptance is recorded).
59
+
60
+ ## User Story (from IMPLEMENTATION.md)
61
+
62
+ -
63
+
64
+ ## Conflicts / Ambiguities Found
65
+
66
+ For each conflict/issue:
67
+
68
+ - Explain what is conflicting and why it matters.
69
+ - Propose 2–4 reasonable options (labeled A/B/C/…); each option should be actionable, realistic for this repo, and include tradeoffs.
70
+ - Ask the user to choose an option (or provide a different preference).
71
+
72
+ Example format:
73
+
74
+ ### Issue 1: <short title>
75
+
76
+ - Conflict: <what conflicts with what>
77
+ - Why it matters: <risk / impact>
78
+ - Options:
79
+ - A: <option> (pros/cons)
80
+ - B: <option> (pros/cons)
81
+ - C: <option> (pros/cons)
82
+ - Question: Which option should we take?
83
+
84
+ ## Clarifying Questions
85
+
86
+ ### Product / UX
87
+
88
+ -
89
+
90
+ ### Permissions / Security
91
+
92
+ -
93
+
94
+ ### Data / DB / RLS
95
+
96
+ -
97
+
98
+ ### Migration / Rollout
99
+
100
+ -
101
+
102
+ ### Observability
103
+
104
+ -
105
+
106
+ ## Decisions to Record in REQUIREMENTS.md
107
+
108
+ Always ensure the questions exist in `/.project-workflow/tasks/${input:taskId}/REQUIREMENTS.md` BEFORE you ask them.
109
+
110
+ If the user’s answers are present in the conversation context, document the decisions and chosen options immediately in `/.project-workflow/tasks/${input:taskId}/REQUIREMENTS.md` (including rationale/tradeoffs where relevant), and do not ask again.
111
+
112
+ If the user’s answers are not present yet:
113
+
114
+ - First, write/update `REQUIREMENTS.md` with the open questions (Q1/Q2/…) and their A/B/C options.
115
+ - Then ask the user the next single unanswered question.
116
+
117
+ Also keep the implementation tracker up to date:
118
+
119
+ - After recording each decision in `REQUIREMENTS.md`, update `/.project-workflow/tasks/${input:taskId}/IMPLEMENTATION.md` to keep BOTH:
120
+ - `## User Story` (and any decision-dependent notes) consistent with `REQUIREMENTS.md`, and
121
+ - `## Tasks` / `## Task List` consistent with the confirmed decisions, including AC-to-task mappings where a plan already exists.
122
+ - Clarify may update an existing task list (or add a minimal “clarification tracking” task list), but must not generate a full multi-phase implementation plan — Planner owns full task planning.
123
+
124
+ -
125
+
126
+ ## Suggested Defaults (if the user doesn’t care)
127
+
128
+ -
129
+
130
+ Guardrail: don't start implementation until unresolved questions are cleared (or explicitly accepted as risks) and decisions are recorded in `REQUIREMENTS.md`.
131
+
132
+ Post-plan clarification guardrail: fix implementation-detail inconsistencies inside the approved
133
+ envelope without another generic approval request. If resolution would change requirements, ACs,
134
+ proof obligations, artifact identity, or scope materially, stop, update the proposed requirements,
135
+ and return the changed envelope to the owner for review/re-approval. When no such drift remains,
136
+ run `task ready`, move the task to `Ready`, and continue autonomously if implementation was
137
+ authorized.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: project.constitution
3
+ description: Create or refine the project's outcome-focused constitution from a brief and repo context.
4
+ argument-hint: projectBrief="..." context="..."
5
+ agent: agent
6
+ ---
7
+
8
+ Use this agent to establish or update the canonical project outcomes document at `/.project-workflow/CONSTITUTION.md`.
9
+
10
+ Purpose:
11
+
12
+ - Define **what success means** for this project in user/business terms.
13
+ - Keep outcome guidance separate from implementation guidance.
14
+ - Ensure technical workflow constraints live in `/.project-workflow/guidance.md` (or repo equivalent), not in the constitution.
15
+
16
+ Inputs:
17
+
18
+ - Project brief: `${input:projectBrief:One-paragraph description of the product and intended users}`
19
+ - Optional context: `${input:context:Roadmap links, docs, constraints, notes}`
20
+
21
+ Reference docs to read first (if present):
22
+
23
+ - `README.md`
24
+ - `/.project-workflow/TRACKER.md`
25
+ - `/.project-workflow/guidance.md`
26
+ - Existing `/.project-workflow/CONSTITUTION.md`
27
+ - `/.github/copilot-instructions.md`
28
+ - Common product docs in repo root (`docs/**`, `specs/**`, `product/**`, `roadmap/**`)
29
+
30
+ Rules:
31
+
32
+ - `CONSTITUTION.md` is **not** a technical implementation doc.
33
+ - Do not put framework choices, folder structure, lint rules, or coding conventions in `CONSTITUTION.md`.
34
+ - Keep the constitution stable and outcome-focused; avoid sprint-level details.
35
+ - If repo context conflicts with user brief, ask clarifying questions before finalizing.
36
+
37
+ Workflow (must follow):
38
+
39
+ 1. Discovery + scan
40
+
41
+ - Read the files above and summarize current product intent in 5–10 bullets.
42
+ - If `projectBrief` is missing or too vague, ask the minimum questions needed to proceed.
43
+
44
+ 2. Draft or refine constitution
45
+
46
+ - Create/update `/.project-workflow/CONSTITUTION.md` using the structure below.
47
+ - Preserve useful existing content; improve clarity and remove technical directives.
48
+
49
+ 3. Validate boundaries
50
+
51
+ - Ensure each section is outcome-oriented and testable at a product level.
52
+ - Remove technical implementation instructions from constitution and point those to copilot instructions.
53
+
54
+ 4. Copilot instructions fallback
55
+
56
+ - If `/.project-workflow/guidance.md` does not exist, explicitly offer to create it.
57
+ - If the user accepts, create a minimal technical guidance file with repo conventions/tooling constraints.
58
+ - If the user declines, continue and note that technical guidance is currently missing.
59
+
60
+ Required output artifact:
61
+
62
+ - Write/update `/.project-workflow/CONSTITUTION.md`.
63
+
64
+ Use this constitution template (adapt content to project):
65
+
66
+ ```md
67
+ # Constitution
68
+
69
+ ## Mission
70
+
71
+ - <What this project exists to achieve>
72
+
73
+ ## Target Users
74
+
75
+ - <Primary users>
76
+ - <Secondary users>
77
+
78
+ ## Core Outcomes
79
+
80
+ - <Outcome 1: user/business result>
81
+ - <Outcome 2>
82
+ - <Outcome 3>
83
+
84
+ ## Non-Goals
85
+
86
+ - <Explicitly out of scope>
87
+
88
+ ## Product Principles
89
+
90
+ - <Principle 1>
91
+ - <Principle 2>
92
+ - <Principle 3>
93
+
94
+ ## Success Signals
95
+
96
+ - <How we know outcomes are being achieved>
97
+
98
+ ## Decision Filters
99
+
100
+ - <How to choose between competing options>
101
+
102
+ ## Assumptions & Risks
103
+
104
+ - <High-level assumptions and product risks>
105
+
106
+ ## Change Log
107
+
108
+ - <YYYY-MM-DD>: <summary of constitution change>
109
+ ```
110
+
111
+ Final response requirements:
112
+
113
+ - Summarize what changed in `CONSTITUTION.md`.
114
+ - Call out any unresolved product questions.
115
+ - If workflow guidance is missing, include: “I can create `/.project-workflow/guidance.md` now — proceed?”
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: project.delegate
3
+ description: Coordinate delegated work items by routing each item through project.implement.
4
+ argument-hint: taskId=TASK-330-Superuser workItems="1,2,3" mode=sequential dependencies="{}"
5
+ agent: agent
6
+ ---
7
+
8
+ Use this prompt to coordinate delegated execution for task work items.
9
+
10
+ Read `/.project-workflow/guidance.md` if present before changing workflow state.
11
+
12
+ Inputs:
13
+
14
+ - Task: `${input:taskId:TASK-000-Example}`
15
+ - Work items: `${input:workItems:1,2,3}`
16
+ - Mode: `${input:mode:sequential|parallel}`
17
+ - Dependencies: `${input:dependencies:{"2":["1"]}}`
18
+ - Worker limit: `${input:workers:4}`
19
+
20
+ Defaults:
21
+
22
+ - If `mode` is omitted, use `sequential`.
23
+ - If `mode` is `parallel` and `workers` is omitted, use `4`.
24
+
25
+ Execution contract:
26
+
27
+ - For each delegated work item, invoke `project.implement` as the execution path.
28
+ - After delegated implementation reaches `Testing`, route the completed set through `project.qa-review`; after completion, route through `project.retro`.
29
+ - Accept the provided work-item list and selected mode as the execution plan input.
30
+ - In `sequential` mode, execute exactly one work item at a time, in listed order.
31
+ - In `sequential` mode, initialize each item as `not started`, set current item to `in progress`, then mark it `completed` or `failed` before starting the next item.
32
+ - Emit a completion status line for each item before moving to the next item.
33
+ - Use the explicit dependency map provided in `dependencies` as the only prerequisite source.
34
+ - Before starting any item in `parallel` mode, validate dependency input strictly: reject unknown item IDs, self-dependencies, and cyclic dependencies.
35
+ - On dependency-validation failure, reject immediately and start no work items.
36
+ - In `parallel` mode, launch only eligible items whose prerequisites are completed.
37
+ - In `parallel` mode, allow independent eligible items to run concurrently up to the worker limit.
38
+ - Keep dependent items in `not started` until all prerequisites complete.
39
+ - On first work-item failure, enter fail-fast mode and stop launching any new pending items.
40
+ - Allow already `in progress` items to finish and report their terminal states.
41
+ - Mark any items that never started because of fail-fast as `halted` in run output.
42
+ - Final summary must clearly include overall result, failed item(s), failure cause, and halted item(s).
43
+ - End with a final aggregate summary that includes overall result and per-item terminal status.
44
+ - Preserve existing `project.*` agent behavior; do not rename or replace existing commands.
45
+
46
+ Scope note:
47
+
48
+ - This prompt defines the delegate entrypoint and routing contract only.
@@ -0,0 +1,210 @@
1
+ ---
2
+ name: project.epic
3
+ description: Manage epic lifecycle (init, approval, contract, decomposition, amendment, adoption, scaffold child, status, audit, closeout).
4
+ argument-hint: action=setup|init|approve-requirements|lifecycle|decompose|amend|approve|scaffold-child|status|audit|closeout title="..." epicId=EPIC-001 id=TASK-001
5
+ agent: agent
6
+ ---
7
+
8
+ Use this prompt to run epic workflow operations through the local workflow CLI.
9
+
10
+ Read `/.project-workflow/guidance.md` if present before changing workflow state.
11
+
12
+ Inputs:
13
+
14
+ - Action: `${input:action:setup|init|ready|approve-requirements|lifecycle|decompose|amend|adopt|approve|scaffold-child|ready-child|status|audit|closeout}`
15
+ - Epic title (required for `init`): `${input:title:}`
16
+ - Epic ID (required for all non-init actions): `${input:epicId:EPIC-001}`
17
+ - Row ID (required for `approve` and `scaffold-child`): `${input:id:TASK-014}`
18
+ - Status target (required for `status`): `${input:status:Testing|Review|Complete}`
19
+ - Epic lifecycle target (required for `lifecycle`): `${input:lifecycleStatus:Analysing|Ready|In Progress|Closeout|Complete}`
20
+ - Decompose limit (optional, default 5): `${input:limit:5}`
21
+ - Decompose type (optional, default Task): `${input:type:Task}`
22
+ - Create branch for scaffold-child (optional): `${input:createBranch:no}`
23
+ - Epic branch for scaffold-child branch creation (optional, default epic/main): `${input:epicBranch:epic/main}`
24
+ - Branch prefix for scaffold-child branch creation (optional, default feature/): `${input:branchPrefix:feature/}`
25
+
26
+ Defaults and inference:
27
+
28
+ - If action is omitted, infer from provided inputs:
29
+ - `title` only -> `setup`
30
+ - `epicId` + no `id` -> `ready` then `decompose`
31
+ - `epicId` + `id` + intent to approve -> `approve`
32
+ - `epicId` + `id` + intent to scaffold -> `scaffold-child`
33
+ - `epicId` + `id` + lifecycle intent -> `status`
34
+ - `epicId` + intent to audit -> `audit`
35
+ - `epicId` + intent to close -> `closeout`
36
+ - If inference is unclear, ask one clarifying question and stop.
37
+
38
+ Required preflight for `init`:
39
+
40
+ - Never run `init` with an implicit/default title.
41
+ - If `title` is missing, empty, or still a placeholder/example value, ask exactly one clarifying question for the epic title and stop.
42
+ - If action is `init` and title is provided, echo the exact title back before executing.
43
+
44
+ Guided setup mode (`action=setup`):
45
+
46
+ - Use this as the default for new epics in chat.
47
+ - Drive the complete lifecycle so users do not miss gates:
48
+ 1. Initialize epic.
49
+ 2. Verify epic requirements are ready for decomposition.
50
+ 3. Ask the owner to confirm the drafted requirements, acceptance criteria, and authority envelope once.
51
+ 4. Record that approval with `epic approve-requirements`.
52
+ 5. Confirm `EPIC-CONTRACT.md` has concrete sources of truth, invalid substitutes, invariants, artifact targets, and proof owners.
53
+ 6. Decompose into Proposed rows and `DECOMPOSITION.md`.
54
+ 7. Approve/scaffold matching rows inside the approved decomposition plan as needed; do not ask for repeated owner approval unless the row is outside the plan or changes material scope.
55
+ - Ask at most one clarifying question at a time.
56
+ - After each completed step, explicitly state the next required step and offer to run it.
57
+
58
+ Requirements readiness gate (before `decompose`):
59
+
60
+ - Run `./.project-workflow/cli/workflow epic ready --epic-id <EPIC_ID>` before `decompose`.
61
+ - Do not run `decompose` until epic `REQUIREMENTS.md` contains concrete, non-placeholder bullets under `## Requirements` and/or `## Acceptance Criteria`.
62
+ - Acceptance criteria should use stable IDs (`AC1`, `AC2`, etc.). Preserve existing IDs; do not renumber them unless the user explicitly approves the requirements change.
63
+ - If requirements are missing/skeletal, lead the user through filling them:
64
+ - Ask focused questions to capture intended outcomes and verifiable criteria.
65
+ - Update epic `REQUIREMENTS.md` with the provided answers.
66
+ - Re-check readiness, then continue.
67
+ - If the user declines to provide requirements details, stop and explain that decomposition cannot proceed yet.
68
+
69
+ Requirements interview flow (when requirements are missing/skeletal):
70
+
71
+ - Ask exactly one question at a time and wait for the answer before continuing.
72
+ - Offer two input modes: (a) step-by-step answers, or (b) one pasted requirements/PRD block.
73
+ - If the user provides a large pasted block, treat it as preferred epic input (do not force short answers first).
74
+ - Capture, then write answers into epic `REQUIREMENTS.md` using these prompts in order:
75
+ 1. Goal: "What user/business outcome should this epic deliver?"
76
+ 2. Scope boundaries: "What is explicitly out of scope for this epic?"
77
+ 3. Requirements bullets: "List 3-7 outcome-focused requirements as bullets."
78
+ 4. Acceptance bullets: "List 3-7 verifiable acceptance criteria as bullets."
79
+ 5. Open questions: "What unknowns still need decisions?"
80
+ - Normalize answers into concise bullet points and replace placeholder lines like `- ____` in matching sections.
81
+ - Prefix acceptance criteria with stable IDs when writing them, for example `- AC1: <verifiable outcome>`.
82
+ - For pasted blocks, extract and map content into sections:
83
+ - Product outcome/business goal -> `## Goal`
84
+ - Platform/UX behavior statements -> `## Requirements (Outcome-Focused)`
85
+ - Testable "As a user..." or acceptance statements -> `## Acceptance Criteria (Verifiable)`
86
+ - Unknowns/dependencies/API notes -> `## Open Questions (Answer Needed)`
87
+ - Keep source fidelity: preserve critical terms, links, and proper nouns from the pasted text.
88
+ - If the pasted block includes desktop/mobile/backend variants, keep those distinctions explicit in the normalized bullets.
89
+ - Read back the drafted `## Requirements` and `## Acceptance Criteria` bullets and ask for confirmation before decomposition.
90
+ - Only proceed after the owner confirms the drafted requirements and acceptance criteria, then record that confirmation with `epic approve-requirements`.
91
+ - If requirements, acceptance criteria, `EPIC-CONTRACT.md`, or `DECOMPOSITION.md` materially change after approval, re-run the relevant gate and seek owner confirmation only for the changed authority envelope.
92
+
93
+ Readiness minimums for decomposition:
94
+
95
+ - `## Requirements` has at least 3 non-placeholder bullet items, or `## Acceptance Criteria` has at least 3 non-placeholder bullet items.
96
+ - At least one acceptance bullet is objectively testable (contains a measurable or observable outcome).
97
+ - `EPIC-CONTRACT.md` has non-placeholder sources of truth, invalid substitutes, invariants, artifact targets, and proof owners before decomposition or child lifecycle movement.
98
+
99
+ Execution:
100
+
101
+ - Run from repo root using the local workflow script:
102
+
103
+ `./.project-workflow/cli/workflow epic <subcommand> ...`
104
+
105
+ - Action mappings:
106
+ - `setup` (orchestrated flow):
107
+
108
+ `./.project-workflow/cli/workflow epic init --title "<TITLE>"`
109
+
110
+ `./.project-workflow/cli/workflow epic approve-requirements --epic-id <EPIC_ID> --approved-by "<OWNER>" --source "<OWNER CONFIRMATION SOURCE>"`
111
+
112
+ `./.project-workflow/cli/workflow epic decompose --epic-id <EPIC_ID> --limit <LIMIT> --type <TYPE>`
113
+
114
+ When `.project-workflow/config.json` defines multiple task namespaces,
115
+ decomposition classifies each proposed child row with `prefix_guidance` by
116
+ default. Use `--prefix <PREFIX>` only when intentionally forcing every proposed
117
+ child row into one configured namespace.
118
+
119
+ `./.project-workflow/cli/workflow epic approve --epic-id <EPIC_ID> --id <ROW_ID>` (one or more user-selected rows)
120
+
121
+ `./.project-workflow/cli/workflow epic scaffold-child --epic-id <EPIC_ID> --id <ROW_ID> [--create-branch --epic-branch <EPIC_BRANCH> --branch-prefix <PREFIX>]` (optional)
122
+
123
+ - `init`:
124
+
125
+ `./.project-workflow/cli/workflow epic init --title "<TITLE>"`
126
+
127
+ - `decompose`:
128
+
129
+ `./.project-workflow/cli/workflow epic decompose --epic-id <EPIC_ID> --limit <LIMIT> --type <TYPE>`
130
+
131
+ - `approve-requirements`:
132
+
133
+ `./.project-workflow/cli/workflow epic approve-requirements --epic-id <EPIC_ID> --approved-by "<OWNER>" --source "<OWNER CONFIRMATION SOURCE>"`
134
+
135
+ - `amend`:
136
+
137
+ `./.project-workflow/cli/workflow epic amend --epic-id <EPIC_ID> --id <ROW_ID> --title "<TITLE>" --parent-acs "<AC1, AC2>" --reason "<OWNER-APPROVED REASON>"`
138
+
139
+ - `adopt`:
140
+
141
+ `./.project-workflow/cli/workflow epic adopt --epic-id <EPIC_ID> --approved-by "<OWNER>" --source "<ADOPTION SOURCE>"`
142
+
143
+ - `ready`:
144
+
145
+ `./.project-workflow/cli/workflow epic ready --epic-id <EPIC_ID>`
146
+
147
+ - `lifecycle`:
148
+
149
+ `./.project-workflow/cli/workflow epic lifecycle --epic-id <EPIC_ID> --to <LIFECYCLE_STATUS>`
150
+
151
+ - `approve`:
152
+
153
+ `./.project-workflow/cli/workflow epic approve --epic-id <EPIC_ID> --id <ROW_ID>`
154
+
155
+ - `scaffold-child` without branch:
156
+
157
+ `./.project-workflow/cli/workflow epic scaffold-child --epic-id <EPIC_ID> --id <ROW_ID>`
158
+
159
+ - `scaffold-child` with branch:
160
+
161
+ `./.project-workflow/cli/workflow epic scaffold-child --epic-id <EPIC_ID> --id <ROW_ID> --create-branch --epic-branch <EPIC_BRANCH> --branch-prefix <PREFIX>`
162
+
163
+ - `ready-child`:
164
+
165
+ `./.project-workflow/cli/workflow epic ready-child --epic-id <EPIC_ID> --id <ROW_ID>`
166
+
167
+ - `status`:
168
+
169
+ `./.project-workflow/cli/workflow epic status --epic-id <EPIC_ID> --id <ROW_ID> --to <STATUS>`
170
+
171
+ - `audit`:
172
+
173
+ `./.project-workflow/cli/workflow epic audit --epic-id <EPIC_ID>`
174
+
175
+ - `closeout`:
176
+
177
+ `./.project-workflow/cli/workflow epic closeout --epic-id <EPIC_ID> [--complete]`
178
+
179
+ Constraints to enforce in responses:
180
+
181
+ - Requirements/AC approval is an authority envelope, not a recurring ceremony. Ask the owner to confirm requirements and ACs once before decomposition or implementation; after that, use gates to detect drift and ask again only for material changes, amendments, deviations, artifact identity changes, proof-obligation changes, or deferrals.
182
+ - New/adopted epics require non-placeholder `EPIC-CONTRACT.md` before decomposition, child approval/scaffolding, or `In Progress`.
183
+ - `DECOMPOSITION.md` is the child-row authority source. Matching rows inside it may be approved/scaffolded by the agent without repeated owner approval; rows outside it require `epic amend`.
184
+ - For pre-existing epics, use `epic adopt`; inferred legacy evidence is not trusted for closeout until refreshed.
185
+ - Proof recipes triggered by requirements, ACs, contracts, child charters, or material claims require child-local `EVIDENCE.json`. QA prose, code review, tests, build output, surrogate artifacts, and wrong target/source pairs are invalid substitutes where the recipe says so.
186
+ - Visual/reference-fidelity work requires calibration before implementation and delivered-artifact comparison before Review/Complete.
187
+ - Decomposition is proposal-first: it writes Proposed rows and does not scaffold child folders.
188
+ - `ACCEPTANCE-MAP.md` is the in-progress parent AC coverage view. It is created on `epic init` and refreshed by epic lifecycle commands from requirements, tracker rows, deferrals, and child evidence.
189
+ - Proposed child rows should preserve source AC IDs in the epic tracker `Parent ACs` field when they come from numbered acceptance criteria. Legacy trackers may still carry coverage in `Notes` as `Covers AC1, AC3`.
190
+ - Proposed child rows should preserve configured task prefixes such as `UI`, `MCP`, `DEV`, or `WF`, and their `Notes` should include prefix classification rationale.
191
+ - Scaffolded epic child tasks must carry parent AC coverage and parent AC evidence sections forward into their docs. Their `IMPLEMENTATION.md` planning table must map each row to child AC IDs while keeping the parent AC mapping visible.
192
+ - The global tracker summarizes epic rows; the epic tracker owns child rows. Proposed child rows must stay in the epic tracker and must not be added to the global tracker.
193
+ - `epic audit` writes `ACCEPTANCE-AUDIT.md` with parent AC coverage, child evidence, deferrals, and verdicts. The audit is the closeout evidence artifact; `ACCEPTANCE-MAP.md` is the working coverage map.
194
+ - `epic closeout` must block if any parent AC is unmapped, lacks evidence, lacks a QA pass verdict, lacks an approved deferral with follow-up, or if `RETRO.md` is missing/incomplete.
195
+ - Before closeout, ensure `RETRO.md` records lessons, follow-up tasks, deferrals, and missed in-scope work. Use explicit `None.` entries when a section has nothing to report.
196
+ - `epic status --to Complete` must block unless the child row is in `Review` and its docs contain QA/code-review evidence plus parent AC evidence for its assigned parent ACs.
197
+ - `epic ready-child` must pass before implementation/testing for an epic child; if it fails, remediate missing child requirements, planning, parent AC coverage, or owner decisions before coding.
198
+ - `epic lifecycle` updates the global epic row through `Analysing`, `Ready`, `In Progress`, and `Closeout`. `Ready`, `In Progress`, and `Closeout` are gated; `Complete` remains owned by `epic closeout --complete`.
199
+ - Approval gate: only Approved rows may be scaffolded.
200
+ - Child task IDs remain globally unique within their configured prefix namespaces and are managed by workflow behavior.
201
+ - If branch creation is requested for `scaffold-child`, the epic branch must already exist; no fallback branch is allowed.
202
+ - In setup mode, do not skip required gates even if the user asks for later steps first; explain what is missing, satisfy the gate, then continue.
203
+
204
+ Output to user:
205
+
206
+ - Report the exact command run (for setup mode, report each command in order).
207
+ - Summarize resulting epic/task ID, files/folders created, tracker updates, and branch result (if any).
208
+ - Run `./.project-workflow/cli/workflow doctor` after epic tracker or child scaffold changes and report any warnings or errors.
209
+ - If command fails, return the error and the next remediation step from the error message.
210
+ - In setup mode, also include a short checklist of completed steps and the single next recommended action.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: project.fix
3
+ description: Route and manage a bounded post-completion correction as a lightweight Fix.
4
+ argument-hint: title="..." relatedWork="TASK-001 or Not identified"
5
+ agent: agent
6
+ ---
7
+
8
+ # Fix
9
+
10
+ Use a Fix for one bounded correction against a delivered or accepted baseline. A Fix is a
11
+ lightweight work-item subtype in the same `.project-workflow/tasks/` directory and global
12
+ `TRACKER.md` as tasks and epics; it is not a separate tracking system.
13
+
14
+ ## Route before scaffolding
15
+
16
+ The agent owns the initial recommendation. The user's label is useful evidence but is not
17
+ binding.
18
+
19
+ - Keep an in-scope correction inside an active task or epic child.
20
+ - Use a Fix for one bounded defect, regression, change request, or incident against delivered
21
+ or accepted behavior.
22
+ - Use a Task when the request creates a new outcome, requires material product decisions or
23
+ discovery, or contains multiple independent work items.
24
+ - Use an Epic when several coordinated outcomes or workstreams are required.
25
+ - State the rationale and proceed for a clear, authorized case. Ask one focused question when
26
+ the classification is genuinely ambiguous or materially changes scope/authority.
27
+
28
+ Do not reopen or rewrite completed work by default. Link it when identifiable. If finding the
29
+ origin would require disproportionate archaeology, record `Not identified` plus the delivered
30
+ baseline and report evidence.
31
+
32
+ ## Workflow
33
+
34
+ 1. Read `AGENTS.md` and `.project-workflow/guidance.md` when present.
35
+ 2. Scaffold with:
36
+
37
+ `./.project-workflow/cli/workflow fix init --title "<TITLE>"`
38
+
39
+ 3. Complete the single `FIX.md`: report/baseline, routing rationale, classification, risk,
40
+ related work, repo metadata, bounded plan, and verification plan.
41
+ 4. Classify `Type` as `Defect`, `Regression`, `Change Request`, or `Incident`. `Hotfix` is a
42
+ mode, not a fifth type.
43
+ 5. Run `fix triage --id <FIX-ID>` to validate the authority/risk packet and move to `Ready`.
44
+ A Hotfix may move directly from `To Do` to `In Progress` only after its emergency safety
45
+ packet is complete.
46
+ 6. Use `fix status` for `In Progress`, `Testing`, and `Review` transitions.
47
+ 7. Record verification/regression evidence and residual risk, then use `fix close` from Review.
48
+ Duplicate, rejected, or deferred reports may close directly to `N/A` with an explicit
49
+ disposition, decision, closer, and date instead of delivery evidence.
50
+ 8. If triage reveals a larger outcome, use `fix promote --to task|epic`; do not stretch the Fix
51
+ envelope.
52
+ 9. Run `doctor` after lifecycle changes.
53
+ 10. Do not require a retro for ordinary Fix closeout. Use retro or create an explicit follow-up
54
+ only when the Fix reveals a reusable workflow, process, quality, or prevention gap; never
55
+ reopen the completed originating work for that follow-up.
56
+
57
+ For a workspace, use canonical component identities/paths for `Primary repo` and `Repos touched`
58
+ and keep per-repo branch, PR, and evidence links in `FIX.md`. In a single repo, `.` is sufficient.