@crewbie/cli 0.1.0-alpha.49

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 (165) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +253 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +506 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/config.d.ts +84 -0
  7. package/dist/config.js +178 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/core.d.ts +31 -0
  10. package/dist/core.js +186 -0
  11. package/dist/core.js.map +1 -0
  12. package/dist/execution/attribution.d.ts +10 -0
  13. package/dist/execution/attribution.js +102 -0
  14. package/dist/execution/attribution.js.map +1 -0
  15. package/dist/execution/cancel.d.ts +3 -0
  16. package/dist/execution/cancel.js +59 -0
  17. package/dist/execution/cancel.js.map +1 -0
  18. package/dist/execution/capabilities.d.ts +22 -0
  19. package/dist/execution/capabilities.js +101 -0
  20. package/dist/execution/capabilities.js.map +1 -0
  21. package/dist/execution/controls.d.ts +51 -0
  22. package/dist/execution/controls.js +257 -0
  23. package/dist/execution/controls.js.map +1 -0
  24. package/dist/execution/dispatch.d.ts +69 -0
  25. package/dist/execution/dispatch.js +831 -0
  26. package/dist/execution/dispatch.js.map +1 -0
  27. package/dist/execution/fix.d.ts +3 -0
  28. package/dist/execution/fix.js +267 -0
  29. package/dist/execution/fix.js.map +1 -0
  30. package/dist/execution/github.d.ts +15 -0
  31. package/dist/execution/github.js +43 -0
  32. package/dist/execution/github.js.map +1 -0
  33. package/dist/execution/merge.d.ts +15 -0
  34. package/dist/execution/merge.js +133 -0
  35. package/dist/execution/merge.js.map +1 -0
  36. package/dist/execution/planning-approval.d.ts +33 -0
  37. package/dist/execution/planning-approval.js +227 -0
  38. package/dist/execution/planning-approval.js.map +1 -0
  39. package/dist/execution/pr-review.d.ts +86 -0
  40. package/dist/execution/pr-review.js +339 -0
  41. package/dist/execution/pr-review.js.map +1 -0
  42. package/dist/execution/review-loop.d.ts +63 -0
  43. package/dist/execution/review-loop.js +463 -0
  44. package/dist/execution/review-loop.js.map +1 -0
  45. package/dist/execution/test-feature.d.ts +29 -0
  46. package/dist/execution/test-feature.js +240 -0
  47. package/dist/execution/test-feature.js.map +1 -0
  48. package/dist/execution/watch.d.ts +12 -0
  49. package/dist/execution/watch.js +34 -0
  50. package/dist/execution/watch.js.map +1 -0
  51. package/dist/memory/context.d.ts +14 -0
  52. package/dist/memory/context.js +82 -0
  53. package/dist/memory/context.js.map +1 -0
  54. package/dist/memory/improvement.d.ts +25 -0
  55. package/dist/memory/improvement.js +168 -0
  56. package/dist/memory/improvement.js.map +1 -0
  57. package/dist/memory/launch.d.ts +9 -0
  58. package/dist/memory/launch.js +65 -0
  59. package/dist/memory/launch.js.map +1 -0
  60. package/dist/memory/runner.d.ts +4 -0
  61. package/dist/memory/runner.js +74 -0
  62. package/dist/memory/runner.js.map +1 -0
  63. package/dist/memory/state.d.ts +10 -0
  64. package/dist/memory/state.js +42 -0
  65. package/dist/memory/state.js.map +1 -0
  66. package/dist/presentation.d.ts +19 -0
  67. package/dist/presentation.js +128 -0
  68. package/dist/presentation.js.map +1 -0
  69. package/dist/reporting/dashboard.d.ts +2 -0
  70. package/dist/reporting/dashboard.js +106 -0
  71. package/dist/reporting/dashboard.js.map +1 -0
  72. package/dist/reporting/pr-usage.d.ts +24 -0
  73. package/dist/reporting/pr-usage.js +179 -0
  74. package/dist/reporting/pr-usage.js.map +1 -0
  75. package/dist/reporting/records.d.ts +28 -0
  76. package/dist/reporting/records.js +152 -0
  77. package/dist/reporting/records.js.map +1 -0
  78. package/dist/setup/agents.d.ts +8 -0
  79. package/dist/setup/agents.js +83 -0
  80. package/dist/setup/agents.js.map +1 -0
  81. package/dist/setup/assessment.d.ts +31 -0
  82. package/dist/setup/assessment.js +75 -0
  83. package/dist/setup/assessment.js.map +1 -0
  84. package/dist/setup/auto-loaded.d.ts +17 -0
  85. package/dist/setup/auto-loaded.js +49 -0
  86. package/dist/setup/auto-loaded.js.map +1 -0
  87. package/dist/setup/copilot-version.d.ts +7 -0
  88. package/dist/setup/copilot-version.js +39 -0
  89. package/dist/setup/copilot-version.js.map +1 -0
  90. package/dist/setup/copilot.d.ts +22 -0
  91. package/dist/setup/copilot.js +164 -0
  92. package/dist/setup/copilot.js.map +1 -0
  93. package/dist/setup/init.d.ts +41 -0
  94. package/dist/setup/init.js +315 -0
  95. package/dist/setup/init.js.map +1 -0
  96. package/dist/setup/install.d.ts +12 -0
  97. package/dist/setup/install.js +211 -0
  98. package/dist/setup/install.js.map +1 -0
  99. package/dist/setup/instruction-quality.d.ts +25 -0
  100. package/dist/setup/instruction-quality.js +258 -0
  101. package/dist/setup/instruction-quality.js.map +1 -0
  102. package/dist/setup/inventory.d.ts +26 -0
  103. package/dist/setup/inventory.js +78 -0
  104. package/dist/setup/inventory.js.map +1 -0
  105. package/dist/setup/onboarding.d.ts +40 -0
  106. package/dist/setup/onboarding.js +472 -0
  107. package/dist/setup/onboarding.js.map +1 -0
  108. package/dist/setup/package.d.ts +2 -0
  109. package/dist/setup/package.js +8 -0
  110. package/dist/setup/package.js.map +1 -0
  111. package/dist/setup/planning-workflow.d.ts +3 -0
  112. package/dist/setup/planning-workflow.js +250 -0
  113. package/dist/setup/planning-workflow.js.map +1 -0
  114. package/dist/setup/repository-map.d.ts +34 -0
  115. package/dist/setup/repository-map.js +89 -0
  116. package/dist/setup/repository-map.js.map +1 -0
  117. package/dist/setup/review.d.ts +8 -0
  118. package/dist/setup/review.js +137 -0
  119. package/dist/setup/review.js.map +1 -0
  120. package/dist/setup/team.d.ts +18 -0
  121. package/dist/setup/team.js +172 -0
  122. package/dist/setup/team.js.map +1 -0
  123. package/dist/setup/templates.d.ts +11 -0
  124. package/dist/setup/templates.js +494 -0
  125. package/dist/setup/templates.js.map +1 -0
  126. package/dist/setup/terminal.d.ts +12 -0
  127. package/dist/setup/terminal.js +11 -0
  128. package/dist/setup/terminal.js.map +1 -0
  129. package/dist/setup/update.d.ts +6 -0
  130. package/dist/setup/update.js +71 -0
  131. package/dist/setup/update.js.map +1 -0
  132. package/dist/specification/batch.d.ts +50 -0
  133. package/dist/specification/batch.js +127 -0
  134. package/dist/specification/batch.js.map +1 -0
  135. package/dist/specification/plan-checks.d.ts +6 -0
  136. package/dist/specification/plan-checks.js +73 -0
  137. package/dist/specification/plan-checks.js.map +1 -0
  138. package/dist/specification/planning.d.ts +26 -0
  139. package/dist/specification/planning.js +507 -0
  140. package/dist/specification/planning.js.map +1 -0
  141. package/dist/specification/prose.d.ts +1 -0
  142. package/dist/specification/prose.js +15 -0
  143. package/dist/specification/prose.js.map +1 -0
  144. package/dist/tracking/ado.d.ts +19 -0
  145. package/dist/tracking/ado.js +128 -0
  146. package/dist/tracking/ado.js.map +1 -0
  147. package/dist/tracking/github.d.ts +8 -0
  148. package/dist/tracking/github.js +112 -0
  149. package/dist/tracking/github.js.map +1 -0
  150. package/dist/tracking/issues.d.ts +28 -0
  151. package/dist/tracking/issues.js +180 -0
  152. package/dist/tracking/issues.js.map +1 -0
  153. package/dist/tracking/native.d.ts +5 -0
  154. package/dist/tracking/native.js +30 -0
  155. package/dist/tracking/native.js.map +1 -0
  156. package/dist/tracking/refs.d.ts +14 -0
  157. package/dist/tracking/refs.js +56 -0
  158. package/dist/tracking/refs.js.map +1 -0
  159. package/dist/tracking/sources.d.ts +5 -0
  160. package/dist/tracking/sources.js +29 -0
  161. package/dist/tracking/sources.js.map +1 -0
  162. package/docs/operations.md +1114 -0
  163. package/examples/batch.json +27 -0
  164. package/examples/runs.json +22 -0
  165. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Crewbie contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,253 @@
