@loopflowhq/agent-pack 0.4.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 (32) hide show
  1. package/.cursor/commands/lfq-next-best-action.md +0 -1
  2. package/.cursor/commands/lfq-start-next-best-action.md +4 -0
  3. package/.cursor/commands/lfq-start-next-phase.md +4 -0
  4. package/loopflowhq/agent.md +34 -1
  5. package/loopflowhq/commands/next-best-action.md +16 -4
  6. package/loopflowhq/commands/start-next-best-action.md +53 -0
  7. package/loopflowhq/commands/start-next-phase.md +49 -0
  8. package/loopflowhq/phases/epic-close.md +7 -5
  9. package/loopflowhq/phases/epic-implement.md +14 -11
  10. package/loopflowhq/phases/epic-plan.md +1 -0
  11. package/loopflowhq/phases/epic-refine.md +2 -0
  12. package/loopflowhq/phases/followup-close.md +5 -7
  13. package/loopflowhq/phases/followup-review.md +11 -9
  14. package/loopflowhq/phases/shared-close-checklist.md +15 -0
  15. package/loopflowhq/phases/shared-execution-checklist.md +33 -0
  16. package/loopflowhq/phases/shared-planning-checklist.md +17 -0
  17. package/loopflowhq/phases/story-close.md +7 -3
  18. package/loopflowhq/phases/story-implement.md +18 -8
  19. package/loopflowhq/phases/story-plan.md +21 -11
  20. package/loopflowhq/phases/story-review.md +26 -9
  21. package/loopflowhq/phases/task-close.md +20 -0
  22. package/loopflowhq/phases/task-define.md +12 -4
  23. package/loopflowhq/phases/task-implement.md +4 -2
  24. package/package.json +1 -1
  25. package/.cursor/commands/lfq01-discovery.md +0 -24
  26. package/.cursor/commands/lfq02-planning.md +0 -71
  27. package/.cursor/commands/lfq03-implementing.md +0 -25
  28. package/.cursor/commands/lfq04-review.md +0 -85
  29. package/.cursor/commands/lfq05-testing.md +0 -55
  30. package/.cursor/commands/lfq06-shipping.md +0 -61
  31. package/.cursor/commands/lfq07-learning.md +0 -22
  32. package/.cursor/commands/lfq08-adjusting.md +0 -22
@@ -1,4 +1,3 @@
1
1
  # lfq-next-best-action — Next best action
2
2
 
3
3
  Follow `loopflowhq/commands/next-best-action.md`.
4
-
@@ -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
+
@@ -36,7 +36,7 @@ This file is the canonical, repo-local description of how LoopFlowHQ work. It is
36
36
 
37
37
  - Epic: `discovery` -> `refine` -> `plan` -> `implement` -> `close`
38
38
  - Story: `plan` -> `implement` -> `review` -> `close`
39
- - Task: `define` -> `implement`
39
+ - Task: `define` -> `implement` -> `close`
40
40
  - Followup: `review` -> `close`
41
41
 
42
42
  See phase playbooks (ticket_type routed):
@@ -58,6 +58,7 @@ See phase playbooks (ticket_type routed):
58
58
  - Task:
59
59
  - define: `loopflowhq/phases/task-define.md`
60
60
  - implement: `loopflowhq/phases/task-implement.md`
61
+ - close: `loopflowhq/phases/task-close.md`
61
62
  - Followup:
62
63
  - review: `loopflowhq/phases/followup-review.md`
63
64
  - close: `loopflowhq/phases/followup-close.md`
@@ -82,6 +83,10 @@ Moving to the next phase:
82
83
 
83
84
  - When a phase is `done`, the next phase starts at `ready`.
84
85
 
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
+
85
90
  ## Required ticket context (before doing work)
86
91
 
87
92
  Before doing ticket work in any phase, load the ticket context from LoopFlowHQ so work stays aligned with the source of truth:
@@ -106,6 +111,34 @@ If MCP / Actions tools are available, the standard loop is:
106
111
  2. `update_ticket` to set `phase` / `phase_state` as you start and finish a step.
107
112
  3. `post_ticket_message` to write a concise step summary (what changed, what was decided, what is next).
108
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.
139
+
140
+ Fallback (no tool access): draft the kickoff message and ask the user to paste it into the ticket chat.
141
+
109
142
  ## API-first ticket operations (deterministic)
110
143
 
111
144
  When you need deterministic ticket CRUD, prefer the LoopFlowHQ Actions REST API when it is available in your environment.
@@ -2,14 +2,25 @@
2
2
 
3
3
  Goal: determine the recommended next workflow transition for a ticket (or pick the next ticket to work on).
4
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
+
5
9
  ## Steps
6
10
 
7
- 1. Ensure you have a ticket key/ID. If none is available, ask the user which ticket to use.
8
- 2. Call `next_best_action`.
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`.
9
17
  - If a ticket is provided: `next_best_action({ ticket })`
10
18
  - If no ticket is provided: `next_best_action({ limit })`
11
- 3. Report:
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`)
12
22
  - selected ticket (id/key/title when present)
