@bradygaster/squad-cli 0.8.19 → 0.8.22
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 +77 -77
- package/dist/cli/commands/build.d.ts +31 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +453 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/init-remote.d.ts.map +1 -1
- package/dist/cli/commands/init-remote.js +13 -0
- package/dist/cli/commands/init-remote.js.map +1 -1
- package/dist/cli/commands/link.d.ts.map +1 -1
- package/dist/cli/commands/link.js +13 -0
- package/dist/cli/commands/link.js.map +1 -1
- package/dist/cli/commands/migrate.d.ts +14 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/migrate.js +419 -0
- package/dist/cli/commands/migrate.js.map +1 -0
- package/dist/cli/commands/streams.d.ts +15 -0
- package/dist/cli/commands/streams.d.ts.map +1 -0
- package/dist/cli/commands/streams.js +147 -0
- package/dist/cli/commands/streams.js.map +1 -0
- package/dist/cli/core/cast.d.ts.map +1 -1
- package/dist/cli/core/cast.js +111 -63
- package/dist/cli/core/cast.js.map +1 -1
- package/dist/cli/core/init.d.ts +4 -0
- package/dist/cli/core/init.d.ts.map +1 -1
- package/dist/cli/core/init.js +2 -2
- package/dist/cli/core/init.js.map +1 -1
- package/dist/cli/core/migrate-directory.d.ts.map +1 -1
- package/dist/cli/core/migrate-directory.js +3 -2
- package/dist/cli/core/migrate-directory.js.map +1 -1
- package/dist/cli/core/team-md.js +34 -34
- package/dist/cli/core/templates.d.ts.map +1 -1
- package/dist/cli/core/templates.js +0 -6
- package/dist/cli/core/templates.js.map +1 -1
- package/dist/cli/core/upgrade.d.ts.map +1 -1
- package/dist/cli/core/upgrade.js +2 -1
- package/dist/cli/core/upgrade.js.map +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/shell/commands.d.ts +6 -0
- package/dist/cli/shell/commands.d.ts.map +1 -1
- package/dist/cli/shell/commands.js +2 -1
- package/dist/cli/shell/commands.js.map +1 -1
- package/dist/cli/shell/components/AgentPanel.d.ts.map +1 -1
- package/dist/cli/shell/components/AgentPanel.js +4 -3
- package/dist/cli/shell/components/AgentPanel.js.map +1 -1
- package/dist/cli/shell/components/App.d.ts.map +1 -1
- package/dist/cli/shell/components/App.js +36 -2
- package/dist/cli/shell/components/App.js.map +1 -1
- package/dist/cli/shell/components/MessageStream.d.ts.map +1 -1
- package/dist/cli/shell/components/MessageStream.js +2 -1
- package/dist/cli/shell/components/MessageStream.js.map +1 -1
- package/dist/cli/shell/components/ThinkingIndicator.js +2 -2
- package/dist/cli/shell/components/ThinkingIndicator.js.map +1 -1
- package/dist/cli/shell/coordinator.js +88 -88
- package/dist/cli/shell/index.d.ts.map +1 -1
- package/dist/cli/shell/index.js +41 -3
- package/dist/cli/shell/index.js.map +1 -1
- package/dist/cli-entry.js +207 -15
- package/dist/cli-entry.js.map +1 -1
- package/package.json +181 -156
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +35 -35
- package/templates/casting-registry.json +3 -3
- package/templates/ceremonies.md +41 -41
- package/templates/charter.md +53 -53
- package/templates/constraint-tracking.md +38 -38
- package/templates/copilot-instructions.md +46 -46
- package/templates/history.md +10 -10
- package/templates/identity/now.md +9 -9
- package/templates/identity/wisdom.md +15 -15
- package/templates/mcp-config.md +90 -90
- package/templates/multi-agent-format.md +28 -28
- package/templates/orchestration-log.md +27 -27
- package/templates/plugin-marketplace.md +49 -49
- package/templates/ralph-triage.js +1 -1
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +54 -54
- package/templates/run-output.md +50 -50
- package/templates/scribe-charter.md +119 -119
- package/templates/skill.md +24 -24
- package/templates/skills/squad-conventions/SKILL.md +69 -69
- package/templates/squad.agent.md +1146 -1146
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +50 -50
- package/templates/workflows/squad-heartbeat.yml +3 -3
- package/templates/workflows/squad-insider-release.yml +61 -61
- package/templates/workflows/squad-issue-assign.yml +161 -161
- package/templates/workflows/squad-label-enforce.yml +181 -181
- package/templates/workflows/squad-preview.yml +55 -55
- package/templates/workflows/squad-promote.yml +120 -121
- package/templates/workflows/squad-release.yml +77 -77
- package/templates/workflows/squad-triage.yml +260 -260
- package/templates/workflows/sync-squad-labels.yml +169 -169
- package/dist/cli/shell/sdk-bridge.d.ts +0 -50
- package/dist/cli/shell/sdk-bridge.d.ts.map +0 -1
- package/dist/cli/shell/sdk-bridge.js +0 -235
- package/dist/cli/shell/sdk-bridge.js.map +0 -1
- package/dist/cli/shell/theme-colors.d.ts +0 -39
- package/dist/cli/shell/theme-colors.d.ts.map +0 -1
- package/dist/cli/shell/theme-colors.js +0 -39
- package/dist/cli/shell/theme-colors.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -4
- package/dist/cli.js.map +0 -1
- package/templates/workflows/squad-main-guard.yml +0 -129
package/templates/skill.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "{skill-name}"
|
|
3
|
-
description: "{what this skill teaches agents}"
|
|
4
|
-
domain: "{e.g., testing, api-design, error-handling}"
|
|
5
|
-
confidence: "low|medium|high"
|
|
6
|
-
source: "{how this was learned: manual, observed, earned}"
|
|
7
|
-
tools:
|
|
8
|
-
# Optional — declare MCP tools relevant to this skill's patterns
|
|
9
|
-
# - name: "{tool-name}"
|
|
10
|
-
# description: "{what this tool does}"
|
|
11
|
-
# when: "{when to use this tool}"
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Context
|
|
15
|
-
{When and why this skill applies}
|
|
16
|
-
|
|
17
|
-
## Patterns
|
|
18
|
-
{Specific patterns, conventions, or approaches}
|
|
19
|
-
|
|
20
|
-
## Examples
|
|
21
|
-
{Code examples or references}
|
|
22
|
-
|
|
23
|
-
## Anti-Patterns
|
|
24
|
-
{What to avoid}
|
|
1
|
+
---
|
|
2
|
+
name: "{skill-name}"
|
|
3
|
+
description: "{what this skill teaches agents}"
|
|
4
|
+
domain: "{e.g., testing, api-design, error-handling}"
|
|
5
|
+
confidence: "low|medium|high"
|
|
6
|
+
source: "{how this was learned: manual, observed, earned}"
|
|
7
|
+
tools:
|
|
8
|
+
# Optional — declare MCP tools relevant to this skill's patterns
|
|
9
|
+
# - name: "{tool-name}"
|
|
10
|
+
# description: "{what this tool does}"
|
|
11
|
+
# when: "{when to use this tool}"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
{When and why this skill applies}
|
|
16
|
+
|
|
17
|
+
## Patterns
|
|
18
|
+
{Specific patterns, conventions, or approaches}
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
{Code examples or references}
|
|
22
|
+
|
|
23
|
+
## Anti-Patterns
|
|
24
|
+
{What to avoid}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "squad-conventions"
|
|
3
|
-
description: "Core conventions and patterns used in the Squad codebase"
|
|
4
|
-
domain: "project-conventions"
|
|
5
|
-
confidence: "high"
|
|
6
|
-
source: "manual"
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Context
|
|
10
|
-
These conventions apply to all work on the Squad CLI tool (`create-squad`). Squad is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Squad source code.
|
|
11
|
-
|
|
12
|
-
## Patterns
|
|
13
|
-
|
|
14
|
-
### Zero Dependencies
|
|
15
|
-
Squad has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.
|
|
16
|
-
|
|
17
|
-
### Node.js Built-in Test Runner
|
|
18
|
-
Tests use `node:test` and `node:assert/strict` — no test frameworks. Run with `npm test`. Test files live in `test/`. The test command is `node --test test/`.
|
|
19
|
-
|
|
20
|
-
### Error Handling — `fatal()` Pattern
|
|
21
|
-
All user-facing errors use the `fatal(msg)` function which prints a red `✗` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.
|
|
22
|
-
|
|
23
|
-
### ANSI Color Constants
|
|
24
|
-
Colors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants — do not inline ANSI escape codes.
|
|
25
|
-
|
|
26
|
-
### File Structure
|
|
27
|
-
- `.squad/` — Team state (user-owned, never overwritten by upgrades)
|
|
28
|
-
- `.squad/templates/` — Template files copied from `templates/` (Squad-owned, overwritten on upgrade)
|
|
29
|
-
- `.github/agents/squad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)
|
|
30
|
-
- `templates/` — Source templates shipped with the npm package
|
|
31
|
-
- `.squad/skills/` — Team skills in SKILL.md format (user-owned)
|
|
32
|
-
- `.squad/decisions/inbox/` — Drop-box for parallel decision writes
|
|
33
|
-
|
|
34
|
-
### Windows Compatibility
|
|
35
|
-
Always use `path.join()` for file paths — never hardcode `/` or `\` separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.
|
|
36
|
-
|
|
37
|
-
### Init Idempotency
|
|
38
|
-
The init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report "already exists." Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.
|
|
39
|
-
|
|
40
|
-
### Copy Pattern
|
|
41
|
-
`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.
|
|
42
|
-
|
|
43
|
-
## Examples
|
|
44
|
-
|
|
45
|
-
```javascript
|
|
46
|
-
// Error handling
|
|
47
|
-
function fatal(msg) {
|
|
48
|
-
console.error(`${RED}✗${RESET} ${msg}`);
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// File path construction (Windows-safe)
|
|
53
|
-
const agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');
|
|
54
|
-
|
|
55
|
-
// Skip-if-exists pattern
|
|
56
|
-
if (!fs.existsSync(ceremoniesDest)) {
|
|
57
|
-
fs.copyFileSync(ceremoniesSrc, ceremoniesDest);
|
|
58
|
-
console.log(`${GREEN}✓${RESET} .squad/ceremonies.md`);
|
|
59
|
-
} else {
|
|
60
|
-
console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Anti-Patterns
|
|
65
|
-
- **Adding npm dependencies** — Squad is zero-dep. Use Node.js built-ins only.
|
|
66
|
-
- **Hardcoded path separators** — Never use `/` or `\` directly. Always `path.join()`.
|
|
67
|
-
- **Overwriting user state on init** — Init skips existing files. Only upgrade overwrites Squad-owned files.
|
|
68
|
-
- **Raw stack traces** — All errors go through `fatal()`. Users see clean messages, not stack traces.
|
|
69
|
-
- **Inline ANSI codes** — Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).
|
|
1
|
+
---
|
|
2
|
+
name: "squad-conventions"
|
|
3
|
+
description: "Core conventions and patterns used in the Squad codebase"
|
|
4
|
+
domain: "project-conventions"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
source: "manual"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
These conventions apply to all work on the Squad CLI tool (`create-squad`). Squad is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Squad source code.
|
|
11
|
+
|
|
12
|
+
## Patterns
|
|
13
|
+
|
|
14
|
+
### Zero Dependencies
|
|
15
|
+
Squad has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.
|
|
16
|
+
|
|
17
|
+
### Node.js Built-in Test Runner
|
|
18
|
+
Tests use `node:test` and `node:assert/strict` — no test frameworks. Run with `npm test`. Test files live in `test/`. The test command is `node --test test/`.
|
|
19
|
+
|
|
20
|
+
### Error Handling — `fatal()` Pattern
|
|
21
|
+
All user-facing errors use the `fatal(msg)` function which prints a red `✗` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.
|
|
22
|
+
|
|
23
|
+
### ANSI Color Constants
|
|
24
|
+
Colors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants — do not inline ANSI escape codes.
|
|
25
|
+
|
|
26
|
+
### File Structure
|
|
27
|
+
- `.squad/` — Team state (user-owned, never overwritten by upgrades)
|
|
28
|
+
- `.squad/templates/` — Template files copied from `templates/` (Squad-owned, overwritten on upgrade)
|
|
29
|
+
- `.github/agents/squad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)
|
|
30
|
+
- `templates/` — Source templates shipped with the npm package
|
|
31
|
+
- `.squad/skills/` — Team skills in SKILL.md format (user-owned)
|
|
32
|
+
- `.squad/decisions/inbox/` — Drop-box for parallel decision writes
|
|
33
|
+
|
|
34
|
+
### Windows Compatibility
|
|
35
|
+
Always use `path.join()` for file paths — never hardcode `/` or `\` separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.
|
|
36
|
+
|
|
37
|
+
### Init Idempotency
|
|
38
|
+
The init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report "already exists." Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.
|
|
39
|
+
|
|
40
|
+
### Copy Pattern
|
|
41
|
+
`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
// Error handling
|
|
47
|
+
function fatal(msg) {
|
|
48
|
+
console.error(`${RED}✗${RESET} ${msg}`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// File path construction (Windows-safe)
|
|
53
|
+
const agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');
|
|
54
|
+
|
|
55
|
+
// Skip-if-exists pattern
|
|
56
|
+
if (!fs.existsSync(ceremoniesDest)) {
|
|
57
|
+
fs.copyFileSync(ceremoniesSrc, ceremoniesDest);
|
|
58
|
+
console.log(`${GREEN}✓${RESET} .squad/ceremonies.md`);
|
|
59
|
+
} else {
|
|
60
|
+
console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Anti-Patterns
|
|
65
|
+
- **Adding npm dependencies** — Squad is zero-dep. Use Node.js built-ins only.
|
|
66
|
+
- **Hardcoded path separators** — Never use `/` or `\` directly. Always `path.join()`.
|
|
67
|
+
- **Overwriting user state on init** — Init skips existing files. Only upgrade overwrites Squad-owned files.
|
|
68
|
+
- **Raw stack traces** — All errors go through `fatal()`. Users see clean messages, not stack traces.
|
|
69
|
+
- **Inline ANSI codes** — Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).
|