@bradygaster/squad-cli 0.9.1 → 0.9.2-insider.6
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 +329 -329
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +10 -10
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/config.d.ts +12 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +157 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/consult.d.ts.map +1 -1
- package/dist/cli/commands/consult.js +9 -4
- package/dist/cli/commands/consult.js.map +1 -1
- package/dist/cli/commands/copilot.d.ts.map +1 -1
- package/dist/cli/commands/copilot.js +8 -7
- package/dist/cli/commands/copilot.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +50 -17
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/economy.d.ts.map +1 -1
- package/dist/cli/commands/economy.js +3 -2
- package/dist/cli/commands/economy.js.map +1 -1
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +22 -16
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/extract.d.ts.map +1 -1
- package/dist/cli/commands/extract.js +14 -10
- package/dist/cli/commands/extract.js.map +1 -1
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/import.js +21 -18
- package/dist/cli/commands/import.js.map +1 -1
- package/dist/cli/commands/init-remote.d.ts.map +1 -1
- package/dist/cli/commands/init-remote.js +7 -6
- 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 +11 -10
- package/dist/cli/commands/link.js.map +1 -1
- package/dist/cli/commands/migrate.d.ts.map +1 -1
- package/dist/cli/commands/migrate.js +19 -18
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/personal.d.ts.map +1 -1
- package/dist/cli/commands/personal.js +57 -65
- package/dist/cli/commands/personal.js.map +1 -1
- package/dist/cli/commands/plugin.d.ts.map +1 -1
- package/dist/cli/commands/plugin.js +8 -7
- package/dist/cli/commands/plugin.js.map +1 -1
- package/dist/cli/commands/rc.d.ts.map +1 -1
- package/dist/cli/commands/rc.js +19 -12
- package/dist/cli/commands/rc.js.map +1 -1
- package/dist/cli/commands/schedule.d.ts.map +1 -1
- package/dist/cli/commands/schedule.js +6 -5
- package/dist/cli/commands/schedule.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +18 -11
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/streams.d.ts.map +1 -1
- package/dist/cli/commands/streams.js +3 -2
- package/dist/cli/commands/streams.js.map +1 -1
- package/dist/cli/commands/upstream.d.ts.map +1 -1
- package/dist/cli/commands/upstream.js +23 -19
- package/dist/cli/commands/upstream.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/board.d.ts +22 -0
- package/dist/cli/commands/watch/capabilities/board.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/board.js +121 -0
- package/dist/cli/commands/watch/capabilities/board.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/budget-check.d.ts +29 -0
- package/dist/cli/commands/watch/capabilities/budget-check.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/budget-check.js +38 -0
- package/dist/cli/commands/watch/capabilities/budget-check.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/circuit-breaker.d.ts +52 -0
- package/dist/cli/commands/watch/capabilities/circuit-breaker.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/circuit-breaker.js +152 -0
- package/dist/cli/commands/watch/capabilities/circuit-breaker.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.js +72 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/execute.d.ts +33 -0
- package/dist/cli/commands/watch/capabilities/execute.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/execute.js +156 -0
- package/dist/cli/commands/watch/capabilities/execute.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/health-check.d.ts +29 -0
- package/dist/cli/commands/watch/capabilities/health-check.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/health-check.js +139 -0
- package/dist/cli/commands/watch/capabilities/health-check.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/heartbeat.d.ts +48 -0
- package/dist/cli/commands/watch/capabilities/heartbeat.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/heartbeat.js +115 -0
- package/dist/cli/commands/watch/capabilities/heartbeat.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/index.d.ts +9 -0
- package/dist/cli/commands/watch/capabilities/index.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/index.js +40 -0
- package/dist/cli/commands/watch/capabilities/index.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/lockfile.d.ts +30 -0
- package/dist/cli/commands/watch/capabilities/lockfile.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/lockfile.js +100 -0
- package/dist/cli/commands/watch/capabilities/lockfile.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/machine-capabilities.d.ts +30 -0
- package/dist/cli/commands/watch/capabilities/machine-capabilities.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/machine-capabilities.js +103 -0
- package/dist/cli/commands/watch/capabilities/machine-capabilities.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.js +54 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.js +55 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/post-failure.d.ts +19 -0
- package/dist/cli/commands/watch/capabilities/post-failure.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/post-failure.js +58 -0
- package/dist/cli/commands/watch/capabilities/post-failure.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/priority.d.ts +59 -0
- package/dist/cli/commands/watch/capabilities/priority.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/priority.js +101 -0
- package/dist/cli/commands/watch/capabilities/priority.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/rate-pool.d.ts +67 -0
- package/dist/cli/commands/watch/capabilities/rate-pool.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/rate-pool.js +187 -0
- package/dist/cli/commands/watch/capabilities/rate-pool.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/retro.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/retro.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/retro.js +81 -0
- package/dist/cli/commands/watch/capabilities/retro.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/self-pull.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/self-pull.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/self-pull.js +33 -0
- package/dist/cli/commands/watch/capabilities/self-pull.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/stale-reclaim.d.ts +23 -0
- package/dist/cli/commands/watch/capabilities/stale-reclaim.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/stale-reclaim.js +87 -0
- package/dist/cli/commands/watch/capabilities/stale-reclaim.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/two-pass.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/two-pass.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/two-pass.js +66 -0
- package/dist/cli/commands/watch/capabilities/two-pass.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.js +117 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/webhook-alerts.d.ts +29 -0
- package/dist/cli/commands/watch/capabilities/webhook-alerts.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/webhook-alerts.js +114 -0
- package/dist/cli/commands/watch/capabilities/webhook-alerts.js.map +1 -0
- package/dist/cli/commands/watch/config.d.ts +40 -0
- package/dist/cli/commands/watch/config.d.ts.map +1 -0
- package/dist/cli/commands/watch/config.js +129 -0
- package/dist/cli/commands/watch/config.js.map +1 -0
- package/dist/cli/commands/watch/index.d.ts +109 -0
- package/dist/cli/commands/watch/index.d.ts.map +1 -0
- package/dist/cli/commands/watch/index.js +757 -0
- package/dist/cli/commands/watch/index.js.map +1 -0
- package/dist/cli/commands/watch/registry.d.ts +19 -0
- package/dist/cli/commands/watch/registry.d.ts.map +1 -0
- package/dist/cli/commands/watch/registry.js +28 -0
- package/dist/cli/commands/watch/registry.js.map +1 -0
- package/dist/cli/commands/watch/types.d.ts +57 -0
- package/dist/cli/commands/watch/types.d.ts.map +1 -0
- package/dist/cli/commands/watch/types.js +8 -0
- package/dist/cli/commands/watch/types.js.map +1 -0
- package/dist/cli/core/cast.d.ts.map +1 -1
- package/dist/cli/core/cast.js +15 -19
- package/dist/cli/core/cast.js.map +1 -1
- package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
- package/dist/cli/core/detect-squad-dir.js +12 -10
- package/dist/cli/core/detect-squad-dir.js.map +1 -1
- package/dist/cli/core/email-scrub.d.ts.map +1 -1
- package/dist/cli/core/email-scrub.js +12 -11
- package/dist/cli/core/email-scrub.js.map +1 -1
- package/dist/cli/core/gh-cli.d.ts +13 -0
- package/dist/cli/core/gh-cli.d.ts.map +1 -1
- package/dist/cli/core/gh-cli.js +24 -0
- package/dist/cli/core/gh-cli.js.map +1 -1
- package/dist/cli/core/init.d.ts +2 -0
- package/dist/cli/core/init.d.ts.map +1 -1
- package/dist/cli/core/init.js +22 -5
- 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 +14 -13
- package/dist/cli/core/migrate-directory.js.map +1 -1
- package/dist/cli/core/migrations.d.ts.map +1 -1
- package/dist/cli/core/migrations.js +22 -8
- package/dist/cli/core/migrations.js.map +1 -1
- package/dist/cli/core/nap.d.ts.map +1 -1
- package/dist/cli/core/nap.js +116 -49
- package/dist/cli/core/nap.js.map +1 -1
- package/dist/cli/core/project-type.d.ts.map +1 -1
- package/dist/cli/core/project-type.js +11 -10
- package/dist/cli/core/project-type.js.map +1 -1
- package/dist/cli/core/team-md.d.ts.map +1 -1
- package/dist/cli/core/team-md.js +43 -38
- package/dist/cli/core/team-md.js.map +1 -1
- package/dist/cli/core/templates.d.ts.map +1 -1
- package/dist/cli/core/templates.js +4 -3
- 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 +68 -55
- package/dist/cli/core/upgrade.js.map +1 -1
- package/dist/cli/core/version.d.ts.map +1 -1
- package/dist/cli/core/version.js +8 -7
- package/dist/cli/core/version.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/self-update.d.ts.map +1 -1
- package/dist/cli/self-update.js +7 -4
- package/dist/cli/self-update.js.map +1 -1
- package/dist/cli/shell/agent-name-parser.d.ts +16 -0
- package/dist/cli/shell/agent-name-parser.d.ts.map +1 -0
- package/dist/cli/shell/agent-name-parser.js +54 -0
- package/dist/cli/shell/agent-name-parser.js.map +1 -0
- package/dist/cli/shell/commands.d.ts.map +1 -1
- package/dist/cli/shell/commands.js +4 -3
- package/dist/cli/shell/commands.js.map +1 -1
- package/dist/cli/shell/coordinator.d.ts +4 -1
- package/dist/cli/shell/coordinator.d.ts.map +1 -1
- package/dist/cli/shell/coordinator.js +29 -26
- package/dist/cli/shell/coordinator.js.map +1 -1
- package/dist/cli/shell/index.d.ts.map +1 -1
- package/dist/cli/shell/index.js +33 -35
- package/dist/cli/shell/index.js.map +1 -1
- package/dist/cli/shell/lifecycle.d.ts +13 -2
- package/dist/cli/shell/lifecycle.d.ts.map +1 -1
- package/dist/cli/shell/lifecycle.js +26 -13
- package/dist/cli/shell/lifecycle.js.map +1 -1
- package/dist/cli/shell/session-store.d.ts.map +1 -1
- package/dist/cli/shell/session-store.js +16 -12
- package/dist/cli/shell/session-store.js.map +1 -1
- package/dist/cli/shell/spawn.d.ts +4 -1
- package/dist/cli/shell/spawn.d.ts.map +1 -1
- package/dist/cli/shell/spawn.js +28 -10
- package/dist/cli/shell/spawn.js.map +1 -1
- package/dist/cli-entry.js +136 -12
- package/dist/cli-entry.js.map +1 -1
- package/package.json +8 -4
- package/scripts/patch-esm-imports.mjs +105 -105
- package/scripts/patch-ink-rendering.mjs +115 -115
- package/templates/casting/Futurama.json +9 -9
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +37 -37
- package/templates/casting-reference.md +104 -104
- 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/cooperative-rate-limiting.md +229 -229
- 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/issue-lifecycle.md +412 -412
- package/templates/keda-scaler.md +164 -164
- package/templates/machine-capabilities.md +74 -74
- 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-circuit-breaker.md +313 -313
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +39 -39
- package/templates/run-output.md +50 -50
- package/templates/scribe-charter.md +123 -119
- package/templates/skill.md +24 -24
- package/templates/skills/agent-collaboration/SKILL.md +42 -42
- package/templates/skills/agent-conduct/SKILL.md +24 -24
- package/templates/skills/architectural-proposals/SKILL.md +151 -151
- package/templates/skills/ci-validation-gates/SKILL.md +84 -84
- package/templates/skills/cli-wiring/SKILL.md +47 -47
- package/templates/skills/client-compatibility/SKILL.md +89 -89
- package/templates/skills/cross-machine-coordination/SKILL.md +434 -0
- package/templates/skills/cross-squad/SKILL.md +114 -114
- package/templates/skills/distributed-mesh/SKILL.md +287 -287
- package/templates/skills/distributed-mesh/mesh.json.example +30 -30
- package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
- package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
- package/templates/skills/docs-standards/SKILL.md +71 -71
- package/templates/skills/economy-mode/SKILL.md +114 -114
- package/templates/skills/error-recovery/SKILL.md +99 -0
- package/templates/skills/external-comms/SKILL.md +329 -329
- package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
- package/templates/skills/git-workflow/SKILL.md +204 -204
- package/templates/skills/github-multi-account/SKILL.md +95 -95
- package/templates/skills/history-hygiene/SKILL.md +36 -36
- package/templates/skills/humanizer/SKILL.md +105 -105
- package/templates/skills/init-mode/SKILL.md +102 -102
- package/templates/skills/iterative-retrieval/SKILL.md +165 -0
- package/templates/skills/model-selection/SKILL.md +117 -117
- package/templates/skills/nap/SKILL.md +24 -24
- package/templates/skills/notification-routing/SKILL.md +105 -0
- package/templates/skills/personal-squad/SKILL.md +57 -57
- package/templates/skills/pr-screenshots/SKILL.md +149 -0
- package/templates/skills/ralph-two-pass-scan/SKILL.md +35 -0
- package/templates/skills/reflect/SKILL.md +229 -0
- package/templates/skills/release-process/SKILL.md +131 -423
- package/templates/skills/reskill/SKILL.md +92 -92
- package/templates/skills/retro-enforcement/SKILL.md +148 -0
- package/templates/skills/reviewer-protocol/SKILL.md +79 -79
- package/templates/skills/secret-handling/SKILL.md +200 -200
- package/templates/skills/session-recovery/SKILL.md +155 -155
- package/templates/skills/squad-conventions/SKILL.md +69 -69
- package/templates/skills/test-discipline/SKILL.md +37 -37
- package/templates/skills/tiered-memory/SKILL.md +234 -0
- package/templates/skills/windows-compatibility/SKILL.md +98 -74
- package/templates/{squad.agent.md → squad.agent.md.template} +1316 -1287
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +54 -54
- package/templates/workflows/squad-heartbeat.yml +0 -4
- 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 -120
- 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/commands/watch.d.ts +0 -18
- package/dist/cli/commands/watch.d.ts.map +0 -1
- package/dist/cli/commands/watch.js +0 -306
- package/dist/cli/commands/watch.js.map +0 -1
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Ink Rendering Patcher for Squad CLI
|
|
5
|
-
*
|
|
6
|
-
* Patches ink/build/ink.js to fix scroll flicker on Windows Terminal.
|
|
7
|
-
* Three patches are applied:
|
|
8
|
-
*
|
|
9
|
-
* 1. Remove trailing newline — the extra '\n' appended to output causes
|
|
10
|
-
* logUpdate's previousLineCount to be off by one, pushing the bottom of
|
|
11
|
-
* the UI below the viewport.
|
|
12
|
-
*
|
|
13
|
-
* 2. Disable clearTerminal fullscreen path — when output fills the terminal,
|
|
14
|
-
* Ink clears the entire screen, causing violent scroll-to-top flicker.
|
|
15
|
-
* We force the condition to `false` so logUpdate's incremental
|
|
16
|
-
* erase-and-rewrite is always used instead.
|
|
17
|
-
*
|
|
18
|
-
* 3. Verify incrementalRendering passthrough — confirms that Ink forwards
|
|
19
|
-
* the incrementalRendering option to logUpdate.create(). No code change
|
|
20
|
-
* needed if already wired up.
|
|
21
|
-
*
|
|
22
|
-
* All patches are idempotent (safe to run multiple times).
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
import { readFileSync, writeFileSync, existsSync } from 'fs';
|
|
26
|
-
import { join, dirname } from 'path';
|
|
27
|
-
import { fileURLToPath } from 'url';
|
|
28
|
-
|
|
29
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
30
|
-
|
|
31
|
-
function patchInkRendering() {
|
|
32
|
-
// Try multiple possible locations (npm workspaces can hoist dependencies)
|
|
33
|
-
const possiblePaths = [
|
|
34
|
-
// squad-cli package node_modules
|
|
35
|
-
join(__dirname, '..', 'node_modules', 'ink', 'build', 'ink.js'),
|
|
36
|
-
// Workspace root node_modules (common with npm workspaces)
|
|
37
|
-
join(__dirname, '..', '..', '..', 'node_modules', 'ink', 'build', 'ink.js'),
|
|
38
|
-
// Global install location (node_modules at parent of package)
|
|
39
|
-
join(__dirname, '..', '..', 'ink', 'build', 'ink.js'),
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
const inkJsPath = possiblePaths.find(p => existsSync(p)) ?? null;
|
|
43
|
-
|
|
44
|
-
if (!inkJsPath) {
|
|
45
|
-
// ink not installed yet — exit silently
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
let content = readFileSync(inkJsPath, 'utf8');
|
|
51
|
-
let patchCount = 0;
|
|
52
|
-
|
|
53
|
-
// --- Patch 1: Remove trailing newline ---
|
|
54
|
-
// Original: const outputToRender = output + '\n';
|
|
55
|
-
// Patched: const outputToRender = output;
|
|
56
|
-
const trailingNewlineSearch = "const outputToRender = output + '\\n';";
|
|
57
|
-
const trailingNewlineReplace = 'const outputToRender = output;';
|
|
58
|
-
if (content.includes(trailingNewlineSearch)) {
|
|
59
|
-
content = content.replace(trailingNewlineSearch, trailingNewlineReplace);
|
|
60
|
-
console.log(' ✅ Patch 1/3: Removed trailing newline from outputToRender');
|
|
61
|
-
patchCount++;
|
|
62
|
-
} else if (content.includes(trailingNewlineReplace)) {
|
|
63
|
-
console.log(' ⏭️ Patch 1/3: Trailing newline already removed');
|
|
64
|
-
} else {
|
|
65
|
-
console.warn(' ⚠️ Patch 1/3: Could not find outputToRender pattern — Ink version may have changed');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// --- Patch 2: Disable clearTerminal fullscreen path ---
|
|
69
|
-
// Original: if (isFullscreen) {
|
|
70
|
-
// const sync = shouldSynchronize(this.options.stdout);
|
|
71
|
-
// ...
|
|
72
|
-
// this.options.stdout.write(ansiEscapes.clearTerminal + ...
|
|
73
|
-
// Patched: if (false) {
|
|
74
|
-
//
|
|
75
|
-
// We match `if (isFullscreen) {` only when followed by the clearTerminal
|
|
76
|
-
// usage to avoid replacing unrelated isFullscreen references.
|
|
77
|
-
const fullscreenSearch = /if \(isFullscreen\) \{\s*\n\s*const sync = shouldSynchronize/;
|
|
78
|
-
const fullscreenAlreadyPatched = /if \(false\) \{\s*\n\s*const sync = shouldSynchronize/;
|
|
79
|
-
if (fullscreenSearch.test(content)) {
|
|
80
|
-
content = content.replace(
|
|
81
|
-
/if \(isFullscreen\) (\{\s*\n\s*const sync = shouldSynchronize)/,
|
|
82
|
-
'if (false) $1'
|
|
83
|
-
);
|
|
84
|
-
console.log(' ✅ Patch 2/3: Disabled clearTerminal fullscreen path');
|
|
85
|
-
patchCount++;
|
|
86
|
-
} else if (fullscreenAlreadyPatched.test(content)) {
|
|
87
|
-
console.log(' ⏭️ Patch 2/3: clearTerminal path already disabled');
|
|
88
|
-
} else {
|
|
89
|
-
console.warn(' ⚠️ Patch 2/3: Could not find isFullscreen pattern — Ink version may have changed');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// --- Patch 3: Verify incrementalRendering passthrough ---
|
|
93
|
-
const incrementalPattern = 'incremental: options.incrementalRendering';
|
|
94
|
-
if (content.includes(incrementalPattern)) {
|
|
95
|
-
console.log(' ✅ Patch 3/3: incrementalRendering passthrough verified (no change needed)');
|
|
96
|
-
} else {
|
|
97
|
-
console.warn(' ⚠️ Patch 3/3: incrementalRendering passthrough not found — Ink version may have changed');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (patchCount > 0) {
|
|
101
|
-
writeFileSync(inkJsPath, content, 'utf8');
|
|
102
|
-
console.log(`✅ Patched ink.js with ${patchCount} rendering fix(es) for scroll flicker`);
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return false;
|
|
107
|
-
} catch (err) {
|
|
108
|
-
console.warn('⚠️ Failed to patch ink.js rendering:', err.message);
|
|
109
|
-
console.warn(' Scroll flicker may occur on Windows Terminal.');
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Run patch
|
|
115
|
-
patchInkRendering();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ink Rendering Patcher for Squad CLI
|
|
5
|
+
*
|
|
6
|
+
* Patches ink/build/ink.js to fix scroll flicker on Windows Terminal.
|
|
7
|
+
* Three patches are applied:
|
|
8
|
+
*
|
|
9
|
+
* 1. Remove trailing newline — the extra '\n' appended to output causes
|
|
10
|
+
* logUpdate's previousLineCount to be off by one, pushing the bottom of
|
|
11
|
+
* the UI below the viewport.
|
|
12
|
+
*
|
|
13
|
+
* 2. Disable clearTerminal fullscreen path — when output fills the terminal,
|
|
14
|
+
* Ink clears the entire screen, causing violent scroll-to-top flicker.
|
|
15
|
+
* We force the condition to `false` so logUpdate's incremental
|
|
16
|
+
* erase-and-rewrite is always used instead.
|
|
17
|
+
*
|
|
18
|
+
* 3. Verify incrementalRendering passthrough — confirms that Ink forwards
|
|
19
|
+
* the incrementalRendering option to logUpdate.create(). No code change
|
|
20
|
+
* needed if already wired up.
|
|
21
|
+
*
|
|
22
|
+
* All patches are idempotent (safe to run multiple times).
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { readFileSync, writeFileSync, existsSync } from 'fs';
|
|
26
|
+
import { join, dirname } from 'path';
|
|
27
|
+
import { fileURLToPath } from 'url';
|
|
28
|
+
|
|
29
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
30
|
+
|
|
31
|
+
function patchInkRendering() {
|
|
32
|
+
// Try multiple possible locations (npm workspaces can hoist dependencies)
|
|
33
|
+
const possiblePaths = [
|
|
34
|
+
// squad-cli package node_modules
|
|
35
|
+
join(__dirname, '..', 'node_modules', 'ink', 'build', 'ink.js'),
|
|
36
|
+
// Workspace root node_modules (common with npm workspaces)
|
|
37
|
+
join(__dirname, '..', '..', '..', 'node_modules', 'ink', 'build', 'ink.js'),
|
|
38
|
+
// Global install location (node_modules at parent of package)
|
|
39
|
+
join(__dirname, '..', '..', 'ink', 'build', 'ink.js'),
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
const inkJsPath = possiblePaths.find(p => existsSync(p)) ?? null;
|
|
43
|
+
|
|
44
|
+
if (!inkJsPath) {
|
|
45
|
+
// ink not installed yet — exit silently
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
let content = readFileSync(inkJsPath, 'utf8');
|
|
51
|
+
let patchCount = 0;
|
|
52
|
+
|
|
53
|
+
// --- Patch 1: Remove trailing newline ---
|
|
54
|
+
// Original: const outputToRender = output + '\n';
|
|
55
|
+
// Patched: const outputToRender = output;
|
|
56
|
+
const trailingNewlineSearch = "const outputToRender = output + '\\n';";
|
|
57
|
+
const trailingNewlineReplace = 'const outputToRender = output;';
|
|
58
|
+
if (content.includes(trailingNewlineSearch)) {
|
|
59
|
+
content = content.replace(trailingNewlineSearch, trailingNewlineReplace);
|
|
60
|
+
console.log(' ✅ Patch 1/3: Removed trailing newline from outputToRender');
|
|
61
|
+
patchCount++;
|
|
62
|
+
} else if (content.includes(trailingNewlineReplace)) {
|
|
63
|
+
console.log(' ⏭️ Patch 1/3: Trailing newline already removed');
|
|
64
|
+
} else {
|
|
65
|
+
console.warn(' ⚠️ Patch 1/3: Could not find outputToRender pattern — Ink version may have changed');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// --- Patch 2: Disable clearTerminal fullscreen path ---
|
|
69
|
+
// Original: if (isFullscreen) {
|
|
70
|
+
// const sync = shouldSynchronize(this.options.stdout);
|
|
71
|
+
// ...
|
|
72
|
+
// this.options.stdout.write(ansiEscapes.clearTerminal + ...
|
|
73
|
+
// Patched: if (false) {
|
|
74
|
+
//
|
|
75
|
+
// We match `if (isFullscreen) {` only when followed by the clearTerminal
|
|
76
|
+
// usage to avoid replacing unrelated isFullscreen references.
|
|
77
|
+
const fullscreenSearch = /if \(isFullscreen\) \{\s*\n\s*const sync = shouldSynchronize/;
|
|
78
|
+
const fullscreenAlreadyPatched = /if \(false\) \{\s*\n\s*const sync = shouldSynchronize/;
|
|
79
|
+
if (fullscreenSearch.test(content)) {
|
|
80
|
+
content = content.replace(
|
|
81
|
+
/if \(isFullscreen\) (\{\s*\n\s*const sync = shouldSynchronize)/,
|
|
82
|
+
'if (false) $1'
|
|
83
|
+
);
|
|
84
|
+
console.log(' ✅ Patch 2/3: Disabled clearTerminal fullscreen path');
|
|
85
|
+
patchCount++;
|
|
86
|
+
} else if (fullscreenAlreadyPatched.test(content)) {
|
|
87
|
+
console.log(' ⏭️ Patch 2/3: clearTerminal path already disabled');
|
|
88
|
+
} else {
|
|
89
|
+
console.warn(' ⚠️ Patch 2/3: Could not find isFullscreen pattern — Ink version may have changed');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// --- Patch 3: Verify incrementalRendering passthrough ---
|
|
93
|
+
const incrementalPattern = 'incremental: options.incrementalRendering';
|
|
94
|
+
if (content.includes(incrementalPattern)) {
|
|
95
|
+
console.log(' ✅ Patch 3/3: incrementalRendering passthrough verified (no change needed)');
|
|
96
|
+
} else {
|
|
97
|
+
console.warn(' ⚠️ Patch 3/3: incrementalRendering passthrough not found — Ink version may have changed');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (patchCount > 0) {
|
|
101
|
+
writeFileSync(inkJsPath, content, 'utf8');
|
|
102
|
+
console.log(`✅ Patched ink.js with ${patchCount} rendering fix(es) for scroll flicker`);
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return false;
|
|
107
|
+
} catch (err) {
|
|
108
|
+
console.warn('⚠️ Failed to patch ink.js rendering:', err.message);
|
|
109
|
+
console.warn(' Scroll flicker may occur on Windows Terminal.');
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Run patch
|
|
115
|
+
patchInkRendering();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
[
|
|
2
|
-
"Fry",
|
|
3
|
-
"Leela",
|
|
4
|
-
"Bender",
|
|
5
|
-
"Farnsworth",
|
|
6
|
-
"Zoidberg",
|
|
7
|
-
"Amy",
|
|
8
|
-
"Zapp",
|
|
9
|
-
"Kif"
|
|
1
|
+
[
|
|
2
|
+
"Fry",
|
|
3
|
+
"Leela",
|
|
4
|
+
"Bender",
|
|
5
|
+
"Farnsworth",
|
|
6
|
+
"Zoidberg",
|
|
7
|
+
"Amy",
|
|
8
|
+
"Zapp",
|
|
9
|
+
"Kif"
|
|
10
10
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"universe_usage_history": [],
|
|
3
|
-
"assignment_cast_snapshots": {}
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"universe_usage_history": [],
|
|
3
|
+
"assignment_cast_snapshots": {}
|
|
4
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"casting_policy_version": "1.1",
|
|
3
|
-
"allowlist_universes": [
|
|
4
|
-
"The Usual Suspects",
|
|
5
|
-
"Reservoir Dogs",
|
|
6
|
-
"Alien",
|
|
7
|
-
"Ocean's Eleven",
|
|
8
|
-
"Arrested Development",
|
|
9
|
-
"Star Wars",
|
|
10
|
-
"The Matrix",
|
|
11
|
-
"Firefly",
|
|
12
|
-
"The Goonies",
|
|
13
|
-
"The Simpsons",
|
|
14
|
-
"Breaking Bad",
|
|
15
|
-
"Lost",
|
|
16
|
-
"Marvel Cinematic Universe",
|
|
17
|
-
"DC Universe",
|
|
18
|
-
"Futurama"
|
|
19
|
-
],
|
|
20
|
-
"universe_capacity": {
|
|
21
|
-
"The Usual Suspects": 6,
|
|
22
|
-
"Reservoir Dogs": 8,
|
|
23
|
-
"Alien": 8,
|
|
24
|
-
"Ocean's Eleven": 14,
|
|
25
|
-
"Arrested Development": 15,
|
|
26
|
-
"Star Wars": 12,
|
|
27
|
-
"The Matrix": 10,
|
|
28
|
-
"Firefly": 10,
|
|
29
|
-
"The Goonies": 8,
|
|
30
|
-
"The Simpsons": 20,
|
|
31
|
-
"Breaking Bad": 12,
|
|
32
|
-
"Lost": 18,
|
|
33
|
-
"Marvel Cinematic Universe": 25,
|
|
34
|
-
"DC Universe": 18,
|
|
35
|
-
"Futurama": 12
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"casting_policy_version": "1.1",
|
|
3
|
+
"allowlist_universes": [
|
|
4
|
+
"The Usual Suspects",
|
|
5
|
+
"Reservoir Dogs",
|
|
6
|
+
"Alien",
|
|
7
|
+
"Ocean's Eleven",
|
|
8
|
+
"Arrested Development",
|
|
9
|
+
"Star Wars",
|
|
10
|
+
"The Matrix",
|
|
11
|
+
"Firefly",
|
|
12
|
+
"The Goonies",
|
|
13
|
+
"The Simpsons",
|
|
14
|
+
"Breaking Bad",
|
|
15
|
+
"Lost",
|
|
16
|
+
"Marvel Cinematic Universe",
|
|
17
|
+
"DC Universe",
|
|
18
|
+
"Futurama"
|
|
19
|
+
],
|
|
20
|
+
"universe_capacity": {
|
|
21
|
+
"The Usual Suspects": 6,
|
|
22
|
+
"Reservoir Dogs": 8,
|
|
23
|
+
"Alien": 8,
|
|
24
|
+
"Ocean's Eleven": 14,
|
|
25
|
+
"Arrested Development": 15,
|
|
26
|
+
"Star Wars": 12,
|
|
27
|
+
"The Matrix": 10,
|
|
28
|
+
"Firefly": 10,
|
|
29
|
+
"The Goonies": 8,
|
|
30
|
+
"The Simpsons": 20,
|
|
31
|
+
"Breaking Bad": 12,
|
|
32
|
+
"Lost": 18,
|
|
33
|
+
"Marvel Cinematic Universe": 25,
|
|
34
|
+
"DC Universe": 18,
|
|
35
|
+
"Futurama": 12
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
# Casting Reference
|
|
2
|
-
|
|
3
|
-
On-demand reference for Squad's casting system. Loaded during Init Mode or when adding team members.
|
|
4
|
-
|
|
5
|
-
## Universe Table
|
|
6
|
-
|
|
7
|
-
| Universe | Capacity | Shape Tags | Resonance Signals |
|
|
8
|
-
|---|---|---|---|
|
|
9
|
-
| The Usual Suspects | 6 | small, noir, ensemble | crime, heist, mystery, deception |
|
|
10
|
-
| Reservoir Dogs | 8 | small, noir, ensemble | crime, heist, tension, loyalty |
|
|
11
|
-
| Alien | 8 | small, sci-fi, survival | space, isolation, threat, engineering |
|
|
12
|
-
| Ocean's Eleven | 14 | medium, heist, ensemble | planning, coordination, roles, charm |
|
|
13
|
-
| Arrested Development | 15 | medium, comedy, ensemble | dysfunction, business, family, satire |
|
|
14
|
-
| Star Wars | 12 | medium, sci-fi, epic | conflict, mentorship, legacy, rebellion |
|
|
15
|
-
| The Matrix | 10 | medium, sci-fi, cyberpunk | systems, reality, hacking, philosophy |
|
|
16
|
-
| Firefly | 10 | medium, sci-fi, western | frontier, crew, independence, smuggling |
|
|
17
|
-
| The Goonies | 8 | small, adventure, ensemble | exploration, treasure, kids, teamwork |
|
|
18
|
-
| The Simpsons | 20 | large, comedy, ensemble | satire, community, family, absurdity |
|
|
19
|
-
| Breaking Bad | 12 | medium, drama, tension | chemistry, transformation, consequence, power |
|
|
20
|
-
| Lost | 18 | large, mystery, ensemble | survival, mystery, groups, leadership |
|
|
21
|
-
| Marvel Cinematic Universe | 25 | large, action, ensemble | heroism, teamwork, powers, scale |
|
|
22
|
-
| DC Universe | 18 | large, action, ensemble | justice, duality, powers, mythology |
|
|
23
|
-
| Futurama | 12 | medium, sci-fi, comedy | future, robots, space, absurdity |
|
|
24
|
-
|
|
25
|
-
**Total: 15 universes** — capacity range 6–25.
|
|
26
|
-
|
|
27
|
-
## Selection Algorithm
|
|
28
|
-
|
|
29
|
-
Universe selection is deterministic. Score each universe and pick the highest:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
score = size_fit + shape_fit + resonance_fit + LRU
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
| Factor | Description |
|
|
36
|
-
|---|---|
|
|
37
|
-
| `size_fit` | How well the universe capacity matches the team size. Prefer universes where capacity ≥ agent_count with minimal waste. |
|
|
38
|
-
| `shape_fit` | Match universe shape tags against the assignment shape derived from the project description. |
|
|
39
|
-
| `resonance_fit` | Match universe resonance signals against session and repo context signals. |
|
|
40
|
-
| `LRU` | Least-recently-used bonus — prefer universes not used in recent assignments (from `history.json`). |
|
|
41
|
-
|
|
42
|
-
Same inputs → same choice (unless LRU changes between assignments).
|
|
43
|
-
|
|
44
|
-
## Casting State File Schemas
|
|
45
|
-
|
|
46
|
-
### policy.json
|
|
47
|
-
|
|
48
|
-
Source template: `.squad/templates/casting-policy.json`
|
|
49
|
-
Runtime location: `.squad/casting/policy.json`
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"casting_policy_version": "1.1",
|
|
54
|
-
"allowlist_universes": ["Universe Name", "..."],
|
|
55
|
-
"universe_capacity": {
|
|
56
|
-
"Universe Name": 10
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### registry.json
|
|
62
|
-
|
|
63
|
-
Source template: `.squad/templates/casting-registry.json`
|
|
64
|
-
Runtime location: `.squad/casting/registry.json`
|
|
65
|
-
|
|
66
|
-
```json
|
|
67
|
-
{
|
|
68
|
-
"agents": {
|
|
69
|
-
"agent-role-id": {
|
|
70
|
-
"persistent_name": "CharacterName",
|
|
71
|
-
"universe": "Universe Name",
|
|
72
|
-
"created_at": "ISO-8601",
|
|
73
|
-
"legacy_named": false,
|
|
74
|
-
"status": "active"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### history.json
|
|
81
|
-
|
|
82
|
-
Source template: `.squad/templates/casting-history.json`
|
|
83
|
-
Runtime location: `.squad/casting/history.json`
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"universe_usage_history": [
|
|
88
|
-
{
|
|
89
|
-
"universe": "Universe Name",
|
|
90
|
-
"assignment_id": "unique-id",
|
|
91
|
-
"used_at": "ISO-8601"
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
"assignment_cast_snapshots": {
|
|
95
|
-
"assignment-id": {
|
|
96
|
-
"universe": "Universe Name",
|
|
97
|
-
"agents": {
|
|
98
|
-
"role-id": "CharacterName"
|
|
99
|
-
},
|
|
100
|
-
"created_at": "ISO-8601"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
```
|
|
1
|
+
# Casting Reference
|
|
2
|
+
|
|
3
|
+
On-demand reference for Squad's casting system. Loaded during Init Mode or when adding team members.
|
|
4
|
+
|
|
5
|
+
## Universe Table
|
|
6
|
+
|
|
7
|
+
| Universe | Capacity | Shape Tags | Resonance Signals |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| The Usual Suspects | 6 | small, noir, ensemble | crime, heist, mystery, deception |
|
|
10
|
+
| Reservoir Dogs | 8 | small, noir, ensemble | crime, heist, tension, loyalty |
|
|
11
|
+
| Alien | 8 | small, sci-fi, survival | space, isolation, threat, engineering |
|
|
12
|
+
| Ocean's Eleven | 14 | medium, heist, ensemble | planning, coordination, roles, charm |
|
|
13
|
+
| Arrested Development | 15 | medium, comedy, ensemble | dysfunction, business, family, satire |
|
|
14
|
+
| Star Wars | 12 | medium, sci-fi, epic | conflict, mentorship, legacy, rebellion |
|
|
15
|
+
| The Matrix | 10 | medium, sci-fi, cyberpunk | systems, reality, hacking, philosophy |
|
|
16
|
+
| Firefly | 10 | medium, sci-fi, western | frontier, crew, independence, smuggling |
|
|
17
|
+
| The Goonies | 8 | small, adventure, ensemble | exploration, treasure, kids, teamwork |
|
|
18
|
+
| The Simpsons | 20 | large, comedy, ensemble | satire, community, family, absurdity |
|
|
19
|
+
| Breaking Bad | 12 | medium, drama, tension | chemistry, transformation, consequence, power |
|
|
20
|
+
| Lost | 18 | large, mystery, ensemble | survival, mystery, groups, leadership |
|
|
21
|
+
| Marvel Cinematic Universe | 25 | large, action, ensemble | heroism, teamwork, powers, scale |
|
|
22
|
+
| DC Universe | 18 | large, action, ensemble | justice, duality, powers, mythology |
|
|
23
|
+
| Futurama | 12 | medium, sci-fi, comedy | future, robots, space, absurdity |
|
|
24
|
+
|
|
25
|
+
**Total: 15 universes** — capacity range 6–25.
|
|
26
|
+
|
|
27
|
+
## Selection Algorithm
|
|
28
|
+
|
|
29
|
+
Universe selection is deterministic. Score each universe and pick the highest:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
score = size_fit + shape_fit + resonance_fit + LRU
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Factor | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `size_fit` | How well the universe capacity matches the team size. Prefer universes where capacity ≥ agent_count with minimal waste. |
|
|
38
|
+
| `shape_fit` | Match universe shape tags against the assignment shape derived from the project description. |
|
|
39
|
+
| `resonance_fit` | Match universe resonance signals against session and repo context signals. |
|
|
40
|
+
| `LRU` | Least-recently-used bonus — prefer universes not used in recent assignments (from `history.json`). |
|
|
41
|
+
|
|
42
|
+
Same inputs → same choice (unless LRU changes between assignments).
|
|
43
|
+
|
|
44
|
+
## Casting State File Schemas
|
|
45
|
+
|
|
46
|
+
### policy.json
|
|
47
|
+
|
|
48
|
+
Source template: `.squad/templates/casting-policy.json`
|
|
49
|
+
Runtime location: `.squad/casting/policy.json`
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"casting_policy_version": "1.1",
|
|
54
|
+
"allowlist_universes": ["Universe Name", "..."],
|
|
55
|
+
"universe_capacity": {
|
|
56
|
+
"Universe Name": 10
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### registry.json
|
|
62
|
+
|
|
63
|
+
Source template: `.squad/templates/casting-registry.json`
|
|
64
|
+
Runtime location: `.squad/casting/registry.json`
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"agents": {
|
|
69
|
+
"agent-role-id": {
|
|
70
|
+
"persistent_name": "CharacterName",
|
|
71
|
+
"universe": "Universe Name",
|
|
72
|
+
"created_at": "ISO-8601",
|
|
73
|
+
"legacy_named": false,
|
|
74
|
+
"status": "active"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### history.json
|
|
81
|
+
|
|
82
|
+
Source template: `.squad/templates/casting-history.json`
|
|
83
|
+
Runtime location: `.squad/casting/history.json`
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"universe_usage_history": [
|
|
88
|
+
{
|
|
89
|
+
"universe": "Universe Name",
|
|
90
|
+
"assignment_id": "unique-id",
|
|
91
|
+
"used_at": "ISO-8601"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"assignment_cast_snapshots": {
|
|
95
|
+
"assignment-id": {
|
|
96
|
+
"universe": "Universe Name",
|
|
97
|
+
"agents": {
|
|
98
|
+
"role-id": "CharacterName"
|
|
99
|
+
},
|
|
100
|
+
"created_at": "ISO-8601"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"agents": {}
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"agents": {}
|
|
3
|
+
}
|
package/templates/ceremonies.md
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# Ceremonies
|
|
2
|
-
|
|
3
|
-
> Team meetings that happen before or after work. Each squad configures their own.
|
|
4
|
-
|
|
5
|
-
## Design Review
|
|
6
|
-
|
|
7
|
-
| Field | Value |
|
|
8
|
-
|-------|-------|
|
|
9
|
-
| **Trigger** | auto |
|
|
10
|
-
| **When** | before |
|
|
11
|
-
| **Condition** | multi-agent task involving 2+ agents modifying shared systems |
|
|
12
|
-
| **Facilitator** | lead |
|
|
13
|
-
| **Participants** | all-relevant |
|
|
14
|
-
| **Time budget** | focused |
|
|
15
|
-
| **Enabled** | ✅ yes |
|
|
16
|
-
|
|
17
|
-
**Agenda:**
|
|
18
|
-
1. Review the task and requirements
|
|
19
|
-
2. Agree on interfaces and contracts between components
|
|
20
|
-
3. Identify risks and edge cases
|
|
21
|
-
4. Assign action items
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Retrospective
|
|
26
|
-
|
|
27
|
-
| Field | Value |
|
|
28
|
-
|-------|-------|
|
|
29
|
-
| **Trigger** | auto |
|
|
30
|
-
| **When** | after |
|
|
31
|
-
| **Condition** | build failure, test failure, or reviewer rejection |
|
|
32
|
-
| **Facilitator** | lead |
|
|
33
|
-
| **Participants** | all-involved |
|
|
34
|
-
| **Time budget** | focused |
|
|
35
|
-
| **Enabled** | ✅ yes |
|
|
36
|
-
|
|
37
|
-
**Agenda:**
|
|
38
|
-
1. What happened? (facts only)
|
|
39
|
-
2. Root cause analysis
|
|
40
|
-
3. What should change?
|
|
41
|
-
4. Action items for next iteration
|
|
1
|
+
# Ceremonies
|
|
2
|
+
|
|
3
|
+
> Team meetings that happen before or after work. Each squad configures their own.
|
|
4
|
+
|
|
5
|
+
## Design Review
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|-------|-------|
|
|
9
|
+
| **Trigger** | auto |
|
|
10
|
+
| **When** | before |
|
|
11
|
+
| **Condition** | multi-agent task involving 2+ agents modifying shared systems |
|
|
12
|
+
| **Facilitator** | lead |
|
|
13
|
+
| **Participants** | all-relevant |
|
|
14
|
+
| **Time budget** | focused |
|
|
15
|
+
| **Enabled** | ✅ yes |
|
|
16
|
+
|
|
17
|
+
**Agenda:**
|
|
18
|
+
1. Review the task and requirements
|
|
19
|
+
2. Agree on interfaces and contracts between components
|
|
20
|
+
3. Identify risks and edge cases
|
|
21
|
+
4. Assign action items
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Retrospective
|
|
26
|
+
|
|
27
|
+
| Field | Value |
|
|
28
|
+
|-------|-------|
|
|
29
|
+
| **Trigger** | auto |
|
|
30
|
+
| **When** | after |
|
|
31
|
+
| **Condition** | build failure, test failure, or reviewer rejection |
|
|
32
|
+
| **Facilitator** | lead |
|
|
33
|
+
| **Participants** | all-involved |
|
|
34
|
+
| **Time budget** | focused |
|
|
35
|
+
| **Enabled** | ✅ yes |
|
|
36
|
+
|
|
37
|
+
**Agenda:**
|
|
38
|
+
1. What happened? (facts only)
|
|
39
|
+
2. Root cause analysis
|
|
40
|
+
3. What should change?
|
|
41
|
+
4. Action items for next iteration
|