23
+ - selected ticket type (epic/story/task/followup when available; otherwise the raw `ticket.type`)
13
24
  - current `{ phase, phase_state }`
14
25
  - next `{ phase, phase_state }` (or null)
15
26
 
@@ -17,8 +28,9 @@ Goal: determine the recommended next workflow transition for a ticket (or pick t
17
28
 
18
29
  ```
19
30
  ## Next best action
31
+ - Requester: <human|chat agent|code agent>
20
32
  - Ticket: <KEY or id> — <title>
33
+ - Ticket type: <epic|story|task|followup|...> (or "unknown")
21
34
  - Current: <phase>/<phase_state>
22
35
  - Next: <phase>/<phase_state> (or "none")
23
36
  ```
24
-
@@ -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
+ ```
@@ -1,6 +1,6 @@
1
1
  # Ticket Type: Epic - Phase: Close
2
2
 
3
- Goal: finish the loop: ship, document, and leave the system clean.
3
+ Goal: close the epic by confirming the outcome, capturing what shipped and verification evidence, and creating followups when needed.
4
4
 
5
5
  ## Inputs
6
6
 
@@ -10,14 +10,16 @@ Goal: finish the loop: ship, document, and leave the system clean.
10
10
 
11
11
  ## Outputs (minimum)
12
12
 
13
- - What shipped summary
13
+ - "What shipped" summary
14
14
  - Verification steps (and results)
15
- - Followups created if needed
15
+ - Followups created if needed (or explicitly skipped)
16
16
 
17
17
  ## Agent checklist
18
18
 
19
19
  - Load ticket context (see `loopflowhq/agent.md`).
20
- - Ensure the ticket summary matches what actually changed.
20
+ - Ensure the epic summary matches what actually changed.
21
21
  - If cancelled, record why and whether a followup is needed.
22
- - Prefer small cleanup over nice-to-have refactors.
22
+ - Prefer small cleanup over "nice-to-have" refactors.
23
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,23 +1,26 @@
1
1
  # Ticket Type: Epic - Phase: Implement
2
2
 
3
- Goal: deliver the epics acceptance criteria by implementing planned changes, with tests and minimal risk.
3
+ Goal: deliver the epic's acceptance criteria by executing the approved plan (typically via child Stories), with tests and minimal risk.
4
4
 
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
- - Approved plan
8
+ - Approved plan (story breakdown + sequencing)
9
9
 
10
10
  ## Outputs (minimum)
11
11
 
12
- - Code changes
13
- - Tests (or explicit justification if not added)
14
- - Verification evidence (commands run, expected outputs)
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
15
 
16
16
  ## Agent checklist
17
17
 
18
- - Implement the acceptance criteria from the ticket; if unclear or missing, ask before proceeding.
19
- - Implement in small diffs; keep changes scoped.
20
- - Write/update tests that cover the acceptance criteria (or document why tests are not feasible).
21
- - Run the project’s standard checks (lint/typecheck/test/build) when applicable.
22
- - Call out any behavior changes and migrations.
23
- - Do not open a PR unless explicitly requested; shipping is handled separately.
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
+
@@ -13,6 +13,7 @@ Goal: decide the smallest safe implementation plan with verification.
13
13
  - Step-by-step plan (small diffs)
14
14
  - Verification steps (tests/lint/build/manual steps)
15
15
  - Risks and rollback plan (if needed)
16
+ - Story breakdown (sequenced, deployable chunks with clear acceptance criteria)
16
17
  - Plan stored in the ticket description (as a `## Plan` section)
17
18
 
18
19
  ## Agent checklist
@@ -14,6 +14,8 @@ Goal: turn discovery output into a precise, buildable specification.
14
14
  - Non-goals and explicit exclusions
15
15
  - Implementation shape (high-level architecture, key files/modules)
16
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`)
17
19
 
18
20
  ## Agent checklist
19
21
 
@@ -1,23 +1,21 @@
1
1
  # Ticket Type: Followup - Phase: Close
2
2
 
3
- Goal: finish the loop: ship, document, and leave the system clean.
3
+ Goal: close the loop: summarize the outcome and leave the system clean.
4
4
 
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
8
  - Approved outcome (or explicit cancellation reason)
9
- - Any rollout/release constraints
10
9
 
11
10
  ## Outputs (minimum)
12
11
 
13
- - What shipped” summary
14
- - Verification steps (and results)
12
+ - "What changed" / "What was decided" summary in ticket chat
15
13
  - Followups created if needed
16
14
 
17
15
  ## Agent checklist
18
16
 
19
17
  - Load ticket context (see `loopflowhq/agent.md`).
20
- - Ensure the ticket summary matches what actually changed.
18
+ - Ensure the ticket summary matches what actually happened.
21
19
  - 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.
20
+ - Prefer small cleanup over "nice-to-have" refactors.
21
+
@@ -1,23 +1,25 @@
1
1
  # Ticket Type: Followup - Phase: Review
2
2
 
3
- Goal: validate correctness, quality, and alignment with requirements.
3
+ Goal: validate the followup outcome and decide whether it is acceptable as-is.
4
4
 
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
- - Implemented changes
9
- - Acceptance criteria
8
+ - Implemented change (if any) and the reported outcome
9
+ - Any acceptance criteria (if present)
10
10
 
11
11
  ## Outputs (minimum)
12
12
 
13
- - Review notes (bugs, risks, missing tests)
14
- - Decision: approve or request changes
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
15
17
 
16
18
  ## Agent checklist
17
19
 
18
20
  - Load ticket context (see `loopflowhq/agent.md`).
19
21
  - Prioritize correctness and regressions over style.
20
- - Ensure acceptance criteria is demonstrably met.
21
- - If changes are requested, be explicit about what must change and why.
22
- - If issues are found, fix them and re-review before marking Review done.
23
- - Post the review notes in the ticket chat (avoid writing `.review/*` files).
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).
@@ -5,19 +5,23 @@ Goal: finish the loop: ship, document, and leave the system clean.
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
- - Approved outcome (or explicit cancellation reason)
8
+ - Approved outcome from Review (or explicit cancellation reason)
9
9
  - Any rollout/release constraints
10
10
 
11
11
  ## Outputs (minimum)
12
12
 
13
- - What shipped summary
13
+ - "What shipped" summary
14
14
  - Verification steps (and results)
15
15
  - Followups created if needed
16
16
 
17
17
  ## Agent checklist
18
18
 
19
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`.
20
23
  - Ensure the ticket summary matches what actually changed.
21
24
  - If cancelled, record why and whether a followup is needed.
22
- - Prefer small cleanup over nice-to-have refactors.
25
+ - Prefer small cleanup over "nice-to-have" refactors.
23
26
  - Run verification (lint/build/test/manual) appropriate to the change before closing.
27
+
@@ -6,18 +6,28 @@ Goal: make the change in code, with tests and minimal risk.
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
8
  - Approved plan
9
+ - Ticket subtasks (if present)
9
10
 
10
11
  ## Outputs (minimum)
11
12
 
12
13
  - Code changes
13
- - Tests (or explicit justification if not added)
14
- - Verification evidence (commands run, expected outputs)
14
+ - Tests added/updated for the acceptance criteria (or explicit justification if not added)
15
+ - Verification evidence (commands run, expected outputs) posted in the ticket chat
16
+ - PR link for human review (when applicable to your repo workflow)
15
17
 
16
18
  ## Agent checklist
17
19
 
18
- - Implement the acceptance criteria from the ticket; if unclear or missing, ask before proceeding.
19
- - Implement in small diffs; keep changes scoped.
20
- - Write/update tests that cover the acceptance criteria (or document why tests are not feasible).
21
- - Run the project’s standard checks (lint/typecheck/test/build) when applicable.
22
- - Call out any behavior changes and migrations.
23
- - Do not open a PR unless explicitly requested; shipping is handled separately.
20
+ - Load ticket context + start/end phase transitions (see `loopflowhq/agent.md`).
21
+ - Ensure subtasks are loaded (`get_ticket_context` or `get_ticket_subtasks`) when present.
22
+ - If a parent Epic exists, load it too (read-only) for additional constraints.
23
+ - No human-in-the-loop in this phase:
24
+ - implement based on the approved plan + acceptance criteria
25
+ - do not block on questions; if assumptions are required, proceed safely and log them in ticket chat
26
+ - if the plan/AC is missing or clearly stale, stop and send the ticket back to Story Plan instead of guessing
27
+ - Implement the acceptance criteria from the ticket.
28
+ - Implement in small diffs; keep scope tight.
29
+ - Follow `loopflowhq/phases/shared-execution-checklist.md`.
30
+ - If you must make assumptions, document them in the ticket chat and proceed when safe.
31
+ - When the story is implemented:
32
+ - open a PR (if your workflow uses PRs for Story Review) and post the PR link + a concise change summary in the ticket chat
33
+ - move the ticket to Story Review: set `phase=review`, `phase_state=ready`
@@ -1,25 +1,35 @@
1
1
  # Ticket Type: Story - Phase: Plan
2
2
 
3
- Goal: decide the smallest safe implementation plan with verification.
3
+ Goal: decide the smallest safe implementation plan (small diffs) with verification, and make the story implementation-ready.
4
4
 
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
- - Final requirements + acceptance criteria
8
+ - Final requirements + constraints
9
9
  - System constraints (tech stack, performance, security, rollout)
10
10
 
11
11
  ## Outputs (minimum)
12
12
 
13
- - Step-by-step plan (small diffs)
14
- - Verification steps (tests/lint/build/manual steps)
15
- - Risks and rollback plan (if needed)
16
- - Plan stored in the ticket description (as a `## Plan` section)
13
+ - Updated ticket title + description:
14
+ - clear problem statement
15
+ - explicit scope + non-goals
16
+ - Concrete, testable acceptance criteria
17
+ - Plan stored in the ticket description as a `## Plan` section:
18
+ - small, atomic, independently committable subtasks
19
+ - explicit verification steps (tests/lint/build/manual)
20
+ - Risks and rollback notes (if needed)
17
21
 
18
22
  ## Agent checklist
19
23
 
20
24
  - Load ticket context (see `loopflowhq/agent.md`).
21
- - Keep the plan minimal and aligned with current project patterns.
22
- - Identify where human approval is needed (review gates, product decisions).
23
- - Prefer “prove it” steps (tests, screenshots, logs) over promises.
24
- - Do not implement in this phase; produce the plan as the deliverable.
25
- - Do not change repo files in this phase.
25
+ - This is a human-in-the-loop phase:
26
+ - ask the minimum clarification questions needed to remove ambiguity
27
+ - do not implement code in this phase
28
+ - Scan the codebase/docs to confirm whether the work is already partially or fully implemented.
29
+ - Use `loopflowhq/phases/shared-planning-checklist.md`.
30
+ - Ensure the subtask plan covers `loopflowhq/phases/shared-execution-checklist.md`.
31
+ - Keep subtasks small (mergeable on their own).
32
+ - Save the `## Plan` section into the ticket description via `update_ticket`.
33
+ - When the plan is agreed and the ticket is implementation-ready:
34
+ - set `phase=plan`, `phase_state=done`
35
+
@@ -1,23 +1,40 @@
1
1
  # Ticket Type: Story - Phase: Review
2
2
 
3
- Goal: validate correctness, quality, and alignment with requirements.
3
+ Goal: human review of the implemented PR: validate correctness, quality, and alignment with requirements.
4
4
 
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
- - Implemented changes
8
+ - PR link (required)
9
+ - Deployed preview URL (if available)
10
+ - Implemented changes (code + tests)
9
11
  - Acceptance criteria
10
12
 
11
13
  ## Outputs (minimum)
12
14
 
13
- - Review notes (bugs, risks, missing tests)
14
- - Decision: approve or request changes
15
+ - Review notes captured in ticket chat (approval or requested changes)
16
+ - One of:
17
+ - Approved: set `phase=review`, `phase_state=done` and move to Close (`phase=close`, `phase_state=ready`)
18
+ - Changes requested: set `phase=review`, `phase_state=changes_requested` with an actionable list
15
19
 
16
20
  ## Agent checklist
17
21
 
18
22
  - Load ticket context (see `loopflowhq/agent.md`).
19
- - Prioritize correctness and regressions over style.
20
- - Ensure acceptance criteria is demonstrably met.
21
- - If changes are requested, be explicit about what must change and why.
22
- - If issues are found, fix them and re-review before marking Review done.
23
- - Post the review notes in the ticket chat (avoid writing `.review/*` files).
23
+ - This is a human-in-the-loop phase:
24
+ - do not implement code in this phase
25
+ - ask questions / request clarifications from the human reviewer when needed
26
+ - Review focus:
27
+ - acceptance criteria is demonstrably met
28
+ - correctness + regressions + edge cases
29
+ - tests and coverage for critical paths
30
+ - UI behavior (states, responsiveness, a11y) when applicable
31
+ - Approval path:
32
+ - post a concise approval note in ticket chat
33
+ - set `phase=review`, `phase_state=done`
34
+ - move to Close (`phase=close`, `phase_state=ready`)
35
+ - Changes requested path:
36
+ - ask for each comment in enough detail to be actionable (repro steps, expected vs actual, screenshots if relevant)
37
+ - collect a complete list ("any more?") before switching phases
38
+ - post a single consolidated list of requested changes in ticket chat
39
+ - set `phase=review`, `phase_state=changes_requested`
40
+
@@ -0,0 +1,20 @@
1
+ # Ticket Type: Task - Phase: Close
2
+
3
+ Goal: ship the task, close the loop, and leave the system clean.
4
+
5
+ ## Inputs
6
+
7
+ - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
+ - PR link (from Task Implement)
9
+ - Any rollout/release constraints
10
+
11
+ ## Outputs (minimum)
12
+
13
+ - “What shipped” summary
14
+ - Ship/deploy evidence (merge link, deploy link/logs, or release notes)
15
+
16
+ ## Agent checklist
17
+
18
+ - Use `loopflowhq/phases/shared-close-checklist.md`.
19
+ - When shipping is complete:
20
+ - set `phase=close`, `phase_state=done`
@@ -1,11 +1,11 @@
1
1
  # Ticket Type: Task - Phase: Define
2
2
 
3
- Goal: turn a vague task into an executable shape (what, why, constraints).
3
+ Goal: turn a vague task into an executable shape (what, why, constraints) and a minimal plan.
4
4
 
5
5
  ## Inputs
6
6
 
7
7
  - LoopFlowHQ ticket ID (pattern: `LOOPF-<number>` / regex: `LOOPF-\\d+`)
8
- - Ticket title (may be vague)
8
+ - Ticket title/description (may be vague)
9
9
  - Any context from prior messages
10
10
 
11
11
  ## Outputs (minimum)
@@ -13,12 +13,20 @@ Goal: turn a vague task into an executable shape (what, why, constraints).
13
13
  - Clear problem statement (1-3 sentences)
14
14
  - Constraints and non-goals
15
15
  - Concrete acceptance criteria (or a proposal to confirm)
16
+ - A minimal `## Plan` section with small, atomic subtasks (when applicable)
16
17
  - Define summary captured in the ticket chat (via `post_ticket_message`)
17
18
 
18
19
  ## Agent checklist
19
20
 
20
21
  - Load ticket context (see `loopflowhq/agent.md`).
21
- - Ask clarification questions in this chat, one at a time; wait for answers before asking the next.
22
- - Ask the minimum questions needed to remove ambiguity.
22
+ - Ask the minimum clarification questions needed to remove ambiguity.
23
23
  - Propose acceptance criteria if missing; get confirmation.
24
24
  - Identify dependencies/risks early (APIs, migrations, permissions, rollout).
25
+ - Use `loopflowhq/phases/shared-planning-checklist.md` when a plan is needed.
26
+ - Update the ticket title/description/AC and write the `## Plan` section via `update_ticket`.
27
+ - If the task needs explicit execution steps, create/update task subtasks via `update_ticket_subtasks`.
28
+ - Post a concise Define summary via `post_ticket_message`:
29
+ - what changed in the ticket (title/description/AC)
30
+ - the plan summary (high level)
31
+ - key assumptions/risks
32
+
@@ -15,9 +15,11 @@ Goal: make the change in code, with tests and minimal risk.
15
15
 
16
16
  ## Agent checklist
17
17
 
18
+ - Load ticket context + start/end phase transitions (see `loopflowhq/agent.md`).
18
19
  - Implement the acceptance criteria from the ticket; if unclear or missing, ask before proceeding.
19
20
  - Implement in small diffs; keep changes scoped.
20
21
  - Write/update tests that cover the acceptance criteria (or document why tests are not feasible).
21
- - Run the projects standard checks (lint/typecheck/test/build) when applicable.
22
+ - Run the project's standard checks (lint/typecheck/test/build) when applicable.
22
23
  - Call out any behavior changes and migrations.
23
- - Do not open a PR unless explicitly requested; shipping is handled separately.
24
+ - When the task is complete, move the ticket to Close (`phase=close`, `phase_state=ready`) and summarize in ticket chat.
25
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loopflowhq/agent-pack",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,24 +0,0 @@
1
- # lfq01-discovery — Discovery step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket, and when-done steps (post summary, transition, confirm), follow **lfq-ticket-workflow.md**. This step uses Discovery typed transitions: start with `phase=discovery`, `phase_state=in_progress`, and finish with `phase=discovery`, `phase_state=done` via `update_ticket`.
8
-
9
- ## Discovery work
10
-
11
- - Explore scope and clarify requirements.
12
- - Analyze codebase and identify ambiguities.
13
- - Ask clarification questions **here in this chat**, one at a time (interactive CLI style). Wait for each answer before asking the next. Do **not** send questions via LoopFlowHQ MCP — ask the user directly in the conversation.
14
- <!-- Optionally post questions/answers to the ticket via `post_ticket_agent_questions` (one at a time) or summarize in `post_ticket_message` when done. -->
15
- - Document findings for next steps.
16
-
17
- ## Summary example (for post_ticket_message)
18
-
19
- ```
20
- ## Discovery done
21
- - Scope: [brief]
22
- - Clarifications received: [key points]
23
- - Open questions / risks: [if any]
24
- ```
@@ -1,71 +0,0 @@
1
- # lfq02-planning — Planning step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step uses Planning typed transitions: start with `phase=plan`, `phase_state=in_progress`, finish with `phase=plan`, `phase_state=done` via `update_ticket`. Use prior step summaries (e.g. Discovery done) as context.
8
-
9
- **What this step does:** Read the repo and prior context only. Produce a markdown plan and save it in the LFQ ticket (update ticket description with a **Plan** section via `update_ticket` action / REST API). Do **not** change any files in the repo. Documentation steps (ADRs, feature docs) are only TODOs in the plan—they are done in a later step, not in this phase. **Think:** Does this work require updating the `/privacy` page (e.g. new data collection, third-party services, cookies)? If so, add a plan item for it.
10
-
11
- ---
12
-
13
- ## Plan requirements
14
-
15
- - Include clear, minimal, concise steps.
16
- - **Scope:** Do NOT add extra scope or unnecessary complexity beyond explicitly clarified details.
17
- - **Step style:** Steps should be modular, elegant, minimal, and integrate seamlessly within the existing codebase.
18
-
19
- ---
20
-
21
- ## Plan structure (save in LFQ ticket)
22
-
23
- Produce a markdown plan with this structure. Preserve any existing ticket description and add or update a clear `## Plan` section with the content below.
24
-
25
- **Title**
26
- After discovery, check the ticket context and adjust the name of the ticket
27
-
28
- **## TLDR**
29
-
30
- Short summary of what we're building and why.
31
-
32
- **## Critical Decisions**
33
-
34
- Key architectural/implementation choices made during exploration:
35
-
36
- - Decision 1: [choice] - [brief rationale]
37
- - Decision 2: [choice] - [brief rationale]
38
-
39
- **## Documentation**
40
-
41
- When the work warrants documentation, add **plan items** (TODOs) for later—do not write docs in this phase:
42
-
43
- - **ADRs** (docs-adr): For significant architectural decisions. Plan path: `docs/decisions/NNN-slug.md`.
44
- - **Feature docs** (docs-feature): For major features with non-obvious implementation. Plan path: `docs/FEATURE_NAME.md`.
45
- - **Privacy page** (`/privacy`): When the work involves new data collection, third-party services, cookies, or processing of user data, add a plan item to update the privacy page if required.
46
-
47
- **## Tasks**
48
-
49
- - [ ] 🟥 **Step 1: [Name]**
50
- - [ ] 🟥 Subtask 1
51
- - [ ] 🟥 Subtask 2
52
-
53
- - [ ] 🟥 **Step 2: [Name]**
54
- - [ ] 🟥 Subtask 1
55
- - [ ] 🟥 Subtask 2
56
-
57
- - [ ] 🟥 **Document: [Create ADR for X | Create feature doc for Y]** (when warranted)
58
-
59
- ...
60
-
61
- ---
62
-
63
- Again, it's still not time to build yet. Just write the clear plan document. No extra complexity or extra scope beyond what we discussed. Save it in the LFQ ticket by updating the ticket description with a **Plan** section (do not save to a file, do not change any repo files).
64
-
65
- ## Summary example (for post_ticket_message)
66
-
67
- ```
68
- ## Planning done
69
- - Plan: stored in ticket description (Plan section)
70
- - Steps: [count]
71
- ```
@@ -1,25 +0,0 @@
1
- # lfq03-implementing — Implementing step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step uses Implementing typed transitions: start with `phase=implement`, `phase_state=in_progress`, finish with `phase=implement`, `phase_state=done` via `update_ticket`. Use prior step summaries (Discovery, Planning) and the plan document (e.g. in `docs/plans/`) as context.
8
-
9
- ## Implementing work
10
-
11
- - Follow `execute.md`: implement precisely as planned.
12
- - Update the plan document with emoji status as you progress.
13
- - Adhere to project rules (Design, coding-patterns, UX).
14
- - **Do not** create a branch, commit, or open a PR in this step.
15
-
16
- ## When implementation is done
17
-
18
- - Post the summary via `post_ticket_message`, then call `update_ticket` with `phase=implement` and `phase_state=done`. Do not run git commit or advance the ticket to the next step.
19
-
20
- ## Summary example (for post_ticket_message)
21
-
22
- ```
23
- ## Implementing done
24
- - Changes: [brief list of files/areas touched]
25
- ```
@@ -1,85 +0,0 @@
1
- # lfq04-review — Review step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step uses Review typed transitions: start with `phase=review`, `phase_state=in_progress`, finish with `phase=review`, `phase_state=done` via `update_ticket`. Use prior step summaries (Implementing done) as context.
8
-
9
- ---
10
-
11
- ## 1. Perform code review
12
-
13
- Follow the same checks and output structure as **review.md**:
14
-
15
- **Check for:**
16
-
17
- - **Logging** — No console.log, use proper logger with context
18
- - **Error handling** — Try-catch for async, centralized handlers, helpful messages
19
- - **TypeScript** — No `any`, proper interfaces, no @ts-ignore
20
- - **Production readiness** — No debug statements, no TODOs, no hardcoded secrets
21
- - **React/Hooks** — Effects have cleanup, dependencies complete, no infinite loops
22
- - **Performance** — No unnecessary re-renders, expensive calcs memoized
23
- - **Security** — Auth checked, inputs validated, RLS in place
24
- - **Architecture** — Follows existing patterns, code in correct directory
25
-
26
- **Severity levels:** CRITICAL (security, data loss, crashes), HIGH (bugs, performance, bad UX), MEDIUM (code quality, maintainability), LOW (style, minor).
27
-
28
- ---
29
-
30
- ## 2. Fix all issues, then re-review
31
-
32
- - If **any issues** are found (Critical, High, Medium, or Low):
33
- 1. **Fix every issue** (apply suggested fixes or equivalent).
34
- 2. **Re-run the review** on the changed code until there are no remaining issues, or you explicitly document why a finding is not fixed (e.g. deferred, out of scope).
35
- - Only after all issues are fixed or documented do you post the review and mark the step done.
36
-
37
- ---
38
-
39
- ## 3. Store review in ticket chat (no .review files)
40
-
41
- - **Do not** write the review to `.review/<ticket-key>.md` or any file under `.review/`.
42
- - Post the **full review** as a single ticket message using **`post_ticket_message`** so the review lives in the ticket chat.
43
-
44
- **Message content format** (use this exact structure in the posted message):
45
-
46
- ```markdown
47
- ## Code review
48
-
49
- ### ✅ Looks Good
50
-
51
- - [Item 1]
52
- - [Item 2]
53
-
54
- ### ⚠️ Issues Found
55
-
56
- - **[Severity]** [File:line] - [Issue description]
57
- - Fix: [Suggested fix]
58
- (If none: "None.")
59
-
60
- ### 📊 Summary
61
-
62
- - Files reviewed: X
63
- - Critical issues: 0 (after fixes)
64
- - Warnings: 0 (after fixes)
65
-
66
- **Outcome:** Passed. [One line: e.g. "Changes are minimal and follow existing patterns." / "All issues fixed and re-verified."]
67
- ```
68
-
69
- Then add the step-done line:
70
-
71
- ```markdown
72
- ## Review done
73
-
74
- - Outcome: [passed / issues fixed and re-verified]
75
- - Critical issues: 0
76
- ```
77
-
78
- (You may combine the "Code review" and "Review done" blocks into one `post_ticket_message` call.)
79
-
80
- ---
81
-
82
- ## 4. Mark step done
83
-
84
- - Call **`update_ticket`** with `ticket`, `phase`: `review`, `phase_state`: `done` (legacy `status` should stay compatible).
85
- - Confirm to the user that the review step is complete and the ticket is ready for the next step (e.g. testing).
@@ -1,55 +0,0 @@
1
- # lfq05-testing — Testing step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step validates release readiness and keeps ticket in close-stage execution (`phase=close`, typically `phase_state=in_progress`). Use prior step summaries (Implementing, Review) as context.
8
-
9
- **Do not:** Create a PR or push commits in this step. Commit, push, and PR creation belong to the Shipping step (lfq06-shipping).
10
-
11
- ## Understand ticket and acceptance criteria
12
-
13
- 1. **Ticket description** — Read and understand the full ticket description. Ensure you know what the ticket is asking for.
14
- 2. **Acceptance criteria** — If the ticket has acceptance criteria (e.g. in the description or as a list), treat them as the source of truth for "done."
15
- 3. **Validate implementation** — Go through each acceptance criterion and confirm it is implemented in code or behavior. If any are missing, implement or fix before considering testing complete.
16
- 4. **Validate docs** — If the change affects architecture, behavior, or features, ensure the appropriate docs are updated (e.g. ADRs in `docs/adr/`, feature docs in `docs/`, READMEs). Documentation should match the current implementation.
17
-
18
- ## Testing work
19
-
20
- 1. **Clean debug code** — Before running the linter, remove all debug code:
21
- - Remove all `console.log` statements (except browser `console.log` relevant to users in production)
22
- - Remove any debug logs calling `127.0.0.1` or `localhost`
23
- - Clean up any temporary debug code
24
-
25
- 2. **Run linter** — Execute `npm run lint` to check code quality and catch any linting issues in **all projects** in `apps/` (e.g. webapp and website).
26
-
27
- 3. **Test build** — Run `npm run build` to ensure **all projects** build successfully without errors.
28
-
29
- 4. **Run tests** — Execute `npm run test` to run all test suites in **all projects** and ensure everything passes.
30
-
31
- 5. **Manual verification** — If applicable, run the dev server and smoke-test the change (e.g. key flows, UI, or APIs).
32
-
33
- 6. **Address issues** — Fix any failures or issues found during lint, build, tests, or manual verification.
34
-
35
- ## Checklist
36
-
37
- - [ ] Ticket description understood; acceptance criteria (if any) identified
38
- - [ ] All acceptance criteria validated as implemented
39
- - [ ] Appropriate docs updated (ADRs, feature docs in `docs/`, etc.) and match implementation
40
- - [ ] Debug code cleaned up (console.log, 127.0.0.1 calls, etc.)
41
- - [ ] Linter passes with no errors for **all projects** in `apps/`
42
- - [ ] Build completes successfully for **all projects** in `apps/`
43
- - [ ] All tests pass for **all projects** in `apps/`
44
- - [ ] Manual verification done if applicable
45
-
46
- ## Summary example (for post_ticket_message)
47
-
48
- ```
49
- ## Testing done
50
- - Ticket/AC: [brief note that description and acceptance criteria were checked and met]
51
- - Docs: [updated / N/A]
52
- - Tests: passing
53
- - Build: passing
54
- - Notes: [any manual verification]
55
- ```
@@ -1,61 +0,0 @@
1
- # lfq06-shipping — Shipping step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step executes close/shipping work: keep `phase=close`, move from `phase_state=in_progress` to `phase_state=done` when shipping is complete. Use prior step summaries (PR link, branch) as context.
8
-
9
- ## 1. Ensure we are not on main with uncommitted changes
10
-
11
- If `git branch --show-current` is `main` **and** `git status --porcelain` is non-empty:
12
-
13
- 1. **Derive branch name from uncommitted files** (see create-branch.md as inspiration):
14
- - Run `git status --porcelain` to inspect changed files
15
- - Infer type from paths: `docs/` → docs, `*.test.*` or `__tests__/` → test, config files → chore, `.github/` → ci, CSS → style, bug-fix cues → fix, new components/features → feat, refactors → refactor, perf cues → perf
16
- - Suggest branch name: `<type>/short-description` (e.g. `feat/LOOPF-30-substate-icons`). Ask user if unclear
17
- 2. **Move uncommitted changes onto a new branch** (same flow as create-branch.md):
18
- - `git stash push -u -m "cursor-ship"`
19
- - `git fetch origin main` && `git pull origin main`
20
- - `git checkout -b <branch-name>`
21
- - `git stash pop`
22
-
23
- If already on a feature branch with uncommitted changes, skip to step 2. If on main with no changes and no existing PR, ask the user what to ship.
24
-
25
- ## 2. Commit and push
26
-
27
- - Stage changes: `git add .` (or stage selectively)
28
- - **Commit message:** Follow Conventional Commits (commitlint / husky). Format: `type(scope): subject` with optional body bullets. Types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `revert`. Scope: `web`, `api`, `mcp`, `deps`, `ci`, `docs`. Subject: imperative, lowercase.
29
- - Commit: `git commit -m "..."` (use `-F` with temp file if multi-line)
30
- - Push: `git push -u origin <branch>`
31
-
32
- ## 3. Prepare a PR
33
-
34
- - Create PR targeting `main`
35
- - **PR title:** Use same Conventional Commits format as the commit (e.g. `feat(web): add substate icons`) — release-please parses PR titles and merge commits for changelog
36
- - **PR body:** Reference ticket(s), e.g. `Closes LOOPF-30` or `Related to LOOPF-30`
37
- - Do **not** merge the PR unless the user explicitly asks to merge
38
-
39
- ### PR title gating (required)
40
-
41
- - **Husky only checks local commit messages**, not PR titles.
42
- - Add a PR title check in CI so merges are blocked unless the title is Conventional Commits:
43
- - Recommended: use `amannn/action-semantic-pull-request` in `.github/workflows/pr-title.yml` and require it in branch protection.
44
- - If a PR title fails, fix the title before merge so the merge commit is parseable by release-please.
45
-
46
- ## 4. Post-PR shipping work (when PR exists)
47
-
48
- - Merge the PR to `main` **only if the user explicitly requests it**
49
-
50
- ## 5. Mark tickets done
51
-
52
- When shipping work is complete (PR created and, if requested, merged): call `update_ticket` with `phase=close`, `phase_state=done` (and compatible legacy `status`). Post summary via `post_ticket_message`.
53
-
54
- ## Summary example (for post_ticket_message)
55
-
56
- ```
57
- ## Shipping done
58
- - Branch: [branch name]
59
- - PR: [PR link]
60
- - Merged: [yes/no, PR link if merged]
61
- ```
@@ -1,22 +0,0 @@
1
- # lfq07-learning — Learning step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step is a post-delivery analysis step; it usually does not require a phase change and should keep typed workflow coherent for the ticket type. Use prior step summaries (what was shipped, outcomes) as context.
8
-
9
- ## Learning work
10
-
11
- - Reflect on what was delivered: outcomes, metrics, user feedback if available.
12
- - Document lessons learned, surprises, or improvements for next time.
13
- - Identify any adjustments to process or scope.
14
-
15
- ## Summary example (for post_ticket_message)
16
-
17
- ```
18
- ## Learning done
19
- - Outcomes: [what we observed]
20
- - Lessons: [key takeaways]
21
- - Adjustments: [if any]
22
- ```
@@ -1,22 +0,0 @@
1
- # lfq08-adjusting — Adjusting step
2
-
3
- **Requirement:** Ticket key or URL may be in the command; if omitted, infer from conversation context (see lfq-ticket-workflow.md §1). Ask only if no ticket can be inferred or if multiple tickets are referenced and the intended one is unclear.
4
-
5
- **When asking questions:** Use an interactive CLI style — ask one question at a time, wait for the user's answer, then ask the next. This makes it easier to answer.
6
-
7
- **Ticket workflow:** For resolve ticket ID, load ticket and context, and when-done steps, follow **lfq-ticket-workflow.md**. This step applies post-delivery adjustments (often via followup tickets) and should keep typed workflow coherent with the ticket type. Use prior step summaries (Learning done, lessons) as context.
8
-
9
- ## Adjusting work
10
-
11
- - Based on Learning outcomes: apply process or scope adjustments.
12
- - Create follow-up tickets if needed.
13
- - Update documentation or runbooks.
14
- - Decide if ticket can move to Done.
15
-
16
- ## Summary example (for post_ticket_message)
17
-
18
- ```
19
- ## Adjusting done
20
- - Adjustments: [what was done]
21
- - Follow-ups: [ticket keys if any]
22
- ```