@loopflowhq/agent-pack 0.3.0 → 0.5.0

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 (40) hide show
  1. package/.cursor/commands/lfq-get-ticket-context.md +4 -0
  2. package/.cursor/commands/lfq-next-best-action.md +3 -0
  3. package/.cursor/commands/lfq-start-next-best-action.md +4 -0
  4. package/.cursor/commands/lfq-start-next-phase.md +4 -0
  5. package/loopflowhq/README.md +5 -7
  6. package/loopflowhq/agent.md +77 -22
  7. package/loopflowhq/commands/get-ticket-context.md +25 -0
  8. package/loopflowhq/commands/next-best-action.md +36 -0
  9. package/loopflowhq/commands/start-next-best-action.md +53 -0
  10. package/loopflowhq/commands/start-next-phase.md +49 -0
  11. package/loopflowhq/phases/epic-close.md +25 -0
  12. package/loopflowhq/phases/{discovery.md → epic-discovery.md} +8 -4
  13. package/loopflowhq/phases/epic-implement.md +26 -0
  14. package/loopflowhq/phases/{plan.md → epic-plan.md} +7 -2
  15. package/loopflowhq/phases/{refine.md → epic-refine.md} +7 -2
  16. package/loopflowhq/phases/followup-close.md +21 -0
  17. package/loopflowhq/phases/followup-review.md +25 -0
  18. package/loopflowhq/phases/shared-close-checklist.md +15 -0
  19. package/loopflowhq/phases/shared-execution-checklist.md +33 -0
  20. package/loopflowhq/phases/shared-planning-checklist.md +17 -0
  21. package/loopflowhq/phases/story-close.md +27 -0
  22. package/loopflowhq/phases/story-implement.md +33 -0
  23. package/loopflowhq/phases/story-plan.md +35 -0
  24. package/loopflowhq/phases/story-review.md +40 -0
  25. package/loopflowhq/phases/task-close.md +20 -0
  26. package/loopflowhq/phases/task-define.md +32 -0
  27. package/loopflowhq/phases/task-implement.md +25 -0
  28. package/package.json +1 -1
  29. package/.cursor/commands/lfq01-discovery.md +0 -24
  30. package/.cursor/commands/lfq02-planning.md +0 -71
  31. package/.cursor/commands/lfq03-implementing.md +0 -25
  32. package/.cursor/commands/lfq04-review.md +0 -85
  33. package/.cursor/commands/lfq05-testing.md +0 -55
  34. package/.cursor/commands/lfq06-shipping.md +0 -61
  35. package/.cursor/commands/lfq07-learning.md +0 -22
  36. package/.cursor/commands/lfq08-adjusting.md +0 -22
  37. package/loopflowhq/phases/close.md +0 -21
  38. package/loopflowhq/phases/define.md +0 -21
  39. package/loopflowhq/phases/implement.md +0 -21
  40. package/loopflowhq/phases/review.md +0 -20
