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

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 +678 -392
  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,25 @@
1
+ ---
2
+ title: "[Note title]"
3
+ category: discovery | gotcha | optimization | debugging | integration
4
+ created: YYYY-MM-DD
5
+ lastUpdated: YYYY-MM-DD
6
+ relatedIssues: []
7
+ ---
8
+
9
+ # [Note Title]
10
+
11
+ ## Summary
12
+
13
+ [One-paragraph summary of the discovery, gotcha, or learning.]
14
+
15
+ ## Details
16
+
17
+ [Full explanation. Include code examples, error messages, or configuration details as relevant.]
18
+
19
+ ## Impact
20
+
21
+ [What this affects — which parts of the system, which workflows, which developers need to know.]
22
+
23
+ ## Resolution / Workaround
24
+
25
+ [If applicable — what was done to address this, or how to work around it.]
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.2",
2
+ "version": "0.6.0-alpha.20",
3
3
  "description": "FlyDocs Core - Manifest of all managed files",
4
4
  "repository": "github.com/plastrlab/flydocs-core",
5
5
 
@@ -9,17 +9,10 @@
9
9
  "owned_directories": {
10
10
  "description": "Entire directories owned by FlyDocs - contents replaced on update",
11
11
  "paths": [
12
- ".flydocs/hooks",
13
12
  ".flydocs/templates",
13
+ ".claude/hooks",
14
14
  ".claude/agents",
15
15
  ".claude/skills/flydocs-workflow",
16
- ".claude/skills/flydocs-cloud",
17
- ".claude/skills/flydocs-local",
18
- ".claude/skills/flydocs-figma",
19
- ".claude/skills/flydocs-estimates",
20
- ".claude/skills/flydocs-context-graph",
21
- ".claude/skills/flydocs-context7",
22
- ".flydocs/scripts",
23
16
  ".cursor/agents"
24
17
  ]
25
18
  },
@@ -45,6 +38,8 @@
45
38
  ".claude/commands/start-session.md",
46
39
  ".claude/commands/status.md",
47
40
  ".claude/commands/validate.md",
41
+ ".claude/commands/knowledge.md",
42
+ ".claude/commands/onboard.md",
48
43
  ".claude/commands/wrap-session.md",
49
44
  ".claude/skills/README.md",
50
45
  ".cursor/hooks.json",
@@ -80,6 +75,7 @@
80
75
  "statusMapping",
81
76
  "detectedStack",
82
77
  "skills",
78
+ "topology",
83
79
  "designSystem",
84
80
  "aiLabor"
85
81
  ]
@@ -96,6 +92,9 @@
96
92
  "flydocs/knowledge/product/personas.md",
97
93
  "flydocs/knowledge/product/user-flows.md",
98
94
  "flydocs/README.md",
95
+ "flydocs/knowledge/templates/decision.md",
96
+ "flydocs/knowledge/templates/feature.md",
97
+ "flydocs/knowledge/templates/note.md",
99
98
  "flydocs/design-system/README.md",
100
99
  "flydocs/design-system/token-mapping.md",
101
100
  "flydocs/design-system/component-patterns.md"
@@ -125,7 +124,9 @@
125
124
  "flydocs-update.md",
126
125
  "flydocs-upgrade.md",
127
126
  "implement.md",
127
+ "knowledge.md",
128
128
  "new-project.md",
129
+ "onboard.md",
129
130
  "project-update.md",
130
131
  "refine.md",
131
132
  "review.md",
@@ -134,6 +135,15 @@
134
135
  "validate.md",
135
136
  "wrap-session.md"
136
137
  ],
138
+ "hooks": [
139
+ "auto-approve.py",
140
+ "post-edit.py",
141
+ "post-pr-check.py",
142
+ "post-transition-check.py",
143
+ "prompt-submit.py",
144
+ "session-start.py",
145
+ "stop-gate.py"
146
+ ],
137
147
  "skills": {
138
148
  "root": ["README.md"],
139
149
  "flydocs-workflow": [
@@ -142,14 +152,9 @@
142
152
  "cursor-rule.mdc",
143
153
  "stages/",
144
154
  "templates/",
145
- "reference/"
146
- ],
147
- "flydocs-cloud": ["SKILL.md", "cursor-rule.mdc", "scripts/"],
148
- "flydocs-local": ["SKILL.md", "cursor-rule.mdc", "scripts/"],
149
- "flydocs-figma": ["SKILL.md", "references/"],
150
- "flydocs-estimates": ["SKILL.md", "references/"],
151
- "flydocs-context-graph": ["SKILL.md", "schema.md", "scripts/"],
152
- "flydocs-context7": ["SKILL.md", "cursor-rule.mdc", "scripts/"]
155
+ "reference/",
156
+ "scripts/"
157
+ ]
153
158
  }
