@flydocs/cli 0.6.0-alpha.2 → 0.6.0-alpha.21

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 (148) hide show
  1. package/dist/cli.js +705 -393
  2. package/package.json +1 -1
  3. package/template/.claude/CLAUDE.md +62 -63
  4. package/template/.claude/agents/implementation-agent.md +1 -1
  5. package/template/.claude/agents/pm-agent.md +1 -1
  6. package/template/.claude/commands/activate.md +1 -1
  7. package/template/.claude/commands/attach.md +1 -1
  8. package/template/.claude/commands/block.md +2 -2
  9. package/template/.claude/commands/capture.md +1 -1
  10. package/template/.claude/commands/close.md +1 -1
  11. package/template/.claude/commands/flydocs-setup.md +387 -74
  12. package/template/.claude/commands/flydocs-upgrade.md +48 -37
  13. package/template/.claude/commands/implement.md +1 -1
  14. package/template/.claude/commands/knowledge.md +61 -0
  15. package/template/.claude/commands/new-project.md +1 -1
  16. package/template/.claude/commands/onboard.md +275 -0
  17. package/template/.claude/commands/project-update.md +1 -1
  18. package/template/.claude/commands/refine.md +1 -1
  19. package/template/.claude/commands/review.md +1 -1
  20. package/template/.claude/commands/start-session.md +1 -1
  21. package/template/.claude/commands/status.md +1 -1
  22. package/template/.claude/commands/validate.md +1 -1
  23. package/template/.claude/commands/wrap-session.md +1 -1
  24. package/template/.claude/hooks/auto-approve.py +132 -0
  25. package/template/.claude/hooks/post-pr-check.py +108 -0
  26. package/template/.claude/hooks/post-transition-check.py +94 -0
  27. package/template/.claude/hooks/prompt-submit.py +513 -0
  28. package/template/.claude/hooks/session-start.py +146 -0
  29. package/template/.claude/hooks/stop-gate.py +109 -0
  30. package/template/.claude/settings.json +41 -4
  31. package/template/.claude/skills/README.md +23 -25
  32. package/template/.claude/skills/flydocs-workflow/SKILL.md +134 -42
  33. package/template/.claude/skills/flydocs-workflow/cursor-rule.mdc +9 -8
  34. package/template/.claude/skills/flydocs-workflow/reference/comment-templates.md +1 -0
  35. package/template/.claude/skills/flydocs-workflow/reference/golden-rules.md +28 -17
  36. package/template/.claude/skills/flydocs-workflow/reference/graph-schema.md +116 -0
  37. package/template/.claude/skills/flydocs-workflow/reference/pr-workflow.md +120 -0
  38. package/template/.claude/skills/flydocs-workflow/reference/priority-estimates.md +37 -15
  39. package/template/.claude/skills/flydocs-workflow/reference/service-descriptor-schema.md +251 -0
  40. package/template/.claude/skills/flydocs-workflow/reference/status-workflow.md +26 -26
  41. package/template/.claude/skills/flydocs-workflow/scripts/_local/__init__.py +0 -0
  42. package/template/.claude/skills/{flydocs-local/scripts/flydocs_api.py → flydocs-workflow/scripts/_local/file_store.py} +137 -47
  43. package/template/.claude/skills/flydocs-workflow/scripts/flydocs_api.py +693 -0
  44. package/template/{.flydocs → .claude/skills/flydocs-workflow}/scripts/generate_manifest.py +4 -4
  45. package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_build.py +132 -1
  46. package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_query.py +18 -5
  47. package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_session.py +1 -10
  48. package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_update.py +4 -4
  49. package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_utils.py +2 -1
  50. package/template/.claude/skills/flydocs-workflow/scripts/issues.py +489 -0
  51. package/template/.claude/skills/flydocs-workflow/scripts/projects.py +144 -0
  52. package/template/.claude/skills/flydocs-workflow/scripts/pull_services.py +128 -0
  53. package/template/.claude/skills/flydocs-workflow/scripts/push_service.py +132 -0
  54. package/template/.claude/skills/flydocs-workflow/scripts/session.py +54 -0
  55. package/template/.claude/skills/flydocs-workflow/scripts/workspace.py +860 -0
  56. package/template/.claude/skills/flydocs-workflow/session.md +63 -25
  57. package/template/.claude/skills/flydocs-workflow/stages/activate.md +18 -7
  58. package/template/.claude/skills/flydocs-workflow/stages/capture.md +10 -5
  59. package/template/.claude/skills/flydocs-workflow/stages/close.md +4 -3
  60. package/template/.claude/skills/flydocs-workflow/stages/implement.md +33 -9
  61. package/template/.claude/skills/flydocs-workflow/stages/refine.md +22 -6
  62. package/template/.claude/skills/flydocs-workflow/stages/review.md +16 -4
  63. package/template/.claude/skills/flydocs-workflow/stages/validate.md +3 -1
  64. package/template/.claude/skills/flydocs-workflow/templates/pr/default.md +33 -0
  65. package/template/.cursor/agents/implementation-agent.md +1 -1
  66. package/template/.cursor/agents/pm-agent.md +2 -2
  67. package/template/.cursor/hooks.json +10 -3
  68. package/template/.env.example +6 -6
  69. package/template/.flydocs/config.json +5 -18
  70. package/template/.flydocs/templates/README.md +13 -14
  71. package/template/.flydocs/templates/quick-capture.md +4 -8
  72. package/template/.flydocs/version +1 -1
  73. package/template/AGENTS.md +39 -32
  74. package/template/CHANGELOG.md +39 -0
  75. package/template/flydocs/README.md +1 -3
  76. package/template/flydocs/context/project.md +6 -3
  77. package/template/flydocs/design-system/README.md +3 -3
  78. package/template/flydocs/knowledge/INDEX.md +38 -53
  79. package/template/flydocs/knowledge/README.md +60 -9
  80. package/template/flydocs/knowledge/templates/decision.md +47 -0
  81. package/template/flydocs/knowledge/templates/feature.md +35 -0
  82. package/template/flydocs/knowledge/templates/note.md +25 -0
  83. package/template/manifest.json +24 -20
  84. package/template/.claude/skills/flydocs-cloud/SKILL.md +0 -111
  85. package/template/.claude/skills/flydocs-cloud/cursor-rule.mdc +0 -50
  86. package/template/.claude/skills/flydocs-cloud/scripts/assign.py +0 -22
  87. package/template/.claude/skills/flydocs-cloud/scripts/assign_cycle.py +0 -28
  88. package/template/.claude/skills/flydocs-cloud/scripts/assign_milestone.py +0 -22
  89. package/template/.claude/skills/flydocs-cloud/scripts/comment.py +0 -29
  90. package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +0 -63
  91. package/template/.claude/skills/flydocs-cloud/scripts/create_milestone.py +0 -35
  92. package/template/.claude/skills/flydocs-cloud/scripts/create_project.py +0 -33
  93. package/template/.claude/skills/flydocs-cloud/scripts/create_team.py +0 -39
  94. package/template/.claude/skills/flydocs-cloud/scripts/estimate.py +0 -29
  95. package/template/.claude/skills/flydocs-cloud/scripts/flydocs_api.py +0 -210
  96. package/template/.claude/skills/flydocs-cloud/scripts/get_issue.py +0 -24
  97. package/template/.claude/skills/flydocs-cloud/scripts/link.py +0 -28
  98. package/template/.claude/skills/flydocs-cloud/scripts/list_cycles.py +0 -28
  99. package/template/.claude/skills/flydocs-cloud/scripts/list_issues.py +0 -44
  100. package/template/.claude/skills/flydocs-cloud/scripts/list_labels.py +0 -19
  101. package/template/.claude/skills/flydocs-cloud/scripts/list_milestones.py +0 -28
  102. package/template/.claude/skills/flydocs-cloud/scripts/list_projects.py +0 -31
  103. package/template/.claude/skills/flydocs-cloud/scripts/list_teams.py +0 -19
  104. package/template/.claude/skills/flydocs-cloud/scripts/priority.py +0 -29
  105. package/template/.claude/skills/flydocs-cloud/scripts/project_update.py +0 -45
  106. package/template/.claude/skills/flydocs-cloud/scripts/set_labels.py +0 -68
  107. package/template/.claude/skills/flydocs-cloud/scripts/set_team.py +0 -41
  108. package/template/.claude/skills/flydocs-cloud/scripts/transition.py +0 -26
  109. package/template/.claude/skills/flydocs-cloud/scripts/update_description.py +0 -36
  110. package/template/.claude/skills/flydocs-cloud/scripts/update_issue.py +0 -82
  111. package/template/.claude/skills/flydocs-context-graph/SKILL.md +0 -87
  112. package/template/.claude/skills/flydocs-context-graph/schema.md +0 -78
  113. package/template/.claude/skills/flydocs-context-graph/scripts/graph_context.py +0 -338
  114. package/template/.claude/skills/flydocs-context7/SKILL.md +0 -105
  115. package/template/.claude/skills/flydocs-context7/cursor-rule.mdc +0 -49
  116. package/template/.claude/skills/flydocs-context7/scripts/context7.py +0 -293
  117. package/template/.claude/skills/flydocs-estimates/SKILL.md +0 -384
  118. package/template/.claude/skills/flydocs-figma/SKILL.md +0 -377
  119. package/template/.claude/skills/flydocs-figma/references/PROMPTING.md +0 -108
  120. package/template/.claude/skills/flydocs-figma/references/TROUBLESHOOTING.md +0 -112
  121. package/template/.claude/skills/flydocs-local/SKILL.md +0 -103
  122. package/template/.claude/skills/flydocs-local/cursor-rule.mdc +0 -43
  123. package/template/.claude/skills/flydocs-local/scripts/assign.py +0 -20
  124. package/template/.claude/skills/flydocs-local/scripts/comment.py +0 -27
  125. package/template/.claude/skills/flydocs-local/scripts/create_issue.py +0 -44
  126. package/template/.claude/skills/flydocs-local/scripts/estimate.py +0 -37
  127. package/template/.claude/skills/flydocs-local/scripts/get_issue.py +0 -20
  128. package/template/.claude/skills/flydocs-local/scripts/link.py +0 -41
  129. package/template/.claude/skills/flydocs-local/scripts/list_issues.py +0 -34
  130. package/template/.claude/skills/flydocs-local/scripts/priority.py +0 -37
  131. package/template/.claude/skills/flydocs-local/scripts/project_update.py +0 -67
  132. package/template/.claude/skills/flydocs-local/scripts/status_summary.py +0 -16
  133. package/template/.claude/skills/flydocs-local/scripts/transition.py +0 -24
  134. package/template/.claude/skills/flydocs-local/scripts/update_description.py +0 -35
  135. package/template/.claude/skills/flydocs-local/scripts/update_issue.py +0 -84
  136. package/template/.flydocs/hooks/auto-approve.py +0 -71
  137. package/template/.flydocs/hooks/prompt-submit.py +0 -277
  138. package/template/.flydocs/scripts/skill_manager.py +0 -541
  139. package/template/.flydocs/templates/bug.md +0 -166
  140. package/template/.flydocs/templates/chore.md +0 -110
  141. package/template/.flydocs/templates/feature.md +0 -173
  142. package/template/.flydocs/templates/idea.md +0 -122
  143. /package/template/{.flydocs → .claude}/hooks/post-edit.py +0 -0
  144. /package/template/.claude/skills/{flydocs-estimates/references → flydocs-workflow/reference}/provider-costs.md +0 -0
  145. /package/template/.claude/skills/flydocs-workflow/templates/{bug.md → issues/bug.md} +0 -0
  146. /package/template/.claude/skills/flydocs-workflow/templates/{chore.md → issues/chore.md} +0 -0
  147. /package/template/.claude/skills/flydocs-workflow/templates/{feature.md → issues/feature.md} +0 -0
  148. /package/template/.claude/skills/flydocs-workflow/templates/{idea.md → issues/idea.md} +0 -0
