@flydocs/cli 0.6.0-alpha.3 → 0.6.0-alpha.31

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 (151) hide show
  1. package/dist/cli.js +2053 -469
  2. package/package.json +1 -1
  3. package/template/.claude/CLAUDE.md +43 -48
  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 +359 -72
  12. package/template/.claude/commands/flydocs-upgrade.md +26 -27
  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 +212 -0
  25. package/template/.claude/hooks/post-pr-check.py +108 -0
  26. package/template/.claude/hooks/post-transition-check.py +281 -0
  27. package/template/.claude/hooks/prompt-submit.py +554 -0
  28. package/template/.claude/hooks/session-start.py +262 -0
  29. package/template/.claude/hooks/stop-gate.py +162 -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 +260 -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 +724 -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 +738 -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/test_enforcement.py +225 -0
  56. package/template/.claude/skills/flydocs-workflow/scripts/workspace.py +902 -0
  57. package/template/.claude/skills/flydocs-workflow/session.md +87 -29
  58. package/template/.claude/skills/flydocs-workflow/stages/activate.md +18 -7
  59. package/template/.claude/skills/flydocs-workflow/stages/capture.md +10 -5
  60. package/template/.claude/skills/flydocs-workflow/stages/close.md +4 -3
  61. package/template/.claude/skills/flydocs-workflow/stages/implement.md +33 -9
  62. package/template/.claude/skills/flydocs-workflow/stages/refine.md +22 -6
  63. package/template/.claude/skills/flydocs-workflow/stages/review.md +16 -4
  64. package/template/.claude/skills/flydocs-workflow/stages/validate.md +3 -1
  65. package/template/.claude/skills/flydocs-workflow/templates/pr/default.md +33 -0
  66. package/template/.cursor/agents/implementation-agent.md +1 -1
  67. package/template/.cursor/agents/pm-agent.md +2 -2
  68. package/template/.cursor/hooks.json +10 -3
  69. package/template/.env.example +6 -6
  70. package/template/.flydocs/config.json +5 -18
  71. package/template/.flydocs/templates/README.md +13 -14
  72. package/template/.flydocs/templates/bug.md +17 -153
  73. package/template/.flydocs/templates/chore.md +10 -98
  74. package/template/.flydocs/templates/feature.md +12 -158
  75. package/template/.flydocs/templates/idea.md +11 -111
  76. package/template/.flydocs/templates/quick-capture.md +4 -8
  77. package/template/.flydocs/version +1 -1
  78. package/template/AGENTS.md +44 -32
  79. package/template/CHANGELOG.md +37 -0
  80. package/template/flydocs/README.md +1 -3
  81. package/template/flydocs/context/project.md +6 -3
  82. package/template/flydocs/design-system/README.md +3 -3
  83. package/template/flydocs/knowledge/INDEX.md +38 -53
  84. package/template/flydocs/knowledge/README.md +60 -9
  85. package/template/flydocs/knowledge/templates/decision.md +47 -0
  86. package/template/flydocs/knowledge/templates/feature.md +35 -0
  87. package/template/flydocs/knowledge/templates/note.md +25 -0
  88. package/template/manifest.json +24 -20
  89. package/template/.claude/skills/flydocs-cloud/SKILL.md +0 -113
  90. package/template/.claude/skills/flydocs-cloud/cursor-rule.mdc +0 -50
  91. package/template/.claude/skills/flydocs-cloud/scripts/assign.py +0 -22
  92. package/template/.claude/skills/flydocs-cloud/scripts/assign_cycle.py +0 -28
  93. package/template/.claude/skills/flydocs-cloud/scripts/assign_milestone.py +0 -22
  94. package/template/.claude/skills/flydocs-cloud/scripts/comment.py +0 -29
  95. package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +0 -66
  96. package/template/.claude/skills/flydocs-cloud/scripts/create_milestone.py +0 -35
  97. package/template/.claude/skills/flydocs-cloud/scripts/create_project.py +0 -33
  98. package/template/.claude/skills/flydocs-cloud/scripts/create_team.py +0 -39
  99. package/template/.claude/skills/flydocs-cloud/scripts/estimate.py +0 -29
  100. package/template/.claude/skills/flydocs-cloud/scripts/flydocs_api.py +0 -210
  101. package/template/.claude/skills/flydocs-cloud/scripts/get_issue.py +0 -24
  102. package/template/.claude/skills/flydocs-cloud/scripts/link.py +0 -28
  103. package/template/.claude/skills/flydocs-cloud/scripts/list_cycles.py +0 -28
  104. package/template/.claude/skills/flydocs-cloud/scripts/list_issues.py +0 -44
  105. package/template/.claude/skills/flydocs-cloud/scripts/list_labels.py +0 -19
  106. package/template/.claude/skills/flydocs-cloud/scripts/list_milestones.py +0 -28
  107. package/template/.claude/skills/flydocs-cloud/scripts/list_projects.py +0 -31
  108. package/template/.claude/skills/flydocs-cloud/scripts/list_providers.py +0 -19
  109. package/template/.claude/skills/flydocs-cloud/scripts/list_teams.py +0 -19
  110. package/template/.claude/skills/flydocs-cloud/scripts/priority.py +0 -29
  111. package/template/.claude/skills/flydocs-cloud/scripts/project_update.py +0 -45
  112. package/template/.claude/skills/flydocs-cloud/scripts/set_labels.py +0 -68
  113. package/template/.claude/skills/flydocs-cloud/scripts/set_provider.py +0 -46
  114. package/template/.claude/skills/flydocs-cloud/scripts/set_team.py +0 -41
  115. package/template/.claude/skills/flydocs-cloud/scripts/transition.py +0 -26
  116. package/template/.claude/skills/flydocs-cloud/scripts/update_description.py +0 -36
  117. package/template/.claude/skills/flydocs-cloud/scripts/update_issue.py +0 -82
  118. package/template/.claude/skills/flydocs-context-graph/SKILL.md +0 -87
  119. package/template/.claude/skills/flydocs-context-graph/schema.md +0 -78
  120. package/template/.claude/skills/flydocs-context-graph/scripts/graph_context.py +0 -338
  121. package/template/.claude/skills/flydocs-context7/SKILL.md +0 -105
  122. package/template/.claude/skills/flydocs-context7/cursor-rule.mdc +0 -49
  123. package/template/.claude/skills/flydocs-context7/scripts/context7.py +0 -293
  124. package/template/.claude/skills/flydocs-estimates/SKILL.md +0 -384
  125. package/template/.claude/skills/flydocs-figma/SKILL.md +0 -377
  126. package/template/.claude/skills/flydocs-figma/references/PROMPTING.md +0 -108
  127. package/template/.claude/skills/flydocs-figma/references/TROUBLESHOOTING.md +0 -112
  128. package/template/.claude/skills/flydocs-local/SKILL.md +0 -103
  129. package/template/.claude/skills/flydocs-local/cursor-rule.mdc +0 -43
  130. package/template/.claude/skills/flydocs-local/scripts/assign.py +0 -20
  131. package/template/.claude/skills/flydocs-local/scripts/comment.py +0 -27
  132. package/template/.claude/skills/flydocs-local/scripts/create_issue.py +0 -44
  133. package/template/.claude/skills/flydocs-local/scripts/estimate.py +0 -37
  134. package/template/.claude/skills/flydocs-local/scripts/get_issue.py +0 -20
  135. package/template/.claude/skills/flydocs-local/scripts/link.py +0 -41
  136. package/template/.claude/skills/flydocs-local/scripts/list_issues.py +0 -34
  137. package/template/.claude/skills/flydocs-local/scripts/priority.py +0 -37
  138. package/template/.claude/skills/flydocs-local/scripts/project_update.py +0 -67
  139. package/template/.claude/skills/flydocs-local/scripts/status_summary.py +0 -16
  140. package/template/.claude/skills/flydocs-local/scripts/transition.py +0 -24
  141. package/template/.claude/skills/flydocs-local/scripts/update_description.py +0 -35
  142. package/template/.claude/skills/flydocs-local/scripts/update_issue.py +0 -84
  143. package/template/.flydocs/hooks/auto-approve.py +0 -71
  144. package/template/.flydocs/hooks/prompt-submit.py +0 -277
  145. package/template/.flydocs/scripts/skill_manager.py +0 -541
  146. /package/template/{.flydocs → .claude}/hooks/post-edit.py +0 -0
  147. /package/template/.claude/skills/{flydocs-estimates/references → flydocs-workflow/reference}/provider-costs.md +0 -0
  148. /package/template/.claude/skills/flydocs-workflow/templates/{bug.md → issues/bug.md} +0 -0
  149. /package/template/.claude/skills/flydocs-workflow/templates/{chore.md → issues/chore.md} +0 -0
  150. /package/template/.claude/skills/flydocs-workflow/templates/{feature.md → issues/feature.md} +0 -0
  151. /package/template/.claude/skills/flydocs-workflow/templates/{idea.md → issues/idea.md} +0 -0