@@ -0,0 +1,4 @@
1
+ # lfq-get-ticket-context — Get ticket context
2
+
3
+ Follow `loopflowhq/commands/get-ticket-context.md`.
4
+
@@ -0,0 +1,3 @@
1
+ # lfq-next-best-action — Next best action
2
+
3
+ Follow `loopflowhq/commands/next-best-action.md`.
@@ -0,0 +1,4 @@
1
+ # lfq-start-next-best-action — Start next best action
2
+
3
+ Follow `loopflowhq/commands/start-next-best-action.md`.
4
+
@@ -0,0 +1,4 @@
1
+ # lfq-start-next-phase — Start next phase
2
+
3
+ Follow `loopflowhq/commands/start-next-phase.md`.
4
+
@@ -4,10 +4,8 @@ The canonical, prompt-ready workflow description for agents lives in `loopflowhq
4
4
 
5
5
  Phase playbooks:
6
6
 
7
- - `loopflowhq/phases/define.md`
8
- - `loopflowhq/phases/discovery.md`
9
- - `loopflowhq/phases/refine.md`
10
- - `loopflowhq/phases/plan.md`
11
- - `loopflowhq/phases/implement.md`
12
- - `loopflowhq/phases/review.md`
13
- - `loopflowhq/phases/close.md`
7
+ - Ticket type + phase files follow this pattern:
8
+ - `loopflowhq/phases/<ticket_type>-<phase>.md`
9
+ - where `<ticket_type>` is one of: `epic`, `story`, `task`, `followup`
10
+
11
+ Routing lives in `loopflowhq/agent.md`.
@@ -22,10 +22,6 @@ This file is the canonical, repo-local description of how LoopFlowHQ work. It is
22
22
 
23
23
  - `phase`: typed workflow phase (what kind of work is happening)
24
24
  - `phase_state`: progress within a phase
25
- - Legacy fields exist for compatibility:
26
- - `status` / `substate` (older workflow model)
27
-
28
- Typed workflow is the canonical model; legacy fields may still be updated for backward compatibility.
29
25
 
30
26
  ## Canonical typed workflow
31
27
 
@@ -40,18 +36,32 @@ Typed workflow is the canonical model; legacy fields may still be updated for ba
40
36
 
41
37
  - Epic: `discovery` -> `refine` -> `plan` -> `implement` -> `close`
42
38
  - Story: `plan` -> `implement` -> `review` -> `close`
43
- - Task: `define` -> `implement`
39
+ - Task: `define` -> `implement` -> `close`
44
40
  - Followup: `review` -> `close`
45
41
 
46
- See phase playbooks:
47
-
48
- - `loopflowhq/phases/define.md`
49
- - `loopflowhq/phases/discovery.md`
50
- - `loopflowhq/phases/refine.md`
51
- - `loopflowhq/phases/plan.md`
52
- - `loopflowhq/phases/implement.md`
53
- - `loopflowhq/phases/review.md`
54
- - `loopflowhq/phases/close.md`
42
+ See phase playbooks (ticket_type routed):
43
+
44
+ - Pattern: `loopflowhq/phases/<ticket_type>-<phase>.md`
45
+ - Ticket types: `epic`, `story`, `task`, `followup`
46
+ - Routing table:
47
+ - Epic:
48
+ - discovery: `loopflowhq/phases/epic-discovery.md`
49
+ - refine: `loopflowhq/phases/epic-refine.md`
50
+ - plan: `loopflowhq/phases/epic-plan.md`
51
+ - implement: `loopflowhq/phases/epic-implement.md`
52
+ - close: `loopflowhq/phases/epic-close.md`
53
+ - Story:
54
+ - plan: `loopflowhq/phases/story-plan.md`
55
+ - implement: `loopflowhq/phases/story-implement.md`
56
+ - review: `loopflowhq/phases/story-review.md`
57
+ - close: `loopflowhq/phases/story-close.md`
58
+ - Task:
59
+ - define: `loopflowhq/phases/task-define.md`
60
+ - implement: `loopflowhq/phases/task-implement.md`
61
+ - close: `loopflowhq/phases/task-close.md`
62
+ - Followup:
63
+ - review: `loopflowhq/phases/followup-review.md`
64
+ - close: `loopflowhq/phases/followup-close.md`
55
65
 
56
66
  ## Transition rules (typed workflow)
57
67
 
@@ -59,6 +69,11 @@ Within a phase, the normal progression is:
59
69
 
60
70
  - `ready` -> `in_progress` -> `done`
61
71
 
72
+ Agents should explicitly move the ticket as work starts and ends:
73
+
74
+ - At the beginning of phase execution: set `phase_state=in_progress`
75
+ - At the end of phase execution: set `phase_state=done`
76
+
62
77
  When feedback fails a gate in the current phase:
63
78
 
64
79
  - `in_progress` -> `changes_requested` (or directly set `changes_requested`)
@@ -68,20 +83,61 @@ Moving to the next phase:
68
83
 
69
84
  - When a phase is `done`, the next phase starts at `ready`.
70
85
 
71
- If you are an agent with tool access, prefer to ask LoopFlowHQ for the next move instead of guessing:
86
+ Story autonomy expectation:
87
+
88
+ - In `story` Implement, a coding agent should be able to complete the work without further human input (based on the approved plan + acceptance criteria), then move the ticket to `phase=review`, `phase_state=ready` and post the PR link in ticket chat.
89
+
90
+ ## Required ticket context (before doing work)
91
+
92
+ Before doing ticket work in any phase, load the ticket context from LoopFlowHQ so work stays aligned with the source of truth:
93
+
94
+ - Prefer a single call: `get_ticket_context` (title, description, acceptance criteria, chat history, subtasks)
95
+ - If needed, fetch separately:
96
+ - Ticket details: `get_ticket`
97
+ - Ticket chat history: `get_ticket_messages`
98
+ - Ticket subtasks: `get_ticket_subtasks`
72
99
 
73
- - Call `next_best_action` and apply the returned `{ phase, phase_state }` as the next transition.
100
+ Do this in order:
101
+
102
+ 1. Via MCP tools (if available).
103
+ 2. Via the LoopFlowHQ Actions REST API (if available).
104
+ 3. If tool access is not available, ask the human to paste the ticket title/description/acceptance criteria and any relevant recent messages.
74
105
 
75
106
  ## How to talk to LoopFlowHQ (tools)
76
107
 
77
108
  If MCP / Actions tools are available, the standard loop is:
78
109
 
79
110
  1. `get_ticket` (+ `get_ticket_messages`) to load context.
80
- 2. `next_best_action` to confirm the recommended transition.
81
- 3. `update_ticket` (preferred) to set `phase` / `phase_state` as you start and finish a step.
82
- 4. `post_ticket_message` to write a concise step summary (what changed, what was decided, what is next).
111
+ 2. `update_ticket` to set `phase` / `phase_state` as you start and finish a step.
112
+ 3. `post_ticket_message` to write a concise step summary (what changed, what was decided, what is next).
113
+
114
+ ## "Start/Execute" intent (kick off a conversation)
115
+
116
+ When the user's intent is to **start / execute / do** work (not just inspect), for example:
117
+
118
+ - "start next phase"
119
+ - "start next-best-action"
120
+ - "start next phase of ticket LOOPF-123"
121
+ - synonyms: "execute", "start", "do"
122
+
123
+ Then **do not only move workflow state**. Also **start a conversation immediately** in the ticket chat.
124
+
125
+ Required behavior (when tools are available):
126
+
127
+ 1. Move the ticket into the correct working state:
128
+ - If the user is starting the next phase for a specific ticket:
129
+ - compute the transition deterministically from the typed workflow (ticket type + current `phase`/`phase_state`)
130
+ - do not use `next_best_action` for this case
131
+ - If the user intent is "next best action" (especially when no ticket is specified and a ticket must be selected):
132
+ - call `next_best_action` to select the ticket and recommended next workflow step
133
+ - set `phase_state=in_progress` for the phase you are starting (use `update_ticket` or `update_ticket_status` depending on your tool surface)
134
+ 2. Post a kickoff message via `post_ticket_message` that includes:
135
+ - what you changed (from -> to `phase/phase_state`)
136
+ - what you will do next (1-3 bullets)
137
+ - what you need from the human (3-7 concrete questions, with defaults if possible)
138
+ 3. Optional (recommended when you need structured answers): also call `post_ticket_agent_questions` with the same questions.
83
139
 
84
- Legacy-only clients may instead use `update_ticket_status` with `status` / `substate`, but typed workflow is preferred whenever available.
140
+ Fallback (no tool access): draft the kickoff message and ask the user to paste it into the ticket chat.
85
141
 
86
142
  ## API-first ticket operations (deterministic)
87
143
 
@@ -97,8 +153,7 @@ Common actions:
97
153
  - Read: `POST /get_ticket`
98
154
  - Messages: `POST /get_ticket_messages`
99
155
  - Create: `POST /create_ticket`
100
- - Update fields (preferred): `POST /update_ticket`
101
- - Legacy status/substate (fallback): `POST /update_ticket_status`
156
+ - Update fields: `POST /update_ticket`
102
157
  - Post message: `POST /post_ticket_message`
103
158
  - Post agent questions: `POST /post_ticket_agent_questions`
104
159
 
@@ -0,0 +1,25 @@
1
+ # Command: Get Ticket Context
2
+
3
+ Goal: load the ticket context needed to implement safely.
4
+
5
+ ## Steps
6
+
7
+ 1. Ensure you have a ticket key/ID. If none is available, ask the user which ticket to use.
8
+ 2. Call `get_ticket_context({ ticket, messages_limit })`.
9
+ 3. Use the returned fields as the source of truth for implementation:
10
+ - `title`
11
+ - `description`
12
+ - `acceptance_criteria`
13
+ - `chat_history`
14
+ - `subtasks`
15
+
16
+ ## Output format
17
+
18
+ ```
19
+ ## Ticket context
20
+ - Ticket: <KEY or id> — <title>
21
+ - Acceptance criteria: <present|missing>
22
+ - Subtasks: <count>
23
+ - Messages: <count>
24
+ ```
25
+
@@ -0,0 +1,36 @@
1
+ # Command: Next Best Action
2
+
3
+ Goal: determine the recommended next workflow transition for a ticket (or pick the next ticket to work on).
4
+
5
+ If the user intent is to **start/execute** the work (not just inspect), use:
6
+
7
+ - `loopflowhq/commands/start-next-best-action.md`
8
+
9
+ ## Steps
10
+
11
+ 1. Determine the **requester type** (who is asking for next best action):
12
+ - `human`: a human in the LoopFlowHQ UI/app
13
+ - `chat agent`: a discussion LLM (e.g. ChatGPT/Claude/Gemini)
14
+ - `code agent`: a coding agent (e.g. Codex/Cursor/Claude Code)
15
+ 2. Ensure you have a ticket key/ID. If none is available, ask the user which ticket to use.
16
+ 3. Call `next_best_action`.
17
+ - If a ticket is provided: `next_best_action({ ticket })`
18
+ - If no ticket is provided: `next_best_action({ limit })`
19
+ 4. If a ticket was selected, call `get_ticket({ ticket })` so you can report its `type` (e.g. epic/story/task/followup).
20
+ 5. Report:
21
+ - requester type (`human|chat agent|code agent`)
22
+ - selected ticket (id/key/title when present)
23
+ - selected ticket type (epic/story/task/followup when available; otherwise the raw `ticket.type`)
24
+ - current `{ phase, phase_state }`
25
+ - next `{ phase, phase_state }` (or null)
26
+
27
+ ## Output format
28
+
29
+ ```
30
+ ## Next best action
31
+ - Requester: <human|chat agent|code agent>
32
+ - Ticket: <KEY or id> — <title>
33
+ - Ticket type: <epic|story|task|followup|...> (or "unknown")
34
+ - Current: <phase>/<phase_state>
35
+ - Next: <phase>/<phase_state> (or "none")
36
+ ```
@@ -0,0 +1,53 @@
1
+ # Command: Start Next Best Action
2
+
3
+ Goal: pick the next ticket (if none is provided), start the recommended workflow step, and immediately kick off a conversation in the ticket chat.
4
+
5
+ This command is for user intents like:
6
+
7
+ - "start next-best-action"
8
+ - "execute next best action"
9
+ - "do the next best action"
10
+
11
+ ## Steps
12
+
13
+ 1. Determine requester type:
14
+ - `human`: a human in the LoopFlowHQ UI/app
15
+ - `chat agent`: a discussion LLM (e.g. ChatGPT/Claude/Gemini)
16
+ - `code agent`: a coding agent (e.g. Codex/Cursor/Claude Code)
17
+ 2. Call `next_best_action`.
18
+ - If a ticket is provided: `next_best_action({ ticket })`
19
+ - If no ticket is provided: `next_best_action({ limit })`
20
+ 3. If `next` is null: report "none" and stop (do not invent work).
21
+ 4. Load ticket context:
22
+ - `get_ticket({ ticket })` for type/title
23
+ - `get_ticket_context({ ticket, messages_limit })` if you need context before asking questions
24
+ 5. Start the work (move workflow state):
25
+ - Determine the target phase/state:
26
+ - If `next.phase_state` is `in_progress`: use it as-is.
27
+ - If `next.phase_state` is `ready`: set target to `{ phase: next.phase, phase_state: in_progress }` (start the phase).
28
+ - If `next.phase_state` is `done`: do **not** apply it for a "start" intent; ask for confirmation.
29
+ - Update the ticket (one call):
30
+ - Prefer `update_ticket({ ticket, phase, phase_state })`
31
+ - If you must use `update_ticket_status`, set `status` consistent with the target phase (legacy mapping):
32
+ - discovery -> discovery
33
+ - refine/plan -> planning
34
+ - implement -> in_progress
35
+ - review/close -> review (close done becomes done)
36
+ 6. Kick off the conversation immediately:
37
+ - Call `post_ticket_message({ ticket, content })` with:
38
+ - the transition you applied (`from` -> `to`)
39
+ - what you will do next (1-3 bullets)
40
+ - 3-7 concrete questions (with default assumptions)
41
+ - Optional (recommended): also call `post_ticket_agent_questions` with the same questions.
42
+
43
+ ## Output format
44
+
45
+ ```
46
+ ## Started next best action
47
+ - Requester: <human|chat agent|code agent>
48
+ - Ticket: <KEY or id> — <title>
49
+ - Ticket type: <epic|story|task|followup|...>
50
+ - Transition: <from phase/state> -> <to phase/state>
51
+ - Kickoff: posted to ticket chat (message + optional structured questions)
52
+ ```
53
+
@@ -0,0 +1,49 @@
1
+ # Command: Start Next Phase (for a ticket)
2
+
3
+ Goal: for a specific ticket, start the next phase of work and immediately kick off a conversation in the ticket chat.
4
+
5
+ This command is for user intents like:
6
+
7
+ - "start next phase"
8
+ - "start next phase of ticket LOOPF-123"
9
+ - "execute the next phase"
10
+
11
+ ## Steps
12
+
13
+ 1. Ensure you have a ticket key/ID. If none is available, ask the user which ticket to use.
14
+ 2. Load the ticket's current typed workflow state:
15
+ - Call `get_ticket({ ticket })` (or `get_ticket_context({ ticket })`) and read `{ type, phase, phase_state }`.
16
+ - Do **not** call `next_best_action` when the user is already talking about a specific ticket and the intent is "start next phase".
17
+ - Reserve `next_best_action` for "next best action" intents, especially when no ticket is specified and you need to select work.
18
+ 3. Decide what "start" means (non-destructive defaults):
19
+ - If `current.phase_state` is `ready`: start the current phase (`phase_state=in_progress`).
20
+ - If `current.phase_state` is `changes_requested`: start rework in the same phase (`phase_state=in_progress`).
21
+ - If `current.phase_state` is `done`: start the next phase (`phase_state=in_progress`) by advancing deterministically using the typed workflow for the ticket type:
22
+ - Epic: `discovery` -> `refine` -> `plan` -> `implement` -> `close`
23
+ - Story: `plan` -> `implement` -> `review` -> `close`
24
+ - Task: `define` -> `implement` -> `close`
25
+ - Followup: `review` -> `close`
26
+ - If the current phase is already the last phase for the ticket type, do not advance; post a kickoff message and ask what the user wants next.
27
+ - If `current.phase_state` is `in_progress`: do not mark done; post a kickoff message anyway and ask what to do next.
28
+ 4. Update the ticket to the target `{ phase, phase_state }`:
29
+ - Prefer `update_ticket({ ticket, phase, phase_state })`.
30
+ - If using `update_ticket_status`, choose a legacy `status` consistent with the target phase:
31
+ - discovery -> discovery
32
+ - refine/plan -> planning
33
+ - implement -> in_progress
34
+ - review/close -> review (close done becomes done)
35
+ 5. Kick off the conversation immediately:
36
+ - Call `post_ticket_message({ ticket, content })` with:
37
+ - the transition you applied (`from` -> `to`)
38
+ - what you will do next (1-3 bullets)
39
+ - 3-7 concrete questions (with default assumptions)
40
+ - Optional (recommended): also call `post_ticket_agent_questions` with the same questions.
41
+
42
+ ## Output format
43
+
44
+ ```
45
+ ## Started next phase
46
+ - Ticket: <KEY or id> — <title>
47
+ - Transition: <from phase/state> -> <to phase/state>
48
+ - Kickoff: posted to ticket chat (message + optional structured questions)
49
+ ```
@@ -0,0 +1,25 @@
1
+ # Ticket Type: Epic - Phase: Close
2
+
3
+ Goal: close the epic by confirming the outcome, capturing what shipped and verification evidence, and creating followups when needed.
4
+
5
+ ## Inputs
6
+
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - Approved outcome (or explicit cancellation reason)
9
+ - Any rollout/release constraints
10
+
11
+ ## Outputs (minimum)
12
+
13
+ - "What shipped" summary
14
+ - Verification steps (and results)
15
+ - Followups created if needed (or explicitly skipped)
16
+
17
+ ## Agent checklist
18
+
19
+ - Load ticket context (see `loopflowhq/agent.md`).
20
+ - Ensure the epic summary matches what actually changed.
21
+ - If cancelled, record why and whether a followup is needed.
22
+ - Prefer small cleanup over "nice-to-have" refactors.
23
+ - Run verification (lint/build/test/manual) appropriate to the change before closing.
24
+ - Post a final Close summary in the ticket chat (`post_ticket_message`).
25
+
@@ -1,21 +1,25 @@
1
- # Phase: Discovery
1
+ # Ticket Type: Epic - Phase: Discovery
2
2
 
3
3
  Goal: explore scope and reduce uncertainty before committing to a solution.
4
4
 
5
5
  ## Inputs
6
6
 
7
- - Problem statement and constraints
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - Initial problem statement and constraints
8
9
  - Existing system context (code, docs, prior tickets)
9
10
 
10
11
  ## Outputs (minimum)
11
12
 
12
13
  - Clarified requirements and edge cases
14
+ - Open questions (only the ones that block progress)
13
15
  - Proposed approach options (if needed) with tradeoffs
14
- - A narrowed, agreed scope
16
+ - A narrowed scope ready for Refine/Plan
17
+ - Discovery summary captured in the ticket chat (via `post_ticket_message`)
15
18
 
16
19
  ## Agent checklist
17
20
 
21
+ - Load ticket context (see `loopflowhq/agent.md`).
22
+ - Ask clarification questions in this chat, one at a time; wait for answers before asking the next.
18
23
  - Identify what is unknown and what must be decided by a human.
19
24
  - Validate assumptions against the codebase when possible.
20
25
  - If requirements are missing, ask targeted questions instead of guessing.
21
-
@@ -0,0 +1,26 @@
1
+ # Ticket Type: Epic - Phase: Implement
2
+
3
+ Goal: deliver the epic's acceptance criteria by executing the approved plan (typically via child Stories), with tests and minimal risk.
4
+
5
+ ## Inputs
6
+
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - Approved plan (story breakdown + sequencing)
9
+
10
+ ## Outputs (minimum)
11
+
12
+ - Planned child stories progressed through implement/review/close
13
+ - Epic `phase_state` reflects overall progress (`ready` / `in_progress` / `done`)
14
+ - Verification evidence captured for anything that shipped (commands run, expected outputs)
15
+
16
+ ## Agent checklist
17
+
18
+ - Load ticket context (see `loopflowhq/agent.md`).
19
+ - Confirm the epic has an approved plan; if missing or stale, send it back to Epic Plan.
20
+ - Prefer executing work via child Stories:
21
+ - Identify the next child Story from the epic plan / linked stories.
22
+ - Start that Story's Implement phase and work it through Review and Close per the Story playbooks.
23
+ - If there are epic-level tasks that must be executed directly, follow the same standards as Story/Task:
24
+ - small diffs, tests, and `npm run lint` / `npm run test` / `npm run build` as applicable.
25
+ - Keep the epic's `phase_state` in sync with overall progress.
26
+
@@ -1,9 +1,10 @@
1
- # Phase: Plan
1
+ # Ticket Type: Epic - Phase: Plan
2
2
 
3
3
  Goal: decide the smallest safe implementation plan with verification.
4
4
 
5
5
  ## Inputs
6
6
 
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
7
8
  - Final requirements + acceptance criteria
8
9
  - System constraints (tech stack, performance, security, rollout)
9
10
 
@@ -12,10 +13,14 @@ Goal: decide the smallest safe implementation plan with verification.
12
13
  - Step-by-step plan (small diffs)
13
14
  - Verification steps (tests/lint/build/manual steps)
14
15
  - Risks and rollback plan (if needed)
16
+ - Story breakdown (sequenced, deployable chunks with clear acceptance criteria)
17
+ - Plan stored in the ticket description (as a `## Plan` section)
15
18
 