@@ -4,23 +4,37 @@
4
4
 
5
5
  When a conversation begins or the user returns after a gap:
6
6
 
7
- 1. **Fetch all product issues in one call** Run `list_issues.py --active --limit 100`.
7
+ 1. **Query graph for issue context** (if an issue ID is known from the prompt or last session) —
8
+
9
+ ```
10
+ python3 .claude/skills/flydocs-workflow/scripts/graph_query.py --node <issue-id> --depth 2
11
+ ```
12
+
13
+ This surfaces related decisions, blocking relationships, and recent session activity.
14
+ Skip silently if the script is not installed or the graph has not been built.
15
+
16
+ 2. **Check workspace context** — If `flydocs/context/service.json` exists, note the
17
+ repo's topology and dependencies. For multi-repo workspaces (topology type 3 or 4),
18
+ briefly mention which sibling repos exist and any active cross-repo dependencies.
19
+ This helps the user orient when switching between repos.
20
+
21
+ 3. **Fetch all product issues in one call** — Run `issues.py list --active --limit 100`.
8
22
  This is auto-scoped by the product cascade: `activeProjects` → `product.labelIds` → team-wide.
9
23
  Issues outside the product scope are never shown.
10
24
 
11
- 2. **Identify the active project** — Read `workspace.activeProjects` from config.
25
+ 4. **Identify the active project** — Read `workspace.activeProjects` from config.
12
26
  Separate issues into two buckets:
13
27
  - **Active project issues** — issues whose `projectId` matches an active project
14
28
  - **Other product issues** — issues in the product scope but in a different project
15
29
 
16
- 3. **Group active project issues by milestone** — Use the `milestone` and `milestoneSortOrder`
30
+ 5. **Group active project issues by milestone** — Use the `milestone` and `milestoneSortOrder`
17
31
  fields returned by the script. Sort milestones by `milestoneSortOrder` (lowest first = earliest).
18
32
  Within each milestone, group by status.
19
33
 
20
- 4. **Identify the current milestone** — The first milestone (by sort order) that still has
34
+ 6. **Identify the current milestone** — The first milestone (by sort order) that still has
21
35
  open issues. This is where work should focus.
22
36
 
23
- 5. **Present the dashboard:**
37
+ 7. **Present the dashboard:**
24
38
 
25
39
  ```
26
40
  Welcome back! [Product Name] status:
@@ -43,20 +57,21 @@ When a conversation begins or the user returns after a gap:
43
57
  Suggested starting point: [ISSUE-ID] — [reason: highest priority in current milestone / unblocks others / due soon]
44
58
  ```
45
59
 
46
- 6. **Suggest where to start** — Use this priority cascade:
60
+ 8. **Suggest where to start** — Use this priority cascade:
47
61
  - Blocked issues that need unblocking (always surface first)
48
62
  - In-progress issues (continue existing work)
49
63
  - Due date approaching (within 7 days)
50
64
  - Highest priority in the current milestone
51
65
  - Issues that unblock downstream milestones
52
66
 
53
- 7. **Surface other product issues briefly** — If there are issues in the product scope
67
+ 9. **Surface other product issues briefly** — If there are issues in the product scope
54
68
  but outside the active project, mention the count with a one-line summary:
69
+
55
70
  ```
56
71
  Also in [Product Name]: [N] issues across other projects (use --all to see)
57
72
  ```
58
73
 
59
- 8. **Check for stale issues** — Flag issues exceeding staleness thresholds (see below).
74
+ 10. **Check for stale issues** — Flag issues exceeding staleness thresholds (see below).
60
75
 
61
76
  **Important:** Do NOT make separate API calls per status or per milestone. One call returns
62
77
  all issues with their status and milestone fields — group them in your response.
@@ -69,19 +84,41 @@ automatically via the config cascade.
69
84
  When the user indicates they're done for the session:
70
85
 
71
86
  1. **Gather session data** — What was completed, what's in progress, what's blocked.