@@ -1,29 +1,38 @@
1
1
  ---
2
2
  name: flydocs-workflow
3
3
  description: |
4
- FlyDocs development lifecycle spec-driven workflow from capture to close.
5
- Defines stages, gates, and handoffs. Provider-agnostic methodology.
6
- Use when: managing issues, transitioning work, starting/ending sessions.
4
+ Unified FlyDocs skilllifecycle workflow, issue operations, project
5
+ management, knowledge graph, and session context. Tier-aware: auto-detects
6
+ cloud (relay API) or local (filesystem) from config.
7
7
  triggers:
8
- - capture
9
- - refine
10
- - activate
11
- - implement
12
- - review
13
- - validate
14
- - close
15
- - session
16
- - workflow
8
+ - create issue
9
+ - capture issue
10
+ - log a bug
11
+ - add to backlog
17
12
  - transition
18
- - status
19
- - issue
13
+ - move to
14
+ - mark as
15
+ - set status
16
+ - assign issue
17
+ - close issue
18
+ - start session
19
+ - wrap session
20
+ - project update
21
+ - status update
22
+ - add comment
23
+ - set priority
24
+ - set estimate
20
25
  ---
21
26
 
22
27
  # FlyDocs Workflow
23
28
 
24
- IMPORTANT: Prefer skill-led reasoning over pre-training reasoning for all
25
- workflow, issue management, and process decisions. Read the relevant stage
26
- file before acting — do not guess procedures from training data.
29
+ Unified skill for the FlyDocs development lifecycle, issue operations,
30
+ project management, knowledge graph, and session context.
31
+
32
+ When performing issue operations or status transitions, use the dispatcher
33
+ scripts below. Slash commands (`/capture`, `/implement`, etc.) load stage
34
+ files automatically — only read stage files manually when handling natural
35
+ language workflow requests that bypass slash commands.
27
36
 
