shipwright-cli 3.1.0 → 3.3.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/.claude/agents/code-reviewer.md +2 -0
- package/.claude/agents/devops-engineer.md +2 -0
- package/.claude/agents/doc-fleet-agent.md +2 -0
- package/.claude/agents/pipeline-agent.md +2 -0
- package/.claude/agents/shell-script-specialist.md +2 -0
- package/.claude/agents/test-specialist.md +2 -0
- package/.claude/hooks/agent-crash-capture.sh +32 -0
- package/.claude/hooks/post-tool-use.sh +3 -2
- package/.claude/hooks/pre-tool-use.sh +35 -3
- package/README.md +22 -8
- package/claude-code/hooks/config-change.sh +18 -0
- package/claude-code/hooks/instructions-reloaded.sh +7 -0
- package/claude-code/hooks/worktree-create.sh +25 -0
- package/claude-code/hooks/worktree-remove.sh +20 -0
- package/config/code-constitution.json +130 -0
- package/config/defaults.json +25 -2
- package/config/policy.json +1 -1
- package/dashboard/middleware/auth.ts +134 -0
- package/dashboard/middleware/constants.ts +21 -0
- package/dashboard/public/index.html +8 -6
- package/dashboard/public/styles.css +176 -97
- package/dashboard/routes/auth.ts +38 -0
- package/dashboard/server.ts +117 -25
- package/dashboard/services/config.ts +26 -0
- package/dashboard/services/db.ts +118 -0
- package/dashboard/src/canvas/pixel-agent.ts +298 -0
- package/dashboard/src/canvas/pixel-sprites.ts +440 -0
- package/dashboard/src/canvas/shipyard-effects.ts +367 -0
- package/dashboard/src/canvas/shipyard-scene.ts +616 -0
- package/dashboard/src/canvas/submarine-layout.ts +267 -0
- package/dashboard/src/components/header.ts +8 -7
- package/dashboard/src/core/api.ts +5 -0
- package/dashboard/src/core/router.ts +1 -0
- package/dashboard/src/design/submarine-theme.ts +253 -0
- package/dashboard/src/main.ts +2 -0
- package/dashboard/src/types/api.ts +12 -1
- package/dashboard/src/views/activity.ts +2 -1
- package/dashboard/src/views/metrics.ts +69 -1
- package/dashboard/src/views/shipyard.ts +39 -0
- package/dashboard/types/index.ts +166 -0
- package/docs/plans/2026-02-28-compound-audit-and-shipyard-design.md +186 -0
- package/docs/plans/2026-02-28-skipper-shipwright-implementation-plan.md +1182 -0
- package/docs/plans/2026-02-28-skipper-shipwright-integration-design.md +531 -0
- package/docs/plans/2026-03-01-ai-powered-skill-injection-design.md +298 -0
- package/docs/plans/2026-03-01-ai-powered-skill-injection-plan.md +1109 -0
- package/docs/plans/2026-03-01-capabilities-cleanup-plan.md +658 -0
- package/docs/plans/2026-03-01-clean-architecture-plan.md +924 -0
- package/docs/plans/2026-03-01-compound-audit-cascade-design.md +191 -0
- package/docs/plans/2026-03-01-compound-audit-cascade-plan.md +921 -0
- package/docs/plans/2026-03-01-deep-integration-plan.md +851 -0
- package/docs/plans/2026-03-01-pipeline-audit-trail-design.md +145 -0
- package/docs/plans/2026-03-01-pipeline-audit-trail-plan.md +770 -0
- package/docs/plans/2026-03-01-refined-depths-brand-design.md +382 -0
- package/docs/plans/2026-03-01-refined-depths-implementation.md +599 -0
- package/docs/plans/2026-03-01-skipper-kernel-integration-design.md +203 -0
- package/docs/plans/2026-03-01-unified-platform-design.md +272 -0
- package/docs/plans/2026-03-07-claude-code-feature-integration-design.md +189 -0
- package/docs/plans/2026-03-07-claude-code-feature-integration-plan.md +1165 -0
- package/docs/research/BACKLOG_QUICK_REFERENCE.md +352 -0
- package/docs/research/CUTTING_EDGE_RESEARCH_2026.md +546 -0
- package/docs/research/RESEARCH_INDEX.md +439 -0
- package/docs/research/RESEARCH_SOURCES.md +440 -0
- package/docs/research/RESEARCH_SUMMARY.txt +275 -0
- package/docs/superpowers/specs/2026-03-10-pipeline-quality-revolution-design.md +341 -0
- package/package.json +2 -2
- package/scripts/lib/adaptive-model.sh +427 -0
- package/scripts/lib/adaptive-timeout.sh +316 -0
- package/scripts/lib/audit-trail.sh +309 -0
- package/scripts/lib/auto-recovery.sh +471 -0
- package/scripts/lib/bandit-selector.sh +431 -0
- package/scripts/lib/bootstrap.sh +104 -2
- package/scripts/lib/causal-graph.sh +455 -0
- package/scripts/lib/compat.sh +126 -0
- package/scripts/lib/compound-audit.sh +337 -0
- package/scripts/lib/constitutional.sh +454 -0
- package/scripts/lib/context-budget.sh +359 -0
- package/scripts/lib/convergence.sh +594 -0
- package/scripts/lib/cost-optimizer.sh +634 -0
- package/scripts/lib/daemon-adaptive.sh +14 -2
- package/scripts/lib/daemon-dispatch.sh +106 -17
- package/scripts/lib/daemon-failure.sh +34 -4
- package/scripts/lib/daemon-patrol.sh +25 -4
- package/scripts/lib/daemon-poll-github.sh +361 -0
- package/scripts/lib/daemon-poll-health.sh +299 -0
- package/scripts/lib/daemon-poll.sh +27 -611
- package/scripts/lib/daemon-state.sh +119 -66
- package/scripts/lib/daemon-triage.sh +10 -0
- package/scripts/lib/dod-scorecard.sh +442 -0
- package/scripts/lib/error-actionability.sh +300 -0
- package/scripts/lib/formal-spec.sh +461 -0
- package/scripts/lib/helpers.sh +180 -5
- package/scripts/lib/intent-analysis.sh +409 -0
- package/scripts/lib/loop-convergence.sh +350 -0
- package/scripts/lib/loop-iteration.sh +682 -0
- package/scripts/lib/loop-progress.sh +48 -0
- package/scripts/lib/loop-restart.sh +185 -0
- package/scripts/lib/memory-effectiveness.sh +506 -0
- package/scripts/lib/mutation-executor.sh +352 -0
- package/scripts/lib/outcome-feedback.sh +521 -0
- package/scripts/lib/pipeline-cli.sh +336 -0
- package/scripts/lib/pipeline-commands.sh +1216 -0
- package/scripts/lib/pipeline-detection.sh +101 -3
- package/scripts/lib/pipeline-execution.sh +897 -0
- package/scripts/lib/pipeline-github.sh +28 -3
- package/scripts/lib/pipeline-intelligence-compound.sh +431 -0
- package/scripts/lib/pipeline-intelligence-scoring.sh +407 -0
- package/scripts/lib/pipeline-intelligence-skip.sh +181 -0
- package/scripts/lib/pipeline-intelligence.sh +104 -1138
- package/scripts/lib/pipeline-quality-bash-compat.sh +182 -0
- package/scripts/lib/pipeline-quality-checks.sh +17 -711
- package/scripts/lib/pipeline-quality-gates.sh +563 -0
- package/scripts/lib/pipeline-stages-build.sh +730 -0
- package/scripts/lib/pipeline-stages-delivery.sh +965 -0
- package/scripts/lib/pipeline-stages-intake.sh +1133 -0
- package/scripts/lib/pipeline-stages-monitor.sh +407 -0
- package/scripts/lib/pipeline-stages-review.sh +1022 -0
- package/scripts/lib/pipeline-stages.sh +161 -2901
- package/scripts/lib/pipeline-state.sh +36 -5
- package/scripts/lib/pipeline-util.sh +487 -0
- package/scripts/lib/policy-learner.sh +438 -0
- package/scripts/lib/process-reward.sh +493 -0
- package/scripts/lib/project-detect.sh +649 -0
- package/scripts/lib/quality-profile.sh +334 -0
- package/scripts/lib/recruit-commands.sh +885 -0
- package/scripts/lib/recruit-learning.sh +739 -0
- package/scripts/lib/recruit-roles.sh +648 -0
- package/scripts/lib/reward-aggregator.sh +458 -0
- package/scripts/lib/rl-optimizer.sh +362 -0
- package/scripts/lib/root-cause.sh +427 -0
- package/scripts/lib/scope-enforcement.sh +445 -0
- package/scripts/lib/session-restart.sh +493 -0
- package/scripts/lib/skill-memory.sh +300 -0
- package/scripts/lib/skill-registry.sh +775 -0
- package/scripts/lib/spec-driven.sh +476 -0
- package/scripts/lib/test-helpers.sh +18 -7
- package/scripts/lib/test-holdout.sh +429 -0
- package/scripts/lib/test-optimizer.sh +511 -0
- package/scripts/shipwright-file-suggest.sh +45 -0
- package/scripts/skills/adversarial-quality.md +61 -0
- package/scripts/skills/api-design.md +44 -0
- package/scripts/skills/architecture-design.md +50 -0
- package/scripts/skills/brainstorming.md +43 -0
- package/scripts/skills/data-pipeline.md +44 -0
- package/scripts/skills/deploy-safety.md +64 -0
- package/scripts/skills/documentation.md +38 -0
- package/scripts/skills/frontend-design.md +45 -0
- package/scripts/skills/generated/.gitkeep +0 -0
- package/scripts/skills/generated/_refinements/.gitkeep +0 -0
- package/scripts/skills/generated/_refinements/adversarial-quality.patch.md +3 -0
- package/scripts/skills/generated/_refinements/architecture-design.patch.md +3 -0
- package/scripts/skills/generated/_refinements/brainstorming.patch.md +3 -0
- package/scripts/skills/generated/cli-version-management.md +29 -0
- package/scripts/skills/generated/collection-system-validation.md +99 -0
- package/scripts/skills/generated/large-scale-c-refactoring-coordination.md +97 -0
- package/scripts/skills/generated/pattern-matching-similarity-scoring.md +195 -0
- package/scripts/skills/generated/test-parallelization-detection.md +65 -0
- package/scripts/skills/observability.md +79 -0
- package/scripts/skills/performance.md +48 -0
- package/scripts/skills/pr-quality.md +49 -0
- package/scripts/skills/product-thinking.md +43 -0
- package/scripts/skills/security-audit.md +49 -0
- package/scripts/skills/systematic-debugging.md +40 -0
- package/scripts/skills/testing-strategy.md +47 -0
- package/scripts/skills/two-stage-review.md +52 -0
- package/scripts/skills/validation-thoroughness.md +55 -0
- package/scripts/sw +9 -3
- package/scripts/sw-activity.sh +9 -8
- package/scripts/sw-adaptive.sh +8 -7
- package/scripts/sw-adversarial.sh +2 -1
- package/scripts/sw-architecture-enforcer.sh +3 -1
- package/scripts/sw-auth.sh +12 -2
- package/scripts/sw-autonomous.sh +5 -1
- package/scripts/sw-changelog.sh +4 -1
- package/scripts/sw-checkpoint.sh +2 -1
- package/scripts/sw-ci.sh +15 -6
- package/scripts/sw-cleanup.sh +4 -26
- package/scripts/sw-code-review.sh +45 -20
- package/scripts/sw-connect.sh +2 -1
- package/scripts/sw-context.sh +2 -1
- package/scripts/sw-cost.sh +107 -5
- package/scripts/sw-daemon.sh +71 -11
- package/scripts/sw-dashboard.sh +3 -1
- package/scripts/sw-db.sh +71 -20
- package/scripts/sw-decide.sh +8 -2
- package/scripts/sw-decompose.sh +360 -17
- package/scripts/sw-deps.sh +4 -1
- package/scripts/sw-developer-simulation.sh +4 -1
- package/scripts/sw-discovery.sh +378 -5
- package/scripts/sw-doc-fleet.sh +4 -1
- package/scripts/sw-docs-agent.sh +3 -1
- package/scripts/sw-docs.sh +2 -1
- package/scripts/sw-doctor.sh +453 -2
- package/scripts/sw-dora.sh +4 -1
- package/scripts/sw-durable.sh +12 -7
- package/scripts/sw-e2e-orchestrator.sh +17 -16
- package/scripts/sw-eventbus.sh +13 -4
- package/scripts/sw-evidence.sh +364 -12
- package/scripts/sw-feedback.sh +550 -9
- package/scripts/sw-fix.sh +20 -1
- package/scripts/sw-fleet-discover.sh +6 -2
- package/scripts/sw-fleet-viz.sh +9 -4
- package/scripts/sw-fleet.sh +5 -1
- package/scripts/sw-github-app.sh +18 -4
- package/scripts/sw-github-checks.sh +3 -2
- package/scripts/sw-github-deploy.sh +3 -2
- package/scripts/sw-github-graphql.sh +18 -7
- package/scripts/sw-guild.sh +5 -1
- package/scripts/sw-heartbeat.sh +5 -30
- package/scripts/sw-hello.sh +67 -0
- package/scripts/sw-hygiene.sh +10 -3
- package/scripts/sw-incident.sh +273 -5
- package/scripts/sw-init.sh +18 -2
- package/scripts/sw-instrument.sh +10 -2
- package/scripts/sw-intelligence.sh +44 -7
- package/scripts/sw-jira.sh +5 -1
- package/scripts/sw-launchd.sh +2 -1
- package/scripts/sw-linear.sh +4 -1
- package/scripts/sw-logs.sh +4 -1
- package/scripts/sw-loop.sh +436 -1076
- package/scripts/sw-memory.sh +357 -3
- package/scripts/sw-mission-control.sh +6 -1
- package/scripts/sw-model-router.sh +483 -27
- package/scripts/sw-otel.sh +15 -4
- package/scripts/sw-oversight.sh +14 -5
- package/scripts/sw-patrol-meta.sh +334 -0
- package/scripts/sw-pipeline-composer.sh +7 -1
- package/scripts/sw-pipeline-vitals.sh +12 -6
- package/scripts/sw-pipeline.sh +54 -2653
- package/scripts/sw-pm.sh +16 -8
- package/scripts/sw-pr-lifecycle.sh +2 -1
- package/scripts/sw-predictive.sh +17 -5
- package/scripts/sw-prep.sh +185 -2
- package/scripts/sw-ps.sh +5 -25
- package/scripts/sw-public-dashboard.sh +17 -4
- package/scripts/sw-quality.sh +14 -6
- package/scripts/sw-reaper.sh +8 -25
- package/scripts/sw-recruit.sh +156 -2303
- package/scripts/sw-regression.sh +19 -12
- package/scripts/sw-release-manager.sh +3 -1
- package/scripts/sw-release.sh +4 -1
- package/scripts/sw-remote.sh +3 -1
- package/scripts/sw-replay.sh +7 -1
- package/scripts/sw-retro.sh +158 -1
- package/scripts/sw-review-rerun.sh +3 -1
- package/scripts/sw-scale.sh +14 -5
- package/scripts/sw-security-audit.sh +6 -1
- package/scripts/sw-self-optimize.sh +173 -6
- package/scripts/sw-session.sh +9 -3
- package/scripts/sw-setup.sh +3 -1
- package/scripts/sw-stall-detector.sh +406 -0
- package/scripts/sw-standup.sh +15 -7
- package/scripts/sw-status.sh +3 -1
- package/scripts/sw-strategic.sh +14 -6
- package/scripts/sw-stream.sh +13 -4
- package/scripts/sw-swarm.sh +20 -7
- package/scripts/sw-team-stages.sh +13 -6
- package/scripts/sw-templates.sh +7 -31
- package/scripts/sw-testgen.sh +17 -6
- package/scripts/sw-tmux-pipeline.sh +4 -1
- package/scripts/sw-tmux-role-color.sh +2 -0
- package/scripts/sw-tmux-status.sh +1 -1
- package/scripts/sw-tmux.sh +37 -1
- package/scripts/sw-trace.sh +3 -1
- package/scripts/sw-tracker-github.sh +3 -0
- package/scripts/sw-tracker-jira.sh +3 -0
- package/scripts/sw-tracker-linear.sh +3 -0
- package/scripts/sw-tracker.sh +3 -1
- package/scripts/sw-triage.sh +3 -2
- package/scripts/sw-upgrade.sh +3 -1
- package/scripts/sw-ux.sh +5 -2
- package/scripts/sw-webhook.sh +5 -2
- package/scripts/sw-widgets.sh +9 -4
- package/scripts/sw-worktree.sh +15 -3
- package/scripts/test-skill-injection.sh +1233 -0
- package/templates/pipelines/autonomous.json +27 -3
- package/templates/pipelines/cost-aware.json +34 -8
- package/templates/pipelines/deployed.json +12 -0
- package/templates/pipelines/enterprise.json +12 -0
- package/templates/pipelines/fast.json +6 -0
- package/templates/pipelines/full.json +27 -3
- package/templates/pipelines/hotfix.json +6 -0
- package/templates/pipelines/standard.json +12 -0
- package/templates/pipelines/tdd.json +12 -0
|
@@ -82,10 +82,12 @@ function renderMetrics(data: MetricsData): void {
|
|
|
82
82
|
doraContainer.style.display = "none";
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
// Cost breakdown/trend
|
|
85
|
+
// Cost breakdown/trend/context efficiency
|
|
86
86
|
if (document.getElementById("cost-breakdown-container"))
|
|
87
87
|
renderCostBreakdown();
|
|
88
88
|
if (document.getElementById("cost-trend-container")) renderCostTrend();
|
|
89
|
+
if (document.getElementById("context-efficiency-container"))
|
|
90
|
+
renderContextEfficiency();
|
|
89
91
|
if (document.getElementById("dora-trend-container")) renderDoraTrend();
|
|
90
92
|
if (document.getElementById("stage-performance-container"))
|
|
91
93
|
renderStagePerformance();
|
|
@@ -256,6 +258,72 @@ function renderCostTrend(): void {
|
|
|
256
258
|
});
|
|
257
259
|
}
|
|
258
260
|
|
|
261
|
+
function renderContextEfficiency(): void {
|
|
262
|
+
const container = document.getElementById("context-efficiency-container");
|
|
263
|
+
if (!container) return;
|
|
264
|
+
api
|
|
265
|
+
.fetchContextEfficiency()
|
|
266
|
+
.then((data) => {
|
|
267
|
+
if (!data.total_iterations) {
|
|
268
|
+
container.innerHTML =
|
|
269
|
+
'<div class="empty-state"><p>No context efficiency data</p></div>';
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const utilPct = Math.min(data.avg_utilization, 100);
|
|
273
|
+
const utilClass =
|
|
274
|
+
utilPct >= 90
|
|
275
|
+
? "ctx-eff-high"
|
|
276
|
+
: utilPct >= 60
|
|
277
|
+
? "ctx-eff-mid"
|
|
278
|
+
: "ctx-eff-low";
|
|
279
|
+
const trimPct = Math.min(data.avg_trim_ratio, 100);
|
|
280
|
+
|
|
281
|
+
let html =
|
|
282
|
+
'<span class="metric-label">CONTEXT EFFICIENCY</span>' +
|
|
283
|
+
'<div class="ctx-eff-grid">';
|
|
284
|
+
|
|
285
|
+
// Budget utilization gauge
|
|
286
|
+
html +=
|
|
287
|
+
'<div class="ctx-eff-card">' +
|
|
288
|
+
'<span class="ctx-eff-card-label">Budget Utilization</span>' +
|
|
289
|
+
`<div class="ctx-eff-gauge"><div class="ctx-eff-gauge-fill ${utilClass}" style="width:${utilPct.toFixed(0)}%"></div></div>` +
|
|
290
|
+
`<span class="ctx-eff-value">${data.avg_utilization.toFixed(1)}%</span>` +
|
|
291
|
+
"</div>";
|
|
292
|
+
|
|
293
|
+
// Trim ratio
|
|
294
|
+
html +=
|
|
295
|
+
'<div class="ctx-eff-card">' +
|
|
296
|
+
'<span class="ctx-eff-card-label">Avg Trim Ratio</span>' +
|
|
297
|
+
`<div class="ctx-eff-gauge"><div class="ctx-eff-gauge-fill ctx-eff-trim" style="width:${trimPct.toFixed(0)}%"></div></div>` +
|
|
298
|
+
`<span class="ctx-eff-value">${data.avg_trim_ratio.toFixed(1)}%</span>` +
|
|
299
|
+
"</div>";
|
|
300
|
+
|
|
301
|
+
// Chars saved
|
|
302
|
+
const savedK = Math.round(data.total_discarded_chars / 1000);
|
|
303
|
+
const totalK = Math.round(data.total_raw_chars / 1000);
|
|
304
|
+
html +=
|
|
305
|
+
'<div class="ctx-eff-card">' +
|
|
306
|
+
'<span class="ctx-eff-card-label">Chars Discarded</span>' +
|
|
307
|
+
`<span class="ctx-eff-big">${fmtNum(savedK)}K</span>` +
|
|
308
|
+
`<span class="ctx-eff-sub">of ${fmtNum(totalK)}K generated</span>` +
|
|
309
|
+
"</div>";
|
|
310
|
+
|
|
311
|
+
// Trim events
|
|
312
|
+
html +=
|
|
313
|
+
'<div class="ctx-eff-card">' +
|
|
314
|
+
'<span class="ctx-eff-card-label">Trim Events</span>' +
|
|
315
|
+
`<span class="ctx-eff-big">${data.trim_events}</span>` +
|
|
316
|
+
`<span class="ctx-eff-sub">of ${data.total_iterations} iterations</span>` +
|
|
317
|
+
"</div>";
|
|
318
|
+
|
|
319
|
+
html += "</div>";
|
|
320
|
+
container.innerHTML = html;
|
|
321
|
+
})
|
|
322
|
+
.catch((err) => {
|
|
323
|
+
container.innerHTML = `<div class="empty-state"><p>Failed to load: ${escapeHtml(String(err))}</p></div>`;
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
259
327
|
function renderDoraTrend(): void {
|
|
260
328
|
const container = document.getElementById("dora-trend-container");
|
|
261
329
|
if (!container) return;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Shipyard View — Pixel art submarine crew visualization
|
|
2
|
+
// Shows pipeline agents as animated crew members in a submarine cross-section.
|
|
3
|
+
|
|
4
|
+
import { CanvasRenderer } from "../canvas/renderer";
|
|
5
|
+
import { ShipyardScene } from "../canvas/shipyard-scene";
|
|
6
|
+
import type { FleetState, View } from "../types/api";
|
|
7
|
+
|
|
8
|
+
let renderer: CanvasRenderer | null = null;
|
|
9
|
+
let scene: ShipyardScene | null = null;
|
|
10
|
+
|
|
11
|
+
export const shipyardView: View = {
|
|
12
|
+
init() {
|
|
13
|
+
const container = document.getElementById("panel-shipyard");
|
|
14
|
+
if (!container) return;
|
|
15
|
+
|
|
16
|
+
container.innerHTML =
|
|
17
|
+
'<div class="shipyard-canvas" style="width:100%;height:calc(100vh - 160px);position:relative;"></div>';
|
|
18
|
+
const canvasContainer = container.querySelector(
|
|
19
|
+
".shipyard-canvas",
|
|
20
|
+
) as HTMLElement;
|
|
21
|
+
|
|
22
|
+
renderer = new CanvasRenderer(canvasContainer);
|
|
23
|
+
scene = new ShipyardScene();
|
|
24
|
+
renderer.setScene(scene);
|
|
25
|
+
renderer.start();
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
render(data: FleetState) {
|
|
29
|
+
if (scene) scene.updateData(data);
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
destroy() {
|
|
33
|
+
if (renderer) {
|
|
34
|
+
renderer.destroy();
|
|
35
|
+
renderer = null;
|
|
36
|
+
}
|
|
37
|
+
scene = null;
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// Dashboard type definitions
|
|
2
|
+
export interface DaemonEvent {
|
|
3
|
+
ts: string;
|
|
4
|
+
ts_epoch?: number;
|
|
5
|
+
type: string;
|
|
6
|
+
issue?: number;
|
|
7
|
+
stage?: string;
|
|
8
|
+
duration_s?: number;
|
|
9
|
+
pid?: number;
|
|
10
|
+
issues_found?: number;
|
|
11
|
+
active?: number;
|
|
12
|
+
from?: number;
|
|
13
|
+
to?: number;
|
|
14
|
+
max_by_cpu?: number;
|
|
15
|
+
max_by_mem?: number;
|
|
16
|
+
max_by_budget?: number;
|
|
17
|
+
cpu_cores?: number;
|
|
18
|
+
avail_mem_gb?: number;
|
|
19
|
+
result?: string;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Pipeline {
|
|
24
|
+
issue: number;
|
|
25
|
+
title: string;
|
|
26
|
+
stage: string;
|
|
27
|
+
elapsed_s: number;
|
|
28
|
+
worktree: string;
|
|
29
|
+
iteration: number;
|
|
30
|
+
maxIterations: number;
|
|
31
|
+
stagesDone: string[];
|
|
32
|
+
linesWritten: number;
|
|
33
|
+
testsPassing: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface QueueItem {
|
|
37
|
+
issue: number;
|
|
38
|
+
title: string;
|
|
39
|
+
score: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface DoraMetric {
|
|
43
|
+
value: number;
|
|
44
|
+
unit: string;
|
|
45
|
+
grade: "Elite" | "High" | "Medium" | "Low";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface DoraGrades {
|
|
49
|
+
deploy_freq: DoraMetric;
|
|
50
|
+
lead_time: DoraMetric;
|
|
51
|
+
cfr: DoraMetric;
|
|
52
|
+
mttr: DoraMetric;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ConnectedDeveloper {
|
|
56
|
+
developer_id: string;
|
|
57
|
+
machine_name: string;
|
|
58
|
+
hostname: string;
|
|
59
|
+
platform: string;
|
|
60
|
+
last_heartbeat: number; // epoch ms
|
|
61
|
+
daemon_running: boolean;
|
|
62
|
+
daemon_pid: number | null;
|
|
63
|
+
active_jobs: Array<{ issue: number; title: string; stage: string }>;
|
|
64
|
+
queued: number[];
|
|
65
|
+
events_since: number; // last synced event timestamp
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface TeamState {
|
|
69
|
+
developers: Array<ConnectedDeveloper & { _presence?: string }>;
|
|
70
|
+
total_online: number;
|
|
71
|
+
total_active_pipelines: number;
|
|
72
|
+
total_queued: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface FleetState {
|
|
76
|
+
timestamp: string;
|
|
77
|
+
daemon: {
|
|
78
|
+
running: boolean;
|
|
79
|
+
pid: number | null;
|
|
80
|
+
uptime_s: number;
|
|
81
|
+
maxParallel: number;
|
|
82
|
+
pollInterval: number;
|
|
83
|
+
};
|
|
84
|
+
pipelines: Pipeline[];
|
|
85
|
+
queue: QueueItem[];
|
|
86
|
+
events: DaemonEvent[];
|
|
87
|
+
scale: {
|
|
88
|
+
from?: number;
|
|
89
|
+
to?: number;
|
|
90
|
+
maxByCpu?: number;
|
|
91
|
+
maxByMem?: number;
|
|
92
|
+
maxByBudget?: number;
|
|
93
|
+
cpuCores?: number;
|
|
94
|
+
availMemGb?: number;
|
|
95
|
+
};
|
|
96
|
+
metrics: {
|
|
97
|
+
cpuCores: number;
|
|
98
|
+
completed: number;
|
|
99
|
+
failed: number;
|
|
100
|
+
};
|
|
101
|
+
agents: AgentInfo[];
|
|
102
|
+
machines: MachineInfo[];
|
|
103
|
+
cost: CostInfo;
|
|
104
|
+
dora: DoraGrades;
|
|
105
|
+
team?: TeamState;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface HealthResponse {
|
|
109
|
+
status: "ok";
|
|
110
|
+
uptime_s: number;
|
|
111
|
+
connections: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface Session {
|
|
115
|
+
githubUser: string;
|
|
116
|
+
accessToken: string;
|
|
117
|
+
avatarUrl: string;
|
|
118
|
+
isAdmin: boolean;
|
|
119
|
+
role: "viewer" | "operator" | "admin";
|
|
120
|
+
expiresAt: number;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface AgentInfo {
|
|
124
|
+
id: string;
|
|
125
|
+
issue: number;
|
|
126
|
+
title: string;
|
|
127
|
+
machine: string;
|
|
128
|
+
stage: string;
|
|
129
|
+
iteration: number;
|
|
130
|
+
activity: string;
|
|
131
|
+
memory_mb: number;
|
|
132
|
+
cpu_pct: number;
|
|
133
|
+
status: "active" | "idle" | "stale" | "dead";
|
|
134
|
+
heartbeat_age_s: number;
|
|
135
|
+
started_at: string;
|
|
136
|
+
elapsed_s: number;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface MachineInfo {
|
|
140
|
+
name: string;
|
|
141
|
+
status: "online" | "offline";
|
|
142
|
+
location: string;
|
|
143
|
+
workers: number;
|
|
144
|
+
loaded: number;
|
|
145
|
+
capacity: number;
|
|
146
|
+
cost_24h: number;
|
|
147
|
+
last_heartbeat: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface CostInfo {
|
|
151
|
+
today_usd: number;
|
|
152
|
+
month_usd: number;
|
|
153
|
+
trend: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface NotificationConfig {
|
|
157
|
+
enabled: boolean;
|
|
158
|
+
webhooks: Array<{
|
|
159
|
+
url: string;
|
|
160
|
+
label: string;
|
|
161
|
+
events: string[]; // "pipeline.completed", "pipeline.failed", "alert", "all"
|
|
162
|
+
created_at: string;
|
|
163
|
+
}>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type AuthMode = "oauth" | "pat" | "none";
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Compound Audit Architecture & Shipyard Simulation Design
|
|
2
|
+
|
|
3
|
+
**Date**: 2026-02-28
|
|
4
|
+
**Status**: Approved
|
|
5
|
+
**Scope**: Three parallel workstreams
|
|
6
|
+
|
|
7
|
+
## 1. Compound Negative-Critical Audit Architecture
|
|
8
|
+
|
|
9
|
+
### Philosophy
|
|
10
|
+
|
|
11
|
+
Every audit asks "What did we get wrong?" The questions:
|
|
12
|
+
|
|
13
|
+
- What did we miss?
|
|
14
|
+
- What did we not think through or consider?
|
|
15
|
+
- What did we fail to test, audit, research, validate, or prove works E2E?
|
|
16
|
+
- Where are we lying to ourselves about capability?
|
|
17
|
+
|
|
18
|
+
### 6 Audit Dimensions
|
|
19
|
+
|
|
20
|
+
Evaluated against background-agents.com gold standard:
|
|
21
|
+
|
|
22
|
+
| Architect | Dimension | Core Question |
|
|
23
|
+
| ------------------ | ---------------------- | ------------------------------------------------------------------------------------ |
|
|
24
|
+
| infra-auditor | Isolated Compute | Can Shipwright provision isolated dev environments with production parity? |
|
|
25
|
+
| event-auditor | Event Routing | Can Shipwright trigger agents from webhooks, schedules, Slack, API, mobile? |
|
|
26
|
+
| governance-auditor | Governance & Safety | Does Shipwright enforce identity, permissions, audit trails at execution layer? |
|
|
27
|
+
| context-auditor | Context & Connectivity | Can agents access internal APIs, databases, private registries behind firewalls? |
|
|
28
|
+
| fleet-auditor | Fleet Coordination | Can Shipwright run the same fix across 100 repos in parallel with progress tracking? |
|
|
29
|
+
| dx-auditor | Developer Experience | Is the dashboard/website compelling enough to choose Shipwright over alternatives? |
|
|
30
|
+
|
|
31
|
+
### Finding Format
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
FINDING-{dimension}-{number}
|
|
35
|
+
Severity: P0 | P1 | P2 | P3
|
|
36
|
+
Category: missing | broken | incomplete | misleading | untested
|
|
37
|
+
Question: What specific question does this answer?
|
|
38
|
+
Gap: What background-agents.com describes that we don't have
|
|
39
|
+
Reality: What Shipwright actually does today
|
|
40
|
+
Impact: Why this matters to users
|
|
41
|
+
Action: Concrete fix with effort estimate (S/M/L/XL)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Scoring
|
|
45
|
+
|
|
46
|
+
Each dimension scored 0-100. Overall "Shipwright Readiness Score" = weighted average.
|
|
47
|
+
|
|
48
|
+
## 2. Shipyard Simulation Engine
|
|
49
|
+
|
|
50
|
+
### A. Pipeline Lifecycle Simulator (`shipyard-simulator.ts`)
|
|
51
|
+
|
|
52
|
+
Client-side state machine generating realistic pipeline behavior:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
SPAWN (2s) -> intake (5-15s) -> plan (10-25s) -> design (8-20s) ->
|
|
56
|
+
build (20-60s) -> test (15-40s) -> review (10-30s) ->
|
|
57
|
+
compound_quality (10-20s) -> pr (5-15s) -> deploy (8-20s) ->
|
|
58
|
+
validate (5-10s) -> monitor (10-30s) -> COMPLETE + DESPAWN (3s)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Pool of 4-10 concurrent pipelines
|
|
62
|
+
- New pipelines spawn every 15-45s
|
|
63
|
+
- 10% failure chance at build/test/review, 70% recovery rate
|
|
64
|
+
- Completed pipelines trigger celebration then despawn
|
|
65
|
+
- Stage durations randomized for organic feel
|
|
66
|
+
|
|
67
|
+
### B. Speech Bubbles (`shipyard-bubbles.ts`)
|
|
68
|
+
|
|
69
|
+
Contextual messages floating above agents:
|
|
70
|
+
|
|
71
|
+
**Types**:
|
|
72
|
+
|
|
73
|
+
- Speech (white, rounded): "Compiling modules...", "47/52 tests passing"
|
|
74
|
+
- Thought (cloud, translucent): "Analyzing dependencies...", "Waiting for review..."
|
|
75
|
+
- Shout (spiky, bright): "Build failed!", "Merge conflict!"
|
|
76
|
+
- Celebrate (sparkly): "All tests pass!", "Shipped!"
|
|
77
|
+
|
|
78
|
+
**40+ unique messages** across stages:
|
|
79
|
+
|
|
80
|
+
| Stage | Sample Messages |
|
|
81
|
+
| ------ | ------------------------------------------------------ |
|
|
82
|
+
| intake | "Reading issue...", "Triaging requirements..." |
|
|
83
|
+
| plan | "Designing architecture...", "Mapping dependencies..." |
|
|
84
|
+
| build | "Compiling module 3/7...", "Linking binaries..." |
|
|
85
|
+
| test | "Running test suite...", "47/52 passing..." |
|
|
86
|
+
| review | "Checking code style...", "Reviewing PR diff..." |
|
|
87
|
+
| deploy | "Rolling out to prod...", "Health checks green!" |
|
|
88
|
+
|
|
89
|
+
**Behavior**:
|
|
90
|
+
|
|
91
|
+
- Auto-show on state transitions
|
|
92
|
+
- Ambient chatter every 8-15s for working agents
|
|
93
|
+
- Dismiss after 3-5s with fade-out
|
|
94
|
+
- Max 1 bubble per agent, 3 visible total
|
|
95
|
+
- Typewriter effect for longer messages
|
|
96
|
+
|
|
97
|
+
### C. Agent Community Behaviors
|
|
98
|
+
|
|
99
|
+
1. **Passing interactions**: Agents walking through same corridor pause and face each other (0.3s)
|
|
100
|
+
2. **Stage celebrations**: Pipeline completes -> nearby agents jump (2 frames, 0.4s)
|
|
101
|
+
3. **Idle variety**: Random look left/right, stretch, wander within compartment
|
|
102
|
+
4. **Work intensity**: Animation speed increases with elapsed time
|
|
103
|
+
5. **Alert clustering**: Failure -> nearby agents turn toward alert
|
|
104
|
+
|
|
105
|
+
### D. Enhanced Crew Manifest Bar
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
CREW *#191 intake *#178 plan *#142 build *#157 test ...
|
|
109
|
+
[====--] 45% [=====] 80% [==---] 30% [====-] 55%
|
|
110
|
+
8 active - 2 completed - 1 failed
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- Mini progress bars per agent
|
|
114
|
+
- Color-coded status dots
|
|
115
|
+
- Rolling stats (completed, failed, throughput)
|
|
116
|
+
- Click to highlight/focus agent
|
|
117
|
+
|
|
118
|
+
### E. Ship's Log Overlay
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
-- SHIP'S LOG ----------------------
|
|
122
|
+
12:07 #220 entered Airlock
|
|
123
|
+
12:06 #142 tests passing
|
|
124
|
+
12:05 #157 build failed
|
|
125
|
+
12:05 #178 advanced to Bridge
|
|
126
|
+
12:04 #163 review complete
|
|
127
|
+
------------------------------------
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- Max 6 visible entries, newest at top
|
|
131
|
+
- Color-coded by event type
|
|
132
|
+
- Semi-transparent overlay
|
|
133
|
+
- Togglable with LOG button
|
|
134
|
+
|
|
135
|
+
## 3. Living Gap Analysis Output
|
|
136
|
+
|
|
137
|
+
### Document Structure
|
|
138
|
+
|
|
139
|
+
Produces `docs/plans/2026-02-28-compound-audit-gap-analysis.md`:
|
|
140
|
+
|
|
141
|
+
- Executive summary (top 5 gaps, top 5 strengths)
|
|
142
|
+
- Dimension scores table with status indicators
|
|
143
|
+
- All findings grouped by dimension
|
|
144
|
+
- Shipyard simulation requirements (from DX audit)
|
|
145
|
+
- Website gap analysis (claims vs. proven)
|
|
146
|
+
- Action plan (ranked by impact x effort)
|
|
147
|
+
|
|
148
|
+
### Compound Loop
|
|
149
|
+
|
|
150
|
+
Audit -> Fix -> Re-Audit -> Fix. Each cycle the readiness score increases.
|
|
151
|
+
|
|
152
|
+
## 4. Execution Plan
|
|
153
|
+
|
|
154
|
+
### Phase 1: Audit (6 parallel architects, read-only)
|
|
155
|
+
|
|
156
|
+
Each architect searches codebase against background-agents.com criteria, produces findings.
|
|
157
|
+
|
|
158
|
+
### Phase 2: Synthesis (lead)
|
|
159
|
+
|
|
160
|
+
Merge findings into gap analysis, score dimensions, prioritize actions.
|
|
161
|
+
|
|
162
|
+
### Phase 3: Implementation (3 parallel builders)
|
|
163
|
+
|
|
164
|
+
- simulation-engineer: `shipyard-simulator.ts` + `shipyard-bubbles.ts`
|
|
165
|
+
- scene-integrator: Wire simulation into scene, enhance manifest/log
|
|
166
|
+
- agent-animator: Community behaviors in `pixel-agent.ts`
|
|
167
|
+
|
|
168
|
+
### Phase 4: Re-Audit (negative-critical loop)
|
|
169
|
+
|
|
170
|
+
Run same 6 auditors on changed codebase. Score should increase.
|
|
171
|
+
|
|
172
|
+
## Files To Create
|
|
173
|
+
|
|
174
|
+
| File | Purpose |
|
|
175
|
+
| -------------------------------------------- | -------------------------------------- |
|
|
176
|
+
| `dashboard/src/canvas/shipyard-simulator.ts` | Pipeline lifecycle simulation engine |
|
|
177
|
+
| `dashboard/src/canvas/shipyard-bubbles.ts` | Speech/thought bubble rendering system |
|
|
178
|
+
|
|
179
|
+
## Files To Modify
|
|
180
|
+
|
|
181
|
+
| File | Changes |
|
|
182
|
+
| ------------------------------------------ | ------------------------------------------------------------- |
|
|
183
|
+
| `dashboard/src/canvas/pixel-agent.ts` | Community behaviors, celebration state, progress tracking |
|
|
184
|
+
| `dashboard/src/canvas/shipyard-scene.ts` | Integrate simulator, bubbles, activity log, enhanced manifest |
|
|
185
|
+
| `dashboard/src/canvas/shipyard-effects.ts` | Celebration effects, enhanced ambient effects |
|
|
186
|
+
| `dashboard/src/design/submarine-theme.ts` | Bubble styles, message pools, simulator timing constants |
|