72
- 2. **Compose summary** using the template below.
73
- 3. **Determine health status** See health table.
74
- 4. **Post project update** `project_update.py` with health and summary body.
75
- 5. **Record session in context graph** Call `graph_session.py` with summary and issues worked on:
87
+ 2. **Knowledge capture check** Review the session's work for uncaptured knowledge:
88
+ - Were any architectural decisions made?
89
+ - Were any non-obvious behaviors or workarounds discovered?
90
+ - Were any patterns established that future work should follow?
91
+ - Did debugging reveal something worth documenting?
92
+ If yes, prompt the user: "This session involved [specific discovery]. Should we capture it in a knowledge doc before wrapping?" Use `/knowledge` if they agree.
93
+ 3. **Compose summary** using the template below.
94
+ 4. **Determine health status** — See health table.
95
+ 5. **Post project update** — `session.py project-update` with health and summary body.
96
+ 6. **Write last-summary.json** — Write `.flydocs/session/last-summary.json` for cross-session continuity.
97
+ Create the directory if it doesn't exist. Structure:
98
+
99
+ ```json
100
+ {
101
+ "timestamp": "ISO-8601 (e.g. 2026-03-20T17:30:00Z)",
102
+ "issues": ["FLY-XXX", "FLY-YYY"],
103
+ "pending": ["description of incomplete work"],
104
+ "blockers": ["any blockers, or empty array"],
105
+ "notes": "free-form session summary"
106
+ }
76
107
  ```
77
- python3 .claude/skills/flydocs-context-graph/scripts/graph_session.py \
108
+
109
+ Populate from the session data gathered in step 1. Use the Write tool or a script — the file
110
+ must exist on disk so the prompt hook can read it on the next session start.
111
+
112
+ 7. **Record session in context graph** — Call `graph_session.py` with summary and issues worked on:
113
+ ```
114
+ python3 .claude/skills/flydocs-workflow/scripts/graph_session.py \
78
115
  --summary "Brief summary of session outcomes" \
79
116
  --issue ISSUE-ID [--issue ISSUE-ID2] \
80
117
  [--decision NNN]
81
118
  ```
82
119
  This creates a session node for cross-session continuity. Skip silently if the script is not installed.
83
- 6. **Verify** — Confirm the project update was posted (update ID returned).
84
- 7. **Ask about uncommitted changes** — If git shows uncommitted work, offer to commit.
120
+ 8. **Verify** — Confirm the project update was posted (update ID returned).
121
+ 9. **Ask about uncommitted changes** — If git shows uncommitted work, offer to commit.
85
122
 
86
123
  Do not just summarize in chat. Actually post the update. Do not skip if the user seems in a hurry.
87
124
 
@@ -104,15 +141,16 @@ Do not just summarize in chat. Actually post the update. Do not skip if the user
104
141
 
105
142
  ### Health Status
106
143
 
107
- | Status | When to Use |
108
- |--------|-------------|
109
- | onTrack | Progress made, no blockers |
110
- | atRisk | Minor delays, attention needed |
144
+ | Status | When to Use |
145
+ | -------- | ------------------------------- |
146
+ | onTrack | Progress made, no blockers |
147
+ | atRisk | Minor delays, attention needed |
111
148
  | offTrack | Major blockers, behind schedule |
112
149
 
113
150
  ### Wrap Detection Phrases
114
151
 
115
152
  Offer session wrap when the user says:
153
+
116
154
  - "I'm done for today" / "wrapping up" / "that's it for now"
117
155
  - "save progress" / "end of day" / "stopping here"
118
156
 
@@ -120,9 +158,9 @@ Offer session wrap when the user says:
120
158
 
121
159
  Proactively surface issues that may be stuck:
122
160
 
123
- | State | Threshold | Action |
124
- |-------|-----------|--------|
125
- | Implementing | > 7 days without activity | Warn |
126
- | Review | > 3 days without activity | Warn |
127
- | Testing/QA | > 3 days without activity | Warn |
128
- | Blocked | Any | Always surface |
161
+ | State | Threshold | Action |
162
+ | ------------ | ------------------------- | -------------- |
163
+ | Implementing | > 7 days without activity | Warn |
164
+ | Review | > 3 days without activity | Warn |
165
+ | Testing/QA | > 3 days without activity | Warn |
166
+ | Blocked | Any | Always surface |
@@ -15,7 +15,7 @@ Assign work to a person and move the issue to In Progress.
15
15
 
16
16
  When user asks "what should I work on?":
17
17
 
18
- 1. **Query available issues** — `list_issues.py` for Ready and Backlog states.
18
+ 1. **Query available issues** — `issues.py list` for Ready and Backlog states.
19
19
  2. **Filter** — Exclude blocked issues and issues assigned to others.
20
20
  3. **Rank** — Priority (highest first) → unblocked → smaller estimate.
21
21
  4. **Present recommendation** — Show top candidates with reasoning.
@@ -23,12 +23,23 @@ When user asks "what should I work on?":
23
23
 
24
24
  ### Activation (specific issue)
25
25
 