16
19
  ## Agent checklist
17
20
 
21
+ - Load ticket context (see `loopflowhq/agent.md`).
18
22
  - Keep the plan minimal and aligned with current project patterns.
19
23
  - Identify where human approval is needed (review gates, product decisions).
20
24
  - Prefer “prove it” steps (tests, screenshots, logs) over promises.
21
-
25
+ - Do not implement in this phase; produce the plan as the deliverable.
26
+ - Do not change repo files in this phase.
@@ -1,9 +1,10 @@
1
- # Phase: Refine
1
+ # Ticket Type: Epic - Phase: Refine
2
2
 
3
3
  Goal: turn discovery output into a precise, buildable specification.
4
4
 
5
5
  ## Inputs
6
6
 
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
7
8
  - Discovery notes and decisions
8
9
  - Existing constraints (time, architecture, UX expectations)
9
10
 
@@ -12,10 +13,14 @@ Goal: turn discovery output into a precise, buildable specification.
12
13
  - Finalized acceptance criteria
13
14
  - Non-goals and explicit exclusions
14
15
  - Implementation shape (high-level architecture, key files/modules)
16
+ - Risks / rollout notes (if applicable)
17
+ - Story list / execution shape (what will be delivered and in what chunks)
18
+ - Refine summary captured in the ticket chat (via `post_ticket_message`)
15
19
 