1
+ <div align="center">
2
+
3
+ # Crewbie
4
+
5
+ ### Agents implement. You review and architect.
6
+
7
+ [![CI](https://github.com/mvanderbend-msoft/crewbie/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mvanderbend-msoft/crewbie/actions/workflows/ci.yml)
8
+ [![Release](https://img.shields.io/github/v/release/mvanderbend-msoft/crewbie?include_prereleases&color=b11f4b)](https://github.com/mvanderbend-msoft/crewbie/releases)
9
+ [![Node.js](https://img.shields.io/badge/Node.js-22.12%2B-43853d)](https://nodejs.org/)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
11
+
12
+ [How it works](#how-it-works) &nbsp; / &nbsp;
13
+ [What you need](#what-you-need) &nbsp; / &nbsp;
14
+ [Quick start](#quick-start) &nbsp; / &nbsp;
15
+ [Principles](#principles) &nbsp; / &nbsp;
16
+ [Operations guide](docs/operations.md)
17
+
18
+ </div>
19
+
20
+ ---
21
+
22
+ Crewbie gives your GitHub repository a small team of GitHub Copilot cloud
23
+ agents. You write what you want in an issue. Crewbie plans the work, the agents
24
+ build it, and you review the result.
25
+
26
+ We are working towards a future where agents do the implementation work on
27
+ their own, and developers spend their time on review and architecture.
28
+ Crewbie covers only two steps of that work: **planning** and **implementation**.
29
+ It does not write your requirements and it does not deploy your code.
30
+
31
+ There is no framework to learn and no boilerplate to fill in. You use things
32
+ you already know: a GitHub issue, a label, a pull request review and a comment.
33
+
34
+ > [!IMPORTANT]
35
+ > **Alpha software.** Commands can still change. Crewbie works with GitHub
36
+ > Copilot only. Cloud runs use GitHub Actions minutes and Copilot AI credits.
37
+
38
+ ## How it works
39
+
40
+ ```text
41
+ You write an issue ──► add label ──► Crewbie opens a plan PR ──► you approve and merge it
42
+ │
43
+ you merge the feature PR ◄── Crewbie review ◄── agents build tasks ◄┘
44
+ ```
45
+
46
+ 1. **Write the issue.** Put your PRD, spec or plain description in a GitHub issue.
47
+ 2. **Add the label `crewbie:ready-for-planning`.** The coordinator agent splits
48
+ the work into small tasks and gives each task to a specialist.
49
+ 3. **Review the plan PR.** It shows the tasks, owners and order. Reply on the PR
50
+ to answer questions, or comment `/crewbie revise <feedback>` to change it.
51
+ 4. **Approve and merge the plan PR.** This is your go-ahead. Crewbie creates one
52
+ issue per task and assigns each to its Copilot cloud agent.
53
+ 5. **Agents build.** Each task gets its own PR into a shared feature branch.
54
+ When its checks pass, Crewbie merges it there and starts the next task.
55
+ 6. **Review the feature PR.** When all tasks are done, Crewbie opens one feature
56
+ PR into your default branch and its reviewer agent comments on it. Comment
57
+ `/crewbie fix` to send the review findings back to the agents.
58
+ 7. **You merge.** Crewbie never merges into your default branch.
59
+
60
+ **That is the whole interface:**
61
+
62
+ | You do | Where |
63
+ |---|---|
64
+ | Add `crewbie:ready-for-planning` | On an issue, to start planning |
65
+ | Reply, or `/crewbie revise <feedback>` | On a plan PR, to change the plan |
66
+ | Approve and merge | On a plan PR, to start the work |
67
+ | `/crewbie fix [notes]` | On a feature PR, to fix review findings |
68
+ | Add `crewbie:restart` | On a task issue, to retry a failed start |
69
+ | Merge | On the feature PR, when you are happy |
70
+
71
+ The other `crewbie:*` labels show status. Crewbie sets them for you.
72
+
73
+ ## What you need
74
+
75
+ ### On your computer
76
+
77
+ - **Node.js 22.12+**, **Git** and the **GitHub CLI** (`gh auth login`).
78
+ - A **GitHub Copilot plan that includes the Copilot cloud agent**. Organization
79
+ repositories also need the cloud agent allowed by the organization's policy.
80
+
81
+ ### In your GitHub repository
82
+
83
+ Do this once per repository. `crewbie init` creates the labels and the
84
+ `CREWBIE_COPILOT_VERSION` variable for you.
85
+
86
+ | Setting | Where | Why |
87
+ |---|---|---|
88
+ | Copilot cloud agent available | *Settings → Copilot → Cloud agent* | Agents run as Copilot cloud agent sessions. |
89
+ | **Require approval for workflow runs**: off | *Settings → Copilot → Cloud agent* | Otherwise GitHub holds each finished session and the next task waits up to an hour. |
90
+ | **Allow GitHub Actions to create and approve pull requests**: on | *Settings → Actions → General → Workflow permissions* | Crewbie's workflows open the plan and feature PRs. |
91
+ | Actions enabled | *Settings → Actions → General* | Planning, dispatch and review run as workflows. |
92
+ | Secret `CREWBIE_USER_TOKEN` | *Settings → Secrets and variables → Actions* | Assigns tasks to Copilot. GitHub only allows this with a user token, not the built-in Actions token. |
93
+
94
+ For `CREWBIE_USER_TOKEN`, create a fine-grained personal access token for this
95
+ repository, owned by a user with write access, with:
96
+
97
+ - **Read:** Metadata, Agent tasks
98
+ - **Read and write:** Actions, Contents, Issues, Pull requests
99
+
100
+ ```powershell
101
+ gh secret set CREWBIE_USER_TOKEN --repo OWNER/REPO # paste the token when asked
102
+ ```
103
+
104
+ Never put the token in a file, an issue or a command argument. See
105
+ [credentials](docs/operations.md#human-approval-and-credentials) for details.
106
+
107
+ ### What it costs
108
+
109
+ - **Planning, review and dispatch** run on GitHub Actions and use Actions minutes
110
+ (free for public repositories).
111
+ - **Each agent session** uses Copilot AI credits for the chosen model.
112
+ - **Save tokens with a setup workflow.** Every step an agent takes resends its
113
+ whole context. Add `.github/workflows/copilot-setup-steps.yml` to install your
114
+ dependencies before the agent starts; otherwise each session spends turns
115
+ installing them. `crewbie init` tells you when it is missing.
116
+ - Default limits: 2 agents at the same time, 3 tries per task and 20 launches
117
+ per plan. You can change these in `.crewbie/config.json`. They limit launches,
118
+ not money.
119
+
120
+ ## Quick start
121
+
122
+ **1. Install the CLI**
123
+
124
+ ```powershell
125
+ npm install --global --ignore-scripts https://github.com/mvanderbend-msoft/crewbie/releases/download/v0.1.0-alpha.49/crewbie-cli-0.1.0-alpha.49.tgz
126
+ ```
127
+
128
+ **2. Set up your repository.** Run this inside your own project:
129
+
130
+ ```powershell
131
+ crewbie init
132
+ ```
133
+
134
+ Crewbie looks at your code and your existing instructions and agents. It then
135
+ proposes a team, such as a frontend engineer, a backend engineer and a
136
+ reviewer, with a model for each. You review the proposal before anything is
137
+ written. For a new project, describe what you want to build and init asks
138
+ follow-up questions.
139
+
140
+ **3. Commit and push** the files init created to your default branch.
141
+
142
+ **4. Do the one-time [GitHub setup](#in-your-github-repository)**, including the
143
+ `CREWBIE_USER_TOKEN` secret.
144
+
145
+ **5. Open an issue** with your first feature and add `crewbie:ready-for-planning`.
146
+
147
+ ## The team
148
+
149
+ The team fits your repository; there is no fixed list of roles. A typical web app
150
+ might get:
151
+
152
+ | Role | Does |
153
+ |---|---|
154
+ | **Coordinator** | Splits your issue into tasks and picks an owner for each. |
155
+ | **Frontend / backend engineers** | Build the UI and the API. |
156
+ | **Tester** | Checks the combined work against your acceptance criteria. |
157
+ | **Reviewer** | Reviews the feature PR and points out problems. |
158
+ | **Improver** | Optional. Suggests small memory and instruction updates at night. |
159
+
160
+ Each role is a normal GitHub custom agent in `.github/agents/`. You can edit it
161
+ like any other file.
162
+
163
+ ## Memory
164
+
165
+ Agents keep short notes in Git so the next task does not repeat old mistakes.
166
+
167
+ | File | Holds | Used |
168
+ |---|---|---|
169
+ | `.crewbie/team/<role>/hot.md` | Current lessons and pitfalls for that role | Every task |
170
+ | `.crewbie/decisions/hot.md` | Choices that several roles depend on | Every task |
171
+ | `index.md` next to each | Links to older notes | Every task, as a table of contents |
172
+ | `cold/` and `archive/` | Older notes | Only when a task needs that history |
173
+
174
+ Crewbie puts the hot files and indexes straight into each agent's start-up
175
+ instructions, so the agent always has them. Older notes stay out of the way
176
+ until they are needed. Every memory change goes through a PR you review.
177
+ GitHub also loads your own `.github/copilot-instructions.md` and `AGENTS.md`
178
+ for each agent, as usual.
179
+
180
+ ## Principles
181
+
182
+ | Principle | In practice |
183
+ |---|---|
184
+ | **You own the what and the why.** | You write the requirements and make the architecture choices. Agents do the implementation. |
185
+ | **Nothing new to learn.** | Issues, labels, PRs and comments. No new document types or process steps. |
186
+ | **Fit the repository.** | Crewbie reuses your existing instructions, agents and tests instead of adding its own boilerplate. |
187
+ | **People decide.** | You approve the plan and merge the feature. Crewbie merges only task PRs, and only into the feature branch. |
188
+ | **Stop rather than guess.** | Clear launch limits, no silent retries and no silent switch to another agent or model. |
189
+ | **Remember lessons, not transcripts.** | Small hot files, with older detail moved out of the way. |
190
+ | **Be honest about what is known.** | Crewbie shows the model it asked for and says when it cannot confirm which model ran. Unknown usage is shown as unknown, not zero. |
191
+
192
+ ### Trade-offs to know about
193
+
194
+ - **GitHub and Copilot only.** Other agent tools and Git hosts are not supported.
195
+ - **Your tests matter.** Agents check their work with your build and tests. Weak
196
+ tests mean weaker checks.
197
+ - **Parallel tasks can conflict.** Two tasks that change the same file may need
198
+ a manual fix.
199
+ - **Not tested everywhere.** It has been run on a few accounts and repositories,
200
+ not on every organization policy.
201
+
202
+ ## Useful commands
203
+
204
+ | Command | Does |
205
+ |---|---|
206
+ | `crewbie update` / `crewbie update --apply` | Refresh the workflows and agents after installing a new CLI version. Your team, models and memory stay as they are. |
207
+ | `crewbie init --update` | Look at the repository again and suggest team changes. |
208
+ | `crewbie test <feature>` | Check out a feature branch locally and start your app. |
209
+ | `crewbie preflight` | Show what would launch next. |
210
+ | `crewbie pause --apply` / `crewbie resume --apply` | Stop and restart new launches. Running sessions continue. |
211
+ | `crewbie dashboard --collect --out report.html` | Build a report of who did what, with which model. |
212
+
213
+ Planning locally instead of on GitHub, the review loop, Azure DevOps work items,
214
+ nightly learning and recovery steps are all in the
215
+ [operations guide](docs/operations.md).
216
+
217
+ <details>
218
+ <summary><strong>What gets added to my repository?</strong></summary>
219
+
220
+ ```text
221
+ .github\agents\crewbie-*.agent.md One agent per role
222
+ .github\skills\crewbie\SKILL.md Local workflow for Copilot CLI
223
+ .github\workflows\crewbie-*.yml Planning, dispatch, review, fixes and reports
224
+ .crewbie\config.json Team, models and limits
225
+ .crewbie\instructions.md Shared working rules
226
+ .crewbie\decisions\hot.md Shared decisions
227
+ .crewbie\decisions\index.md Links to older shared decisions
228
+ .crewbie\team\<role>\hot.md Role lessons
229
+ .crewbie\team\<role>\index.md Links to older role notes
230
+ ```
231
+
232
+ Plans are added under `.crewbie\plans\` by each plan PR. Crewbie tracks which
233
+ files it owns and stops instead of overwriting your edits.
234
+
235
+ </details>
236
+
237
+ ## Build and contribute
238
+
239
+ ```powershell
240
+ git clone https://github.com/mvanderbend-msoft/crewbie.git
241
+ cd crewbie
242
+ npm ci --ignore-scripts
243
+ npm test
244
+ ```
245
+
246
+ Keep changes small and cover behaviour changes with tests. Maintainer release
247
+ steps are in the [operations guide](docs/operations.md#verification-and-release).
248
+ Report problems in [GitHub issues](https://github.com/mvanderbend-msoft/crewbie/issues).
249
+
250
+ ---
251
+
252
+ **MIT licensed.** Inspired by [Brady Gaster's Squad](https://github.com/bradygaster/squad).
253
+ Crewbie is a separate, smaller project, not a fork.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};