26
- 1. **Read full issue** — Load description and acceptance criteria.
27
- 2. **Determine assignee** — MANDATORY. Ask "Who should this be assigned to?" if unclear. This is a hard gate.
28
- 3. **Assign** — `assign.py` with user identifier. If assignment fails, STOP. Do not continue.
29
- 4. **Set metadata** — Priority and estimate if not already set.
30
- 5. **Transition** `transition.py` to Implementing with Activate comment from `reference/comment-templates.md`.
31
- 6. **Verify** Confirm state = In Progress and assignee set.
26
+ 1. **Query graph for blocking relationships** — Check for blockers before proceeding:
27
+ ```
28
+ python3 .claude/skills/flydocs-workflow/scripts/graph_query.py --node <issue-id> --relationships BLOCKS,BLOCKED_BY
29
+ ```
30
+ If blocking relationships exist, surface them to the user before continuing.
31
+ Skip silently if the script is not installed or the graph has not been built.
32
+ 2. **Check cross-repo impact** — If `flydocs/context/service.json` exists and the issue
33
+ description references API changes, endpoint modifications, or interface updates,
34
+ check if the affected APIs appear in the descriptor's `apis` section. If so, note
35
+ which sibling repos may be affected (they CONSUME this interface). This is a
36
+ heads-up, not a gate — just surface it for awareness.
37
+ 3. **Read full issue** — Load description and acceptance criteria.
38
+ 4. **Determine assignee** — MANDATORY. Ask "Who should this be assigned to?" if unclear. This is a hard gate.
39
+ 5. **Assign** — `issues.py assign` with user identifier. If assignment fails, STOP. Do not continue.
40
+ 6. **Set metadata** — Priority and estimate if not already set.
41
+ 7. **Transition** — `issues.py transition` to Implementing with Activate comment from `reference/comment-templates.md`.
42
+ 8. **Verify** — Confirm state = In Progress and assignee set.
32
43
 
33
44
  **Sequence matters:** Assign → metadata → transition. Never transition without an assignee.
34
45
 
@@ -16,21 +16,26 @@ When the user has enough context to describe the issue:
16
16
 
17
17
  1. **Determine type** — feature, bug, chore, or idea. Ask if unclear.
18
18
  2. **Select project** — Single active project: use it. Multiple: ask user. None: error.
19
- 3. **Fill template** — Read the appropriate template from `templates/`. Extract from user input:
19
+ 3. **Fill template** — Read the appropriate template from `templates/issues/`. Extract from user input:
20
20
  - **What** — Context or problem description
21
21
  - **Why** — User story or business value
22
22
  - **How** — Technical notes or approach (if known)
23
23
  - **Done when** — Acceptance criteria as checkboxes
24
- 4. **Create issue** — `create_issue.py` with title, type, description, priority, and estimate (if known).
25
- 5. **Add comment** Use the Capture template from `reference/comment-templates.md`.
26
- 6. **Verify** Confirm issue identifier returned.
24
+ 4. **Apply labels** — Include appropriate labels from config:
25
+ - **Category label**: Automatic from issue type (feature, bug, chore, idea) via `issueLabels.category` in config
26
+ - **Repo label**: If multi-repo workspace, apply the repo label from `issueLabels.repo` in config
27
+ - **Product labels**: Applied automatically by the workflow scripts from `workspace.product.labelIds`
28
+ - **Ad-hoc labels**: Only if explicitly relevant (e.g., "accessibility", "performance")
29
+ 5. **Create issue** — `issues.py create` with title, type, description, priority, estimate (if known), and labels.
30
+ 6. **Add comment** — Use the Capture template from `reference/comment-templates.md`.
31
+ 7. **Verify** — Confirm issue identifier returned.
27
32
 
28
33
  ### Quick Capture
29
34
 
30
35
  When logging an idea or observation during flow — flesh out later:
31
36
 
32
37
  1. **Determine type** — Default to `idea` if unclear.
33
- 2. **Create issue** — `create_issue.py --triage` with minimal title and brief context.
38
+ 2. **Create issue** — `issues.py create --triage` with minimal title and brief context.
34
39
  Issue receives both the category label and the triage label.
35
40
  3. **Add comment** — "**Captured** — Quick capture, needs refinement."
36
41
  4. Issue sits in Backlog with triage tag. The Refine stage picks it up later.
@@ -11,12 +11,13 @@ Archive verified and completed work.
11
11
  ## Steps
12
12
 
13
13
  1. **Verify QE approval** — Check issue comments for a "QE Approved" comment. If not found, do not close — direct to Validate stage first.
14
- 2. **Determine terminal state:**
14
+ 2. **Final knowledge check** — If the issue involved significant implementation, verify `knowledge/INDEX.md` reflects any decisions or discoveries. This is informational — don't block close, but prompt the user if notable knowledge appears uncaptured.
15
+ 3. **Determine terminal state:**
15
16
  - **Done** — Work completed and verified (normal path)
16
17
  - **Archived** — Deferring to a later date (not cancelled, may return)