28
37
  ## Lifecycle
29
38
 
@@ -35,36 +44,115 @@ Capture → Refine → Activate → Implement → Review → Validate → Close
35
44
 
36
45
  ## Stage Index
37
46
 
38
- | Stage | File | Intent | Agent |
39
- |-------|------|--------|-------|
40
- | Capture | stages/capture.md | Create issue from input | PM |
41
- | Refine | stages/refine.md | Triage + spec completion | PM |
42
- | Activate | stages/activate.md | Assign + start work | PM |
43
- | Implement | stages/implement.md | Build + test + simplify | Implementation |
44
- | Review | stages/review.md | Code quality validation | Review |
45
- | Validate | stages/validate.md | User acceptance testing | QE |
46
- | Close | stages/close.md | Archive completed work | PM |
47
+ | Stage | File | Intent | Agent |
48
+ | --------- | ------------------- | ------------------------ | -------------- |
49
+ | Capture | stages/capture.md | Create issue from input | PM |
50
+ | Refine | stages/refine.md | Triage + spec completion | PM |
51
+ | Activate | stages/activate.md | Assign + start work | PM |
52
+ | Implement | stages/implement.md | Build + test + simplify | Implementation |
53
+ | Review | stages/review.md | Code quality validation | Review |
54
+ | Validate | stages/validate.md | User acceptance testing | QE |
55
+ | Close | stages/close.md | Archive completed work | PM |
47
56
 
48
57
  ## Session
49
58
 
50
- | Action | File |
51
- |--------|------|
52
- | Start session | session.md |
53
- | Wrap session | session.md |
59
+ | Action | File |
60
+ | --------------- | ---------- |
61
+ | Start session | session.md |
62
+ | Wrap session | session.md |
54
63
  | Stale detection | session.md |
55
64
 
