@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
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ FlyDocs Hook: stop-gate.py
4
+ Triggered: Stop (every time the agent finishes responding)
5
+ Purpose: Gate agent completion on workflow state — blocks finish if issue
6
+ is still In Progress, warns if acceptance criteria are incomplete.
7
+
8
+ Exit codes:
9
+ 0 - Allow stop (optional JSON output parsed)
10
+ 2 - Block stop (stderr shown to Claude as instruction)
11
+ """
12
+
13
+ import json
14
+ import os
15
+ import re
16
+ import sys
17
+ from pathlib import Path
18
+
19
+ ISSUE_ID_PATTERN = re.compile(r"[A-Z]+-[0-9]+")
20
+ CHECKBOX_DONE = re.compile(r"- \[x\]", re.IGNORECASE)
21
+ CHECKBOX_ALL = re.compile(r"- \[[ x]\]", re.IGNORECASE)
22
+
23
+
24
+ def read_file_safe(path):
25
+ """Read file contents, returning None on any error."""
26
+ try:
27
+ return Path(path).read_text(encoding="utf-8")
28
+ except (OSError, ValueError):
29
+ return None
30
+
31
+
32
+ def extract_issue_id(text):
33
+ """Extract first issue ID matching PROJ-123 pattern."""
34
+ match = ISSUE_ID_PATTERN.search(text)
35
+ return match.group(0) if match else None
36
+
37
+
38
+ def main():
39
+ # -- Parse stdin --
40
+ try:
41
+ input_data = json.loads(sys.stdin.read())
42
+ except (json.JSONDecodeError, ValueError):
43
+ input_data = {}
44
+
45
+ # -- Loop guard: if the hook itself triggered this stop, exit cleanly --
46
+ if input_data.get("stop_hook_active"):
47
+ sys.exit(0)
48
+
49
+ # -- Resolve working directory --
50
+ cwd = input_data.get("cwd") or os.environ.get("CLAUDE_PROJECT_DIR", "")
51
+ if not cwd:
52
+ sys.exit(0)
53
+
54
+ try:
55
+ os.chdir(cwd)
56
+ except OSError:
57
+ sys.exit(0)
58
+
59
+ session_dir = Path(".flydocs/session")
60
+
61
+ # -- Check for active focus --
62
+ focus_text = read_file_safe(session_dir / "focus.md")
63
+ if not focus_text:
64
+ sys.exit(0)
65
+
66
+ issue_id = extract_issue_id(focus_text)
67
+ if not issue_id:
68
+ sys.exit(0)
69
+
70
+ # -- Read current status --
71
+ status_text = read_file_safe(session_dir / "status")
72
+ if not status_text:
73
+ sys.exit(0)
74
+
75
+ status = status_text.strip().upper()
76
+
77
+ # -- IMPLEMENTING: block completion --
78
+ if status == "IMPLEMENTING":
79
+ msg = (
80
+ "Issue {} is still In Progress. "
81
+ "Transition to Review before finishing:\n"
82
+ " python3 .claude/skills/flydocs-workflow/scripts/issues.py "
83
+ "transition {} REVIEW \"Implementation complete\""
84
+ ).format(issue_id, issue_id)
85
+ sys.stderr.write(msg)
86
+ sys.exit(2)
87
+
88
+ # -- REVIEW: warn on incomplete acceptance criteria --
89
+ if status == "REVIEW":
90
+ ac_text = read_file_safe(session_dir / "acceptance-criteria.md")
91
+ if ac_text:
92
+ total = len(CHECKBOX_ALL.findall(ac_text))
93
+ done = len(CHECKBOX_DONE.findall(ac_text))
94
+ if total > 0 and done < total:
95
+ result = {
96
+ "hookSpecificOutput": {
97
+ "additionalContext": (
98
+ "Warning: {}/{} acceptance criteria checked "
99
+ "for {}. Consider verifying remaining criteria."
100
+ ).format(done, total, issue_id)
101
+ }
102
+ }
103
+ print(json.dumps(result))
104
+
105
+ sys.exit(0)
106
+
107
+
108
+ if __name__ == "__main__":
109
+ main()
@@ -2,11 +2,11 @@
2
2
  "hooks": {
3
3
  "PreToolUse": [
4
4
  {
5
- "matcher": "Bash",
5
+ "matcher": "Bash|Edit|Write",
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
9
- "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.flydocs/hooks/auto-approve.py",
9
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/auto-approve.py",
10
10
  "timeout": 5
11
11
  }
12
12
  ]
@@ -18,10 +18,25 @@
18
18
  "hooks": [
19
19
  {
20
20
  "type": "command",
21
- "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.flydocs/hooks/post-edit.py",
21
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/post-edit.py",
22
22
  "timeout": 30
23
23
  }
24
24
  ]
25
+ },
26
+ {
27
+ "matcher": "Bash",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/post-pr-check.py",
32
+ "timeout": 10
33
+ },
34
+ {
35
+ "type": "command",
36
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/post-transition-check.py",
37
+ "timeout": 5
38
+ }
39
+ ]
25
40
  }
26
41
  ],
27
42
  "UserPromptSubmit": [
@@ -29,7 +44,29 @@
29
44
  "hooks": [
30
45
  {
31
46
  "type": "command",
32
- "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.flydocs/hooks/prompt-submit.py",
47
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/prompt-submit.py",
48
+ "timeout": 10
49
+ }
50
+ ]
51
+ }
52
+ ],
53
+ "Stop": [
54
+ {
55
+ "hooks": [
56
+ {
57
+ "type": "command",
58
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/stop-gate.py",
59
+ "timeout": 5
60
+ }
61
+ ]
62
+ }
63
+ ],
64
+ "SessionStart": [
65
+ {
66
+ "hooks": [
67
+ {
68
+ "type": "command",
69
+ "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/session-start.py",
33
70
  "timeout": 10
34
71
  }
35
72
  ]
@@ -11,16 +11,12 @@
11
11
  Owned and maintained by FlyDocs. May include executable scripts and premium
12
12
  functionality gated via API relay.
13
13
 
14
- | Skill | Category | Purpose |
15
- | ------------------- | ---------------- | ------------------------------------------------------- |
16
- | `flydocs-workflow` | Core | Lifecycle stages, session management, comment templates |
17
- | `flydocs-local` | Mechanism (free) | File-based issue management |
18
- | `flydocs-cloud` | Mechanism (paid) | Linear/provider issue management via API |
19
- | `flydocs-context7` | Core | Library documentation lookup via Context7 API |
20
- | `flydocs-figma` | Premium | Design extraction from Figma |
21
- | `flydocs-estimates` | Premium | AI token/labor cost estimation |
14
+ | Skill | Purpose |
15
+ | ------------------ | ---------------------------------------------------------------------------- |
16
+ | `flydocs-workflow` | Unified skill — lifecycle, issues, projects, Figma, estimates, context graph |
22
17
 
23
- Only one mechanism skill is active at a time. Determined by `tier` in `.flydocs/config.json`.
18
+ All functionality consolidated into a single skill. Tier (local vs cloud) is
19
+ auto-detected from `.flydocs/config.json` — no separate mechanism skills.
24
20
 
25
21
  ### Unprefixed — Community Skills
26
22
 
@@ -101,8 +97,8 @@ The body serves as a **compressed index** — not a documentation dump. Target ~
101
97
  ```markdown
102
98
  # Skill Name
103
99
 
104
- IMPORTANT: Prefer skill-led reasoning over pre-training reasoning for
105
- [domain]. Read the relevant section before acting.
100
+ Use this skill when performing [domain]-specific operations.
101
+ For general coding, skip this just write code.
106
102
 
107
103
  ## Key Rules (always apply)
108
104
 
@@ -191,12 +187,13 @@ CLAUDE.md and AGENTS.md between markers:
191
187
 
192
188
  ## Skills Index
193
189
 
194
- IMPORTANT: Prefer skill-led reasoning over pre-training reasoning.
190
+ Consult the workflow skill for **issue operations and status transitions only**.
191
+ For general coding tasks, skip this — just write code.
195
192
 
196
- | Skill | Triggers | Entry |
197
- | ----------------- | ---------------------------------- | ----------------------------------------- |
198
- | flydocs-workflow | capture, refine, implement, review | .claude/skills/flydocs-workflow/SKILL.md |
199
- | typescript-strict | TypeScript, type error, any type | .claude/skills/typescript-strict/SKILL.md |
193
+ | Skill | Triggers | Entry |
194
+ | ----------------- | --------------------------------------------- | ----------------------------------------- |
195
+ | flydocs-workflow | create issue, transition, assign, close issue | .claude/skills/flydocs-workflow/SKILL.md |
196
+ | typescript-strict | TypeScript, type error, any type | .claude/skills/typescript-strict/SKILL.md |
200
197
 
201
198
  <!-- flydocs:skills-manifest:end -->
202
199
  ```
@@ -257,17 +254,18 @@ For detailed patterns, see `reference/patterns.md`.
257
254
 
258
255
  ---
259
256
 
260
- ## Mechanism Contract
257
+ ## Unified Dispatcher Model
261
258
 
262
- Both mechanism skills (`flydocs-local`, `flydocs-cloud`) implement the same
263
- script interface, making the backend swap transparent:
259
+ All operations route through grouped dispatcher scripts in
260
+ `flydocs-workflow/scripts/`. The unified client (`flydocs_api.py`) auto-detects
261
+ tier from `.flydocs/config.json` — scripts never check tier directly.
264
262
 
265
- **Shared contract:**
266
- `create_issue.py`, `transition.py`, `comment.py`, `list_issues.py`,
267
- `get_issue.py`, `assign.py`, `update_description.py`
268
-
269
- **Cloud-only extensions:**
270
- `update_issue.py`, `project_update.py`, `estimate.py`, `priority.py`, `link.py`, cycle/milestone management.
263
+ | Dispatcher | Operations |
264
+ | -------------- | ------------------------------------------------------ |
265
+ | `issues.py` | create, get, list, transition, assign, update, comment |
266
+ | `projects.py` | list-projects, create-project, milestones, cycles |
267
+ | `workspace.py` | validate, labels, statuses, teams, config, identity |
268
+ | `session.py` | project-update, status-summary |
271
269
 
272
270
  ---
273
271
 
@@ -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