shipwright-cli 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -7
- package/completions/_shipwright +247 -93
- package/completions/shipwright.bash +69 -15
- package/completions/shipwright.fish +309 -41
- package/config/decision-tiers.json +55 -0
- package/config/defaults.json +25 -2
- package/config/event-schema.json +142 -5
- package/config/policy.json +8 -0
- package/dashboard/public/index.html +6 -0
- package/dashboard/public/styles.css +76 -0
- package/dashboard/server.ts +51 -0
- package/dashboard/src/core/api.ts +5 -0
- package/dashboard/src/types/api.ts +10 -0
- package/dashboard/src/views/metrics.ts +69 -1
- package/package.json +3 -3
- package/scripts/lib/architecture.sh +2 -1
- package/scripts/lib/bootstrap.sh +0 -0
- package/scripts/lib/config.sh +0 -0
- package/scripts/lib/daemon-adaptive.sh +4 -2
- package/scripts/lib/daemon-dispatch.sh +24 -1
- package/scripts/lib/daemon-failure.sh +0 -0
- package/scripts/lib/daemon-health.sh +0 -0
- package/scripts/lib/daemon-patrol.sh +42 -7
- package/scripts/lib/daemon-poll.sh +17 -0
- package/scripts/lib/daemon-state.sh +17 -0
- package/scripts/lib/daemon-triage.sh +1 -1
- package/scripts/lib/decide-autonomy.sh +295 -0
- package/scripts/lib/decide-scoring.sh +228 -0
- package/scripts/lib/decide-signals.sh +462 -0
- package/scripts/lib/fleet-failover.sh +0 -0
- package/scripts/lib/helpers.sh +19 -18
- package/scripts/lib/pipeline-detection.sh +1 -1
- package/scripts/lib/pipeline-github.sh +0 -0
- package/scripts/lib/pipeline-intelligence.sh +23 -4
- package/scripts/lib/pipeline-quality-checks.sh +11 -6
- package/scripts/lib/pipeline-quality.sh +0 -0
- package/scripts/lib/pipeline-stages.sh +330 -33
- package/scripts/lib/pipeline-state.sh +14 -0
- package/scripts/lib/policy.sh +0 -0
- package/scripts/lib/test-helpers.sh +0 -0
- package/scripts/postinstall.mjs +75 -1
- package/scripts/signals/example-collector.sh +36 -0
- package/scripts/sw +8 -4
- package/scripts/sw-activity.sh +1 -7
- package/scripts/sw-adaptive.sh +7 -7
- package/scripts/sw-adversarial.sh +1 -1
- package/scripts/sw-architecture-enforcer.sh +1 -1
- package/scripts/sw-auth.sh +1 -1
- package/scripts/sw-autonomous.sh +1 -1
- package/scripts/sw-changelog.sh +1 -1
- package/scripts/sw-checkpoint.sh +1 -1
- package/scripts/sw-ci.sh +11 -6
- package/scripts/sw-cleanup.sh +1 -1
- package/scripts/sw-code-review.sh +36 -17
- package/scripts/sw-connect.sh +1 -1
- package/scripts/sw-context.sh +1 -1
- package/scripts/sw-cost.sh +71 -5
- package/scripts/sw-daemon.sh +6 -3
- package/scripts/sw-dashboard.sh +1 -1
- package/scripts/sw-db.sh +53 -38
- package/scripts/sw-decide.sh +685 -0
- package/scripts/sw-decompose.sh +1 -1
- package/scripts/sw-deps.sh +1 -1
- package/scripts/sw-developer-simulation.sh +1 -1
- package/scripts/sw-discovery.sh +80 -4
- package/scripts/sw-doc-fleet.sh +1 -1
- package/scripts/sw-docs-agent.sh +1 -1
- package/scripts/sw-docs.sh +1 -1
- package/scripts/sw-doctor.sh +1 -1
- package/scripts/sw-dora.sh +1 -1
- package/scripts/sw-durable.sh +9 -5
- package/scripts/sw-e2e-orchestrator.sh +1 -1
- package/scripts/sw-eventbus.sh +7 -4
- package/scripts/sw-evidence.sh +1 -1
- package/scripts/sw-feedback.sh +1 -1
- package/scripts/sw-fix.sh +1 -1
- package/scripts/sw-fleet-discover.sh +1 -1
- package/scripts/sw-fleet-viz.sh +6 -4
- package/scripts/sw-fleet.sh +1 -1
- package/scripts/sw-github-app.sh +3 -2
- package/scripts/sw-github-checks.sh +1 -1
- package/scripts/sw-github-deploy.sh +1 -1
- package/scripts/sw-github-graphql.sh +1 -1
- package/scripts/sw-guild.sh +1 -1
- package/scripts/sw-heartbeat.sh +1 -1
- package/scripts/sw-hygiene.sh +5 -3
- package/scripts/sw-incident.sh +9 -5
- package/scripts/sw-init.sh +1 -1
- package/scripts/sw-instrument.sh +1 -1
- package/scripts/sw-intelligence.sh +11 -6
- package/scripts/sw-jira.sh +1 -1
- package/scripts/sw-launchd.sh +1 -1
- package/scripts/sw-linear.sh +1 -1
- package/scripts/sw-logs.sh +1 -1
- package/scripts/sw-loop.sh +338 -32
- package/scripts/sw-memory.sh +23 -6
- package/scripts/sw-mission-control.sh +1 -1
- package/scripts/sw-model-router.sh +3 -2
- package/scripts/sw-otel.sh +8 -4
- package/scripts/sw-oversight.sh +1 -1
- package/scripts/sw-pipeline-composer.sh +3 -1
- package/scripts/sw-pipeline-vitals.sh +11 -6
- package/scripts/sw-pipeline.sh +92 -8
- package/scripts/sw-pm.sh +5 -4
- package/scripts/sw-pr-lifecycle.sh +7 -4
- package/scripts/sw-predictive.sh +11 -5
- package/scripts/sw-prep.sh +1 -1
- package/scripts/sw-ps.sh +1 -1
- package/scripts/sw-public-dashboard.sh +3 -2
- package/scripts/sw-quality.sh +21 -10
- package/scripts/sw-reaper.sh +1 -1
- package/scripts/sw-recruit.sh +1 -1
- package/scripts/sw-regression.sh +1 -1
- package/scripts/sw-release-manager.sh +1 -1
- package/scripts/sw-release.sh +1 -1
- package/scripts/sw-remote.sh +1 -1
- package/scripts/sw-replay.sh +1 -1
- package/scripts/sw-retro.sh +1 -1
- package/scripts/sw-review-rerun.sh +1 -1
- package/scripts/sw-scale.sh +69 -11
- package/scripts/sw-security-audit.sh +1 -1
- package/scripts/sw-self-optimize.sh +168 -4
- package/scripts/sw-session.sh +3 -3
- package/scripts/sw-setup.sh +1 -1
- package/scripts/sw-standup.sh +1 -1
- package/scripts/sw-status.sh +1 -1
- package/scripts/sw-strategic.sh +11 -6
- package/scripts/sw-stream.sh +7 -4
- package/scripts/sw-swarm.sh +3 -2
- package/scripts/sw-team-stages.sh +1 -1
- package/scripts/sw-templates.sh +3 -3
- package/scripts/sw-testgen.sh +11 -6
- package/scripts/sw-tmux-pipeline.sh +1 -1
- package/scripts/sw-tmux.sh +35 -1
- package/scripts/sw-trace.sh +1 -1
- package/scripts/sw-tracker.sh +1 -1
- package/scripts/sw-triage.sh +7 -7
- package/scripts/sw-upgrade.sh +1 -1
- package/scripts/sw-ux.sh +1 -1
- package/scripts/sw-webhook.sh +3 -2
- package/scripts/sw-widgets.sh +7 -4
- package/scripts/sw-worktree.sh +1 -1
- package/scripts/update-homebrew-sha.sh +21 -15
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<a href="https://github.com/sethdford/shipwright/actions/workflows/test.yml"><img src="https://github.com/sethdford/shipwright/actions/workflows/test.yml/badge.svg" alt="Tests"></a>
|
|
14
14
|
<a href="https://github.com/sethdford/shipwright/actions/workflows/shipwright-pipeline.yml"><img src="https://github.com/sethdford/shipwright/actions/workflows/shipwright-pipeline.yml/badge.svg" alt="Pipeline"></a>
|
|
15
15
|
<img src="https://img.shields.io/badge/tests-141_suites_passing-4ade80?style=flat-square" alt="141 suites">
|
|
16
|
-
<img src="https://img.shields.io/badge/version-3.
|
|
16
|
+
<img src="https://img.shields.io/badge/version-3.2.0-00d4ff?style=flat-square" alt="v3.2.0">
|
|
17
17
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License">
|
|
18
18
|
<img src="https://img.shields.io/badge/bash-3.2%2B-7c3aed?style=flat-square" alt="Bash 3.2+">
|
|
19
19
|
</p>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
- [Shipwright Builds Itself](#shipwright-builds-itself)
|
|
26
26
|
- [Code Factory Pattern](#code-factory-pattern)
|
|
27
|
-
- [What's New in v3.
|
|
27
|
+
- [What's New in v3.2.0](#whats-new-in-v320)
|
|
28
28
|
- [How It Works](#how-it-works)
|
|
29
29
|
- [Install](#install)
|
|
30
30
|
- [Quick Start](#quick-start)
|
|
@@ -77,7 +77,8 @@ Shipwright extends the Code Factory pattern with capabilities most implementatio
|
|
|
77
77
|
- **12-stage pipeline** with self-healing builds, adversarial review, and compound quality gates
|
|
78
78
|
- **Predictive risk scoring** using GitHub signals (security alerts, contributor expertise, file churn)
|
|
79
79
|
- **Persistent memory** — failure patterns, fix effectiveness, and prediction accuracy compound over time
|
|
80
|
-
- **Auto-learning** — self-optimize runs automatically after every pipeline completion
|
|
80
|
+
- **Auto-learning** — self-optimize runs automatically after every pipeline completion, including context efficiency tuning
|
|
81
|
+
- **Decision engine** — tiered autonomous decisions with outcome learning and deduplication
|
|
81
82
|
- **Unified model routing** — single source of truth for model selection across all components
|
|
82
83
|
- **Evidence-gated merges** — SHA discipline ensures all evidence validated against current PR head
|
|
83
84
|
- **Semantic quality audits** — Claude-powered audits with grep fallback when Claude unavailable
|
|
@@ -108,7 +109,7 @@ shipwright incident gap sla
|
|
|
108
109
|
|
|
109
110
|
---
|
|
110
111
|
|
|
111
|
-
## What's New in v3.
|
|
112
|
+
## What's New in v3.2.0
|
|
112
113
|
|
|
113
114
|
**Code Factory pattern** — deterministic, risk-aware agent delivery with machine-verifiable evidence:
|
|
114
115
|
|
|
@@ -282,7 +283,7 @@ Each stage is configurable with quality gates that auto-proceed or pause for app
|
|
|
282
283
|
|
|
283
284
|
### Intelligence Layer
|
|
284
285
|
|
|
285
|
-
7 modules that make the pipeline smarter over time. **
|
|
286
|
+
7 modules that make the pipeline smarter over time. **Enabled by default**: intelligence is on when Claude CLI is available, with optimization and prediction active out of the box. Set `intelligence.enabled=false` to disable. All modules degrade gracefully.
|
|
286
287
|
|
|
287
288
|
| Module | What It Does |
|
|
288
289
|
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -290,7 +291,7 @@ Each stage is configurable with quality gates that auto-proceed or pause for app
|
|
|
290
291
|
| **Pipeline Composer** | Generates custom pipeline configs from codebase analysis (file churn, test coverage, dependencies) |
|
|
291
292
|
| **Predictive Risk** | Scores issues for risk using GitHub signals (security alerts, similar past issues, contributor expertise) |
|
|
292
293
|
| **Adversarial Review** | Red-team code review — finds security flaws, edge cases, failure modes. Cross-checks against CodeQL/Dependabot alerts |
|
|
293
|
-
| **Self-Optimization** | Reads DORA metrics and auto-tunes daemon config.
|
|
294
|
+
| **Self-Optimization** | Reads DORA metrics and auto-tunes daemon config. Includes context efficiency closed loop for token budget tuning |
|
|
294
295
|
| **Developer Simulation** | 3-persona review (security, performance, maintainability) before PR creation |
|
|
295
296
|
| **Architecture Enforcement** | Living architectural model with violation detection and dependency direction rules |
|
|
296
297
|
|
|
@@ -309,6 +310,19 @@ Native GitHub API integration enriches every intelligence module:
|
|
|
309
310
|
| **Contributors** | CODEOWNERS-based reviewer routing, top-contributor fallback, auto-approve as last resort |
|
|
310
311
|
| **Branch Protection** | Checks required reviews and status checks before attempting auto-merge |
|
|
311
312
|
|
|
313
|
+
### Decision Engine
|
|
314
|
+
|
|
315
|
+
The autonomous decision engine (`config/policy.json` → `decision` section) handles routine operational decisions with outcome learning. Decisions are tiered by risk, with low-risk actions auto-approved and higher tiers escalated. The engine learns from outcomes to improve future decisions.
|
|
316
|
+
|
|
317
|
+
### Context Engineering
|
|
318
|
+
|
|
319
|
+
Intelligent context window management for pipeline agents:
|
|
320
|
+
|
|
321
|
+
- **Budget-aware trimming** — Configurable character budgets for prompt composition (`context_budget_chars`)
|
|
322
|
+
- **Section-level trimming** — Independent limits for memory, git history, hotspot files, and test output
|
|
323
|
+
- **Context efficiency metrics** — Tracks budget utilization and trim ratios per iteration
|
|
324
|
+
- **Self-tuning** — The self-optimization loop analyzes context efficiency events and recommends budget adjustments
|
|
325
|
+
|
|
312
326
|
### Autonomous Daemon
|
|
313
327
|
|
|
314
328
|
```bash
|
|
@@ -354,7 +368,7 @@ Per-pipeline cost tracking with model pricing, budget enforcement, and ROI analy
|
|
|
354
368
|
shipwright dashboard start
|
|
355
369
|
```
|
|
356
370
|
|
|
357
|
-
Web dashboard with live pipeline progress, GitHub context (security alerts, contributors, deployments), DORA metrics, and
|
|
371
|
+
Web dashboard with live pipeline progress, GitHub context (security alerts, contributors, deployments), DORA metrics, cost tracking, and context efficiency metrics. WebSocket-powered, updates in real-time.
|
|
358
372
|
|
|
359
373
|
### Webhook Receiver
|
|
360
374
|
|
package/completions/_shipwright
CHANGED
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
_shipwright() {
|
|
8
8
|
local -a commands
|
|
9
9
|
commands=(
|
|
10
|
+
# Command groups
|
|
10
11
|
'agent:Agent management (recruit, swarm, standup, guild, oversight)'
|
|
11
|
-
'quality:Quality & review (code-review, security-audit, testgen, hygiene)'
|
|
12
|
+
'quality:Quality & review (code-review, security-audit, testgen, hygiene, validate)'
|
|
12
13
|
'observe:Observability (vitals, dora, retro, stream, activity, replay)'
|
|
13
|
-
'release:Release & deploy (release, release-manager, changelog, deploy)'
|
|
14
|
+
'release:Release & deploy (release, release-manager, changelog, deploy, build)'
|
|
14
15
|
'intel:Intelligence (predict, intelligence, strategic, optimize)'
|
|
16
|
+
# Core workflow
|
|
15
17
|
'init:Quick tmux setup — one command, no prompts'
|
|
16
18
|
'setup:Guided setup — prerequisites, init, doctor'
|
|
17
19
|
'session:Create a new tmux window for a Claude team'
|
|
@@ -34,33 +36,103 @@ _shipwright() {
|
|
|
34
36
|
'db:SQLite persistence — events, runs, developers'
|
|
35
37
|
'fix:Bulk fix — apply a fix across multiple repos'
|
|
36
38
|
'dashboard:Fleet Command — real-time dashboard'
|
|
37
|
-
|
|
38
|
-
'
|
|
39
|
+
# Agent management (also accessible via agent group)
|
|
40
|
+
'swarm:Dynamic agent swarm management'
|
|
41
|
+
'recruit:Agent recruitment & talent management'
|
|
42
|
+
'standup:Automated daily standups for AI teams'
|
|
43
|
+
'guild:Knowledge guilds & cross-team learning'
|
|
44
|
+
'oversight:Quality oversight board'
|
|
45
|
+
'pm:Autonomous PM agent for team orchestration'
|
|
46
|
+
'team-stages:Multi-agent execution with roles'
|
|
47
|
+
'scale:Dynamic agent team scaling'
|
|
48
|
+
# Quality (also accessible via quality group)
|
|
49
|
+
'code-review:Clean code & architecture analysis'
|
|
50
|
+
'security-audit:Comprehensive security auditing'
|
|
51
|
+
'testgen:Autonomous test generation & coverage'
|
|
52
|
+
'hygiene:Repository organization & cleanup'
|
|
53
|
+
'adversarial:Red-team code review & edge case finding'
|
|
54
|
+
'simulation:Multi-persona developer simulation'
|
|
55
|
+
'architecture:Living architecture model & enforcement'
|
|
56
|
+
# Observability (also accessible via observe group)
|
|
57
|
+
'vitals:Pipeline vitals — real-time health scoring'
|
|
58
|
+
'dora:DORA metrics dashboard with intelligence'
|
|
59
|
+
'retro:Sprint retrospective engine'
|
|
60
|
+
'stream:Live terminal output streaming from panes'
|
|
61
|
+
'activity:Live agent activity stream'
|
|
62
|
+
'replay:Pipeline run replay & timeline viewing'
|
|
63
|
+
# Release (also accessible via release group)
|
|
64
|
+
'changelog:Automated release notes & migration guides'
|
|
65
|
+
'release-manager:Autonomous release pipeline'
|
|
66
|
+
'review-rerun:SHA-deduped rerun comment writer'
|
|
67
|
+
# Intelligence (also accessible via intel group)
|
|
68
|
+
'intelligence:Run intelligence engine analysis'
|
|
69
|
+
'predict:Predictive risk assessment & anomaly detection'
|
|
70
|
+
'strategic:Strategic intelligence agent'
|
|
71
|
+
'optimize:Self-optimization based on DORA metrics'
|
|
72
|
+
'adaptive:Data-driven pipeline tuning'
|
|
73
|
+
'regression:Regression detection pipeline'
|
|
74
|
+
'model:Intelligent model routing & cost optimization'
|
|
75
|
+
'pipeline-composer:Dynamic pipeline composition'
|
|
76
|
+
# Integrations
|
|
77
|
+
'jira:Jira ↔ GitHub bidirectional sync'
|
|
78
|
+
'linear:Linear ↔ GitHub bidirectional sync'
|
|
39
79
|
'tracker:Issue tracker — configure Linear/Jira'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
80
|
+
'github:GitHub context — repo metadata'
|
|
81
|
+
'github-app:GitHub App management & webhook receiver'
|
|
82
|
+
'checks:GitHub checks — CI check runs'
|
|
83
|
+
'ci:CI/CD workflow generation'
|
|
84
|
+
'deploys:Deployments — deployment history'
|
|
42
85
|
'webhook:GitHub webhooks — instant processing'
|
|
43
|
-
'
|
|
86
|
+
'auth:GitHub OAuth authentication'
|
|
87
|
+
# Operations
|
|
88
|
+
'fleet-viz:Multi-repo fleet visualization'
|
|
89
|
+
'public-dashboard:Public real-time pipeline progress'
|
|
90
|
+
'mission-control:Terminal-based pipeline mission control'
|
|
44
91
|
'connect:Team connect — sync local state'
|
|
45
92
|
'remote:Remote machines — manage distributed workers'
|
|
46
93
|
'launchd:Process supervision — auto-start on boot'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
|
|
94
|
+
'heartbeat:Agent heartbeat — write/check/list'
|
|
95
|
+
'checkpoint:Checkpoints — save/restore agent state'
|
|
96
|
+
'autonomous:AI-building-AI master controller'
|
|
97
|
+
'tmux-pipeline:Spawn and manage pipelines in tmux'
|
|
98
|
+
# Issue management
|
|
99
|
+
'triage:Intelligent issue labeling & prioritization'
|
|
100
|
+
'decompose:Issue decomposer — analyze complexity'
|
|
52
101
|
'pr:PR lifecycle — auto-review, merge'
|
|
102
|
+
# Data & learning
|
|
103
|
+
'instrument:Pipeline instrumentation & feedback loops'
|
|
104
|
+
'discovery:Cross-pipeline real-time learning'
|
|
105
|
+
'feedback:Production feedback loop'
|
|
106
|
+
'eventbus:Durable event bus for components'
|
|
107
|
+
'evidence:Machine-verifiable proof for deliveries'
|
|
108
|
+
'otel:OpenTelemetry observability'
|
|
53
109
|
'context:Context engine — gather context'
|
|
110
|
+
'trace:E2E traceability (Issue → Commit → PR → Deploy)'
|
|
111
|
+
# Documentation
|
|
112
|
+
'docs:Documentation keeper — auto-sync docs'
|
|
113
|
+
'docs-agent:Auto-sync README, wiki, API docs'
|
|
114
|
+
'doc-fleet:Documentation fleet orchestrator'
|
|
115
|
+
# Setup & maintenance
|
|
116
|
+
'incident:Autonomous incident detection & response'
|
|
117
|
+
'deps:Automated dependency update management'
|
|
118
|
+
'durable:Durable workflow engine for long-running ops'
|
|
119
|
+
'tmux:tmux health — doctor, install, fix'
|
|
120
|
+
'ux:Premium UX enhancement layer'
|
|
121
|
+
'widgets:Embeddable status widgets'
|
|
122
|
+
'e2e:Test suite registry & execution'
|
|
123
|
+
# Meta
|
|
54
124
|
'help:Show help message'
|
|
55
|
-
'version:Show version'
|
|
125
|
+
'version:Show/bump/check version'
|
|
56
126
|
)
|
|
57
127
|
|
|
128
|
+
local -a agent_cmds quality_cmds observe_cmds release_cmds intel_cmds
|
|
58
129
|
local -a pipeline_cmds daemon_cmds fleet_cmds memory_cmds cost_cmds
|
|
59
130
|
local -a templates_cmds worktree_cmds tracker_cmds heartbeat_cmds
|
|
60
131
|
local -a checkpoint_cmds connect_cmds remote_cmds launchd_cmds
|
|
61
132
|
local -a dashboard_cmds github_cmds checks_cmds deploys_cmds docs_cmds
|
|
62
|
-
local -a tmux_cmds decompose_cmds pr_cmds
|
|
63
|
-
local -a
|
|
133
|
+
local -a tmux_cmds decompose_cmds pr_cmds db_cmds ci_cmds auth_cmds
|
|
134
|
+
local -a autonomous_cmds version_cmds jira_cmds linear_cmds
|
|
135
|
+
local -a eventbus_cmds evidence_cmds webhook_cmds
|
|
64
136
|
|
|
65
137
|
agent_cmds=(
|
|
66
138
|
'recruit:Agent recruitment & talent management'
|
|
@@ -74,6 +146,8 @@ _shipwright() {
|
|
|
74
146
|
'security-audit:Comprehensive security auditing'
|
|
75
147
|
'testgen:Autonomous test generation'
|
|
76
148
|
'hygiene:Repository organization & cleanup'
|
|
149
|
+
'validate:Intelligent completion audits'
|
|
150
|
+
'gate:Quality gate enforcement'
|
|
77
151
|
)
|
|
78
152
|
observe_cmds=(
|
|
79
153
|
'vitals:Pipeline vitals — real-time scoring'
|
|
@@ -89,6 +163,7 @@ _shipwright() {
|
|
|
89
163
|
'release-manager:Autonomous release pipeline'
|
|
90
164
|
'changelog:Automated release notes'
|
|
91
165
|
'deploy:Deployments — deployment history'
|
|
166
|
+
'build:Build release tarballs'
|
|
92
167
|
)
|
|
93
168
|
intel_cmds=(
|
|
94
169
|
'predict:Predictive risk assessment'
|
|
@@ -100,6 +175,9 @@ _shipwright() {
|
|
|
100
175
|
'start:Start a new pipeline run'
|
|
101
176
|
'resume:Resume from last stage'
|
|
102
177
|
'status:Show pipeline progress dashboard'
|
|
178
|
+
'abort:Cancel the running pipeline'
|
|
179
|
+
'list:Browse pipeline templates'
|
|
180
|
+
'show:Show pipeline template details'
|
|
103
181
|
'test:Run pipeline test suite'
|
|
104
182
|
)
|
|
105
183
|
daemon_cmds=(
|
|
@@ -107,23 +185,36 @@ _shipwright() {
|
|
|
107
185
|
'stop:Graceful shutdown'
|
|
108
186
|
'status:Show active pipelines and queue'
|
|
109
187
|
'metrics:DORA/DX metrics dashboard'
|
|
188
|
+
'triage:Show issue triage scores'
|
|
189
|
+
'patrol:Run proactive codebase patrol'
|
|
110
190
|
'test:Run daemon test suite'
|
|
191
|
+
'logs:View daemon logs'
|
|
192
|
+
'init:Initialize daemon config'
|
|
111
193
|
)
|
|
112
194
|
fleet_cmds=(
|
|
113
195
|
'start:Start daemons for all repos'
|
|
114
196
|
'stop:Stop all daemons'
|
|
115
197
|
'status:Show fleet-wide status'
|
|
116
198
|
'metrics:Cross-repo DORA metrics'
|
|
199
|
+
'discover:Auto-discover repos in GitHub org'
|
|
117
200
|
'test:Run fleet test suite'
|
|
118
201
|
)
|
|
119
202
|
memory_cmds=(
|
|
120
203
|
'show:Show learned patterns for this repo'
|
|
121
204
|
'search:Search across all memories'
|
|
205
|
+
'forget:Remove a memory entry'
|
|
206
|
+
'export:Export memories to file'
|
|
207
|
+
'import:Import memories from file'
|
|
122
208
|
'stats:Memory usage and coverage'
|
|
209
|
+
'test:Run memory test suite'
|
|
123
210
|
)
|
|
124
211
|
cost_cmds=(
|
|
125
212
|
'show:Show cost summary'
|
|
126
213
|
'budget:Manage daily budget'
|
|
214
|
+
'record:Record token usage'
|
|
215
|
+
'calculate:Calculate cost estimate'
|
|
216
|
+
'check-budget:Check budget before starting'
|
|
217
|
+
'remaining-budget:Check remaining daily budget'
|
|
127
218
|
)
|
|
128
219
|
templates_cmds=(
|
|
129
220
|
'list:Browse team templates'
|
|
@@ -215,6 +306,62 @@ _shipwright() {
|
|
|
215
306
|
'cleanup:Cleanup merged branches'
|
|
216
307
|
'feedback:Get PR feedback'
|
|
217
308
|
)
|
|
309
|
+
db_cmds=(
|
|
310
|
+
'init:Initialize database'
|
|
311
|
+
'health:Check database health'
|
|
312
|
+
'migrate:Run migrations'
|
|
313
|
+
'stats:Show database statistics'
|
|
314
|
+
'query:Run a query'
|
|
315
|
+
'export:Export data'
|
|
316
|
+
)
|
|
317
|
+
ci_cmds=(
|
|
318
|
+
'generate:Generate CI workflows'
|
|
319
|
+
'status:Show CI status'
|
|
320
|
+
'test:Run CI test suite'
|
|
321
|
+
)
|
|
322
|
+
auth_cmds=(
|
|
323
|
+
'login:Authenticate with GitHub'
|
|
324
|
+
'logout:Revoke authentication'
|
|
325
|
+
'status:Show auth status'
|
|
326
|
+
'test:Run auth test suite'
|
|
327
|
+
)
|
|
328
|
+
autonomous_cmds=(
|
|
329
|
+
'start:Start autonomous loop'
|
|
330
|
+
'status:Show autonomous status'
|
|
331
|
+
'test:Run autonomous test suite'
|
|
332
|
+
)
|
|
333
|
+
version_cmds=(
|
|
334
|
+
'show:Show current version'
|
|
335
|
+
'bump:Bump version everywhere'
|
|
336
|
+
'check:Verify version consistency'
|
|
337
|
+
)
|
|
338
|
+
jira_cmds=(
|
|
339
|
+
'sync:Sync Jira issues'
|
|
340
|
+
'status:Show Jira sync status'
|
|
341
|
+
'test:Run Jira test suite'
|
|
342
|
+
)
|
|
343
|
+
linear_cmds=(
|
|
344
|
+
'sync:Sync Linear issues'
|
|
345
|
+
'status:Show Linear sync status'
|
|
346
|
+
'test:Run Linear test suite'
|
|
347
|
+
)
|
|
348
|
+
eventbus_cmds=(
|
|
349
|
+
'emit:Emit an event'
|
|
350
|
+
'listen:Listen for events'
|
|
351
|
+
'status:Show bus status'
|
|
352
|
+
'test:Run eventbus test suite'
|
|
353
|
+
)
|
|
354
|
+
evidence_cmds=(
|
|
355
|
+
'capture:Capture evidence artifacts'
|
|
356
|
+
'verify:Verify evidence freshness'
|
|
357
|
+
'pre-pr:Run pre-PR evidence checks'
|
|
358
|
+
)
|
|
359
|
+
webhook_cmds=(
|
|
360
|
+
'start:Start webhook receiver'
|
|
361
|
+
'stop:Stop webhook receiver'
|
|
362
|
+
'status:Show webhook status'
|
|
363
|
+
'test:Run webhook test suite'
|
|
364
|
+
)
|
|
218
365
|
|
|
219
366
|
_arguments -C \
|
|
220
367
|
'1:command:->command' \
|
|
@@ -226,52 +373,24 @@ _shipwright() {
|
|
|
226
373
|
;;
|
|
227
374
|
args)
|
|
228
375
|
case "${words[1]}" in
|
|
229
|
-
agent)
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
;;
|
|
235
|
-
observe)
|
|
236
|
-
_describe -t observe-cmds 'observe command' observe_cmds
|
|
237
|
-
;;
|
|
238
|
-
release)
|
|
239
|
-
_describe -t release-cmds 'release command' release_cmds
|
|
240
|
-
;;
|
|
241
|
-
intel)
|
|
242
|
-
_describe -t intel-cmds 'intel command' intel_cmds
|
|
243
|
-
;;
|
|
376
|
+
agent) _describe -t agent-cmds 'agent command' agent_cmds ;;
|
|
377
|
+
quality) _describe -t quality-cmds 'quality command' quality_cmds ;;
|
|
378
|
+
observe) _describe -t observe-cmds 'observe command' observe_cmds ;;
|
|
379
|
+
release) _describe -t release-cmds 'release command' release_cmds ;;
|
|
380
|
+
intel) _describe -t intel-cmds 'intel command' intel_cmds ;;
|
|
244
381
|
pipeline)
|
|
245
382
|
_describe -t pipeline-cmds 'pipeline command' pipeline_cmds
|
|
246
383
|
_arguments '*:options:_pipeline_options'
|
|
247
384
|
;;
|
|
248
|
-
daemon)
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
cost)
|
|
258
|
-
_describe -t cost-cmds 'cost command' cost_cmds
|
|
259
|
-
;;
|
|
260
|
-
templates)
|
|
261
|
-
_describe -t templates-cmds 'templates command' templates_cmds
|
|
262
|
-
;;
|
|
263
|
-
worktree)
|
|
264
|
-
_describe -t worktree-cmds 'worktree command' worktree_cmds
|
|
265
|
-
;;
|
|
266
|
-
tracker)
|
|
267
|
-
_describe -t tracker-cmds 'tracker command' tracker_cmds
|
|
268
|
-
;;
|
|
269
|
-
heartbeat)
|
|
270
|
-
_describe -t heartbeat-cmds 'heartbeat command' heartbeat_cmds
|
|
271
|
-
;;
|
|
272
|
-
checkpoint)
|
|
273
|
-
_describe -t checkpoint-cmds 'checkpoint command' checkpoint_cmds
|
|
274
|
-
;;
|
|
385
|
+
daemon) _describe -t daemon-cmds 'daemon command' daemon_cmds ;;
|
|
386
|
+
fleet) _describe -t fleet-cmds 'fleet command' fleet_cmds ;;
|
|
387
|
+
memory) _describe -t memory-cmds 'memory command' memory_cmds ;;
|
|
388
|
+
cost) _describe -t cost-cmds 'cost command' cost_cmds ;;
|
|
389
|
+
templates) _describe -t templates-cmds 'templates command' templates_cmds ;;
|
|
390
|
+
worktree) _describe -t worktree-cmds 'worktree command' worktree_cmds ;;
|
|
391
|
+
tracker) _describe -t tracker-cmds 'tracker command' tracker_cmds ;;
|
|
392
|
+
heartbeat) _describe -t heartbeat-cmds 'heartbeat command' heartbeat_cmds ;;
|
|
393
|
+
checkpoint) _describe -t checkpoint-cmds 'checkpoint command' checkpoint_cmds ;;
|
|
275
394
|
connect)
|
|
276
395
|
_describe -t connect-cmds 'connect command' connect_cmds
|
|
277
396
|
_arguments '--token[Invite token]:token'
|
|
@@ -280,33 +399,25 @@ _shipwright() {
|
|
|
280
399
|
_describe -t remote-cmds 'remote command' remote_cmds
|
|
281
400
|
_arguments '--host[Hostname]:host' '--port[SSH port]:port' '--key[SSH key]:file' '--user[SSH user]:user'
|
|
282
401
|
;;
|
|
283
|
-
launchd)
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
_describe -t tmux-cmds 'tmux command' tmux_cmds
|
|
303
|
-
;;
|
|
304
|
-
decompose)
|
|
305
|
-
_describe -t decompose-cmds 'decompose command' decompose_cmds
|
|
306
|
-
;;
|
|
307
|
-
pr)
|
|
308
|
-
_describe -t pr-cmds 'pr command' pr_cmds
|
|
309
|
-
;;
|
|
402
|
+
launchd) _describe -t launchd-cmds 'launchd command' launchd_cmds ;;
|
|
403
|
+
dashboard) _describe -t dashboard-cmds 'dashboard command' dashboard_cmds ;;
|
|
404
|
+
github) _describe -t github-cmds 'github command' github_cmds ;;
|
|
405
|
+
checks) _describe -t checks-cmds 'checks command' checks_cmds ;;
|
|
406
|
+
deploys) _describe -t deploys-cmds 'deploys command' deploys_cmds ;;
|
|
407
|
+
docs) _describe -t docs-cmds 'docs command' docs_cmds ;;
|
|
408
|
+
tmux) _describe -t tmux-cmds 'tmux command' tmux_cmds ;;
|
|
409
|
+
decompose) _describe -t decompose-cmds 'decompose command' decompose_cmds ;;
|
|
410
|
+
pr) _describe -t pr-cmds 'pr command' pr_cmds ;;
|
|
411
|
+
db) _describe -t db-cmds 'db command' db_cmds ;;
|
|
412
|
+
ci) _describe -t ci-cmds 'ci command' ci_cmds ;;
|
|
413
|
+
auth) _describe -t auth-cmds 'auth command' auth_cmds ;;
|
|
414
|
+
autonomous) _describe -t autonomous-cmds 'autonomous command' autonomous_cmds ;;
|
|
415
|
+
version) _describe -t version-cmds 'version command' version_cmds ;;
|
|
416
|
+
jira) _describe -t jira-cmds 'jira command' jira_cmds ;;
|
|
417
|
+
linear) _describe -t linear-cmds 'linear command' linear_cmds ;;
|
|
418
|
+
eventbus) _describe -t eventbus-cmds 'eventbus command' eventbus_cmds ;;
|
|
419
|
+
evidence) _describe -t evidence-cmds 'evidence command' evidence_cmds ;;
|
|
420
|
+
webhook) _describe -t webhook-cmds 'webhook command' webhook_cmds ;;
|
|
310
421
|
prep)
|
|
311
422
|
_arguments \
|
|
312
423
|
'--check[Audit existing prep quality]' \
|
|
@@ -319,20 +430,32 @@ _shipwright() {
|
|
|
319
430
|
'--repo[Directory path]:directory:_directories' \
|
|
320
431
|
'--local[Local-only mode (no GitHub)]' \
|
|
321
432
|
'--test-cmd[Test command]:command:' \
|
|
433
|
+
'--fast-test-cmd[Fast subset test]:command:' \
|
|
434
|
+
'--fast-test-interval[Full test every N iterations]:count:' \
|
|
322
435
|
'--max-iterations[Max iterations]:count:' \
|
|
323
436
|
'--model[Model to use]:model:(opus sonnet haiku)' \
|
|
324
437
|
'--agents[Number of agents]:count:' \
|
|
438
|
+
'--roles[Role per agent]:roles:' \
|
|
439
|
+
'--worktree[Use git worktrees for isolation]' \
|
|
325
440
|
'--audit[Self-reflection each iteration]' \
|
|
326
441
|
'--audit-agent[Separate auditor]' \
|
|
327
442
|
'--quality-gates[Quality checks]' \
|
|
328
443
|
'--definition-of-done[Checklist]:file:_files' \
|
|
329
444
|
'--resume[Resume interrupted loop]' \
|
|
330
|
-
'--
|
|
445
|
+
'--max-restarts[Max session restarts]:count:' \
|
|
446
|
+
'--max-turns[Max API turns per session]:count:' \
|
|
447
|
+
'--skip-permissions[Skip prompts]' \
|
|
448
|
+
'--verbose[Show full Claude output]' \
|
|
449
|
+
'--no-auto-extend[Disable auto-extension]' \
|
|
450
|
+
'--extension-size[Additional iterations per extension]:count:' \
|
|
451
|
+
'--max-extensions[Max auto-extensions]:count:'
|
|
331
452
|
;;
|
|
332
453
|
fix)
|
|
333
454
|
_arguments \
|
|
334
455
|
'1:goal:' \
|
|
335
|
-
'--repos[Repository paths]:repos:'
|
|
456
|
+
'--repos[Repository paths]:repos:' \
|
|
457
|
+
'--worktree[Use git worktrees]' \
|
|
458
|
+
'--test-cmd[Test command]:command:'
|
|
336
459
|
;;
|
|
337
460
|
logs)
|
|
338
461
|
_arguments \
|
|
@@ -342,16 +465,30 @@ _shipwright() {
|
|
|
342
465
|
'--grep[Search pattern]:pattern:'
|
|
343
466
|
;;
|
|
344
467
|
cleanup)
|
|
345
|
-
_arguments
|
|
346
|
-
'--force[Kill orphaned sessions]'
|
|
468
|
+
_arguments '--force[Kill orphaned sessions]'
|
|
347
469
|
;;
|
|
348
470
|
upgrade)
|
|
349
|
-
_arguments
|
|
350
|
-
'--apply[Apply updates]'
|
|
471
|
+
_arguments '--apply[Apply updates]'
|
|
351
472
|
;;
|
|
352
473
|
reaper)
|
|
474
|
+
_arguments '--watch[Continuous watch mode]'
|
|
475
|
+
;;
|
|
476
|
+
status)
|
|
477
|
+
_arguments '--json[JSON output]'
|
|
478
|
+
;;
|
|
479
|
+
doctor)
|
|
480
|
+
_arguments '--json[JSON output]'
|
|
481
|
+
;;
|
|
482
|
+
session)
|
|
353
483
|
_arguments \
|
|
354
|
-
'
|
|
484
|
+
'1:team name:' \
|
|
485
|
+
'--template[Team template]:template:' \
|
|
486
|
+
'-t[Team template]:template:' \
|
|
487
|
+
'--agents[Number of agents]:count:' \
|
|
488
|
+
'--roles[Agent roles]:roles:'
|
|
489
|
+
;;
|
|
490
|
+
help)
|
|
491
|
+
_arguments '--all[Show all commands]' '-a[Show all commands]'
|
|
355
492
|
;;
|
|
356
493
|
esac
|
|
357
494
|
;;
|
|
@@ -365,8 +502,25 @@ _pipeline_options() {
|
|
|
365
502
|
'--repo[Directory path]:directory:_directories' \
|
|
366
503
|
'--local[Local-only mode (no GitHub)]' \
|
|
367
504
|
'--worktree[Use isolated worktree]' \
|
|
368
|
-
'--template[Pipeline template]:
|
|
369
|
-
'--skip-gates[Auto-proceed all gates]'
|
|
505
|
+
'--template[Pipeline template]:template:(fast standard full hotfix autonomous enterprise cost-aware deployed)' \
|
|
506
|
+
'--skip-gates[Auto-proceed all gates]' \
|
|
507
|
+
'--test-cmd[Test command]:command:' \
|
|
508
|
+
'--fast-test-cmd[Fast test command]:command:' \
|
|
509
|
+
'--model[Model to use]:model:(opus sonnet haiku)' \
|
|
510
|
+
'--agents[Number of agents]:count:' \
|
|
511
|
+
'--base[Base branch for PR]:branch:' \
|
|
512
|
+
'--reviewers[PR reviewers]:reviewers:' \
|
|
513
|
+
'--labels[PR labels]:labels:' \
|
|
514
|
+
'--no-github[Disable GitHub integration]' \
|
|
515
|
+
'--no-github-label[Do not modify issue labels]' \
|
|
516
|
+
'--ci[CI mode (non-interactive)]' \
|
|
517
|
+
'--ignore-budget[Skip budget enforcement]' \
|
|
518
|
+
'--dry-run[Show what would happen]' \
|
|
519
|
+
'--slack-webhook[Slack webhook URL]:url:' \
|
|
520
|
+
'--self-heal[Build retry cycles]:count:' \
|
|
521
|
+
'--max-iterations[Max build loop iterations]:count:' \
|
|
522
|
+
'--max-restarts[Max session restarts]:count:' \
|
|
523
|
+
'--completed-stages[Skip these stages]:stages:'
|
|
370
524
|
}
|
|
371
525
|
|
|
372
526
|
_shipwright "$@"
|