65
+ ## Script Catalog
66
+
67
+ All scripts: `python3 .claude/skills/flydocs-workflow/scripts/<script>`
68
+
69
+ ### Issue Operations — `issues.py`
70
+
71
+ | Command | Usage | Notes |
72
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
73
+ | `create` | `--title T --type feature\|bug\|chore\|idea [--description D] [--priority 0-4] [--estimate 0\|1\|2\|3\|5] [--assignee A] [--project P] [--triage]` | Also accepts `--description-file` or stdin |
74
+ | `get` | `REF [--fields basic\|full]` | Full includes comments |
75
+ | `list` | `[--status S] [--active] [--project P] [--assignee A] [--milestone M] [--mine] [--limit N]` | `--active` = non-terminal states |
76
+ | `transition` | `REF STATUS COMMENT` | Status is uppercased automatically |
77
+ | `assign` | `REF ASSIGNEE` or `REF --unassign` | |
78
+ | `update` | `REF [--title] [--priority] [--estimate] [--assignee] [--state] [--description] [--labels] [--milestone] [--comment]` | Bulk update, also accepts `--description-file` |
79
+ | `description` | `REF [--text T] [--file F]` | Also accepts stdin |
80
+ | `comment` | `REF [BODY]` | Also accepts stdin |
81
+ | `estimate` | `REF POINTS` | Non-negative integer |
82
+ | `priority` | `REF LEVEL` | 0 (none) to 4 (low) |
83
+ | `link` | `REF RELATED_REF TYPE` | Type: blocks, related, duplicate |
84
+ | `assign-milestone` | `REF MILESTONE_ID` | Cloud only |
85
+ | `assign-cycle` | `REF [CYCLE_ID]` | Cloud only |
86
+ | `pr` | `[--issue REF] [--title T] [--base B] [--draft] [--dry-run]` | Detects GitHub/GitLab, auto-populates from issue |
87
+
88
+ ### Project Operations — `projects.py` (cloud only)
89
+
90
+ | Command | Usage |
91
+ | ------------------ | --------------------------------------------- |
92
+ | `list-projects` | `[--active] [--all]` |
93
+ | `create-project` | `--name N [--description D]` |
94
+ | `list-milestones` | `[--all]` |
95
+ | `create-milestone` | `--name N [--project P] [--target-date D]` |
96
+ | `update-milestone` | `ID [--name] [--target-date] [--description]` |
97
+ | `delete-milestone` | `ID` |
98
+ | `list-cycles` | `[--active]` |
99
+
100
+ ### Workspace Operations — `workspace.py` (cloud only)
101
+
102
+ | Command | Usage | Notes |
103
+ | -------------------- | ---------------------------------------------------- | ------------------------------------------- |
104
+ | `validate` | (no args) | Writes validation cache, sets setupComplete |
105
+ | `list-labels` | (no args) | |
106
+ | `refresh-labels` | `[--fix]` | Compare local config with provider |
107
+ | `list-statuses` | (no args) | |
108
+ | `list-providers` | (no args) | |
109
+ | `set-provider` | `TYPE` | linear, jira |
110
+ | `list-teams` | (no args) | |
111
+ | `create-team` | `--name N [--key K] [--description D] [--parent ID]` | |
112
+ | `set-team` | `TEAM_ID` | |
113
+ | `set-labels` | `[--defaults JSON] [--type-map JSON]` | Also accepts stdin |
114
+ | `set-status-mapping` | `[--auto] [--mapping JSON]` | Also accepts stdin |
115
+ | `set-identity` | `PROVIDER PROVIDER_USER_ID` | Writes .flydocs/me.json |
116
+ | `set-preferences` | `[--workspace] [--assignee] [--display JSON]` | No flags = GET |
117
+ | `get-estimate-scale` | (no args) | |
118
+ | `generate-config` | `[--dry-run]` | Merge server config with local |
119
+ | `get-me` | (no args) | Writes .flydocs/me.json |
120
+
121
+ ### Session Operations — `session.py`
122
+
123
+ | Command | Usage | Notes |
124
+ | ---------------- | --------------------------------------------------------------- | ---------------------- |
125
+ | `project-update` | `--health onTrack\|atRisk\|offTrack [--body B] [--body-file F]` | Also accepts stdin |
126
+ | `status-summary` | (no args) | Issue counts by status |
127
+
128
+ ### Knowledge Graph Scripts
129
+
130
+ | Script | Usage | Notes |
131
+ | ------------------ | --------------------------------------------------------------------------- | ---------------------------------------------------- |
132
+ | `graph_build.py` | `[--root PATH]` | Rebuild graph from skills, ADRs, service descriptors |
133
+ | `graph_query.py` | `--node ID [--depth N] [--rel TYPE] [--reverse] [--format json\|md]` | BFS traversal |
134
+ | `graph_update.py` | `add-node ID --type TYPE [--label STR]` / `add-edge FROM TO REL [--manual]` | Manual CRUD |
135
+ | `graph_session.py` | `--summary "..." [--issue REF]... [--decision NNN]...` | Called at session wrap |
136
+ | `push_service.py` | `[--root PATH]` | Push service descriptor to relay (cloud) |
137
+ | `pull_services.py` | `[--root PATH]` | Pull workspace composite (cloud) |
138
+
56
139
  ## Reference
57
140
 
58
- | Topic | File |
59
- |-------|------|
60
- | Comment templates | reference/comment-templates.md |
61
- | Status transitions | reference/status-workflow.md |
62
- | Priority & estimates | reference/priority-estimates.md |
63
- | Golden rules | reference/golden-rules.md |
141
+ | Topic | File |
142
+ | ------------------------- | -------------------------------------- |
143
+ | Comment templates | reference/comment-templates.md |
144
+ | Status transitions | reference/status-workflow.md |
145
+ | Priority & estimates | reference/priority-estimates.md |
146
+ | PR & git workflow | reference/pr-workflow.md |
147
+ | Golden rules | reference/golden-rules.md |
148
+ | Provider costs | reference/provider-costs.md |
149
+ | Graph schema | reference/graph-schema.md |
150
+ | Service descriptor schema | reference/service-descriptor-schema.md |
64
151
 
65
152
  ## Templates
66
153
 
67
- Issue templates in `templates/` — feature, bug, chore, idea.
154
+ Issue templates in `templates/issues/` — feature, bug, chore, idea.
155
+ PR templates in `templates/pr/` — pull request description structure.
68
156
  Stage files define how to fill templates; template files are pure structure.
69
157
 
70
158
  ## Golden Rules (Summary)
@@ -72,14 +160,18 @@ Stage files define how to fill templates; template files are pure structure.
72
160
  1. Every status transition gets a comment (see `reference/comment-templates.md`)
73
161
  2. Assignment required before In Progress
74
162
  3. Checkboxes live in issue description, never comments
75
- 4. Use mechanism scripts for all issue operations — execute, don't describe
163
+ 4. Use dispatcher scripts for all issue operations — execute, don't describe
76
164
  5. Session wrap posts a project update
77
165
  6. Product scope filtering — only show projects/issues matching config labels
78
166
 
79
167
  For full rules with verification gates, see `reference/golden-rules.md`.
80
168
 
