@ramon-sg/issue-flow 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +304 -2
  3. package/dist/ask.d.ts +28 -0
  4. package/dist/ask.js +73 -0
  5. package/dist/branch-name.d.ts +113 -0
  6. package/dist/branch-name.js +226 -0
  7. package/dist/claude-namer.d.ts +51 -0
  8. package/dist/claude-namer.js +140 -0
  9. package/dist/cli-setup.d.ts +22 -0
  10. package/dist/cli-setup.js +26 -0
  11. package/dist/cli-worktree.d.ts +74 -0
  12. package/dist/cli-worktree.js +123 -0
  13. package/dist/cli.d.ts +132 -0
  14. package/dist/cli.js +348 -0
  15. package/dist/commands/adapter.d.ts +49 -0
  16. package/dist/commands/adapter.js +231 -0
  17. package/dist/commands/claude-hooks.d.ts +37 -0
  18. package/dist/commands/claude-hooks.js +162 -0
  19. package/dist/commands/doctor.d.ts +10 -0
  20. package/dist/commands/doctor.js +124 -0
  21. package/dist/commands/init.d.ts +27 -0
  22. package/dist/commands/init.js +213 -0
  23. package/dist/commands/issue-branch.d.ts +36 -0
  24. package/dist/commands/issue-branch.js +182 -0
  25. package/dist/commands/issue-start.d.ts +11 -0
  26. package/dist/commands/issue-start.js +361 -0
  27. package/dist/commands/pr-worktree.d.ts +31 -0
  28. package/dist/commands/pr-worktree.js +122 -0
  29. package/dist/commands/session.d.ts +15 -0
  30. package/dist/commands/session.js +102 -0
  31. package/dist/commands/upgrade.d.ts +16 -0
  32. package/dist/commands/upgrade.js +115 -0
  33. package/dist/commands/worktree.d.ts +82 -0
  34. package/dist/commands/worktree.js +244 -0
  35. package/dist/config-base.d.ts +32 -0
  36. package/dist/config-base.js +47 -0
  37. package/dist/config.d.ts +63 -0
  38. package/dist/config.js +230 -0
  39. package/dist/docker.d.ts +53 -0
  40. package/dist/docker.js +153 -0
  41. package/dist/git.d.ts +130 -0
  42. package/dist/git.js +192 -0
  43. package/dist/guard-config.d.ts +16 -0
  44. package/dist/guard-config.js +38 -0
  45. package/dist/issue-text.d.ts +128 -0
  46. package/dist/issue-text.js +210 -0
  47. package/dist/launch.d.ts +90 -0
  48. package/dist/launch.js +158 -0
  49. package/dist/output.d.ts +33 -0
  50. package/dist/output.js +37 -0
  51. package/dist/package-edits.d.ts +35 -0
  52. package/dist/package-edits.js +78 -0
  53. package/dist/plan-doc.d.ts +26 -0
  54. package/dist/plan-doc.js +93 -0
  55. package/dist/ports.d.ts +90 -0
  56. package/dist/ports.js +257 -0
  57. package/dist/propose.d.ts +42 -0
  58. package/dist/propose.js +111 -0
  59. package/dist/recipes.d.ts +43 -0
  60. package/dist/recipes.js +123 -0
  61. package/dist/session-lock.d.ts +32 -0
  62. package/dist/session-lock.js +69 -0
  63. package/dist/settings-hooks.d.ts +31 -0
  64. package/dist/settings-hooks.js +133 -0
  65. package/dist/setup-files.d.ts +89 -0
  66. package/dist/setup-files.js +138 -0
  67. package/dist/start-modes.d.ts +162 -0
  68. package/dist/start-modes.js +277 -0
  69. package/dist/start-place.d.ts +61 -0
  70. package/dist/start-place.js +301 -0
  71. package/dist/start-state.d.ts +72 -0
  72. package/dist/start-state.js +13 -0
  73. package/dist/start-summary.d.ts +42 -0
  74. package/dist/start-summary.js +217 -0
  75. package/dist/stop-apps.d.ts +14 -0
  76. package/dist/stop-apps.js +127 -0
  77. package/dist/usage.d.ts +5 -0
  78. package/dist/usage.js +54 -0
  79. package/dist/work-state.d.ts +51 -0
  80. package/dist/work-state.js +58 -0
  81. package/dist/worktree-config.d.ts +35 -0
  82. package/dist/worktree-config.js +139 -0
  83. package/dist/worktree-steps.d.ts +53 -0
  84. package/dist/worktree-steps.js +210 -0
  85. package/package.json +20 -4
  86. package/recipes/bun.json +5 -0
  87. package/recipes/direnv.json +17 -0
  88. package/recipes/docker-compose.json +30 -0
  89. package/recipes/npm.json +5 -0
  90. package/recipes/pnpm.json +5 -0
  91. package/recipes/staging-main.json +5 -0
  92. package/schema.json +281 -0
