cadet-agent 0.15.5 → 0.19.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.
- package/README.md +105 -2
- package/package.json +35 -35
- package/src/install.mjs +16 -2
- package/src/upgrades.mjs +1 -1
package/README.md
CHANGED
|
@@ -6,8 +6,12 @@ Cadet-Agent is **not a one-shot code generator**. It won't spit out a finished g
|
|
|
6
6
|
|
|
7
7
|
## Repository Layout
|
|
8
8
|
- `.cadet/agent/core/` contains the shared Cadet-Agent framework documents.
|
|
9
|
+
- `cadet-agent.md` is the thin global directive: identity, non-negotiable rules, workflow routing, hard-gate protocol, and skill dispatch.
|
|
10
|
+
- `skills/` contains scoped workflow-phase skills (Requirements, Architecture, Spike, StoryBreakdown, TDD, Debugging, CodeReview).
|
|
11
|
+
- `templates/` contains runtime templates for planning artifacts.
|
|
9
12
|
- `.cadet/agent/docs/` contains setup guides for each supported IDE.
|
|
10
13
|
- `.github/agents/` contains the Copilot custom agent definitions (Cadet Agent + Cadet Agent Reviewer).
|
|
14
|
+
- `.github/prompts/` contains Copilot slash-command skill prompts (`/cadet-review`, `/cadet-tdd`, etc.).
|
|
11
15
|
- `.cursor/` contains Cursor-specific authored files.
|
|
12
16
|
- `.continue/` contains Continue-specific authored files.
|
|
13
17
|
- `.claude/` contains Claude Code-specific authored files.
|
|
@@ -15,6 +19,27 @@ Cadet-Agent is **not a one-shot code generator**. It won't spit out a finished g
|
|
|
15
19
|
- `package-agent.ps1` builds the distributable `cadet-agent.zip` package.
|
|
16
20
|
- `publish-npm.ps1` publishes the CLI to npm using a token from `~/.npm_token`.
|
|
17
21
|
|
|
22
|
+
## Cross-IDE Support
|
|
23
|
+
|
|
24
|
+
Cadet-Agent provides full workflow parity across four IDEs. The same 7 skills + resume + reviewer are available in each:
|
|
25
|
+
|
|
26
|
+
| Feature | GitHub Copilot | Cursor | Continue | Claude Code |
|
|
27
|
+
|---|---|---|---|---|
|
|
28
|
+
| Auto-load rules | Agent definition | `alwaysApply` rule | Project rule | Project skill |
|
|
29
|
+
| Skill dispatch | `/cadet-<skill>` prompts | Natural language | `/cadet-<skill>` commands | `/cadet-<skill>` skills |
|
|
30
|
+
| Requirements | ✅ | ✅ | ✅ | ✅ |
|
|
31
|
+
| Architecture | ✅ | ✅ | ✅ | ✅ |
|
|
32
|
+
| Spike | ✅ | ✅ | ✅ | ✅ |
|
|
33
|
+
| Story Breakdown | ✅ | ✅ | ✅ | ✅ |
|
|
34
|
+
| TDD | ✅ | ✅ | ✅ | ✅ |
|
|
35
|
+
| Debugging | ✅ | ✅ | ✅ | ✅ |
|
|
36
|
+
| Code Review | ✅ | ✅ | ✅ | ✅ |
|
|
37
|
+
| Resume | ✅ | ✅ | ✅ | ✅ |
|
|
38
|
+
| Reviewer mode | Agent picker | Rule toggle | `/cadet-agent-reviewer` | `/cadet-agent-reviewer` |
|
|
39
|
+
| Git guard | PreToolUse hook | Manual | Manual | Manual |
|
|
40
|
+
|
|
41
|
+
All adapters delegate to the canonical files under `.cadet/agent/core/` — no duplicated rules or skills. See `ADAPTERS.md` for the full inventory.
|
|
42
|
+
|
|
18
43
|
## Quick Install
|
|
19
44
|
|
|
20
45
|
```bash
|
|
@@ -53,18 +78,92 @@ Expand-Archive .\cadet-agent.zip -DestinationPath . -Force
|
|
|
53
78
|
- For framework navigation after install, see `.cadet/agent/core/README.md`.
|
|
54
79
|
- IDE setup guides and full documentation are at the [canonical repository](https://github.com/naishtech/cadet-agent) (GitHub Pages).
|
|
55
80
|
|
|
81
|
+
## Workflow
|
|
82
|
+
|
|
83
|
+
Cadet-Agent follows a structured SDLC with hard gates between phases. The workflow path adapts to change size: **large** changes go through the full pipeline, **small** changes skip planning artifacts, and **no_test_required** changes (docs, config) skip TDD.
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
flowchart TD
|
|
87
|
+
START(["🚀 User starts session"])
|
|
88
|
+
RESUME{"state.json<br/>exists?"}
|
|
89
|
+
INIT["Initialize state.json<br/>phase: context-resolution"]
|
|
90
|
+
REPORT["Report current phase,<br/>epics, stories & gates"]
|
|
91
|
+
CR["🔍 Context Resolution<br/>classify change size,<br/>calibrate learner,<br/>detect policy"]
|
|
92
|
+
REQ["📋 Requirements<br/>Given/When/Then criteria<br/>assumption audit"]
|
|
93
|
+
ARCH["🏗️ Architecture<br/>technical design,<br/>ADR decisions"]
|
|
94
|
+
SPIKE["🧪 Spikes<br/>resolve unverified<br/>assumptions"]
|
|
95
|
+
BREAKDOWN["📐 Story Breakdown<br/>epics → testable stories"]
|
|
96
|
+
IMPL["🔨 Implementation<br/>TDD per story,<br/>red → green → refactor"]
|
|
97
|
+
REVIEW["✅ Review<br/>hard gate: 17-step<br/>code review, security"]
|
|
98
|
+
VALIDATE["✔️ Validation<br/>acceptance criteria,<br/>design artifact sync"]
|
|
99
|
+
CLOSED(["🎉 Closed"])
|
|
100
|
+
NEXT_STORY{"More stories<br/>in epic?"}
|
|
101
|
+
|
|
102
|
+
START --> RESUME
|
|
103
|
+
RESUME -->|"no"| INIT --> CR
|
|
104
|
+
RESUME -->|"yes"| REPORT --> CR
|
|
105
|
+
|
|
106
|
+
CR -->|"large change"| REQ
|
|
107
|
+
CR -->|"small / no_test_required"| IMPL
|
|
108
|
+
|
|
109
|
+
REQ --> ARCH
|
|
110
|
+
ARCH -->|"unverified assumptions"| SPIKE
|
|
111
|
+
ARCH -->|"all assumptions resolved"| BREAKDOWN
|
|
112
|
+
SPIKE -->|"spike complete"| ARCH
|
|
113
|
+
|
|
114
|
+
BREAKDOWN --> IMPL
|
|
115
|
+
|
|
116
|
+
IMPL -->|"story complete"| REVIEW
|
|
117
|
+
REVIEW -->|"gate: codeReviewCompleted ✅<br/>gate: securityReviewPassed ✅"| VALIDATE
|
|
118
|
+
VALIDATE -->|"gate: designArtifactSyncConfirmed ✅"| NEXT_STORY
|
|
119
|
+
NEXT_STORY -->|"yes"| IMPL
|
|
120
|
+
NEXT_STORY -->|"no"| CLOSED
|
|
121
|
+
|
|
122
|
+
style START fill:#4a9,stroke:#333,color:#fff
|
|
123
|
+
style CLOSED fill:#4a9,stroke:#333,color:#fff
|
|
124
|
+
style RESUME fill:#e8a840,stroke:#333,color:#000
|
|
125
|
+
style REVIEW fill:#e87440,stroke:#333,color:#fff
|
|
126
|
+
style VALIDATE fill:#e87440,stroke:#333,color:#fff
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Resuming a Session
|
|
130
|
+
|
|
131
|
+
Use the `/cadet-resume` slash command to pick up where you left off. It reads `.cadet/state.json` and reports the current phase, epic/story progress, and outstanding gates — then dispatches the right skill for the next step. If no state file exists, it initializes a fresh session from `context-resolution`.
|
|
132
|
+
|
|
133
|
+
### Phase Gating
|
|
134
|
+
|
|
135
|
+
Hard gates are enforced at every phase transition. The agent reads `.cadet/state.json → gates` before advancing and **blocks** the transition if any required gate is `false`. Gates cannot be skipped without an explicit user-directed exception recorded in `changeHistory`.
|
|
136
|
+
|
|
137
|
+
| Transition | Required Gates |
|
|
138
|
+
|---|---|
|
|
139
|
+
| implementation → review | `testsPassed`, `compileCheckConfirmed`, `unityAnalyzerClean`, `storyTrackingUpdated` |
|
|
140
|
+
| review → validation | `codeReviewCompleted`, `securityReviewPassed`, `acceptanceCriteriaValidated` |
|
|
141
|
+
| validation → closed | `designArtifactSyncConfirmed` |
|
|
142
|
+
|
|
56
143
|
## Examples
|
|
57
144
|
|
|
58
145
|
### GitHub Copilot
|
|
59
146
|
Run `npx cadet-agent@latest init` in your Unity project root, then open the repo in VS Code.
|
|
60
147
|
|
|
61
|
-
**Agent mode:** Select the **Cadet Agent** agent from the agent picker in Copilot Chat. The agent definition at `.github/agents/cadet.agent.md`
|
|
148
|
+
**Agent mode:** Select the **Cadet Agent** agent from the agent picker in Copilot Chat. The agent definition at `.github/agents/cadet.agent.md` loads the thin directive in `.cadet/agent/core/cadet-agent.md` and dispatches scoped skills.
|
|
62
149
|
|
|
63
150
|
```text
|
|
64
151
|
[Describe your game dev task...]
|
|
65
152
|
```
|
|
66
153
|
|
|
67
|
-
Cadet Agent will
|
|
154
|
+
Cadet Agent will classify the change, check `.cadet/state.json` for blocking gates, and invoke the appropriate skill.
|
|
155
|
+
|
|
156
|
+
**Skill mode:** For a specific workflow phase, use the matching slash command so the skill becomes the primary instruction context:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
/cadet-requirements
|
|
160
|
+
create a requirements doc for a kart handling prototype
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
/cadet-review
|
|
165
|
+
review the PR at https://github.com/... or review story-1 in epic-1-player-movement
|
|
166
|
+
```
|
|
68
167
|
|
|
69
168
|
**Review mode:** After the Cadet Agent completes a task, select the **Cadet Agent Reviewer** from the agent picker. Provide the task, story, or PR to review:
|
|
70
169
|
|
|
@@ -101,8 +200,12 @@ If a specific game repository needs local conventions, add a policy file under `
|
|
|
101
200
|
## Package Output
|
|
102
201
|
Running `./package-agent.ps1` produces `cadet-agent.zip` with this layout:
|
|
103
202
|
- `.cadet/agent/core/`
|
|
203
|
+
- `.cadet/agent/core/skills/`
|
|
204
|
+
- `.cadet/agent/core/templates/`
|
|
104
205
|
- `.github/agents/cadet.agent.md`
|
|
105
206
|
- `.github/agents/cadet-agent-reviewer.agent.md`
|
|
207
|
+
- `.github/prompts/cadet-*.prompt.md`
|
|
208
|
+
- `.github/hooks/`
|
|
106
209
|
- `.cursor/rules/cadet-agent.md`
|
|
107
210
|
- `.continue/rules/cadet-agent.md`
|
|
108
211
|
- `.claude/skills/cadet-agent.md`
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cadet-agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Cross-IDE agent framework for Unity/C# game-development — one-command install",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"cadet-agent": "bin/cli.mjs"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "node --test test/*.test.mjs"
|
|
11
|
-
},
|
|
12
|
-
"files": [
|
|
13
|
-
"bin/",
|
|
14
|
-
"src/"
|
|
15
|
-
],
|
|
16
|
-
"keywords": [
|
|
17
|
-
"cadet",
|
|
18
|
-
"cadet-agent",
|
|
19
|
-
"unity",
|
|
20
|
-
"game-development",
|
|
21
|
-
"ai-agent",
|
|
22
|
-
"copilot",
|
|
23
|
-
"cursor",
|
|
24
|
-
"claude-code"
|
|
25
|
-
],
|
|
26
|
-
"license": "CC-BY-4.0",
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/naishtech/cadet-agent.git"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://github.com/naishtech/cadet-agent#readme",
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18.0.0"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "cadet-agent",
|
|
3
|
+
"version": "0.19.0",
|
|
4
|
+
"description": "Cross-IDE agent framework for Unity/C# game-development — one-command install",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"cadet-agent": "bin/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node --test test/*.test.mjs"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin/",
|
|
14
|
+
"src/"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"cadet",
|
|
18
|
+
"cadet-agent",
|
|
19
|
+
"unity",
|
|
20
|
+
"game-development",
|
|
21
|
+
"ai-agent",
|
|
22
|
+
"copilot",
|
|
23
|
+
"cursor",
|
|
24
|
+
"claude-code"
|
|
25
|
+
],
|
|
26
|
+
"license": "CC-BY-4.0",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/naishtech/cadet-agent.git"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/naishtech/cadet-agent#readme",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18.0.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/install.mjs
CHANGED
|
@@ -227,12 +227,26 @@ export async function install(targetDir, opts = {}) {
|
|
|
227
227
|
console.log('── Next steps ──');
|
|
228
228
|
console.log(' GitHub Copilot:');
|
|
229
229
|
console.log(' Select "Cadet Agent" from the agent picker in Copilot Chat');
|
|
230
|
+
console.log(' Slash commands: /cadet-requirements, /cadet-architecture, /cadet-spike,');
|
|
231
|
+
console.log(' /cadet-breakdown, /cadet-tdd, /cadet-debug, /cadet-review, /cadet-resume');
|
|
232
|
+
console.log(' Reviewer: select "Cadet Agent Reviewer" from the agent picker');
|
|
230
233
|
console.log(' Cursor:');
|
|
231
|
-
console.log(' Already active — .cursor\\rules\\cadet-agent.md loads automatically');
|
|
234
|
+
console.log(' Already active — .cursor\\rules\\cadet-agent.md loads automatically (alwaysApply)');
|
|
235
|
+
console.log(' Ask for a phase by name: "run the requirements skill", "do a code review", etc.');
|
|
236
|
+
console.log(' Reviewer: enable the cadet-agent-reviewer rule (alwaysApply: false)');
|
|
237
|
+
console.log(' Git guard: manual — see .cursor\\rules\\cadet-agent.md for instructions');
|
|
232
238
|
console.log(' Continue:');
|
|
233
|
-
console.log(' Already active — .continue\\rules\\cadet-agent.md loads
|
|
239
|
+
console.log(' Already active — .continue\\rules\\cadet-agent.md loads as a project rule');
|
|
240
|
+
console.log(' Slash commands: /cadet-requirements, /cadet-architecture, /cadet-spike,');
|
|
241
|
+
console.log(' /cadet-breakdown, /cadet-tdd, /cadet-debug, /cadet-review, /cadet-resume');
|
|
242
|
+
console.log(' Reviewer: /cadet-agent-reviewer');
|
|
243
|
+
console.log(' Git guard: manual — see .continue\\rules\\cadet-agent.md for instructions');
|
|
234
244
|
console.log(' Claude Code:');
|
|
235
245
|
console.log(' Already active — .claude\\skills\\cadet-agent.md loads as a project skill');
|
|
246
|
+
console.log(' Slash commands: /cadet-requirements, /cadet-architecture, /cadet-spike,');
|
|
247
|
+
console.log(' /cadet-breakdown, /cadet-tdd, /cadet-debug, /cadet-review, /cadet-resume');
|
|
248
|
+
console.log(' Reviewer: /cadet-agent-reviewer');
|
|
249
|
+
console.log(' Git guard: manual — see .claude\\skills\\cadet-agent.md for instructions');
|
|
236
250
|
console.log('');
|
|
237
251
|
}
|
|
238
252
|
|
package/src/upgrades.mjs
CHANGED
|
@@ -37,7 +37,7 @@ function deletePath(targetDir, relativePath) {
|
|
|
37
37
|
|
|
38
38
|
// Add upgrade entries when removing/renaming managed paths.
|
|
39
39
|
// Key = FROM version. Example:
|
|
40
|
-
// '0.
|
|
40
|
+
// '0.17.0': (targetDir) => [
|
|
41
41
|
// ...deletePath(targetDir, '.cadet/some-old-dir'),
|
|
42
42
|
// ...deletePath(targetDir, '.github/old-agent.agent.md'),
|
|
43
43
|
// ],
|