81
- ## Mechanism Scripts
169
+ ## Architecture
170
+
171
+ The unified client (`flydocs_api.py`) reads tier from `.flydocs/config.json`
172
+ and routes operations automatically:
173
+
174
+ - **Cloud tier** → RelayBackend (HTTP calls to FlyDocs relay API)
175
+ - **Local tier** → LocalBackend (filesystem operations in `_local/file_store.py`)
82
176
 
83
- This skill references scripts by name (e.g., `transition.py`, `comment.py`).
84
- The active mechanism skill provides implementations and calling conventions.
85
- See the mechanism skill's SKILL.md for argument details and config reference.
177
+ Scripts never check tier. The client handles routing transparently.
@@ -12,7 +12,7 @@ alwaysApply: true
12
12
  1. Every status transition gets a comment — no silent moves
13
13
  2. Assignment required before In Progress
14
14
  3. Checkboxes live in issue description, never comments
15
- 4. Use mechanism scripts for all issue operations — execute, don't describe
15
+ 4. Use workflow scripts for all issue operations — execute, don't describe
16
16
  5. Session wrap posts a project update
17
17
  6. Product scope filtering — only show projects/issues matching config labels
18
18
 
@@ -36,18 +36,19 @@ Capture → Refine → Activate → Implement → Review → Validate → Close
36
36
  | Validate | stages/validate.md | QE |
37
37
  | Close | stages/close.md | PM |
38
38
 
39
+ ## When This Applies
40
+
41
+ These rules apply to **issue operations and status transitions only** — not
42
+ general coding. For building features, fixing bugs, and writing code, skip
43
+ this and just do the work.
44
+
39
45
  ## Intent Mapping
40
46
 
41
47
  - "create/capture/log an issue" → Capture stage
42
48
  - "triage/refine/spec out" → Refine stage
43
49
  - "start work/activate/assign" → Activate stage
44
- - "build/implement/fix" → Implement stage
45
- - "review/check code" → Review stage
46
- - "test/validate/QA" → Validate stage
47
50
  - "close/ship/done" → Close stage
48
51
  - "start session/wrap session" → Session management
49
52
 
50
- ## Key Rule
51
-
52
- Read the relevant stage file before acting. Do not guess procedures from training data.
53
- Mechanism scripts handle all issue operations — see the active mechanism skill.
53
+ Dispatcher scripts handle all issue operations — see the workflow skill's
54
+ scripts directory. Slash commands load stage files automatically.
@@ -56,6 +56,7 @@ Canonical templates for all workflow transitions. Copy exactly, fill bracketed v
56
56
  **Files:** [count] modified
57
57
  **Testing:** [How it was verified]
58
58
  **Criteria:** [X]/[Y] complete