17
18
  - **Canceled** — Not pursuing (won't be done)
18
- 3. **Transition** — `transition.py` with the appropriate Close comment from `reference/comment-templates.md`.
19
- 4. **Verify** — Confirm terminal state reached.
19
+ 4. **Transition** — `issues.py transition` with the appropriate Close comment from `reference/comment-templates.md`.
20
+ 5. **Verify** — Confirm terminal state reached.
20
21
 
21
22
  ## Gates
22
23
 
@@ -20,6 +20,7 @@ Build, test, simplify, and hand off to code review.
20
20
  ### 2. Show Implementation Checklist
21
21
 
22
22
  Present to the user:
23
+
23
24
  - Issue ID and title
24
25
  - All acceptance criteria
25
26
  - Estimate
@@ -46,17 +47,28 @@ Rationale: [Why this choice over alternatives]
46
47
 
47
48
  For significant architectural decisions, also create a record in `knowledge/decisions/`.
48
49
 
49
- ### 5. TODO to Issue
50
+ ### 5. Knowledge Capture Check
51
+
52
+ Before moving to self-review, check if any of these occurred during implementation:
53
+
54
+ - **Architectural decision** — framework choice, pattern established, approach rejected
55
+ - **Discovery** — API quirk, debugging technique, non-obvious behavior
56
+ - **Workaround** — limitation found, temporary fix applied
57
+ - **Pattern** — reusable approach that future work should follow
58
+
59
+ If yes, prompt the user: "Should we capture this in a knowledge doc?" Use `/knowledge` to create the doc, or note it for session wrap if the user wants to defer.
60
+
61
+ ### 6. TODO to Issue
50
62
 
51
63
  When adding a TODO comment in code:
52
64
 
53
65
  1. Write the initial comment: `// TODO: Description`
54
- 2. Create a corresponding issue via `create_issue.py` with type `chore`
66
+ 2. Create a corresponding issue via `issues.py create` with type `chore`
55
67
  3. Update the comment with the issue ID: `// TODO: Description (ENG-XXX)`
56
68
 
57
69
  Every TODO must have a tracked issue. No orphaned TODOs.
58
70
 
59
- ### 6. Simplify
71
+ ### 7. Simplify
60
72
 
61
73
  After implementation is functionally complete, review modified files for:
62
74
 
@@ -67,7 +79,7 @@ After implementation is functionally complete, review modified files for:
67
79
 
68
80
  Apply standards from installed community skills and `preferences.md`. Preserve all functionality.
69
81
 
70
- ### 7. Self-Review
82
+ ### 8. Self-Review
71
83
 
72
84
  Before handing off:
73
85
 
@@ -77,23 +89,35 @@ Before handing off:
77
89
  - [ ] No obvious security issues
78
90
  - [ ] No orphaned TODOs
79
91
 
80
- ### 8. Hand Off to Review
92
+ ### 9. Create PR (if applicable)
93
+
94
+ See `reference/pr-workflow.md` for full conventions. If changes warrant a PR:
95
+
96
+ 1. Create branch: `git checkout -b <type>/<ref>-<slug>`
97
+ 2. Stage and commit with a descriptive message: `<type>: <description> (<ref>)`
98
+ 3. Push: `git push -u origin <branch>`
99
+ 4. Create PR: `python3 .claude/skills/flydocs-workflow/scripts/issues.py pr --issue <ref>`
100
+
101
+ The PR dispatcher auto-populates the description from the issue context and links the PR back via comment. If the user requested a direct commit or changes are trivial, skip the PR and commit directly.
102
+
103
+ ### 10. Hand Off to Review
81
104
 
82
- Transition to Review via `transition.py` with the "Ready for Review" comment from `reference/comment-templates.md`. Include:
105
+ Transition to Review via `issues.py transition` with the "Ready for Review" comment from `reference/comment-templates.md`. Include:
83
106
 
84
107
  - What changed (brief summary)
85
108
  - File count
86
109
  - How it was tested
87
110
  - Criteria completion count
111
+ - PR link (if PR was created)
88
112
 
89
113
  ## Checkbox Protocol
90
114
 
91
115
  Checkboxes live in the issue description. Never in comments.
92
116
 
93
- 1. Read current description via `get_issue.py`
117
+ 1. Read current description via `issues.py get`
94
118
  2. Find `- [ ] Criterion text`
95
119
  3. Change to `- [x] Criterion text`
96
- 4. Save entire updated description via `update_description.py`
120
+ 4. Save entire updated description via `issues.py description`
97
121
 
98
122
  **Never** put completion checkmarks in comments. **Never** create new checkboxes in comments.
99
123
 
@@ -102,7 +126,7 @@ Checkboxes live in the issue description. Never in comments.
102
126
  If blocked during implementation:
103
127
 
104
128
  1. Document what is blocking and what is needed
105
- 2. Transition via `transition.py` to Blocked with comment from `reference/comment-templates.md`
129
+ 2. Transition via `issues.py transition` to Blocked with comment from `reference/comment-templates.md`
106
130
  3. If blocked by another issue, create a dependency relationship
107
131
 
108
132
  To unblock: transition back to Implementing with an Unblocked comment.
@@ -16,9 +16,9 @@ For quick captures that need classification and structure:
16
16
 
17
17
  1. **Read issue** — Load current content.
18
18
  2. **Classify type** — Determine category (feature/bug/chore/idea). Ask if unclear.
19
- 3. **Apply template** — Read appropriate template from `templates/` and restructure the issue content to match.
19
+ 3. **Apply template** — Read appropriate template from `templates/issues/` and restructure the issue content to match.
20
20
  4. **Set priority** — P1-P4 based on urgency and impact.
21
- 5. **Update description** — `update_description.py` with templated content.
21
+ 5. **Update description** — `issues.py description` with templated content.
22
22
  6. **Add comment** — Use Triage template from `reference/comment-templates.md`.
23
23
 
24
24
  ### Refinement Path (issue already templated)
@@ -32,14 +32,30 @@ For backlog items that need fleshing out before activation:
32
32
  5. **Add technical notes** — Implementation guidance, dependencies, affected areas.
33
33
  6. **Set estimate and priority** — If not already set. See `reference/priority-estimates.md`.
34
34
  7. **Check dependencies** — Blocked by other issues? Related work?
35
- 8. **Update description** — `update_description.py` with refined content.
36
- 9. **Transition to Ready** — `transition.py` with Refine comment from `reference/comment-templates.md`.
35
+ 8. **Assign milestone** — If the issue fits a current or upcoming milestone, assign it via `--milestone` on `issues.py update`. If no milestone is appropriate, leave unassigned but note it.
36
+ 9. **Update description** — `issues.py description` with refined content.
37
+ 10. **Quality gate check** — Verify all criteria pass before transitioning:
38
+
39
+ | Gate | Check | Required |
40
+ | ------------------- | ------------------------------------------------ | -------- |
41
+ | Description | Context section filled, not just a title | Yes |
42
+ | Acceptance criteria | Specific, testable, written as checkboxes | Yes |
43
+ | Estimate | Set (see `reference/priority-estimates.md`) | Yes |
44
+ | Priority | Set (P1-P4) | Yes |
45
+ | Labels | Category label applied, repo label if multi-repo | Yes |
46
+ | Dependencies | Identified and documented, or explicitly "none" | Yes |
47
+ | Milestone | Assigned if applicable | No |
48
+
49
+ If any required gate fails, address it before transitioning.
50
+
51
+ 11. **Transition to Ready** — `issues.py transition` with Refine comment from `reference/comment-templates.md`.
37
52
 
38
53
  ## Gates
39
54
 
55
+ - All quality gate checks pass (see table above)
40
56
  - Acceptance criteria defined (specific, testable, as checkboxes)
41
- - Estimate set (1-5)
42
- - Priority set (1-4)
57
+ - Estimate set
58
+ - Priority set (P1-P4)
43
59
 
44
60
  ## Outputs
45
61
 
@@ -16,7 +16,8 @@ Validate code quality, standards compliance, and acceptance criteria completion.
16
16
  - Issue description (acceptance criteria)
17
17
  - Implementation summary comment (what was built)
18
18
  - Installed community skills relevant to the code (check `.claude/skills/` for available patterns)
19
- - Changed files (from git diff or implementation notes)
19
+ - Changed files prefer PR diff if a PR exists, otherwise git diff or implementation notes
20
+ - `reference/pr-workflow.md` for branch and commit conventions
20
21
 
21
22
  ### 2. Verify Acceptance Criteria
22
23
 
@@ -47,25 +48,36 @@ Check against project standards and installed community skills:
47
48
  - Tests are meaningful (not just coverage)
48
49
  - Edge cases considered
49
50
 
50
- ### 5. Decision
51
+ ### 5. Knowledge Verification
52
+
53
+ If the issue template includes a Documentation section with "Knowledge base updated" checkbox:
54
+
55
+ - Verify knowledge doc was created or updated (check `knowledge/INDEX.md` for new entries)
56
+ - If the checkbox is unchecked and implementation involved significant decisions or discoveries, flag it
57
+
58
+ This is a soft gate — not all issues require knowledge docs. Flag only when implementation clearly warrants documentation that wasn't captured.
59
+
60
+ ### 6. Decision
51
61
 
52
62
  **If approved:**
53
63
 
54
- 1. Transition to Testing via `transition.py` with "Code Review Passed" comment from `reference/comment-templates.md`.
64
+ 1. Transition to Testing via `issues.py transition` with "Code Review Passed" comment from `reference/comment-templates.md`.
55
65
 
56
66
  **If changes needed:**
57
67
 
58
68
  1. Document specific issues with file/location details.
59
- 2. Transition to Implementing via `transition.py` with "Code Review: Changes Needed" comment listing each issue.
69
+ 2. Transition to Implementing via `issues.py transition` with "Code Review: Changes Needed" comment listing each issue.
60
70
 
61
71
  ## Review Boundaries
62
72
 
63
73
  The review agent:
74
+
64
75
  - Analyzes code quality and documents findings
65
76
  - Validates against standards and criteria
66
77
  - Transitions issue state
67
78
 
68
79
  The review agent does NOT:
80
+
69
81
  - Edit or write code
70
82
  - Fix issues directly
71
83
  - Approve incomplete work
@@ -47,7 +47,7 @@ Please test each criterion and let me know:
47
47
  **On issues found:**
48
48
 
49
49
  1. Document issues clearly. Ask clarifying questions if needed.
50
- 2. Transition to Implementing via `transition.py` with "QE Issues Found" comment listing each issue.
50
+ 2. Transition to Implementing via `issues.py transition` with "QE Issues Found" comment listing each issue.
51
51
 
52
52
  **On partial issues:**
53
53
 
@@ -65,11 +65,13 @@ Please test each criterion and let me know:
65
65
  ## QE Boundaries
66
66
 
67
67
  The QE agent:
68
+
68
69
  - Guides user through testing
69
70
  - Documents approval or issues
70
71
  - Transitions back to Implementing if issues found
71
72
 
72
73
  The QE agent NEVER:
74
+
73
75
  - Moves issues to Done or closes them
74
76
  - Skips documenting results
75
77
  - Approves without user confirmation
@@ -0,0 +1,33 @@
1
+ ## Summary
2
+
3
+ <!-- What changed and why. Reference the issue. -->
4
+
5
+ Resolves {ISSUE_REF}
6
+
7
+ {ISSUE_SUMMARY}
8
+
9
+ ## Changes
10
+
11
+ <!-- Key changes, grouped logically. -->
12
+
13
+ - {CHANGE_1}
14
+ - {CHANGE_2}
15
+
16
+ ## Test Plan
17
+
18
+ <!-- How to verify this works. Be specific. -->
19
+
20
+ - [ ] {TEST_1}
21
+ - [ ] {TEST_2}
22
+
23
+ ## Acceptance Criteria
24
+
25
+ <!-- Pulled from issue description. -->
26
+
27
+ {ACCEPTANCE_CRITERIA}
28
+
29
+ ## Notes
30
+
31
+ <!-- Anything reviewers should know: trade-offs, follow-up work, risks. -->
32
+
33
+ {NOTES}
@@ -20,7 +20,7 @@ Implementation agent for FlyDocs spec-driven development.
20
20
 
21
21
  ## Constraints
22
22
 
23
- - **Scripts for issue updates** — use mechanism scripts for progress comments and transitions
23
+ - **Scripts for issue updates** — use workflow dispatcher scripts for progress comments and transitions
24
24
  - Follow installed community skills for code quality patterns
25
25
  - Keep changes focused on the spec — don't over-engineer
26
26
 
@@ -2,7 +2,7 @@
2
2
  name: pm-agent
3
3
  description: "Specs, workflow, issue management. Invoke for capturing, refining, activating, reviewing, closing, or session management."
4
4
  model: inherit
5
- readonly: false
5
+ readonly: true
6
6
  is_background: false
7
7
  ---
8
8
 
@@ -20,7 +20,7 @@ Product management agent for FlyDocs spec-driven workflow.
20
20
  ## Constraints
21
21
 
22
22
  - **Do not modify code files** — this agent handles workflow, not implementation
23
- - **Scripts for all issue ops** — read the mechanism skill's SKILL.md for calling conventions
23
+ - **Scripts for all issue ops** — use workflow dispatcher scripts (`issues.py`, `projects.py`, etc.) for all operations
24
24
  - Defer technical decisions to implementation agent
25
25
 
26
26
  Read `.claude/skills/flydocs-workflow/SKILL.md` for lifecycle and stage procedures.
@@ -4,19 +4,26 @@
4
4
  "preToolUse": [
5
5
  {
6
6
  "matcher": "Bash",
7
- "command": "python3 ./.flydocs/hooks/auto-approve.py",
7
+ "command": "python3 ./.claude/hooks/auto-approve.py",
8
8
  "timeout": 5
9
9
  }
10
10
  ],
11
11
  "afterFileEdit": [
12
12
  {
13
- "command": "python3 ./.flydocs/hooks/post-edit.py",
13
+ "command": "python3 ./.claude/hooks/post-edit.py",
14
14
  "timeout": 30
15
15
  }
16
16
  ],
17
+ "afterToolUse": [
18
+ {
19
+ "matcher": "Bash",
20
+ "command": "python3 ./.claude/hooks/post-pr-check.py",
21
+ "timeout": 10
22
+ }
23
+ ],
17
24
  "beforeSubmitPrompt": [
18
25
  {
19
- "command": "python3 ./.flydocs/hooks/prompt-submit.py",
26
+ "command": "python3 ./.claude/hooks/prompt-submit.py",
20
27
  "timeout": 10
21
28
  }
22
29
  ]
@@ -31,18 +31,18 @@
31
31
  FLYDOCS_API_KEY=
32
32
 
33
33
  # ===========================================
34
- # CLOUD TIER: Direct Linear API Key (Legacy)
34
+ # CLOUD TIER: Direct Provider API Key (Legacy)
35
35
  # ===========================================
36
- # Use this ONLY if connecting directly to Linear without the relay.
37
- # Get from: Linear → Settings → API → Personal API Keys
38
- # Format: lin_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
39
- LINEAR_API_KEY=
36
+ # Use this ONLY if connecting directly to your provider without the relay.
37
+ # For Linear: Get from Linear → Settings → API → Personal API Keys (format: lin_api_...)
38
+ # For Jira: Get from Atlassian → API Tokens (format: ATATT...)
39
+ # LINEAR_API_KEY=
40
40
 
41
41
  # ===========================================
42
42
  # OPTIONAL: Figma Access Token
43
43
  # ===========================================
44
44
  # Get from: Figma → Settings → Personal Access Tokens
45
- # Only needed if using the flydocs-figma skill for design integration
45
+ # Only needed if using Figma design integration
46
46
  FIGMA_ACCESS_TOKEN=
47
47
 
48
48
  # ===========================================
@@ -1,18 +1,17 @@
1
1
  {
2
- "version": "0.6.0-alpha.2",
2
+ "version": "0.6.0-alpha.21",
3
3
  "sourceRepo": "github.com/plastrlab/flydocs-core",
4
4
  "tier": "local",
5
5
  "setupComplete": false,
6
+ "onboardComplete": false,
7
+ "workspaceId": null,
6
8
  "paths": {
7
9
  "content": "flydocs"
8
10
  },
9
- "provider": {
10
- "type": null,
11
- "teamId": null
12
- },
13
11
  "workspace": {
14
12
  "activeProjects": [],
15
13
  "defaultMilestoneId": null,
14
+ "repoSlug": null,
16
15
  "product": {
17
16
  "name": null,
18
17
  "labelIds": [],
@@ -21,7 +20,7 @@
21
20
  }
22
21
  },
23
22
  "issueLabels": {
24
- "_note": "Run /flydocs-setup to populate these from your Linear team",
23
+ "_note": "Run /flydocs-setup to populate these from your workspace",
25
24
  "category": {
26
25
  "feature": null,
27
26
  "bug": null,
@@ -50,18 +49,6 @@
50
49
  "installed": [],
51
50
  "custom": []
52
51
  },
53
- "statusMapping": {
54
- "BACKLOG": "Backlog",
55
- "READY": "Todo",
56
- "IMPLEMENTING": "In Progress",
57
- "BLOCKED": "Blocked",
58
- "REVIEW": "In Review",
59
- "TESTING": "QA",
60
- "COMPLETE": "Done",
61
- "ARCHIVED": "Archived",
62
- "CANCELED": "Canceled",
63
- "DUPLICATE": "Duplicate"
64
- },
65
52
  "designSystem": null,
66
53
  "aiLabor": {
67
54
  "enabled": false,