shipwright-cli 2.4.0 → 3.1.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 +16 -11
- package/completions/_shipwright +248 -94
- package/completions/shipwright.bash +68 -19
- package/completions/shipwright.fish +310 -42
- package/config/decision-tiers.json +55 -0
- package/config/defaults.json +111 -0
- package/config/event-schema.json +218 -0
- package/config/policy.json +21 -18
- package/dashboard/coverage/coverage-summary.json +14 -0
- package/dashboard/public/index.html +1 -1
- package/dashboard/server.ts +306 -17
- package/dashboard/src/components/charts/bar.test.ts +79 -0
- package/dashboard/src/components/charts/donut.test.ts +68 -0
- package/dashboard/src/components/charts/pipeline-rail.test.ts +117 -0
- package/dashboard/src/components/charts/sparkline.test.ts +125 -0
- package/dashboard/src/core/api.test.ts +309 -0
- package/dashboard/src/core/helpers.test.ts +301 -0
- package/dashboard/src/core/router.test.ts +307 -0
- package/dashboard/src/core/router.ts +7 -0
- package/dashboard/src/core/sse.test.ts +144 -0
- package/dashboard/src/views/metrics.test.ts +186 -0
- package/dashboard/src/views/overview.test.ts +173 -0
- package/dashboard/src/views/pipelines.test.ts +183 -0
- package/dashboard/src/views/team.test.ts +253 -0
- package/dashboard/vitest.config.ts +14 -5
- package/docs/TIPS.md +1 -1
- package/docs/patterns/README.md +1 -1
- package/package.json +7 -9
- package/scripts/adapters/docker-deploy.sh +1 -1
- package/scripts/adapters/tmux-adapter.sh +11 -1
- package/scripts/adapters/wezterm-adapter.sh +1 -1
- package/scripts/check-version-consistency.sh +1 -1
- package/scripts/lib/architecture.sh +127 -0
- package/scripts/lib/bootstrap.sh +75 -0
- package/scripts/lib/compat.sh +89 -6
- package/scripts/lib/config.sh +91 -0
- package/scripts/lib/daemon-adaptive.sh +3 -3
- package/scripts/lib/daemon-dispatch.sh +63 -17
- package/scripts/lib/daemon-failure.sh +0 -0
- package/scripts/lib/daemon-health.sh +1 -1
- package/scripts/lib/daemon-patrol.sh +64 -17
- package/scripts/lib/daemon-poll.sh +54 -25
- package/scripts/lib/daemon-state.sh +125 -23
- package/scripts/lib/daemon-triage.sh +31 -9
- 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 +63 -0
- package/scripts/lib/helpers.sh +29 -6
- package/scripts/lib/pipeline-detection.sh +2 -2
- package/scripts/lib/pipeline-github.sh +9 -9
- package/scripts/lib/pipeline-intelligence.sh +105 -38
- package/scripts/lib/pipeline-quality-checks.sh +17 -16
- package/scripts/lib/pipeline-quality.sh +1 -1
- package/scripts/lib/pipeline-stages.sh +440 -59
- package/scripts/lib/pipeline-state.sh +54 -4
- package/scripts/lib/policy.sh +0 -0
- package/scripts/lib/test-helpers.sh +247 -0
- package/scripts/postinstall.mjs +78 -12
- package/scripts/signals/example-collector.sh +36 -0
- package/scripts/sw +17 -7
- package/scripts/sw-activity.sh +1 -11
- package/scripts/sw-adaptive.sh +109 -85
- package/scripts/sw-adversarial.sh +4 -14
- package/scripts/sw-architecture-enforcer.sh +1 -11
- package/scripts/sw-auth.sh +8 -17
- package/scripts/sw-autonomous.sh +111 -49
- package/scripts/sw-changelog.sh +1 -11
- package/scripts/sw-checkpoint.sh +144 -20
- package/scripts/sw-ci.sh +2 -12
- package/scripts/sw-cleanup.sh +13 -17
- package/scripts/sw-code-review.sh +16 -36
- package/scripts/sw-connect.sh +5 -12
- package/scripts/sw-context.sh +9 -26
- package/scripts/sw-cost.sh +17 -18
- package/scripts/sw-daemon.sh +76 -71
- package/scripts/sw-dashboard.sh +57 -17
- package/scripts/sw-db.sh +524 -26
- package/scripts/sw-decide.sh +685 -0
- package/scripts/sw-decompose.sh +1 -11
- package/scripts/sw-deps.sh +15 -25
- package/scripts/sw-developer-simulation.sh +1 -11
- package/scripts/sw-discovery.sh +138 -30
- package/scripts/sw-doc-fleet.sh +7 -17
- package/scripts/sw-docs-agent.sh +6 -16
- package/scripts/sw-docs.sh +4 -12
- package/scripts/sw-doctor.sh +134 -43
- package/scripts/sw-dora.sh +11 -19
- package/scripts/sw-durable.sh +35 -52
- package/scripts/sw-e2e-orchestrator.sh +11 -27
- package/scripts/sw-eventbus.sh +115 -115
- package/scripts/sw-evidence.sh +114 -30
- package/scripts/sw-feedback.sh +3 -13
- package/scripts/sw-fix.sh +2 -20
- package/scripts/sw-fleet-discover.sh +1 -11
- package/scripts/sw-fleet-viz.sh +10 -18
- package/scripts/sw-fleet.sh +13 -17
- package/scripts/sw-github-app.sh +6 -16
- package/scripts/sw-github-checks.sh +1 -11
- package/scripts/sw-github-deploy.sh +1 -11
- package/scripts/sw-github-graphql.sh +2 -12
- package/scripts/sw-guild.sh +1 -11
- package/scripts/sw-heartbeat.sh +49 -12
- package/scripts/sw-hygiene.sh +45 -43
- package/scripts/sw-incident.sh +48 -74
- package/scripts/sw-init.sh +35 -37
- package/scripts/sw-instrument.sh +1 -11
- package/scripts/sw-intelligence.sh +368 -53
- package/scripts/sw-jira.sh +5 -14
- package/scripts/sw-launchd.sh +2 -12
- package/scripts/sw-linear.sh +8 -17
- package/scripts/sw-logs.sh +4 -12
- package/scripts/sw-loop.sh +905 -104
- package/scripts/sw-memory.sh +263 -20
- package/scripts/sw-mission-control.sh +2 -12
- package/scripts/sw-model-router.sh +73 -34
- package/scripts/sw-otel.sh +15 -23
- package/scripts/sw-oversight.sh +1 -11
- package/scripts/sw-patrol-meta.sh +5 -11
- package/scripts/sw-pipeline-composer.sh +7 -17
- package/scripts/sw-pipeline-vitals.sh +1 -11
- package/scripts/sw-pipeline.sh +550 -122
- package/scripts/sw-pm.sh +2 -12
- package/scripts/sw-pr-lifecycle.sh +33 -28
- package/scripts/sw-predictive.sh +16 -22
- package/scripts/sw-prep.sh +6 -16
- package/scripts/sw-ps.sh +1 -11
- package/scripts/sw-public-dashboard.sh +2 -12
- package/scripts/sw-quality.sh +85 -14
- package/scripts/sw-reaper.sh +1 -11
- package/scripts/sw-recruit.sh +15 -25
- package/scripts/sw-regression.sh +11 -21
- package/scripts/sw-release-manager.sh +19 -28
- package/scripts/sw-release.sh +8 -16
- package/scripts/sw-remote.sh +1 -11
- package/scripts/sw-replay.sh +48 -44
- package/scripts/sw-retro.sh +70 -92
- package/scripts/sw-review-rerun.sh +1 -1
- package/scripts/sw-scale.sh +174 -41
- package/scripts/sw-security-audit.sh +12 -22
- package/scripts/sw-self-optimize.sh +239 -23
- package/scripts/sw-session.sh +5 -15
- package/scripts/sw-setup.sh +8 -18
- package/scripts/sw-standup.sh +5 -15
- package/scripts/sw-status.sh +32 -23
- package/scripts/sw-strategic.sh +129 -13
- package/scripts/sw-stream.sh +1 -11
- package/scripts/sw-swarm.sh +76 -36
- package/scripts/sw-team-stages.sh +10 -20
- package/scripts/sw-templates.sh +4 -14
- package/scripts/sw-testgen.sh +3 -13
- package/scripts/sw-tmux-pipeline.sh +1 -19
- package/scripts/sw-tmux-role-color.sh +0 -10
- package/scripts/sw-tmux-status.sh +3 -11
- package/scripts/sw-tmux.sh +2 -20
- package/scripts/sw-trace.sh +1 -19
- package/scripts/sw-tracker-github.sh +0 -10
- package/scripts/sw-tracker-jira.sh +1 -11
- package/scripts/sw-tracker-linear.sh +1 -11
- package/scripts/sw-tracker.sh +7 -24
- package/scripts/sw-triage.sh +29 -39
- package/scripts/sw-upgrade.sh +5 -23
- package/scripts/sw-ux.sh +1 -19
- package/scripts/sw-webhook.sh +18 -32
- package/scripts/sw-widgets.sh +3 -21
- package/scripts/sw-worktree.sh +11 -27
- package/scripts/update-homebrew-sha.sh +73 -0
- package/templates/pipelines/tdd.json +72 -0
- package/scripts/sw-pipeline.sh.mock +0 -7
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shipwright.dev/schemas/decision-tiers-v1.json",
|
|
3
|
+
"description": "Autonomy tiers for Shipwright decision engine. Controls which actions the engine takes automatically vs proposing for human review.",
|
|
4
|
+
"version": "1",
|
|
5
|
+
"tiers": {
|
|
6
|
+
"auto": {
|
|
7
|
+
"description": "Create issue and auto-spawn pipeline — no human approval needed",
|
|
8
|
+
"labels": ["shipwright", "shipwright:auto", "ready-to-build"],
|
|
9
|
+
"pipeline_template": "fast"
|
|
10
|
+
},
|
|
11
|
+
"propose": {
|
|
12
|
+
"description": "Create issue with proposed label — human approves before build",
|
|
13
|
+
"labels": ["shipwright", "shipwright:proposed"],
|
|
14
|
+
"pipeline_template": "standard"
|
|
15
|
+
},
|
|
16
|
+
"draft": {
|
|
17
|
+
"description": "Write to decision-drafts directory only — human reviews offline",
|
|
18
|
+
"labels": [],
|
|
19
|
+
"pipeline_template": null
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"category_rules": {
|
|
23
|
+
"deps_patch": { "tier": "auto", "risk_ceiling": 30 },
|
|
24
|
+
"deps_minor": { "tier": "auto", "risk_ceiling": 40 },
|
|
25
|
+
"deps_major": { "tier": "propose", "risk_ceiling": 60 },
|
|
26
|
+
"security_patch": { "tier": "auto", "risk_ceiling": 50 },
|
|
27
|
+
"security_critical": { "tier": "propose", "risk_ceiling": 80 },
|
|
28
|
+
"test_coverage": { "tier": "auto", "risk_ceiling": 30 },
|
|
29
|
+
"doc_sync": { "tier": "auto", "risk_ceiling": 20 },
|
|
30
|
+
"dead_code": { "tier": "auto", "risk_ceiling": 35 },
|
|
31
|
+
"refactor_hotspot": { "tier": "propose", "risk_ceiling": 60 },
|
|
32
|
+
"architecture_drift": { "tier": "propose", "risk_ceiling": 70 },
|
|
33
|
+
"performance_regression": { "tier": "propose", "risk_ceiling": 60 },
|
|
34
|
+
"recurring_failure": { "tier": "propose", "risk_ceiling": 50 },
|
|
35
|
+
"dora_regression": { "tier": "propose", "risk_ceiling": 55 },
|
|
36
|
+
"new_feature": { "tier": "draft", "risk_ceiling": 90 },
|
|
37
|
+
"breaking_change": { "tier": "draft", "risk_ceiling": 95 },
|
|
38
|
+
"business_logic": { "tier": "draft", "risk_ceiling": 90 },
|
|
39
|
+
"api_change": { "tier": "draft", "risk_ceiling": 85 },
|
|
40
|
+
"data_model_change": { "tier": "draft", "risk_ceiling": 90 }
|
|
41
|
+
},
|
|
42
|
+
"limits": {
|
|
43
|
+
"max_issues_per_day": 15,
|
|
44
|
+
"max_cost_per_day_usd": 25,
|
|
45
|
+
"cooldown_seconds": 300,
|
|
46
|
+
"halt_after_consecutive_failures": 3
|
|
47
|
+
},
|
|
48
|
+
"scoring_weights": {
|
|
49
|
+
"impact": 0.3,
|
|
50
|
+
"urgency": 0.25,
|
|
51
|
+
"effort": 0.2,
|
|
52
|
+
"confidence": 0.15,
|
|
53
|
+
"risk": 0.1
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shipwright.dev/schemas/defaults-v1.json",
|
|
3
|
+
"description": "Default values for all Shipwright tunables. Override via daemon-config.json, config/policy.json, or SHIPWRIGHT_* env vars.",
|
|
4
|
+
"version": "1",
|
|
5
|
+
"network": {
|
|
6
|
+
"connect_timeout": 10,
|
|
7
|
+
"max_time": 60,
|
|
8
|
+
"gh_timeout": 30,
|
|
9
|
+
"retry_count": 3,
|
|
10
|
+
"retry_delay": 2
|
|
11
|
+
},
|
|
12
|
+
"daemon": {
|
|
13
|
+
"poll_interval": 30,
|
|
14
|
+
"max_parallel": 4,
|
|
15
|
+
"watch_label": "shipwright",
|
|
16
|
+
"issue_limit": 100,
|
|
17
|
+
"on_success_remove_label": true,
|
|
18
|
+
"health_check_interval": 60,
|
|
19
|
+
"stale_job_timeout_hours": 2,
|
|
20
|
+
"branch_pattern": "shipwright/issue-{issue}",
|
|
21
|
+
"worktree_dir": ".worktrees"
|
|
22
|
+
},
|
|
23
|
+
"pipeline": {
|
|
24
|
+
"max_iterations": 20,
|
|
25
|
+
"build_test_retries": 3,
|
|
26
|
+
"claude_timeout": 1800,
|
|
27
|
+
"heartbeat_interval": 30,
|
|
28
|
+
"branch_pattern": "shipwright/issue-{issue}",
|
|
29
|
+
"stage_order": [
|
|
30
|
+
"intake",
|
|
31
|
+
"plan",
|
|
32
|
+
"design",
|
|
33
|
+
"build",
|
|
34
|
+
"test",
|
|
35
|
+
"review",
|
|
36
|
+
"compound_quality",
|
|
37
|
+
"pr",
|
|
38
|
+
"merge",
|
|
39
|
+
"deploy",
|
|
40
|
+
"validate",
|
|
41
|
+
"monitor"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"loop": {
|
|
45
|
+
"claude_timeout": 1800,
|
|
46
|
+
"sleep_between_iterations": 2,
|
|
47
|
+
"max_restarts": 0,
|
|
48
|
+
"fast_test_interval": 5,
|
|
49
|
+
"convergence_threshold": 3,
|
|
50
|
+
"multi_agent_sleep": 5
|
|
51
|
+
},
|
|
52
|
+
"dashboard": {
|
|
53
|
+
"port": 8767,
|
|
54
|
+
"poll_interval_ms": 2000,
|
|
55
|
+
"ws_heartbeat_ms": 30000
|
|
56
|
+
},
|
|
57
|
+
"webhook": {
|
|
58
|
+
"port": 8765,
|
|
59
|
+
"secret_length": 32,
|
|
60
|
+
"max_payload_bytes": 1048576
|
|
61
|
+
},
|
|
62
|
+
"urls": {
|
|
63
|
+
"linear_api": "https://api.linear.app/graphql",
|
|
64
|
+
"github_api": "https://api.github.com",
|
|
65
|
+
"github_device_code": "https://github.com/login/device/code",
|
|
66
|
+
"github_device_login": "https://github.com/login/device",
|
|
67
|
+
"otel_endpoint": "http://localhost:4318",
|
|
68
|
+
"tpm_repo": "https://github.com/tmux-plugins/tpm",
|
|
69
|
+
"bun_install": "https://bun.sh/install"
|
|
70
|
+
},
|
|
71
|
+
"intelligence": {
|
|
72
|
+
"cache_ttl": 3600,
|
|
73
|
+
"complexity_bands": { "low": 3, "medium": 6, "high": 10 },
|
|
74
|
+
"miss_rate_high": 30,
|
|
75
|
+
"miss_rate_low": 5,
|
|
76
|
+
"anomaly_threshold": 3.0,
|
|
77
|
+
"ab_test_ratio": 0.2,
|
|
78
|
+
"claude_timeout": 60
|
|
79
|
+
},
|
|
80
|
+
"quality": {
|
|
81
|
+
"gate_score_threshold": 70,
|
|
82
|
+
"secret_threshold": 3,
|
|
83
|
+
"min_file_count": 10,
|
|
84
|
+
"score_weight_per_file": 25,
|
|
85
|
+
"pass_rate_threshold": 5.0
|
|
86
|
+
},
|
|
87
|
+
"cleanup": {
|
|
88
|
+
"artifact_age_days": 7,
|
|
89
|
+
"heartbeat_stale_seconds": 300,
|
|
90
|
+
"checkpoint_max_count": 10
|
|
91
|
+
},
|
|
92
|
+
"labels": {
|
|
93
|
+
"watch": "shipwright",
|
|
94
|
+
"ready_to_build": "ready-to-build",
|
|
95
|
+
"hotfix": "hotfix",
|
|
96
|
+
"claimed_prefix": "claimed:",
|
|
97
|
+
"incident": ["hotfix", "shipwright"],
|
|
98
|
+
"incident_labels": "hotfix,shipwright",
|
|
99
|
+
"harness_gap": ["harness-gap", "shipwright"],
|
|
100
|
+
"harness_gap_labels": "harness-gap,shipwright"
|
|
101
|
+
},
|
|
102
|
+
"limits": {
|
|
103
|
+
"triage_issues": 100,
|
|
104
|
+
"triage_unlabeled": 50,
|
|
105
|
+
"strategic_closed": 30,
|
|
106
|
+
"dora_days": 30,
|
|
107
|
+
"log_tail_lines": 100,
|
|
108
|
+
"function_scan_limit": 0,
|
|
109
|
+
"dependency_scan_limit": 0
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shipwright.dev/schemas/events-v1.json",
|
|
3
|
+
"description": "Known Shipwright event types and their expected fields",
|
|
4
|
+
"version": "1",
|
|
5
|
+
"event_types": {
|
|
6
|
+
"pipeline.started": {
|
|
7
|
+
"required": ["job_id"],
|
|
8
|
+
"optional": ["issue", "goal", "template"]
|
|
9
|
+
},
|
|
10
|
+
"pipeline.completed": {
|
|
11
|
+
"required": ["job_id"],
|
|
12
|
+
"optional": ["duration_s", "result"]
|
|
13
|
+
},
|
|
14
|
+
"pipeline.failed": {
|
|
15
|
+
"required": ["job_id"],
|
|
16
|
+
"optional": ["error", "stage"]
|
|
17
|
+
},
|
|
18
|
+
"stage.started": { "required": ["stage"], "optional": ["issue", "job_id"] },
|
|
19
|
+
"stage.completed": {
|
|
20
|
+
"required": ["stage"],
|
|
21
|
+
"optional": ["issue", "job_id", "duration_s", "result"]
|
|
22
|
+
},
|
|
23
|
+
"stage.failed": {
|
|
24
|
+
"required": ["stage"],
|
|
25
|
+
"optional": ["issue", "job_id", "error", "error_class", "duration_s"]
|
|
26
|
+
},
|
|
27
|
+
"daemon.started": { "required": [], "optional": ["pid", "mode"] },
|
|
28
|
+
"daemon.stopped": { "required": [], "optional": ["reason"] },
|
|
29
|
+
"daemon.claimed": { "required": ["issue"], "optional": ["repo", "title"] },
|
|
30
|
+
"daemon.released": { "required": ["issue"], "optional": ["reason"] },
|
|
31
|
+
"daemon.spawn": {
|
|
32
|
+
"required": ["issue"],
|
|
33
|
+
"optional": ["template", "worktree"]
|
|
34
|
+
},
|
|
35
|
+
"daemon.complete": {
|
|
36
|
+
"required": ["issue"],
|
|
37
|
+
"optional": ["result", "duration_s"]
|
|
38
|
+
},
|
|
39
|
+
"daemon.failure": {
|
|
40
|
+
"required": ["issue"],
|
|
41
|
+
"optional": ["error", "retry_count"]
|
|
42
|
+
},
|
|
43
|
+
"loop.started": { "required": [], "optional": ["goal", "test_cmd"] },
|
|
44
|
+
"loop.iteration": {
|
|
45
|
+
"required": ["iteration"],
|
|
46
|
+
"optional": ["test_result"]
|
|
47
|
+
},
|
|
48
|
+
"loop.completed": { "required": [], "optional": ["iterations", "result"] },
|
|
49
|
+
"cost.recorded": {
|
|
50
|
+
"required": ["cost_usd"],
|
|
51
|
+
"optional": ["model", "tokens_in", "tokens_out", "stage"]
|
|
52
|
+
},
|
|
53
|
+
"intelligence.analysis": {
|
|
54
|
+
"required": ["analysis_type"],
|
|
55
|
+
"optional": ["result", "cache_hit"]
|
|
56
|
+
},
|
|
57
|
+
"memory.captured": {
|
|
58
|
+
"required": ["memory_type"],
|
|
59
|
+
"optional": ["pattern", "repo"]
|
|
60
|
+
},
|
|
61
|
+
"quality.gate": {
|
|
62
|
+
"required": ["gate_name", "passed"],
|
|
63
|
+
"optional": ["score", "details"]
|
|
64
|
+
},
|
|
65
|
+
"pr.created": {
|
|
66
|
+
"required": ["pr_number"],
|
|
67
|
+
"optional": ["title", "branch"]
|
|
68
|
+
},
|
|
69
|
+
"deploy.started": { "required": ["environment"], "optional": ["version"] },
|
|
70
|
+
"deploy.completed": {
|
|
71
|
+
"required": ["environment"],
|
|
72
|
+
"optional": ["version", "duration_s"]
|
|
73
|
+
},
|
|
74
|
+
"heartbeat.write": {
|
|
75
|
+
"required": ["job_id"],
|
|
76
|
+
"optional": ["stage", "iteration"]
|
|
77
|
+
},
|
|
78
|
+
"session.started": {
|
|
79
|
+
"required": ["session_id"],
|
|
80
|
+
"optional": ["template", "agents"]
|
|
81
|
+
},
|
|
82
|
+
"session.ended": { "required": ["session_id"], "optional": ["duration_s"] },
|
|
83
|
+
"memory.fix_outcome": {
|
|
84
|
+
"required": ["pattern"],
|
|
85
|
+
"optional": ["outcome", "repo"]
|
|
86
|
+
},
|
|
87
|
+
"memory.global_aggregated": {
|
|
88
|
+
"required": [],
|
|
89
|
+
"optional": ["repo", "patterns_promoted"]
|
|
90
|
+
},
|
|
91
|
+
"memory.not_available": {
|
|
92
|
+
"required": ["path"],
|
|
93
|
+
"optional": ["action"]
|
|
94
|
+
},
|
|
95
|
+
"memory.export": {
|
|
96
|
+
"required": [],
|
|
97
|
+
"optional": ["repo"]
|
|
98
|
+
},
|
|
99
|
+
"cost.budget_unconfigured": {
|
|
100
|
+
"required": ["status"],
|
|
101
|
+
"optional": []
|
|
102
|
+
},
|
|
103
|
+
"scale.recommendation": {
|
|
104
|
+
"required": [],
|
|
105
|
+
"optional": ["iterations", "coverage", "modules", "has_recommendations"]
|
|
106
|
+
},
|
|
107
|
+
"pr.skipped": {
|
|
108
|
+
"required": ["issue"],
|
|
109
|
+
"optional": ["reason"]
|
|
110
|
+
},
|
|
111
|
+
"pr.rejected": {
|
|
112
|
+
"required": ["issue"],
|
|
113
|
+
"optional": ["reason"]
|
|
114
|
+
},
|
|
115
|
+
"intelligence.compose": {
|
|
116
|
+
"required": [],
|
|
117
|
+
"optional": ["stage_count", "complexity"]
|
|
118
|
+
},
|
|
119
|
+
"intelligence.synthesize": {
|
|
120
|
+
"required": [],
|
|
121
|
+
"optional": ["fix_count", "cause_count"]
|
|
122
|
+
},
|
|
123
|
+
"simulation.complete": {
|
|
124
|
+
"required": [],
|
|
125
|
+
"optional": ["issue", "concerns"]
|
|
126
|
+
},
|
|
127
|
+
"daemon.hard_limit": {
|
|
128
|
+
"required": ["issue"],
|
|
129
|
+
"optional": ["elapsed_s", "limit_s", "pid"]
|
|
130
|
+
},
|
|
131
|
+
"daemon.stalled": {
|
|
132
|
+
"required": ["issue"],
|
|
133
|
+
"optional": ["no_progress", "elapsed_s", "pid"]
|
|
134
|
+
},
|
|
135
|
+
"daemon.nudge": {
|
|
136
|
+
"required": ["issue"],
|
|
137
|
+
"optional": ["no_progress", "stage", "elapsed_s"]
|
|
138
|
+
},
|
|
139
|
+
"daemon.stuck_kill": {
|
|
140
|
+
"required": ["issue"],
|
|
141
|
+
"optional": [
|
|
142
|
+
"no_progress",
|
|
143
|
+
"repeated_errors",
|
|
144
|
+
"stage",
|
|
145
|
+
"elapsed_s",
|
|
146
|
+
"pid",
|
|
147
|
+
"reason"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
"convergence.tests_passed": {
|
|
151
|
+
"required": [],
|
|
152
|
+
"optional": ["issue", "cycle"]
|
|
153
|
+
},
|
|
154
|
+
"vitals.snapshot": {
|
|
155
|
+
"required": [],
|
|
156
|
+
"optional": [
|
|
157
|
+
"issue",
|
|
158
|
+
"stage",
|
|
159
|
+
"iteration",
|
|
160
|
+
"diff_count",
|
|
161
|
+
"files_changed",
|
|
162
|
+
"error"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"retry.classified": {
|
|
166
|
+
"required": ["stage"],
|
|
167
|
+
"optional": ["issue", "attempt", "error_class"]
|
|
168
|
+
},
|
|
169
|
+
"retry.escalated": {
|
|
170
|
+
"required": ["stage"],
|
|
171
|
+
"optional": ["issue", "reason"]
|
|
172
|
+
},
|
|
173
|
+
"retry.skipped": {
|
|
174
|
+
"required": ["stage"],
|
|
175
|
+
"optional": ["issue", "reason"]
|
|
176
|
+
},
|
|
177
|
+
"pipeline.anomaly": {
|
|
178
|
+
"required": ["stage"],
|
|
179
|
+
"optional": ["metric", "value", "severity"]
|
|
180
|
+
},
|
|
181
|
+
"pipeline.cost": {
|
|
182
|
+
"required": [],
|
|
183
|
+
"optional": ["issue", "stage", "cost_usd", "model"]
|
|
184
|
+
},
|
|
185
|
+
"pipeline.cleanup": {
|
|
186
|
+
"required": [],
|
|
187
|
+
"optional": ["issue", "reason"]
|
|
188
|
+
},
|
|
189
|
+
"pipeline.comment_failed": {
|
|
190
|
+
"required": [],
|
|
191
|
+
"optional": ["issue"]
|
|
192
|
+
},
|
|
193
|
+
"loop.iteration_start": {
|
|
194
|
+
"required": ["iteration"],
|
|
195
|
+
"optional": ["issue", "goal"]
|
|
196
|
+
},
|
|
197
|
+
"loop.iteration_complete": {
|
|
198
|
+
"required": ["iteration"],
|
|
199
|
+
"optional": ["issue", "test_result", "duration_s"]
|
|
200
|
+
},
|
|
201
|
+
"loop.restart": {
|
|
202
|
+
"required": [],
|
|
203
|
+
"optional": ["issue", "restart_count", "reason"]
|
|
204
|
+
},
|
|
205
|
+
"loop.stuckness_detected": {
|
|
206
|
+
"required": [],
|
|
207
|
+
"optional": ["issue", "iteration", "reason"]
|
|
208
|
+
},
|
|
209
|
+
"stage.skipped": {
|
|
210
|
+
"required": ["stage"],
|
|
211
|
+
"optional": ["issue", "reason"]
|
|
212
|
+
},
|
|
213
|
+
"stage.artifact_miss": {
|
|
214
|
+
"required": ["stage"],
|
|
215
|
+
"optional": ["issue"]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
package/config/policy.json
CHANGED
|
@@ -35,28 +35,23 @@
|
|
|
35
35
|
"critical": {
|
|
36
36
|
"requiredChecks": [
|
|
37
37
|
"risk-policy-gate",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"test",
|
|
39
|
+
"smoke",
|
|
40
40
|
"platform-health",
|
|
41
|
-
"
|
|
41
|
+
"shellcheck"
|
|
42
42
|
],
|
|
43
43
|
"requiredReviewers": 1,
|
|
44
44
|
"requiredEvidence": ["cli", "api"],
|
|
45
45
|
"requireDocsDriftCheck": true
|
|
46
46
|
},
|
|
47
47
|
"high": {
|
|
48
|
-
"requiredChecks": [
|
|
49
|
-
"risk-policy-gate",
|
|
50
|
-
"tests",
|
|
51
|
-
"e2e-smoke",
|
|
52
|
-
"code-review-agent"
|
|
53
|
-
],
|
|
48
|
+
"requiredChecks": ["risk-policy-gate", "test", "smoke"],
|
|
54
49
|
"requiredReviewers": 0,
|
|
55
50
|
"requiredEvidence": ["cli"],
|
|
56
51
|
"requireDocsDriftCheck": false
|
|
57
52
|
},
|
|
58
53
|
"medium": {
|
|
59
|
-
"requiredChecks": ["risk-policy-gate", "
|
|
54
|
+
"requiredChecks": ["risk-policy-gate", "test"],
|
|
60
55
|
"requiredReviewers": 0,
|
|
61
56
|
"requiredEvidence": [],
|
|
62
57
|
"requireDocsDriftCheck": false
|
|
@@ -94,21 +89,21 @@
|
|
|
94
89
|
"name": "dashboard-loads",
|
|
95
90
|
"type": "browser",
|
|
96
91
|
"entrypoint": "/",
|
|
97
|
-
"baseUrl": "http://localhost:
|
|
92
|
+
"baseUrl": "http://localhost:8767",
|
|
98
93
|
"assertions": ["page-title-visible", "websocket-connected"]
|
|
99
94
|
},
|
|
100
95
|
{
|
|
101
96
|
"name": "pipeline-status",
|
|
102
97
|
"type": "browser",
|
|
103
98
|
"entrypoint": "/pipeline",
|
|
104
|
-
"baseUrl": "http://localhost:
|
|
99
|
+
"baseUrl": "http://localhost:8767",
|
|
105
100
|
"assertions": ["stage-list-rendered", "progress-indicator-visible"]
|
|
106
101
|
},
|
|
107
102
|
{
|
|
108
103
|
"name": "dashboard-api-health",
|
|
109
104
|
"type": "api",
|
|
110
105
|
"method": "GET",
|
|
111
|
-
"url": "http://localhost:
|
|
106
|
+
"url": "http://localhost:8767/api/health",
|
|
112
107
|
"expectedStatus": 200,
|
|
113
108
|
"assertions": ["status-ok", "response-has-version"]
|
|
114
109
|
},
|
|
@@ -116,16 +111,16 @@
|
|
|
116
111
|
"name": "dashboard-ws-connect",
|
|
117
112
|
"type": "api",
|
|
118
113
|
"method": "GET",
|
|
119
|
-
"url": "http://localhost:
|
|
114
|
+
"url": "http://localhost:8767/api/ws-status",
|
|
120
115
|
"expectedStatus": 200,
|
|
121
116
|
"assertions": ["websocket-active"]
|
|
122
117
|
},
|
|
123
118
|
{
|
|
124
119
|
"name": "pipeline-cli-smoke",
|
|
125
120
|
"type": "cli",
|
|
126
|
-
"command": "bash scripts/sw-pipeline.sh status
|
|
121
|
+
"command": "bash scripts/sw-pipeline.sh status",
|
|
127
122
|
"expectedExitCode": 0,
|
|
128
|
-
"assertions": ["
|
|
123
|
+
"assertions": ["has-pipeline-state"]
|
|
129
124
|
},
|
|
130
125
|
{
|
|
131
126
|
"name": "policy-validation",
|
|
@@ -137,9 +132,9 @@
|
|
|
137
132
|
{
|
|
138
133
|
"name": "db-schema-integrity",
|
|
139
134
|
"type": "database",
|
|
140
|
-
"command": "bash scripts/sw-db.sh
|
|
135
|
+
"command": "bash scripts/sw-db.sh health",
|
|
141
136
|
"expectedExitCode": 0,
|
|
142
|
-
"assertions": ["schema-valid", "
|
|
137
|
+
"assertions": ["schema-valid", "db-accessible"]
|
|
143
138
|
}
|
|
144
139
|
]
|
|
145
140
|
},
|
|
@@ -227,5 +222,13 @@
|
|
|
227
222
|
"default_model": "sonnet",
|
|
228
223
|
"promote_threshold_tasks": 10,
|
|
229
224
|
"promote_threshold_success_rate": 85
|
|
225
|
+
},
|
|
226
|
+
"decision": {
|
|
227
|
+
"enabled": false,
|
|
228
|
+
"cycle_interval_seconds": 1800,
|
|
229
|
+
"tiers_file": "config/decision-tiers.json",
|
|
230
|
+
"outcome_learning_enabled": true,
|
|
231
|
+
"outcome_min_samples": 10,
|
|
232
|
+
"dedup_window_days": 7
|
|
230
233
|
}
|
|
231
234
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{"total": {"lines":{"total":602,"covered":593,"skipped":0,"pct":98.5},"statements":{"total":671,"covered":657,"skipped":0,"pct":97.91},"functions":{"total":142,"covered":139,"skipped":0,"pct":97.88},"branches":{"total":311,"covered":285,"skipped":0,"pct":91.63},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}
|
|
2
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/components/charts/bar.ts": {"lines":{"total":30,"covered":30,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":34,"covered":34,"skipped":0,"pct":100},"branches":{"total":28,"covered":27,"skipped":0,"pct":96.42}}
|
|
3
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/components/charts/donut.ts": {"lines":{"total":13,"covered":13,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":13,"covered":13,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
|
|
4
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/components/charts/pipeline-rail.ts": {"lines":{"total":58,"covered":58,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":62,"covered":62,"skipped":0,"pct":100},"branches":{"total":34,"covered":31,"skipped":0,"pct":91.17}}
|
|
5
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/components/charts/sparkline.ts": {"lines":{"total":44,"covered":44,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":52,"covered":52,"skipped":0,"pct":100},"branches":{"total":36,"covered":34,"skipped":0,"pct":94.44}}
|
|
6
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/core/api.ts": {"lines":{"total":142,"covered":141,"skipped":0,"pct":99.29},"functions":{"total":74,"covered":73,"skipped":0,"pct":98.64},"statements":{"total":151,"covered":149,"skipped":0,"pct":98.67},"branches":{"total":31,"covered":28,"skipped":0,"pct":90.32}}
|
|
7
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/core/helpers.ts": {"lines":{"total":65,"covered":65,"skipped":0,"pct":100},"functions":{"total":14,"covered":14,"skipped":0,"pct":100},"statements":{"total":87,"covered":87,"skipped":0,"pct":100},"branches":{"total":65,"covered":65,"skipped":0,"pct":100}}
|
|
8
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/core/router.ts": {"lines":{"total":94,"covered":94,"skipped":0,"pct":100},"functions":{"total":14,"covered":14,"skipped":0,"pct":100},"statements":{"total":100,"covered":99,"skipped":0,"pct":99},"branches":{"total":52,"covered":49,"skipped":0,"pct":94.23}}
|
|
9
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/core/sse.ts": {"lines":{"total":14,"covered":14,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":15,"covered":15,"skipped":0,"pct":100},"branches":{"total":4,"covered":3,"skipped":0,"pct":75}}
|
|
10
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/core/state.ts": {"lines":{"total":38,"covered":38,"skipped":0,"pct":100},"functions":{"total":13,"covered":13,"skipped":0,"pct":100},"statements":{"total":44,"covered":44,"skipped":0,"pct":100},"branches":{"total":14,"covered":14,"skipped":0,"pct":100}}
|
|
11
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/core/ws.ts": {"lines":{"total":85,"covered":77,"skipped":0,"pct":90.58},"functions":{"total":14,"covered":12,"skipped":0,"pct":85.71},"statements":{"total":93,"covered":82,"skipped":0,"pct":88.17},"branches":{"total":42,"covered":29,"skipped":0,"pct":69.04}}
|
|
12
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/design/icons.ts": {"lines":{"total":6,"covered":6,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":7,"covered":7,"skipped":0,"pct":100},"branches":{"total":5,"covered":5,"skipped":0,"pct":100}}
|
|
13
|
+
,"/Users/sethford/Documents/shipwright/dashboard/src/design/tokens.ts": {"lines":{"total":13,"covered":13,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":13,"covered":13,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
|
|
14
|
+
}
|