154
159
  },
155
160
  ".cursor": {
@@ -163,8 +168,6 @@
163
168
  },
164
169
  ".flydocs": {
165
170
  "root": ["config.json", "version", "CHANGELOG.md"],
166
- "scripts": ["generate_manifest.py", "skill_manager.py"],
167
- "hooks": ["auto-approve.py", "post-edit.py", "prompt-submit.py"],
168
171
  "templates": ["bug.md", "chore.md", "feature.md", "idea.md"]
169
172
  },
170
173
  "flydocs": {
@@ -177,7 +180,8 @@
177
180
  ],
178
181
  "knowledge": {
179
182
  "root": ["INDEX.md", "README.md"],
180
- "product": ["personas.md", "user-flows.md"]
183
+ "product": ["personas.md", "user-flows.md"],
184
+ "templates": ["decision.md", "feature.md", "note.md"]
181
185
  }
182
186
  },
183
187
  "root": ["AGENTS.md", ".env.example"]
@@ -1,111 +0,0 @@
1
- ---
2
- name: flydocs-cloud
3
- description: |
4
- Connected issue management via FlyDocs Relay API.
5
- Implements the FlyDocs mechanism contract with extended cloud operations.
6
- All provider translation (Linear, Jira) happens server-side.
7
- triggers:
8
- - create issue
9
- - transition
10
- - comment
11
- - list issues
12
- - assign
13
- - update description
14
- - update issue
15
- - project update
16
- - Linear
17
- - cloud
18
- ---
19
-
20
- # FlyDocs Cloud Mechanism
21
-
22
- Issues managed via the FlyDocs Relay API. The relay handles provider translation server-side — scripts are thin REST wrappers.
23
-
24
- Reads config from `.flydocs/config.json` and API key (`FLYDOCS_API_KEY`) from `.env`.
25
-
26
- ## Script Catalog
27
-
28
- All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
29
-
30
- ### Shared Contract Scripts
31
-
32
- | Script | Usage | Output |
33
- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
34
- | `create_issue.py` | `--title "..." --type feature [--description "..."] [--description-file PATH] [--priority 0-4] [--estimate 1-5] [--assignee STR] [--labels "a,b"] [--triage] \| stdin` | `{id, identifier, title, url}` |
35
- | `transition.py` | `<ref> <STATUS> "<comment>"` | `{success, issue, previousStatus, newStatus}` |
36
- | `comment.py` | `<ref> ["<comment>"] \| stdin` | `{success, commentId}` |
37
- | `list_issues.py` | `[--status STATUS[,STATUS]] [--active] [--project ID] [--milestone ID] [--assignee STR] [--mine] [--limit N]` | `[{id, identifier, title, status, assignee, priority, dueDate, milestone, milestoneId, milestoneSortOrder, project, projectId}]` |
38
- | `get_issue.py` | `<ref> [--fields basic\|full]` | `{id, identifier, title, description, status, assignee, priority, estimate, dueDate, milestone, milestoneId, project, projectId, comments[]}` |
39
- | `assign.py` | `<ref> <assignee>` | `{success, issue, assignee}` |
40
- | `update_description.py` | `<ref> --text "..." \| --file PATH \| stdin` | `{success, issue}` |
41
-
42
- ### Extended Scripts
43
-
44
- | Script | Usage | Output |
45
- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
46
- | `update_issue.py` | `<ref> [--title "..."] [--priority 0-4] [--estimate 1-5] [--assignee STR] [--state STATUS] [--description "..."] [--description-file PATH] [--labels "a,b"] [--comment "..."]` | `{success, issue, updated[]}` |
47
- | `estimate.py` | `<ref> <1-5>` | `{success, issue, estimate}` |
48
- | `priority.py` | `<ref> <0-4>` | `{success, issue, priority}` |
49
- | `link.py` | `<ref> <related_ref> <type>` | `{success, type}` |
50
- | `project_update.py` | `--health STATUS --body "..." [--body-file PATH]` | `{success, id}` |
51
- | `list_projects.py` | `[--active] [--all]` | `[{id, name, state}]` — `--all` bypasses product scope |
52
- | `create_project.py` | `--name "..." [--description "..."]` | `{id, name, url}` |
53
- | `assign_cycle.py` | `<ref> [cycle_id]` | `{success, issue, cycle}` |
54
- | `list_cycles.py` | `[--active]` | `[{id, name, number, startsAt, endsAt}]` |
55
- | `list_milestones.py` | `[--all]` | `[{id, name, targetDate}]` |
56
- | `create_milestone.py` | `--name "..." [--project ID] [--target-date DATE]` | `{id, name}` |
57
- | `assign_milestone.py` | `<ref> <milestone_id>` | `{success, issue, milestone}` |
58
-
59
- ### Workspace Scripts
60
-
61
- | Script | Usage | Output |
62
- | ---------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------- |
63
- | `list_teams.py` | (no args) | `[{id, name, key}]` |
64
- | `create_team.py` | `--name "..." [--key KEY] [--description "..."] [--parent <team_id>]` | `{id, name, key}` — `--parent` creates a sub-team |
65
- | `set_team.py` | `<team_id>` | `{success}` — updates relay preference and local config `provider.teamId` |
66
- | `list_labels.py` | (no args) | `[{id, name, color}]` — requires team to be set first |
67
- | `set_labels.py` | `--defaults '["a"]' --type-map '{"feature":["F"],...}' \| stdin` | `{success, validated, defaults, typeMap}` — stores label config on relay |
68
-
69
- ### Script Notes
70
-
71
- - **How it works**: Scripts call the FlyDocs Relay REST API, which translates to the provider (Linear, Jira) server-side. Same interface and output as before — the transport changed from direct GraphQL to managed REST.
72
- - **`list_issues.py --active`**: Returns all non-terminal issues (excludes Done, Archived, Canceled, Duplicate).
73
- - **`list_issues.py --status`**: Accepts comma-separated statuses: `--status READY,IMPLEMENTING,BLOCKED`
74
- - **`get_issue.py --fields basic`**: Skips comment fetch for faster responses.
75
- - **`update_issue.py`**: Bulk update — sets multiple fields in a single API call. Prefer over separate scripts when updating more than one field.
76
- - **Shell-safe text input**: For text with special characters, pipe via stdin with a single-quoted heredoc:
77
- ```bash
78
- python3 update_description.py ENG-123 <<'EOF'
79
- Description with 'apostrophes', (parens), and "quotes"
80
- EOF
81
- ```
82
- Scripts supporting stdin: `update_description.py`, `comment.py`, `project_update.py`. For `update_issue.py` and `create_issue.py`, use `--description-file PATH` instead.
83
-
84
- ### Status Values
85
-
86
- `BACKLOG`, `READY`, `IMPLEMENTING`, `BLOCKED`, `REVIEW`, `TESTING`, `COMPLETE`, `ARCHIVED`, `CANCELED`, `DUPLICATE`
87
-
88
- ### Issue Types
89
-
90
- `feature`, `bug`, `chore`, `idea`
91
-
92
- ### Link Types
93
-
94
- `blocks`, `related`, `duplicate`
95
-
96
- ### Issue Reference
97
-
98
- `<ref>`: Provider identifier, e.g., `ENG-123`. Resolved server-side by the relay.
99
-
100
- ## Error Handling
101
-
102
- Exit 0 = success (JSON on stdout). Exit 1 = error (message on stderr).
103
- Network errors: exponential backoff, 3 retries, 2s base delay.
104
- Relay errors include `code` and optional `provider_error` for debugging.
105
-
106
- ## Configuration
107
-
108
- Reads from `.flydocs/config.json`: tier, relay URL override.
109
- Reads `FLYDOCS_API_KEY` from environment or `.env` / `.env.local`.
110
-
111
- Optional: `FLYDOCS_RELAY_URL` env var or `relay.url` in config to override the base URL (e.g., for local development).
@@ -1,50 +0,0 @@
1
- ---
2
- description: Connected issue management via FlyDocs Relay API — cloud mechanism for FlyDocs
3
- alwaysApply: true
4
- ---
5
-
6
- <!-- Condensed from SKILL.md — update both when changing patterns -->
7
-
8
- # FlyDocs Cloud Mechanism
9
-
10
- Issues managed via FlyDocs Relay API. Reads config from `.flydocs/config.json` and API key (`FLYDOCS_API_KEY`) from `.env`.
11
-
12
- ## Shared Contract Scripts
13
-
14
- All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
15
-
16
- | Script | Key Arguments |
17
- |--------|---------------|
18
- | `create_issue.py` | `--title "..." --type feature [--priority 0-4] [--estimate 1-5] [--assignee STR] [--triage]` |
19
- | `transition.py` | `<ref> <STATUS> "<comment>"` |
20
- | `comment.py` | `<ref> "<comment>"` |
21
- | `list_issues.py` | `[--status STATUS[,STATUS]] [--active] [--mine] [--limit N]` |
22
- | `get_issue.py` | `<ref> [--fields basic\|full]` |
23
- | `assign.py` | `<ref> <assignee>` |
24
- | `update_description.py` | `<ref> --text "..." \| --file PATH` |
25
-
26
- ## Extended Scripts
27
-
28
- | Script | Key Arguments |
29
- |--------|---------------|
30
- | `update_issue.py` | `<ref> [--priority 0-4] [--estimate 1-5] [--assignee STR] [--state STATUS] [--comment "..."]` |
31
- | `project_update.py` | `--health STATUS --body "..."` |
32
- | `estimate.py` / `priority.py` | `<ref> <value>` |
33
- | `link.py` | `<ref> <related_ref> <type>` |
34
- | `list_projects.py` / `create_project.py` | Project management |
35
- | `assign_cycle.py` / `list_cycles.py` | Cycle management |
36
- | `assign_milestone.py` / `list_milestones.py` / `create_milestone.py` | Milestone management |
37
-
38
- ## Status Values
39
-
40
- `BACKLOG`, `READY`, `IMPLEMENTING`, `BLOCKED`, `REVIEW`, `TESTING`, `COMPLETE`, `ARCHIVED`, `CANCELED`, `DUPLICATE`
41
-
42
- ## Error Handling
43
-
44
- Exit 0 = success (JSON on stdout). Exit 1 = error (message on stderr).
45
- Network errors: exponential backoff, 3 retries, 2s base delay.
46
-
47
- ## Configuration
48
-
49
- Reads from `.flydocs/config.json`: tier, relay URL override.
50
- Reads `FLYDOCS_API_KEY` from environment or `.env` / `.env.local`.
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Assign an issue to a user via the FlyDocs Relay API."""
3
-
4
- import sys
5
- from pathlib import Path
6
-
7
- sys.path.insert(0, str(Path(__file__).parent))
8
- from flydocs_api import get_client, output_json, fail
9
-
10
- if len(sys.argv) < 3:
11
- fail("Usage: assign.py <ref> <assignee>")
12
-
13
- ref, assignee = sys.argv[1], sys.argv[2]
14
- client = get_client()
15
-
16
- result = client.post(f"/issues/{ref}/assign", {"assignee": assignee})
17
-
18
- output_json({
19
- "success": result.get("success", True),
20
- "issue": result.get("issue", ref),
21
- "assignee": result.get("assignee", assignee),
22
- })
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Assign a cycle to an issue via the FlyDocs Relay API."""
3
-
4
- import sys
5
- from pathlib import Path
6
-
7
- sys.path.insert(0, str(Path(__file__).parent))
8
- from flydocs_api import get_client, output_json, fail
9
-
10
- if len(sys.argv) < 2:
11
- fail("Usage: assign_cycle.py <ref> [cycle_id]")
12
-
13
- ref = sys.argv[1]
14
- cycle_id = sys.argv[2] if len(sys.argv) >= 3 else None
15
-
16
- client = get_client()
17
-
18
- body: dict = {}
19
- if cycle_id:
20
- body["cycleId"] = cycle_id
21
-
22
- result = client.put(f"/issues/{ref}/cycle", body)
23
-
24
- output_json({
25
- "success": result.get("success", True),
26
- "issue": result.get("issue", ref),
27
- "cycle": result.get("cycle", ""),
28
- })
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Assign a milestone to an issue via the FlyDocs Relay API."""
3
-
4
- import sys
5
- from pathlib import Path
6
-
7
- sys.path.insert(0, str(Path(__file__).parent))
8
- from flydocs_api import get_client, output_json, fail
9
-
10
- if len(sys.argv) < 3:
11
- fail("Usage: assign_milestone.py <ref> <milestone_id>")
12
-
13
- ref, milestone_id = sys.argv[1], sys.argv[2]
14
- client = get_client()
15
-
16
- result = client.put(f"/issues/{ref}/milestone", {"milestoneId": milestone_id})
17
-
18
- output_json({
19
- "success": result.get("success", True),
20
- "issue": result.get("issue", ref),
21
- "milestone": result.get("milestone", ""),
22
- })
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Add a comment to an issue via the FlyDocs Relay API."""
3
-
4
- import sys
5
- from pathlib import Path
6
-
7
- sys.path.insert(0, str(Path(__file__).parent))
8
- from flydocs_api import get_client, output_json, fail
9
-
10
- if len(sys.argv) < 2:
11
- fail("Usage: comment.py <ref> [comment] | stdin")
12
-
13
- ref = sys.argv[1]
14
-
15
- # Comment from arg > stdin
16
- if len(sys.argv) >= 3:
17
- body = sys.argv[2]
18
- elif not sys.stdin.isatty():
19
- body = sys.stdin.read().strip()
20
- else:
21
- fail("Provide comment as argument or via stdin")
22
-
23
- client = get_client()
24
- result = client.post(f"/issues/{ref}/comment", {"body": body})
25
-
26
- output_json({
27
- "success": result.get("success", True),
28
- "commentId": result.get("commentId", ""),
29
- })
@@ -1,63 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Create a new issue via the FlyDocs Relay API."""
3
-
4
- import argparse
5
- import sys
6
- from pathlib import Path
7
-
8
- sys.path.insert(0, str(Path(__file__).parent))
9
- from flydocs_api import get_client, output_json, fail
10
-
11
-
12
- def main():
13
- parser = argparse.ArgumentParser(description="Create issue")
14
- parser.add_argument("--title", required=True)
15
- parser.add_argument("--type", required=True, choices=["feature", "bug", "chore", "idea"], dest="issue_type")
16
- parser.add_argument("--description", default="")
17
- parser.add_argument("--description-file", default="", dest="description_file")
18
- parser.add_argument("--priority", type=int, default=3, choices=range(5))
19
- parser.add_argument("--estimate", type=int, default=0, choices=[0, 1, 2, 3, 5])
20
- parser.add_argument("--assignee", default=None)
21
- parser.add_argument("--labels", default=None, help="Comma-separated ad-hoc label names")
22
- parser.add_argument("--triage", action="store_true")
23
- args = parser.parse_args()
24
-
25
- # Resolve description: --description-file > stdin > --description
26
- description = args.description
27
- if args.description_file:
28
- try:
29
- description = Path(args.description_file).read_text()
30
- except FileNotFoundError:
31
- fail(f"File not found: {args.description_file}")
32
- elif not description and not sys.stdin.isatty():
33
- description = sys.stdin.read().strip()
34
-
35
- body: dict = {
36
- "title": args.title,
37
- "type": args.issue_type,
38
- "priority": args.priority,
39
- }
40
- if description:
41
- body["description"] = description
42
- if args.estimate:
43
- body["estimate"] = args.estimate
44
- if args.assignee:
45
- body["assignee"] = args.assignee
46
- if args.labels:
47
- body["labels"] = [l.strip() for l in args.labels.split(",") if l.strip()]
48
- if args.triage:
49
- body["triage"] = True
50
-
51
- client = get_client()
52
- result = client.post("/issues", body)
53
-
54
- output_json({
55
- "id": result["id"],
56
- "identifier": result["identifier"],
57
- "title": result["title"],
58
- "url": result["url"],
59
- })
60
-
61
-
62
- if __name__ == "__main__":
63
- main()
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Create a milestone via the FlyDocs Relay API."""
3
-
4
- import argparse
5
- import sys
6
- from pathlib import Path
7
-
8
- sys.path.insert(0, str(Path(__file__).parent))
9
- from flydocs_api import get_client, output_json, fail
10
-
11
-
12
- def main():
13
- parser = argparse.ArgumentParser(description="Create milestone")
14
- parser.add_argument("--name", required=True)
15
- parser.add_argument("--project", default=None, help="Project ID")
16
- parser.add_argument("--target-date", default=None, dest="target_date")
17
- args = parser.parse_args()
18
-
19
- body: dict = {"name": args.name}
20
- if args.project:
21
- body["projectId"] = args.project
22
- if args.target_date:
23
- body["targetDate"] = args.target_date
24
-
25
- client = get_client()
26
- result = client.post("/milestones", body)
27
-
28
- output_json({
29
- "id": result["id"],
30
- "name": result["name"],
31
- })
32
-
33
-
34
- if __name__ == "__main__":
35
- main()
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Create a project via the FlyDocs Relay API."""
3
-
4
- import argparse
5
- import sys
6
- from pathlib import Path
7
-
8
- sys.path.insert(0, str(Path(__file__).parent))
9
- from flydocs_api import get_client, output_json, fail
10
-
11
-
12
- def main():
13
- parser = argparse.ArgumentParser(description="Create project")
14
- parser.add_argument("--name", required=True)
15
- parser.add_argument("--description", default=None)
16
- args = parser.parse_args()
17
-
18
- body: dict = {"name": args.name}
19
- if args.description:
20
- body["description"] = args.description
21
-
22
- client = get_client()
23
- result = client.post("/projects", body)
24
-
25
- output_json({
26
- "id": result["id"],
27
- "name": result["name"],
28
- "url": result.get("url", ""),
29
- })
30
-
31
-
32
- if __name__ == "__main__":
33
- main()
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Create a team (or sub-team) via the FlyDocs Relay API."""
3
-
4
- import argparse
5
- import sys
6
- from pathlib import Path
7
-
8
- sys.path.insert(0, str(Path(__file__).parent))
9
- from flydocs_api import get_client, output_json
10
-
11
-
12
- def main():
13
- parser = argparse.ArgumentParser(description="Create team")
14
- parser.add_argument("--name", required=True)
15
- parser.add_argument("--key", default=None, help="Team key (e.g., PROD). Auto-generated if omitted.")
16
- parser.add_argument("--description", default=None)
17
- parser.add_argument("--parent", default=None, dest="parent_id", help="Parent team ID to create a sub-team")
18
- args = parser.parse_args()
19
-
20
- body: dict = {"name": args.name}
21
- if args.key:
22
- body["key"] = args.key
23
- if args.description:
24
- body["description"] = args.description
25
- if args.parent_id:
26
- body["parentId"] = args.parent_id
27
-
28
- client = get_client()
29
- result = client.post("/teams", body)
30
-
31
- output_json({
32
- "id": result["id"],
33
- "name": result["name"],
34
- "key": result.get("key", ""),
35
- })
36
-
37
-
38
- if __name__ == "__main__":
39
- main()
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Set estimate on an issue via the FlyDocs Relay API."""
3
-
4
- import sys
5
- from pathlib import Path
6
-
7
- sys.path.insert(0, str(Path(__file__).parent))
8
- from flydocs_api import get_client, output_json, fail
9
-
10
- if len(sys.argv) < 3:
11
- fail("Usage: estimate.py <ref> <1-5>")
12
-
13
- ref = sys.argv[1]
14
- try:
15
- estimate = int(sys.argv[2])
16
- except ValueError:
17
- fail("Estimate must be a number (1-5)")
18
-
19
- if estimate not in (1, 2, 3, 5):
20
- fail("Estimate must be 1 (XS), 2 (S), 3 (M), or 5 (L)")
21
-
22
- client = get_client()
23
- result = client.put(f"/issues/{ref}/estimate", {"estimate": estimate})
24
-
25
- output_json({
26
- "success": result.get("success", True),
27
- "issue": result.get("issue", ref),
28
- "estimate": result.get("estimate", estimate),
29
- })