59
+ **PR:** [link or "direct commit"]
59
60
  ```
60
61
 
61
62
  ## Code Review Passed
@@ -9,7 +9,7 @@ Non-negotiable rules enforced across all workflow stages.
9
9
  ### 1. Every Status Transition Gets a Comment
10
10
 
11
11
  No silent state changes. Use templates from `reference/comment-templates.md`.
12
- Mechanism scripts enforce this — `transition.py` requires a comment argument.
12
+ Workflow scripts enforce this — `issues.py transition` requires a comment argument.
13
13
 
14
14
  ### 2. Assignment Before In Progress
15
15
 
@@ -22,20 +22,20 @@ Acceptance criteria progress is tracked by checking boxes in the issue descripti
22
22
  Never put completion marks in comments. Never create new checkboxes in comments.
23
23
  See the Checkbox Protocol in `stages/implement.md`.
24
24
 
25
- ### 4. Use Mechanism Scripts — Execute, Don't Describe
25
+ ### 4. Use Workflow Scripts — Execute, Don't Describe
26
26
 
27
- For all issue operations (create, transition, comment, assign, query), use the scripts
28
- provided by the active mechanism skill. Run them. Do not say "you should run..." or
27
+ For all issue operations (create, transition, comment, assign, query), use the dispatcher
28
+ scripts provided by the workflow skill. Run them. Do not say "you should run..." or
29
29
  describe what a script would do. Execute and report the result.
30
30
 
31
31
  ### 5. Session Wrap Posts a Project Update
32
32
 
33
- Every session wrap posts a project update via `project_update.py`. Do not just
33
+ Every session wrap posts a project update via `session.py project-update`. Do not just
34
34
  summarize in chat. Actually post. See `session.md` for the full protocol.
35
35
 
36
36
  ### 6. Product Scope Filtering
37
37
 
38
- `list_issues.py` automatically applies product scope from config using this cascade:
38
+ `issues.py list` automatically applies product scope from config using this cascade:
39
39
 
40
40
  1. **`workspace.activeProjects` set** → scope to those projects (OR logic if multiple)
41
41
  2. **`workspace.product.labelIds` set** → scope to issues with ALL those labels (AND logic)
@@ -46,23 +46,34 @@ work within the scoped results — they do not bypass product scope.
46
46
 
47
47
  Never show out-of-scope issues, even if the user asks.
48
48
 
49
+ ### 7. Sequential Script Execution
50
+
51
+ Run workflow scripts **one at a time, sequentially**. Never fire multiple
52
+ `issues.py`, `projects.py`, or `session.py` commands in parallel. The relay
53
+ API does not handle concurrent requests from the same workspace well — parallel
54
+ calls may timeout, produce empty output, or silently fail.
55
+
56
+ Wait for each script to return before running the next. If you need to create
57
+ multiple issues, create them one by one and confirm each succeeds before
58
+ proceeding.
59
+
49
60
  ---
50
61
 
51
62
  ## Verification Gates
52
63
 
53
64
  After executing any workflow command, verify the result before responding:
54
65
 
55
- | Action | Script Used | Verify |
56
- |--------|-------------|--------|
57
- | Capture | `create_issue.py` | Issue identifier returned |
58
- | Refine | `transition.py` → READY | Success response |
59
- | Activate | `assign.py` + `transition.py` | Both succeed |
60
- | Implement | `get_issue.py` | Issue details loaded |
61
- | Block | `transition.py` → BLOCKED | Success response |
62
- | Review | `transition.py` → REVIEW/TESTING | Success response |
63
- | Validate | `transition.py` → TESTING/IMPLEMENTING | Success response |
64
- | Close | `transition.py` → COMPLETE | Success response |
65
- | Wrap | `project_update.py` | Update ID returned |
66
+ | Action | Script Used | Verify |
67
+ | --------- | --------------------------------------------- | ------------------------- |
68
+ | Capture | `issues.py create` | Issue identifier returned |
69
+ | Refine | `issues.py transition` → READY | Success response |
70
+ | Activate | `issues.py assign` + `issues.py transition` | Both succeed |
71
+ | Implement | `issues.py get` | Issue details loaded |
72
+ | Block | `issues.py transition` → BLOCKED | Success response |
73
+ | Review | `issues.py transition` → REVIEW/TESTING | Success response |
74
+ | Validate | `issues.py transition` → TESTING/IMPLEMENTING | Success response |
75
+ | Close | `issues.py transition` → COMPLETE | Success response |
76
+ | Wrap | `session.py project-update` | Update ID returned |
66
77
 
67
78
  If any script fails: **stop, report, retry, escalate.** Do not continue to the next step.
68
79
 
@@ -0,0 +1,116 @@
1
+ # Context Graph Schema
2
+
3
+ Reference for the graph JSON structure stored at `flydocs/context/graph.json`.
4
+
5
+ ## Top-Level Structure
6
+
7
+ ```json
8
+ {
9
+ "version": 1,
10
+ "updated": "ISO-8601 timestamp",
11
+ "nodes": { "<id>": { ... } },
12
+ "edges": [ { ... } ]
13
+ }
14
+ ```
15
+
16
+ ## Node Schema
17
+
18
+ ```json
19
+ {
20
+ "type": "skill | decision | issue | module | session | concept",
21
+ "label": "Human-readable name",
22
+ "path": "Relative file path (optional)",
23
+ "status": "Node-specific status (optional)",
24
+ "date": "ISO date for temporal nodes (optional)",
25
+ "tier": "Skill tier: behavioral | mechanism | premium (optional)",
26
+ "manual": true
27
+ }
28
+ ```
29
+
30
+ **ID conventions:**
31
+
32
+ | Type | Pattern | Example |
33
+ | -------- | --------------------------- | -------------------------------- |
34
+ | skill | `skill:{directory-name}` | `skill:typescript-strict` |
35
+ | decision | `decision:{3-digit-number}` | `decision:001` |
36
+ | issue | `issue:{identifier}` | `issue:FLY-56` |
37
+ | module | `module:{kebab-name}` | `module:install-script` |
38
+ | session | `session:{YYYY-MM-DD-seq}` | `session:2026-02-03-a` |
39
+ | concept | `concept:{kebab-name}` | `concept:progressive-disclosure` |
40
+ | repo | `repo:{owner/name}` | `repo:plastrlab/flydocs-app` |
41
+
42
+ ## Edge Schema
43
+
44
+ ```json
45
+ {
46
+ "from": "source node ID",
47
+ "to": "target node ID",
48
+ "rel": "RELATIONSHIP_TYPE",
49
+ "weight": 0.0-1.0,
50
+ "manual": true
51
+ }
52
+ ```
53
+
54
+ **Weight guidelines:**
55
+
56
+ | Weight | Meaning |
57
+ | ------- | --------------------------- |
58
+ | 1.0 | Direct, strong relationship |
59
+ | 0.7-0.9 | Strong but indirect |
60
+ | 0.4-0.6 | Moderate association |
61
+ | 0.1-0.3 | Weak or tangential |
62
+
63
+ **Edges with `"manual": true`** are preserved when `graph_build.py` rebuilds
64
+ the graph from sources. Auto-derived edges are regenerated on each build.
65
+
66
+ ## Relationship Types
67
+
68
+ | Relationship | Direction | Example |
69
+ | -------------- | ------------------------------ | ----------------------------------------- |
70
+ | `EXTENDS` | A extends B | ADR-004 extends ADR-001 |
71
+ | `IMPLEMENTS` | A implements B | Issue implements a decision |
72
+ | `DELEGATES_TO` | A delegates to B | Workflow delegates to mechanism |
73
+ | `PRECEDES` | A should load before B | typescript-strict precedes implementation |
74
+ | `MODIFIES` | A modifies B | Issue modifies a module |
75
+ | `WORKED_ON` | A worked on B | Session worked on an issue |
76
+ | `PRODUCED` | A produced B | Session produced a decision |
77
+ | `RELATES_TO` | A relates to B | General association |
78
+ | `SUPERSEDES` | A supersedes B | New decision replaces old |
79
+ | `BLOCKS` | A blocks B | Issue blocks another issue |
80
+ | `PROVIDES` | A exposes interface B consumes | Repo provides REST API to sibling |
81
+ | `CONSUMES` | A depends on B's interface | Repo consumes another's API |
82
+
83
+ ### Cross-Repo Edge Properties
84
+
85
+ Edges of type `PROVIDES` and `CONSUMES` carry additional properties:
86
+
87
+ ```json
88
+ {
89
+ "from": "repo:plastrlab/flydocs-core",
90
+ "to": "repo:plastrlab/flydocs-app",
91
+ "rel": "PROVIDES",
92
+ "weight": 1.0,
93
+ "interface": "REST API /api/relay/*",
94
+ "description": "Core CLI pushes config and descriptors to relay endpoints"
95
+ }
96
+ ```
97
+
98
+ | Property | Type | Description |
99
+ | ------------- | ------ | ------------------------------------------------------ |
100
+ | `interface` | string | What is exposed or consumed (endpoint, event, package) |
101
+ | `description` | string | Brief context about the relationship |
102
+
103
+ ## Repo Node Schema
104
+
105
+ Repo nodes are derived from `flydocs/context/service.json` by `graph_build.py`.
106
+ See `service-descriptor-schema.md` for the full ServiceDescriptor interface.
107
+
108
+ ```json
109
+ {
110
+ "type": "repo",
111
+ "label": "flydocs-app",
112
+ "path": "flydocs/context/service.json",
113
+ "purpose": "Web dashboard and relay API for FlyDocs cloud tier",
114
+ "stack": ["next", "convex", "typescript"]
115
+ }
116
+ ```
@@ -0,0 +1,120 @@
1
+ # PR & Git Workflow
2
+
3
+ ## Branch Naming
4
+
5
+ Format: `<type>/<ref>-<slug>`
6
+
7
+ | Type | When |
8
+ | --------- | -------------------------------------- |
9
+ | `feature` | New functionality |
10
+ | `fix` | Bug fixes |
11
+ | `chore` | Maintenance, refactoring, dependencies |
12
+ | `docs` | Documentation only |
13
+
14
+ Examples:
15
+
16
+ - `feature/FLY-255-knowledge-capture`
17
+ - `fix/FLY-301-login-timeout`
18
+ - `chore/FLY-290-upgrade-deps`
19
+
20
+ Keep the slug short (2-4 words, kebab-case). Include the issue reference.
21
+
22
+ ## Commit Messages
23
+
24
+ Format: `<type>: <description> (<ref>)`
25
+
26
+ - Lead with what changed, not how
27
+ - Use imperative mood ("Add", not "Added")
28
+ - Keep the first line under 72 characters
29
+ - Add a body for non-obvious changes
30
+
31
+ Examples:
32
+
33
+ ```
34
+ feat: Add knowledge doc templates and /knowledge command (FLY-255)
35
+ fix: Handle null milestone in create_issue response (FLY-301)
36
+ chore: Remove deprecated auth middleware (FLY-290)
37
+ ```
38
+
39
+ ## When to Create a PR
40
+
41
+ **Create a PR when:**
42
+
43
+ - Changes affect shared code (not just local config or docs)
44
+ - Multiple files changed across different concerns
45
+ - Changes need review before merging
46
+ - Working on a branch (not committing directly to main)
47
+
48
+ **Commit directly when:**
49
+
50
+ - Single-file documentation updates
51
+ - Config changes for local development
52
+ - Trivial fixes (typos, formatting)
53
+ - The user explicitly requests direct commit
54
+
55
+ When in doubt, create a PR. It's easier to merge a PR than to revert a direct commit.
56
+
57
+ ## PR Description Template
58
+
59
+ The canonical PR template lives at `templates/pr/default.md`. Use the PR
60
+ dispatcher to create PRs with auto-populated issue context:
61
+
62
+ ```bash
63
+ python3 .claude/skills/flydocs-workflow/scripts/issues.py pr --issue FLY-123
64
+ ```
65
+
66
+ Options:
67
+
68
+ | Flag | Purpose |
69
+ | ----------- | ----------------------------------------- |
70
+ | `--issue` | Link to issue (auto-populates title + AC) |
71
+ | `--title` | Override PR title |
72
+ | `--base` | Target branch (defaults to main/master) |
73
+ | `--draft` | Create as draft PR |
74
+ | `--dry-run` | Preview without creating |
75
+
76
+ The script:
77
+
78
+ - Detects platform (GitHub, GitLab) from git remote
79
+ - Reads the PR template and fills in issue context
80
+ - Creates the PR via `gh pr create` or `glab mr create`
81
+ - Posts a comment on the issue linking the PR
82
+
83
+ **Enforcement:** A PostToolUse hook (`post-pr-check.py`) detects direct
84
+ `gh pr create` or `glab mr create` calls and warns if required sections
85
+ (Summary, Test Plan) are missing.
86
+
87
+ ### Template Sections
88
+
89
+ | Section | Required | Auto-populated |
90
+ | ----------------------- | -------- | ------------------------ |
91
+ | **Summary** | Yes | From issue title |
92
+ | **Changes** | No | Manual |
93
+ | **Test Plan** | Yes | Manual |
94
+ | **Acceptance Criteria** | No | From issue AC checkboxes |
95
+ | **Notes** | No | Manual |
96
+
97
+ ## PR Workflow in Practice
98
+
99
+ ### During Implement Stage
100
+
101
+ After self-review (step 7 in `implement.md`), before handing off to review:
102
+
103
+ 1. Create branch: `git checkout -b <type>/<ref>-<slug>`
104
+ 2. Stage and commit changes with a descriptive message
105
+ 3. Push branch: `git push -u origin <branch>`
106
+ 4. Create PR: `python3 .claude/skills/flydocs-workflow/scripts/issues.py pr --issue <ref>`
107
+ 5. Include the PR link in the "Ready for Review" comment
108
+
109
+ ### During Review Stage
110
+
111
+ The reviewer should:
112
+
113
+ - Review the PR diff (not just local git diff)
114
+ - Leave comments on the PR for specific code feedback
115
+ - Reference the PR in review comments on the issue
116
+
117
+ ### After Review
118
+
119
+ - **Approved**: Merge the PR, then transition issue to Testing
120
+ - **Changes needed**: Push fixes to the same branch, re-request review
@@ -2,27 +2,49 @@
2
2
 
3
3
  ## Priority Values
4
4
 
5
- | Value | Name | Use When |
6
- |-------|------|----------|
7
- | 0 | None | Not yet triaged |
8
- | 1 | Urgent | Drop everything, fix now |
9
- | 2 | High | Next up, unblocks others |
10
- | 3 | Medium | Normal priority (default) |
11
- | 4 | Low | Nice to have |
5
+ | Value | Name | Use When |
6
+ | ----- | ------ | ------------------------- |
7
+ | 0 | None | Not yet triaged |
8
+ | 1 | Urgent | Drop everything, fix now |
9
+ | 2 | High | Next up, unblocks others |
10
+ | 3 | Medium | Normal priority (default) |
11
+ | 4 | Low | Nice to have |
12
12
 
13
13
  ## Estimate Values (Complexity)
14
14
 
15
- | Value | Name | Rough Effort |
16
- |-------|------|--------------|
17
- | 1 | XS | < 1 hour |
18
- | 2 | S | 1-4 hours |
19
- | 3 | M | Half day to full day |
20
- | 4 | L | 2-3 days |
21
- | 5 | XL | Week+ |
15
+ | Value | Name | Rough Effort |
16
+ | ----- | ---- | -------------------- |
17
+ | 1 | XS | < 1 hour |
18
+ | 2 | S | 1-4 hours |
19
+ | 3 | M | Half day to full day |
20
+ | 4 | L | 2-3 days |
21
+ | 5 | XL | Week+ |
22
22
 
23
23
  ## Guidance
24
24
 
25
25
  - Set priority during Refine or Activate stages
26
26
  - Set estimate during Refine stage (before Ready)
27
27
  - If estimate is missing at Activate, set it before transitioning
28
- - XL estimates often indicate the issue should be broken into smaller pieces
28
+ - Estimate values may vary by provider the relay translates per provider configuration
29
+
30
+ ## Decomposition
31
+
32
+ When an estimate is large (XL / 5+ or provider equivalent), prompt for decomposition:
33
+
34
+ 1. **Identify natural boundaries** — separate concerns, independent deliverables, sequential phases
35
+ 2. **Create child issues** — each should be independently estimable at M or smaller
36
+ 3. **Link parent to children** — use `issues.py link` with type `blocks` (parent blocks children conceptually)
37
+ 4. **Re-estimate parent** — set to 0 or remove estimate, since children carry the work
38
+ 5. **Move parent to a tracking role** — it becomes the "epic" or summary issue
39
+
40
+ **Split pattern:**
41
+
42
+ ```
43
+ Original: FLY-100 "Build auth system" (XL)
44
+ → FLY-101 "Add login endpoint" (S)
45
+ → FLY-102 "Add session management" (M)
46
+ → FLY-103 "Add role-based access control" (M)
47
+ → FLY-104 "Add password reset flow" (S)
48
+ ```
49
+
50
+ Don't force decomposition on every large issue — some are genuinely large and atomic. Use judgment. The prompt is: "This is estimated as XL. Can it be broken into smaller, independently deliverable pieces?"