package/schema.json ADDED
@@ -0,0 +1,281 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/ramon-sg/issue-flow/main/schema.json",
4
+ "title": "issue-flow config (.agents/flow.json)",
5
+ "description": "Every key is optional; a missing one takes its default. Unknown keys are an error.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string"
11
+ },
12
+ "repo": {
13
+ "description": "owner/repo. By default, -R, then GH_REPO, then the checkout's origin.",
14
+ "type": "string",
15
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
16
+ },
17
+ "baseBranch": {
18
+ "description": "Branch the work starts from and PRs target. By default, the repo's default branch.",
19
+ "type": "string",
20
+ "minLength": 1
21
+ },
22
+ "branch": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "template": {
27
+ "description": "Name of an issue's branch. Needs {number} and {slug}; {type} is optional.",
28
+ "type": "string",
29
+ "default": "{type}/{number}-{slug}",
30
+ "allOf": [
31
+ {
32
+ "pattern": "\\{number\\}"
33
+ },
34
+ {
35
+ "pattern": "\\{slug\\}"
36
+ }
37
+ ]
38
+ },
39
+ "namer": {
40
+ "description": "Who names a branch when the issue has no usable \"Slug de rama\" block: Claude (falls back to the title) or the title.",
41
+ "enum": [
42
+ "claude",
43
+ "title"
44
+ ],
45
+ "default": "claude"
46
+ },
47
+ "claudeModel": {
48
+ "description": "Model passed to claude -p --model.",
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "default": "haiku"
52
+ },
53
+ "types": {
54
+ "description": "Branch type of an issue: by label first, then by title prefix (case-insensitive). Each map given replaces its default whole.",
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "labels": {
59
+ "$ref": "#/$defs/typeMap"
60
+ },
61
+ "titlePrefixes": {
62
+ "$ref": "#/$defs/typeMap"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "worktrees": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "dir": {
73
+ "description": "Where issue worktrees go, relative to the repo root.",
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "default": ".claude/worktrees"
77
+ },
78
+ "setup": {
79
+ "description": "Steps that prepare a worktree, in order. They come from the main checkout's config, never the worktree's.",
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "name",
86
+ "run"
87
+ ],
88
+ "properties": {
89
+ "name": {
90
+ "description": "Lowercase letters, digits and dashes; what --only takes.",
91
+ "type": "string",
92
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
93
+ },
94
+ "run": {
95
+ "description": "The command, run with sh -c in the worktree. It gets ISSUE_FLOW_WORKTREE, ISSUE_FLOW_MAIN_ROOT, ISSUE_FLOW_DOCKER_SUFFIX and, with ports, ISSUE_FLOW_PORT_BASE.",
96
+ "type": "string",
97
+ "minLength": 1
98
+ },
99
+ "trusted": {
100
+ "description": "Run only if the worktree's code is in origin/<base> and has no changes (an install runs the scripts of package.json).",
101
+ "type": "boolean",
102
+ "default": false
103
+ },
104
+ "once": {
105
+ "description": "Run once: a mark in the worktree's git dir skips it after it works.",
106
+ "type": "boolean",
107
+ "default": false
108
+ }
109
+ }
110
+ },
111
+ "default": []
112
+ },
113
+ "teardown": {
114
+ "description": "Steps that clean a worktree before it is deleted (bring its Docker down, for example).",
115
+ "type": "array",
116
+ "items": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "name",
121
+ "run"
122
+ ],
123
+ "properties": {
124
+ "name": {
125
+ "description": "Lowercase letters, digits and dashes; what --only takes.",
126
+ "type": "string",
127
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
128
+ },
129
+ "run": {
130
+ "description": "The command, run with sh -c in the worktree. It gets ISSUE_FLOW_WORKTREE, ISSUE_FLOW_MAIN_ROOT, ISSUE_FLOW_DOCKER_SUFFIX and, with ports, ISSUE_FLOW_PORT_BASE.",
131
+ "type": "string",
132
+ "minLength": 1
133
+ }
134
+ }
135
+ },
136
+ "default": []
137
+ },
138
+ "ports": {
139
+ "description": "A block of ports per worktree: true for 1000 blocks of 10 from 20000, or a range. Steps get the block's first port in ISSUE_FLOW_PORT_BASE.",
140
+ "oneOf": [
141
+ {
142
+ "type": "boolean"
143
+ },
144
+ {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "properties": {
148
+ "start": {
149
+ "type": "integer",
150
+ "minimum": 1024,
151
+ "default": 20000
152
+ },
153
+ "blockSize": {
154
+ "type": "integer",
155
+ "minimum": 1,
156
+ "default": 10
157
+ },
158
+ "blocks": {
159
+ "type": "integer",
160
+ "minimum": 2,
161
+ "multipleOf": 2,
162
+ "default": 1000
163
+ }
164
+ }
165
+ }
166
+ ],
167
+ "default": false
168
+ },
169
+ "dockerProjects": {
170
+ "description": "Prefixes of the worktrees' Docker Compose projects (<prefix>-$ISSUE_FLOW_DOCKER_SUFFIX). The cleanup only deletes projects with one of these and a suffix.",
171
+ "type": "array",
172
+ "items": {
173
+ "type": "string",
174
+ "pattern": "^[a-z0-9][a-z0-9_-]*$"
175
+ },
176
+ "default": []
177
+ }
178
+ }
179
+ },
180
+ "start": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "properties": {
184
+ "commitMessage": {
185
+ "description": "Message of the empty commit that starts an issue; {number} is the issue. [skip ci] keeps CI from running on a commit with no changes.",
186
+ "type": "string",
187
+ "minLength": 1,
188
+ "default": "chore: empieza el trabajo en la issue #{number} [skip ci]"
189
+ },
190
+ "prBody": {
191
+ "description": "Body of the draft PR; {keyword} is Closes, or Part of when the issue has another live branch.",
192
+ "type": "string",
193
+ "minLength": 1,
194
+ "default": "{keyword} #{number}\n\nEn progreso."
195
+ },
196
+ "prompt": {
197
+ "description": "Prompt Claude opens with on a new branch; {number}, {title} (text anyone can write in the issue: better left out).",
198
+ "type": "string",
199
+ "minLength": 1,
200
+ "default": "Issue #{number}. Lee la issue con `npx @ramon-sg/github-rest issue view {number}`, resúmela en lenguaje llano y sigue la skill start-issue para elegir el flujo."
201
+ },
202
+ "resumePrompt": {
203
+ "description": "Prompt Claude opens with on a branch that has a plan; {number}, {title} (text anyone can write in the issue: better left out), {plan}.",
204
+ "type": "string",
205
+ "minLength": 1,
206
+ "default": "Issue #{number}. Lee la issue con `npx @ramon-sg/github-rest issue view {number}`, resúmela en lenguaje llano y retoma el trabajo según {plan}: revisa qué tareas quedan."
207
+ },
208
+ "summaryPrompt": {
209
+ "description": "Prompt of --plan: only summarize and wait; {number}, {title} (text anyone can write in the issue: better left out).",
210
+ "type": "string",
211
+ "minLength": 1,
212
+ "default": "Issue #{number}. Lee la issue con `npx @ramon-sg/github-rest issue view {number}` y resúmela en lenguaje llano. No empieces a trabajar ni a planificar: espera mi pedido."
213
+ },
214
+ "summaryPlanPrompt": {
215
+ "description": "Prompt of --plan when the issue has an open plan; {number}, {title} (text anyone can write in the issue: better left out), {plan}.",
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "default": "Issue #{number}. Lee la issue con `npx @ramon-sg/github-rest issue view {number}` y resúmela en lenguaje llano. Tiene un plan abierto en {plan}: di en una línea qué tareas quedan. No empieces a trabajar ni a planificar: espera mi pedido."
219
+ },
220
+ "cloudPrompt": {
221
+ "description": "What --cloud asks the cloud session: the skill that starts the issue there with --here; {number}, and {flags} (' --new' or ' --resume <branch>' when the branch was chosen here).",
222
+ "type": "string",
223
+ "minLength": 1,
224
+ "default": "/start-issue {number} --yes{flags}"
225
+ }
226
+ }
227
+ },
228
+ "plans": {
229
+ "type": "object",
230
+ "additionalProperties": false,
231
+ "properties": {
232
+ "dirs": {
233
+ "description": "Folders where an issue's plan is looked for, relative to the repo, in order of preference.",
234
+ "type": "array",
235
+ "minItems": 1,
236
+ "items": {
237
+ "type": "string",
238
+ "minLength": 1,
239
+ "pattern": "^[^/]"
240
+ },
241
+ "default": [
242
+ "docs/plans",
243
+ "docs/specs"
244
+ ]
245
+ }
246
+ }
247
+ },
248
+ "colors": {
249
+ "description": "Session color by label prefix; the first entry that starts a label wins. Replaces the default whole.",
250
+ "type": "object",
251
+ "additionalProperties": {
252
+ "enum": [
253
+ "red",
254
+ "blue",
255
+ "green",
256
+ "yellow",
257
+ "purple",
258
+ "orange",
259
+ "pink",
260
+ "cyan"
261
+ ]
262
+ },
263
+ "default": {
264
+ "critical-path": "red",
265
+ "P1:": "red",
266
+ "P2:": "orange",
267
+ "P3:": "yellow",
268
+ "P4:": "cyan"
269
+ }
270
+ }
271
+ },
272
+ "$defs": {
273
+ "typeMap": {
274
+ "type": "object",
275
+ "additionalProperties": {
276
+ "type": "string",
277
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
278
+ }
279
+ }
280
+ }
281
+ }