16
20
  ## Agent checklist
17
21
 
22
+ - Load ticket context (see `loopflowhq/agent.md`).
18
23
  - Ensure acceptance criteria is testable and unambiguous.
19
24
  - Surface any scope creep since Discovery and ask for confirmation.
20
25
  - Call out any “this changes behavior” items explicitly.
21
-
26
+ - If you change the spec/AC, update the ticket to reflect the new source of truth.
@@ -0,0 +1,21 @@
1
+ # Ticket Type: Followup - Phase: Close
2
+
3
+ Goal: close the loop: summarize the outcome and leave the system clean.
4
+
5
+ ## Inputs
6
+
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - Approved outcome (or explicit cancellation reason)
9
+
10
+ ## Outputs (minimum)
11
+
12
+ - "What changed" / "What was decided" summary in ticket chat
13
+ - Followups created if needed
14
+
15
+ ## Agent checklist
16
+
17
+ - Load ticket context (see `loopflowhq/agent.md`).
18
+ - Ensure the ticket summary matches what actually happened.
19
+ - If cancelled, record why and whether a followup is needed.
20
+ - Prefer small cleanup over "nice-to-have" refactors.
21
+
@@ -0,0 +1,25 @@
1
+ # Ticket Type: Followup - Phase: Review
2
+
3
+ Goal: validate the followup outcome and decide whether it is acceptable as-is.
4
+
5
+ ## Inputs
6
+
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - Implemented change (if any) and the reported outcome
9
+ - Any acceptance criteria (if present)
10
+
11
+ ## Outputs (minimum)
12
+
13
+ - Review notes captured in ticket chat
14
+ - One of:
15
+ - Approved: set `phase=review`, `phase_state=done`, then move to Close (`phase=close`, `phase_state=ready`)
16
+ - Changes requested: set `phase=review`, `phase_state=changes_requested` with an actionable list of fixes
17
+
18
+ ## Agent checklist
19
+
20
+ - Load ticket context (see `loopflowhq/agent.md`).
21
+ - Prioritize correctness and regressions over style.
22
+ - Ensure acceptance criteria (if present) is demonstrably met.
23
+ - Post a single consolidated list of requested changes if not approved.
24
+ - Do not mark human-owned gates complete unless explicitly instructed by the human owner.
25
+
@@ -0,0 +1,15 @@
1
+ # Shared: Close Checklist (Story/Task)
2
+
3
+ Use this checklist to avoid duplicating close/shipping guidance across Story/Task phases.
4
+
5
+ ## Checklist items to cover
6
+
7
+ - Load ticket context (see `loopflowhq/agent.md`).
8
+ - Confirm you have the PR link and checks are green.
9
+ - Merge and ship:
10
+ - merge the PR to `main` automatically when checks pass
11
+ - if the project uses a different ship mechanism than “merge to main” (merge queue, release-please, manual promote, etc.), follow the repo’s standard process and run it instead
12
+ - if merge/deploy is blocked by missing permissions, post exact instructions and the PR link in ticket chat so a human can perform the single action
13
+ - Post a concise “what shipped” summary in ticket chat (include PR link and any deploy evidence).
14
+ - Ensure the ticket summary matches what actually changed.
15
+ - Create followups if needed (bugs, tech debt, missing tests, rollout tasks).
@@ -0,0 +1,33 @@
1
+ # Shared: Execution Checklist (Story/Task)
2
+
3
+ Use this checklist to avoid duplicating execution guidance across Story/Task phases.
4
+
5
+ ## Requirements
6
+
7
+ - Each subtask should be small and independently committable.
8
+ - Prefer 1 subtask = 1 commit (or a small sequence of commits) so work can be reviewed and reverted safely.
9
+ - Before each commit, run the standard checks (or the closest equivalents for the repo):
10
+ - `npm run lint`
11
+ - `npm run test`
12
+ - `npm run build`
13
+ - If the change includes UI:
14
+ - include explicit subtasks to verify light mode and dark mode
15
+ - include explicit subtasks to verify desktop and mobile layouts
16
+ - UX/UI rules are project-specific:
17
+ - follow the current repo's UX/UI spec and components; do not invent a new design system
18
+ - Reuse existing components and patterns; do not duplicate functionality unless there is a clear reason.
19
+ - Do a self code review before each commit (review diff for correctness, edge cases, a11y, and unintended behavior changes).
20
+ - When implementation is complete, move the ticket forward in the typed workflow:
21
+ - Story Implement -> `phase=review`, `phase_state=ready` (post PR link)
22
+ - Task Implement -> `phase=close`, `phase_state=ready` (post summary / PR link if used)
23
+
24
+ ## Checklist items to cover
25
+
26
+ - Implement code (small diffs)
27
+ - Implement UI per project UX/UI rules (states: loading/empty/error; copy; a11y; responsiveness)
28
+ - Write tests (unit/integration/e2e as appropriate)
29
+ - Run tests and regression checks
30
+ - Ensure `npm run lint`, `npm run build`, `npm run test` pass
31
+ - Call out any behavior changes and migrations (and any follow-ups)
32
+ - Update project docs (architecture/feature docs) when warranted
33
+ - Create/update ADRs when warranted
@@ -0,0 +1,17 @@
1
+ # Shared: Planning Checklist (Story/Task)
2
+
3
+ Use this checklist to avoid duplicating planning and refinement guidance across phases.
4
+
5
+ ## Checklist items to cover
6
+
7
+ - Scan the codebase/docs first to confirm whether the work is already partially or fully implemented.
8
+ - Rewrite the ticket to be implementation-ready:
9
+ - title: short, specific, outcome-oriented
10
+ - description: problem + scope + constraints
11
+ - explicit non-goals / out-of-scope
12
+ - concrete acceptance criteria (testable)
13
+ - Create an execution plan:
14
+ - add a `## Plan` section to the ticket description
15
+ - list small, atomic subtasks that are independently committable
16
+ - ensure the subtask plan covers `loopflowhq/phases/shared-execution-checklist.md`
17
+ - Identify risks/dependencies and document mitigations (migrations, permissions, rollout, data backfills, performance).
@@ -0,0 +1,27 @@
1
+ # Ticket Type: Story - Phase: Close
2
+
3
+ Goal: finish the loop: ship, document, and leave the system clean.
4
+
5
+ ## Inputs
6
+
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - Approved outcome from Review (or explicit cancellation reason)
9
+ - Any rollout/release constraints
10
+
11
+ ## Outputs (minimum)
12
+
13
+ - "What shipped" summary
14
+ - Verification steps (and results)
15
+ - Followups created if needed
16
+
17
+ ## Agent checklist
18
+
19
+ - Load ticket context (see `loopflowhq/agent.md`).
20
+ - Confirm Story Review is complete and approved (unless explicitly cancelling):
21
+ - ticket is `phase=review`, `phase_state=done`
22
+ - Use `loopflowhq/phases/shared-close-checklist.md`.
23
+ - Ensure the ticket summary matches what actually changed.
24
+ - If cancelled, record why and whether a followup is needed.
25
+ - Prefer small cleanup over "nice-to-have" refactors.
26
+ - Run verification (lint/build/test/manual) appropriate to the change before closing.
27
+