shipwright-cli 2.1.2 → 2.2.1
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/devops-engineer.md +14 -12
- package/.claude/agents/doc-fleet-agent.md +99 -0
- package/.claude/agents/test-specialist.md +5 -3
- package/README.md +48 -27
- package/claude-code/CLAUDE.md.shipwright +2 -2
- package/config/policy.json +73 -0
- package/config/policy.schema.json +150 -0
- package/docs/AGI-PLATFORM-PLAN.md +126 -0
- package/docs/AGI-WHATS-NEXT.md +72 -0
- package/docs/KNOWN-ISSUES.md +1 -23
- package/docs/PLATFORM-TODO-BACKLOG.md +41 -0
- package/docs/PLATFORM-TODO-TRIAGE.md +56 -0
- package/docs/README.md +83 -0
- package/docs/TIPS.md +39 -2
- package/docs/config-policy.md +40 -0
- package/docs/definition-of-done.example.md +2 -0
- package/docs/patterns/README.md +5 -0
- package/docs/strategy/02-mission-and-brand.md +3 -3
- package/docs/strategy/README.md +4 -3
- package/docs/tmux-research/TMUX-AUDIT.md +2 -0
- package/docs/tmux-research/TMUX-RESEARCH-INDEX.md +17 -0
- package/package.json +3 -2
- package/scripts/lib/daemon-health.sh +32 -0
- package/scripts/lib/helpers.sh +30 -1
- package/scripts/lib/pipeline-detection.sh +278 -0
- package/scripts/lib/pipeline-github.sh +196 -0
- package/scripts/lib/pipeline-intelligence.sh +1712 -0
- package/scripts/lib/pipeline-quality-checks.sh +1052 -0
- package/scripts/lib/pipeline-quality.sh +34 -0
- package/scripts/lib/pipeline-stages.sh +2488 -0
- package/scripts/lib/pipeline-state.sh +529 -0
- package/scripts/lib/policy.sh +32 -0
- package/scripts/sw +5 -1
- package/scripts/sw-activity.sh +35 -46
- package/scripts/sw-adaptive.sh +30 -39
- package/scripts/sw-adversarial.sh +30 -36
- package/scripts/sw-architecture-enforcer.sh +30 -33
- package/scripts/sw-auth.sh +30 -42
- package/scripts/sw-autonomous.sh +60 -40
- package/scripts/sw-changelog.sh +29 -30
- package/scripts/sw-checkpoint.sh +30 -18
- package/scripts/sw-ci.sh +30 -42
- package/scripts/sw-cleanup.sh +32 -15
- package/scripts/sw-code-review.sh +26 -32
- package/scripts/sw-connect.sh +30 -19
- package/scripts/sw-context.sh +30 -19
- package/scripts/sw-cost.sh +30 -40
- package/scripts/sw-daemon.sh +66 -36
- package/scripts/sw-dashboard.sh +31 -40
- package/scripts/sw-db.sh +30 -20
- package/scripts/sw-decompose.sh +30 -38
- package/scripts/sw-deps.sh +30 -41
- package/scripts/sw-developer-simulation.sh +30 -36
- package/scripts/sw-discovery.sh +36 -19
- package/scripts/sw-doc-fleet.sh +822 -0
- package/scripts/sw-docs-agent.sh +30 -36
- package/scripts/sw-docs.sh +29 -31
- package/scripts/sw-doctor.sh +52 -20
- package/scripts/sw-dora.sh +29 -34
- package/scripts/sw-durable.sh +30 -20
- package/scripts/sw-e2e-orchestrator.sh +36 -21
- package/scripts/sw-eventbus.sh +30 -17
- package/scripts/sw-feedback.sh +30 -41
- package/scripts/sw-fix.sh +30 -40
- package/scripts/sw-fleet-discover.sh +30 -41
- package/scripts/sw-fleet-viz.sh +30 -20
- package/scripts/sw-fleet.sh +30 -40
- package/scripts/sw-github-app.sh +30 -41
- package/scripts/sw-github-checks.sh +30 -41
- package/scripts/sw-github-deploy.sh +30 -41
- package/scripts/sw-github-graphql.sh +30 -38
- package/scripts/sw-guild.sh +30 -37
- package/scripts/sw-heartbeat.sh +30 -19
- package/scripts/sw-hygiene.sh +134 -42
- package/scripts/sw-incident.sh +30 -39
- package/scripts/sw-init.sh +31 -14
- package/scripts/sw-instrument.sh +30 -41
- package/scripts/sw-intelligence.sh +39 -44
- package/scripts/sw-jira.sh +31 -41
- package/scripts/sw-launchd.sh +30 -17
- package/scripts/sw-linear.sh +31 -41
- package/scripts/sw-logs.sh +32 -17
- package/scripts/sw-loop.sh +32 -19
- package/scripts/sw-memory.sh +32 -43
- package/scripts/sw-mission-control.sh +31 -40
- package/scripts/sw-model-router.sh +30 -20
- package/scripts/sw-otel.sh +30 -20
- package/scripts/sw-oversight.sh +30 -36
- package/scripts/sw-patrol-meta.sh +31 -0
- package/scripts/sw-pipeline-composer.sh +30 -39
- package/scripts/sw-pipeline-vitals.sh +30 -44
- package/scripts/sw-pipeline.sh +277 -6383
- package/scripts/sw-pm.sh +31 -41
- package/scripts/sw-pr-lifecycle.sh +30 -42
- package/scripts/sw-predictive.sh +32 -34
- package/scripts/sw-prep.sh +30 -19
- package/scripts/sw-ps.sh +32 -17
- package/scripts/sw-public-dashboard.sh +30 -40
- package/scripts/sw-quality.sh +42 -40
- package/scripts/sw-reaper.sh +32 -15
- package/scripts/sw-recruit.sh +428 -48
- package/scripts/sw-regression.sh +30 -38
- package/scripts/sw-release-manager.sh +30 -38
- package/scripts/sw-release.sh +29 -31
- package/scripts/sw-remote.sh +31 -40
- package/scripts/sw-replay.sh +30 -18
- package/scripts/sw-retro.sh +33 -42
- package/scripts/sw-scale.sh +41 -24
- package/scripts/sw-security-audit.sh +30 -20
- package/scripts/sw-self-optimize.sh +33 -37
- package/scripts/sw-session.sh +31 -15
- package/scripts/sw-setup.sh +30 -16
- package/scripts/sw-standup.sh +30 -20
- package/scripts/sw-status.sh +33 -13
- package/scripts/sw-strategic.sh +55 -43
- package/scripts/sw-stream.sh +33 -37
- package/scripts/sw-swarm.sh +30 -21
- package/scripts/sw-team-stages.sh +30 -38
- package/scripts/sw-templates.sh +31 -16
- package/scripts/sw-testgen.sh +30 -31
- package/scripts/sw-tmux-pipeline.sh +29 -31
- package/scripts/sw-tmux-role-color.sh +31 -0
- package/scripts/sw-tmux-status.sh +31 -0
- package/scripts/sw-tmux.sh +31 -15
- package/scripts/sw-trace.sh +30 -19
- package/scripts/sw-tracker-github.sh +31 -0
- package/scripts/sw-tracker-jira.sh +31 -0
- package/scripts/sw-tracker-linear.sh +31 -0
- package/scripts/sw-tracker.sh +30 -40
- package/scripts/sw-triage.sh +68 -61
- package/scripts/sw-upgrade.sh +30 -16
- package/scripts/sw-ux.sh +30 -35
- package/scripts/sw-webhook.sh +30 -25
- package/scripts/sw-widgets.sh +30 -19
- package/scripts/sw-worktree.sh +32 -15
- package/tmux/templates/doc-fleet.json +43 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# AGI-Level Platform Plan: Refactor, Refine, Remove, Redo
|
|
2
|
+
|
|
3
|
+
**Status:** Active
|
|
4
|
+
**Created:** 2026-02-16
|
|
5
|
+
**Goal:** Make Shipwright a fully autonomous product development team — reduce hardcoded/static policy, clean architecture, and let the platform improve itself.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Success Criteria
|
|
10
|
+
|
|
11
|
+
- **Policy:** All tunables (timeouts, limits, thresholds) live in `config/policy.json` or env; scripts read via `policy_get` or jq. Zero new hardcoded magic numbers in core paths.
|
|
12
|
+
- **Monoliths:** `sw-pipeline.sh` and `sw-daemon.sh` decomposed into sourced modules (stages, health, poll loop); single-file line count < 2000 for core orchestration.
|
|
13
|
+
- **Helpers:** All scripts use `lib/helpers.sh` for colors/output/events (or a single other canonical source); no duplicated info/success/warn/error blocks.
|
|
14
|
+
- **Platform health:** `shipwright hygiene platform-refactor` counts trend down (hardcoded, fallback, TODO/FIXME/HACK); strategic agent routinely suggests platform refactor issues.
|
|
15
|
+
- **Continuous:** Hygiene + platform-refactor run in CI or weekly; strategic reads platform-hygiene and policy; AGI-level criterion is part of product thinking.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Phase 1: Foundation (Policy + Helpers Adoption)
|
|
20
|
+
|
|
21
|
+
**Goal:** Policy and helpers are the default; at least two key scripts read from policy; plan is visible and tracked.
|
|
22
|
+
|
|
23
|
+
**Status:** Done. 1.1–1.3 done (strategic + hygiene read policy; plan linked from STRATEGY P6). 1.4 done — all ~98 scripts migrated to `lib/helpers.sh`; zero duplicated helper blocks remain.
|
|
24
|
+
|
|
25
|
+
| # | Task | Owner | Acceptance |
|
|
26
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------- |
|
|
27
|
+
| 1.1 | **Strategic reads policy** — In sw-strategic.sh, after constants block, source policy.sh and override STRATEGIC_MAX_ISSUES, COOLDOWN, STRATEGY_LINES, OVERLAP_THRESHOLD from policy when present. | Agent | strategic run uses config/policy.json values when file exists; fallback to current literals. |
|
|
28
|
+
| 1.2 | **Hygiene reads policy** — In sw-hygiene.sh, read artifact_age_days from policy (policy_get ".hygiene.artifact_age_days" 7) when policy.sh available. | Agent | hygiene --artifact-age default comes from policy when present. |
|
|
29
|
+
| 1.3 | **Document plan** — This doc (docs/AGI-PLATFORM-PLAN.md) is the single source of truth; link from STRATEGY.md P6. | Done | STRATEGY P6 references this plan. |
|
|
30
|
+
| 1.4 | **Helpers adoption** — Migrate 3–5 high-traffic scripts to source lib/helpers.sh instead of defining info/success/warn/error (e.g. sw-strategic, sw-hygiene, sw-quality). | Agent | No duplicate color/output blocks in those scripts; they source helpers. |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Phase 2: Policy Migration (First Batch)
|
|
35
|
+
|
|
36
|
+
**Goal:** Daemon, pipeline, quality, and sweep read their key tunables from policy; hardcoded count drops.
|
|
37
|
+
|
|
38
|
+
**Status:** Done. 2.1–2.5 complete. Daemon (timeouts, intervals), pipeline (coverage/quality thresholds), quality (thresholds), sweep (workflow reads policy.json and exports env vars).
|
|
39
|
+
|
|
40
|
+
| # | Task | Owner | Acceptance |
|
|
41
|
+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| 2.1 | **Daemon timeouts** — In sw-daemon.sh, health heartbeat and stage timeouts read from policy_get when policy exists (else keep current defaults). | Agent | daemon_health_timeout_for_stage uses policy .daemon.stage_timeouts and .daemon.health_heartbeat_timeout. |
|
|
43
|
+
| 2.2 | **Daemon intervals** — POLL_INTERVAL, AUTO_SCALE_INTERVAL, OPTIMIZE_INTERVAL, STALE_REAPER_INTERVAL read from policy when present. | Agent | One place (policy) controls daemon timing. |
|
|
44
|
+
| 2.3 | **Pipeline thresholds** — Coverage and quality gate thresholds in pipeline read from policy (pipeline.coverage_threshold_percent, quality_gate_score_threshold, memory fallbacks). | Agent | Pipeline quality gate uses policy_get for thresholds when policy exists. |
|
|
45
|
+
| 2.4 | **Quality script** — sw-quality.sh reads coverage_threshold and gate_score_threshold from policy. | Agent | quality validate/gate use policy. |
|
|
46
|
+
| 2.5 | **Sweep (workflow)** — Document in plan that sweep workflow (shipwright-sweep.yml) uses hardcoded 4h/30min; add optional env or later step to read from policy (e.g. script that emits workflow inputs from policy). | Agent | Either sweep reads policy in a wrapper or doc states “sweep defaults documented in config/policy.json; override via env.” |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Phase 3: Monolith Decomposition
|
|
51
|
+
|
|
52
|
+
**Goal:** Pipeline and daemon are split into sourced modules; no single file > 2000 lines for orchestration core.
|
|
53
|
+
|
|
54
|
+
**Status:** 3.2 and 3.4 done (pipeline-quality.sh and daemon-health.sh created, wired, and sourced). 3.1 and 3.3 (full stage/poll extraction) deferred — high risk, requires incremental approach.
|
|
55
|
+
|
|
56
|
+
| # | Task | Owner | Acceptance |
|
|
57
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | --------------------------------------------------------------------- |
|
|
58
|
+
| 3.1 | **Pipeline stages lib** — Extract stage run logic (run_intake, run_plan, run_build, run_test, …) into scripts/lib/pipeline-stages.sh or scripts/lib/pipeline-stages/\*.sh; source from sw-pipeline.sh. | Agent | sw-pipeline.sh sources stages; line count drops; existing tests pass. |
|
|
59
|
+
| 3.2 | **Pipeline quality gate** — Extract quality gate and audit selection into scripts/lib/pipeline-quality.sh; source from sw-pipeline.sh. | Agent | Quality gate logic in one place; pipeline sources it. |
|
|
60
|
+
| 3.3 | **Daemon poll loop** — Extract daemon_poll_loop, daemon_poll_issues, daemon_reap_completed into scripts/lib/daemon-poll.sh; source from sw-daemon.sh. | Agent | Daemon sources daemon-poll; line count drops. |
|
|
61
|
+
| 3.4 | **Daemon health** — Extract health check and timeout logic into scripts/lib/daemon-health.sh. | Agent | Daemon sources daemon-health; tests pass. |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Phase 4: Cleanup (TODO / FIXME / HACK / Dead Code)
|
|
66
|
+
|
|
67
|
+
**Goal:** Triage all TODO/FIXME/HACK; remove dead code; reduce fallback count.
|
|
68
|
+
|
|
69
|
+
**Status:** 4.1–4.2 done (PLATFORM-TODO-TRIAGE.md created with full triage: 4 github-issue, 3 accepted-debt, 0 stale). 4.3–4.4 ongoing (run hygiene dead-code; reduce fallbacks over time). Pre-existing `now_unix` bug in sw-scale.sh fixed.
|
|
70
|
+
|
|
71
|
+
| # | Task | Owner | Acceptance |
|
|
72
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------- |
|
|
73
|
+
| 4.1 | **TODO/FIXME backlog** — Generate list (from platform-refactor findings); create GitHub issues for each or mark “accepted tech debt” in code; strategic can then suggest “Resolve TODO in X” as issues. | Agent | Every TODO/FIXME has an issue or comment; count tracked. |
|
|
74
|
+
| 4.2 | **HACK/KLUDGE** — Same as 4.1; replace or document. | Agent | HACK count explained or reduced. |
|
|
75
|
+
| 4.3 | **Dead code** — Run hygiene dead-code; remove or refactor unused functions/scripts. | Agent | Dead code count in hygiene report drops. |
|
|
76
|
+
| 4.4 | **Fallback reduction** — Where adaptive/learned data exists, remove duplicate hardcoded fallbacks so one code path wins (policy → adaptive → minimal default). | Agent | Fallback count in platform-refactor scan drops. |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Phase 5: Continuous (CI + Strategic + Metrics)
|
|
81
|
+
|
|
82
|
+
**Goal:** Platform health is measured and improved continuously.
|
|
83
|
+
|
|
84
|
+
**Status:** 5.1 done (shipwright-platform-health.yml with threshold gate). 5.2 done (strategic reads platform-hygiene + AGI rule; CI workflow now runs hygiene before strategic). 5.3 done (doctor shows platform health counts). 5.4 done (config/policy.schema.json created; ajv validates; integrated in CI). E2E policy tests added (sw-policy-e2e-test.sh, 26 tests).
|
|
85
|
+
|
|
86
|
+
| # | Task | Owner | Acceptance |
|
|
87
|
+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------- |
|
|
88
|
+
| 5.1 | **Hygiene in CI** — Add a job (e.g. in shipwright-sweep or a new workflow) that runs `shipwright hygiene platform-refactor` and fails or warns if counts exceed thresholds (e.g. hardcoded > 100). | Agent | CI runs platform-refactor; optional gate. |
|
|
89
|
+
| 5.2 | **Strategic creates refactor issues** — Ensure strategic prompt and platform-hygiene input are used; run strategic periodically so it suggests platform refactor issues. | Done | Strategic already has platform health + AGI rule. |
|
|
90
|
+
| 5.3 | **Metrics dashboard** — Optional: add a small “platform health” section to dashboard or doctor showing platform-hygiene counts and trend. | Agent | Doctor or dashboard shows hardcoded/fallback/TODO counts. |
|
|
91
|
+
| 5.4 | **Policy schema** — Add JSON schema for config/policy.json and validate in CI or on load. | Agent | policy.json validated against schema. |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Current Snapshot (from platform-refactor scan)
|
|
96
|
+
|
|
97
|
+
- **hardcoded:** 58 | **fallback:** 54 | **TODO:** 37 | **FIXME:** 19 | **HACK/KLUDGE:** 17
|
|
98
|
+
- **Triage:** 4 github-issue, 3 accepted-debt, 0 stale, 0 fix-now (see `docs/PLATFORM-TODO-TRIAGE.md`)
|
|
99
|
+
- **Largest scripts:** sw-pipeline.sh (8600+), sw-daemon.sh (6000+), sw-loop.sh (2400+), sw-recruit.sh (2200+), sw-prep.sh (1600+), sw-memory.sh (1600+).
|
|
100
|
+
- _Last scan: 2026-02-16. Re-scan after full helpers migration to track delta._
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Sweep defaults (Phase 2.5)
|
|
105
|
+
|
|
106
|
+
Sweep workflow (`.github/workflows/shipwright-sweep.yml`) uses hardcoded values: stuck = 4h, cron every 30min, retry template = full, retry max_iterations = 25, stuck retry = 30. These are documented in **config/policy.json** under `sweep`. To override: set env in the workflow (e.g. `STUCK_THRESHOLD_HOURS`, `RETRY_MAX_ITERATIONS`) or add a wrapper step that reads policy and exports env for the dispatch step.
|
|
107
|
+
|
|
108
|
+
## How to Use This Plan
|
|
109
|
+
|
|
110
|
+
1. **Run platform-refactor:** `shipwright hygiene platform-refactor` to refresh `.claude/platform-hygiene.json`.
|
|
111
|
+
2. **Run strategic:** `shipwright strategic run` to get AI-suggested issues (including platform refactor).
|
|
112
|
+
3. **Execute phases in order:** Phase 1 → 2 → 3 → 4 → 5; mark tasks done in this doc or in issues.
|
|
113
|
+
4. **Policy first:** Any new tunable goes in config/policy.json; scripts use policy_get or jq.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## References
|
|
118
|
+
|
|
119
|
+
- **STRATEGY.md** — P6 Platform Self-Improvement, Technical Principle 8 (AGI-level criterion).
|
|
120
|
+
- **config/policy.json** — Central policy schema.
|
|
121
|
+
- **docs/config-policy.md** — Policy usage and roadmap.
|
|
122
|
+
- **scripts/lib/policy.sh** — policy_get helper.
|
|
123
|
+
- **scripts/lib/helpers.sh** — Canonical colors and output helpers.
|
|
124
|
+
- **config/policy.schema.json** — JSON Schema for policy validation.
|
|
125
|
+
- **docs/PLATFORM-TODO-TRIAGE.md** — Phase 4 TODO/FIXME/HACK triage results.
|
|
126
|
+
- **scripts/sw-policy-e2e-test.sh** — E2E policy integration tests (26 tests).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# What's Next — Gaps, Not Fully Implemented, Not Integrated, E2E Audit
|
|
2
|
+
|
|
3
|
+
**Status:** 2026-02-16
|
|
4
|
+
**Companion to:** [docs/AGI-PLATFORM-PLAN.md](AGI-PLATFORM-PLAN.md)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Still broken or risky
|
|
9
|
+
|
|
10
|
+
| Item | What | Fix |
|
|
11
|
+
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
12
|
+
| **Platform-health workflow threshold check** | ~~Report step used string comparison for threshold.~~ **Fixed:** Now normalizes to numeric with default 0. | Done. |
|
|
13
|
+
| **policy.sh when REPO_DIR not set** | If a script is run from a different cwd (e.g. CI from repo root), `git rev-parse --show-toplevel` may point to a different repo. | Already uses SCRIPT_DIR/.. when SCRIPT_DIR is set; document that callers must set SCRIPT_DIR. |
|
|
14
|
+
| **Daemon get_adaptive_heartbeat_timeout** | When policy has no entry for a stage, we fall back to case statement only when `policy_get` is not available; when policy exists but stage is missing we keep HEALTH_HEARTBEAT_TIMEOUT. | Verified: logic is correct (policy stage → else case → HEALTH_HEARTBEAT_TIMEOUT). |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 2. Not fully implemented
|
|
19
|
+
|
|
20
|
+
| Item | What | Next step |
|
|
21
|
+
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
22
|
+
| ~~**Phase 3 libs not sourced**~~ | **Done.** `pipeline-quality.sh` sourced by `sw-pipeline.sh` and `sw-quality.sh`; `daemon-health.sh` sourced by `sw-daemon.sh`. | Wired and verified. |
|
|
23
|
+
| ~~**Policy JSON Schema validation**~~ | **Done.** `config/policy.schema.json` created; `ajv-cli` validates successfully; optional step in platform-health workflow confirmed working. | Validated locally; trigger workflow_dispatch in CI to confirm. |
|
|
24
|
+
| ~~**Sweep workflow still hardcoded**~~ | **Done.** Sweep workflow now checks out repo, reads `config/policy.json`, and exports `STUCK_THRESHOLD_HOURS`, `RETRY_TEMPLATE`, `RETRY_MAX_ITERATIONS`, `STUCK_RETRY_MAX_ITERATIONS` to env. | Wired. |
|
|
25
|
+
| ~~**Helpers adoption (Phase 1.4)**~~ | **Done.** All ~98 scripts migrated to `lib/helpers.sh`. Zero duplicated info/success/warn/error blocks remain. | Complete. |
|
|
26
|
+
| **Monolith decomposition (Phase 3.1–3.4)** | Pipeline stages, pipeline quality gate, daemon poll loop, daemon health are **not** extracted into separate sourced files. Line counts unchanged (8600+ / 6000+). | Defer or do incrementally: extract one module (e.g. pipeline quality gate block) and source it. |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 3. Not integrated
|
|
31
|
+
|
|
32
|
+
| Item | What | Next step |
|
|
33
|
+
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
|
34
|
+
| ~~**pipeline-quality.sh**~~ | **Done.** Sourced by `sw-pipeline.sh` and `sw-quality.sh`; duplicate policy_get for thresholds removed. | Wired. |
|
|
35
|
+
| ~~**daemon-health.sh**~~ | **Done.** Sourced by `sw-daemon.sh`; `get_adaptive_heartbeat_timeout` calls `daemon_health_timeout_for_stage` when loaded. | Wired. |
|
|
36
|
+
| ~~**Strategic + platform-hygiene**~~ | **Done.** `shipwright-strategic.yml` now runs `hygiene platform-refactor` before strategic analysis, feeding fresh data to the AI agent. | Wired. |
|
|
37
|
+
| ~~**Test suite and policy**~~ | **Done.** Policy read test added to `sw-hygiene-test.sh` (Test 12): verifies `policy_get` reads from config and returns default when key missing. | Covered. |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 4. Not audited E2E
|
|
42
|
+
|
|
43
|
+
| Item | What | Next step |
|
|
44
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
|
|
45
|
+
| ~~**Pipeline E2E with policy**~~ | **Done.** `sw-policy-e2e-test.sh` (26 tests) verifies pipeline-quality.sh reads coverage/gate thresholds from policy, policy_get with mock and real configs. | Added to npm test suite. |
|
|
46
|
+
| ~~**Daemon E2E with policy**~~ | **Done.** `sw-policy-e2e-test.sh` verifies daemon policy_get for poll_interval, heartbeat_timeout, stage_timeouts, auto_scale_interval. | Covered in policy E2E test. |
|
|
47
|
+
| **Platform-health workflow E2E** | Workflow validated locally (schema, scan, report steps); not yet triggered via workflow_dispatch in CI. | Trigger workflow (workflow_dispatch) to confirm end-to-end in real CI. |
|
|
48
|
+
| **Doctor with no platform-hygiene** | When `.claude/platform-hygiene.json` is missing, doctor shows "Platform hygiene not run". Not wrong, but we never auto-run it. | Optional: doctor could run `hygiene platform-refactor` once and then show section. |
|
|
49
|
+
| ~~**Full npm test with policy**~~ | **Done.** `sw-policy-e2e-test.sh` added to npm test; 26 policy-specific assertions covering policy_get, pipeline-quality.sh, daemon thresholds, and sanity checks. | In test suite. |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 5. Summary checklist
|
|
54
|
+
|
|
55
|
+
- [x] **Wire or remove** pipeline-quality.sh and daemon-health.sh — sourced in pipeline, quality, daemon.
|
|
56
|
+
- [x] **Policy schema** — `config/policy.schema.json` created; ajv validates successfully; integrated in CI.
|
|
57
|
+
- [x] **Sweep** — Workflow reads policy.json and exports env vars.
|
|
58
|
+
- [x] **Helpers** — All ~98 scripts migrated to lib/helpers.sh; zero duplicated helper blocks remain.
|
|
59
|
+
- [x] **Test** — Policy read test in hygiene-test.sh (Test 12) + 26 E2E policy tests in sw-policy-e2e-test.sh.
|
|
60
|
+
- [x] **E2E** — Pipeline + daemon policy assertions in sw-policy-e2e-test.sh; platform-health workflow validated locally.
|
|
61
|
+
- [x] **TODO/FIXME/HACK** — Phase 4 triage complete: 4 github-issue, 3 accepted-debt, 0 stale. See `docs/PLATFORM-TODO-TRIAGE.md`.
|
|
62
|
+
- [x] **Strategic + hygiene** — Strategic CI workflow now runs hygiene platform-refactor before analysis.
|
|
63
|
+
- [ ] **Platform-health workflow_dispatch** — Trigger once in CI to confirm end-to-end execution.
|
|
64
|
+
- [ ] **Monolith decomposition (Phase 3.1, 3.3)** — Deferred; high risk, requires incremental extraction.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## References
|
|
69
|
+
|
|
70
|
+
- [AGI-PLATFORM-PLAN.md](AGI-PLATFORM-PLAN.md) — Phases and success criteria.
|
|
71
|
+
- [PLATFORM-TODO-BACKLOG.md](PLATFORM-TODO-BACKLOG.md) — TODO/FIXME/HACK triage.
|
|
72
|
+
- [config-policy.md](config-policy.md) — Policy usage and schema.
|
package/docs/KNOWN-ISSUES.md
CHANGED
|
@@ -142,28 +142,6 @@ If only one pane is listed while agents are active, the fallback occurred.
|
|
|
142
142
|
|
|
143
143
|
---
|
|
144
144
|
|
|
145
|
-
## White/Bright Pane Backgrounds on Agent Spawn
|
|
146
|
-
|
|
147
|
-
**Severity:** Medium — cosmetic but distracting
|
|
148
|
-
|
|
149
|
-
**Problem:** When Claude Code spawns agent panes via tmux, new panes sometimes inherit the terminal's default background (often white/bright) instead of the tmux dark theme.
|
|
150
|
-
|
|
151
|
-
**Root Cause:** tmux's `window-style` applies at the window level but newly spawned panes from external processes (like Claude Code) don't always inherit it.
|
|
152
|
-
|
|
153
|
-
**Fix:** As of v1.3.0, `shipwright-overlay.conf` uses `set-hook` to force the dark theme on every new pane:
|
|
154
|
-
|
|
155
|
-
```conf
|
|
156
|
-
set-hook -g after-split-window "select-pane -P 'bg=#1a1a2e,fg=#e4e4e7'"
|
|
157
|
-
set-hook -g after-new-window "select-pane -P 'bg=#1a1a2e,fg=#e4e4e7'"
|
|
158
|
-
set-hook -g after-new-session "select-pane -P 'bg=#1a1a2e,fg=#e4e4e7'"
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Run `shipwright init` or `shipwright upgrade --apply` to get the updated overlay with these hooks.
|
|
162
|
-
|
|
163
|
-
**Status:** ✅ Resolved in v1.3.0
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
145
|
## TPM plugins not loading
|
|
168
146
|
|
|
169
147
|
**Severity:** Low — cosmetic
|
|
@@ -204,4 +182,4 @@ shipwright reaper --dry-run # Preview what would be reaped
|
|
|
204
182
|
|
|
205
183
|
Or use the tmux keybinding: `prefix + R` for a quick one-shot cleanup.
|
|
206
184
|
|
|
207
|
-
**Status:** Resolved in v1.6.0
|
|
185
|
+
**Status:** ✅ Resolved in v1.6.0 — reaper is the recommended solution.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Platform TODO/FIXME/HACK Backlog
|
|
2
|
+
|
|
3
|
+
**Source:** `shipwright hygiene platform-refactor` → `.claude/platform-hygiene.json`
|
|
4
|
+
**Purpose:** Track TODO, FIXME, and HACK markers for triage; strategic agent can suggest "Resolve TODO in X" as issues.
|
|
5
|
+
|
|
6
|
+
## How to refresh
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
shipwright hygiene platform-refactor
|
|
10
|
+
jq '.counts, .findings_sample[0:10]' .claude/platform-hygiene.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**File:line list for triage** (after refresh):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
jq -r '.findings_sample[]? | "\(.file):\(.line)"' .claude/platform-hygiene.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Triage
|
|
20
|
+
|
|
21
|
+
- **TODO** — Create a GitHub issue or implement; add `TODO(issue #N)` in code when deferred.
|
|
22
|
+
- **FIXME** — Same as TODO; prefer fix or document.
|
|
23
|
+
- **HACK/KLUDGE** — Replace with proper fix or add comment: `# HACK: reason (tracked in #N)`.
|
|
24
|
+
|
|
25
|
+
## Current counts (from last scan: 2026-02-16)
|
|
26
|
+
|
|
27
|
+
| Marker | Count | Action |
|
|
28
|
+
| ------ | ----- | ---------------------------------------------------------- |
|
|
29
|
+
| TODO | 37 | Triage; create issues or mark "accepted tech debt" in code |
|
|
30
|
+
| FIXME | 19 | Same as TODO |
|
|
31
|
+
| HACK | 17 | Replace or document with tracking comment |
|
|
32
|
+
|
|
33
|
+
See `.claude/platform-hygiene.json` for live counts and `findings_sample` (file:line).
|
|
34
|
+
Strategic agent uses this file when suggesting platform refactor issues.
|
|
35
|
+
|
|
36
|
+
## Prioritized next steps
|
|
37
|
+
|
|
38
|
+
1. **Run triage** — Use `jq -r '.findings_sample[]? | "\(.file):\(.line)"' .claude/platform-hygiene.json` to list all; batch into issues by file or theme.
|
|
39
|
+
2. **High-traffic scripts first** — sw-pipeline.sh, sw-daemon.sh, sw-recruit.sh have most findings; address critical path items.
|
|
40
|
+
3. **Dead code (Phase 4.3)** — Run `shipwright hygiene` dead-code scan; remove or refactor unused functions.
|
|
41
|
+
4. **Fallback reduction (Phase 4.4)** — Where policy or adaptive data exists, remove duplicate hardcoded fallbacks.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Platform TODO/FIXME/HACK Triage (Phase 4)
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-02-16
|
|
4
|
+
**Source:** `rg -n "TODO|FIXME|HACK" scripts/ docs/ config/ .github/ .claude/` (comment-style markers only)
|
|
5
|
+
|
|
6
|
+
This document categorizes all TODO/FIXME/HACK comment markers found in the codebase. Only actual technical-debt comment markers are included (not variable names like `STATUS_TODO`, grep patterns, or documentation references).
|
|
7
|
+
|
|
8
|
+
## Summary by Category
|
|
9
|
+
|
|
10
|
+
| Category | Count |
|
|
11
|
+
| ------------- | ----- |
|
|
12
|
+
| fix-now | 0 |
|
|
13
|
+
| github-issue | 4 |
|
|
14
|
+
| accepted-debt | 3 |
|
|
15
|
+
| stale | 0 |
|
|
16
|
+
| **Total** | **7** |
|
|
17
|
+
|
|
18
|
+
## Full Triage Table
|
|
19
|
+
|
|
20
|
+
| File | Line | Marker | Text | Category |
|
|
21
|
+
| ----------------------------- | ---- | ------ | ------------------------------------------------------------------- | ------------- |
|
|
22
|
+
| scripts/sw-scale.sh | 173 | TODO | Integrate with tmux/SendMessage to spawn agent | github-issue |
|
|
23
|
+
| scripts/sw-scale.sh | 199 | TODO | Integrate with SendMessage to shut down agent | github-issue |
|
|
24
|
+
| scripts/sw-scale.sh | 337 | TODO | Parse pipeline context to generate actual recommendations | github-issue |
|
|
25
|
+
| scripts/sw-swarm.sh | 365 | TODO | Implement queue depth and resource monitoring | github-issue |
|
|
26
|
+
| scripts/sw-testgen.sh | 271 | TODO | Claude unavailable (generated stub when Claude API unavailable) | accepted-debt |
|
|
27
|
+
| scripts/sw-testgen.sh | 277 | TODO | Implement test for \$func (placeholder in generated test template) | accepted-debt |
|
|
28
|
+
| scripts/sw-predictive-test.sh | 70 | TODO | add input validation (intentional fixture for security patrol test) | accepted-debt |
|
|
29
|
+
|
|
30
|
+
## Category Definitions
|
|
31
|
+
|
|
32
|
+
- **fix-now**: Simple, actionable, can be addressed in a single session (e.g., replace hardcoded value with policy read).
|
|
33
|
+
- **github-issue**: Needs a tracked GitHub issue for future work; non-trivial integration or feature work.
|
|
34
|
+
- **accepted-debt**: Intentional or documented trade-off; no action required beyond documentation.
|
|
35
|
+
- **stale**: No longer relevant; safe to remove from source.
|
|
36
|
+
|
|
37
|
+
## Recommended Actions
|
|
38
|
+
|
|
39
|
+
### github-issue (create issues)
|
|
40
|
+
|
|
41
|
+
1. **sw-scale.sh** (lines 173, 199): Create issue _"Integrate scale up/down with tmux/SendMessage"_ — when scaling, spawn/shutdown agents via tmux or SendMessage instead of emitting events only.
|
|
42
|
+
2. **sw-scale.sh** (line 337): Create issue _"Parse pipeline context for scale recommendations"_ — use active pipeline state to generate context-aware scaling recommendations.
|
|
43
|
+
3. **sw-swarm.sh** (line 365): Create issue _"Implement queue depth and resource monitoring for swarm"_ — add queue depth and resource utilization monitoring to auto-scaling analysis.
|
|
44
|
+
|
|
45
|
+
### accepted-debt (no change)
|
|
46
|
+
|
|
47
|
+
- **sw-testgen.sh** (271, 277): These are intentional placeholders in generated test templates. The TODO text signals fallback behavior when Claude is unavailable or when no test implementation exists.
|
|
48
|
+
- **sw-predictive-test.sh** (70): Intentional test fixture. The test creates sample vulnerable code (SQL injection, missing input validation) to verify the security patrol detects these issues. The TODO is part of the deliberately bad code.
|
|
49
|
+
|
|
50
|
+
### stale
|
|
51
|
+
|
|
52
|
+
None identified.
|
|
53
|
+
|
|
54
|
+
### fix-now
|
|
55
|
+
|
|
56
|
+
None identified. All TODOs are either deferred integration work (github-issue) or intentional placeholders (accepted-debt).
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Shipwright Documentation
|
|
2
|
+
|
|
3
|
+
Navigation hub for all Shipwright docs. Start here or jump to a section.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Root Documentation
|
|
8
|
+
|
|
9
|
+
| Doc | Purpose |
|
|
10
|
+
| -------------------------------------------- | --------------------------------------------------- |
|
|
11
|
+
| [../README.md](../README.md) | Project overview, quick start, features |
|
|
12
|
+
| [../STRATEGY.md](../STRATEGY.md) | Vision, priorities, technical principles |
|
|
13
|
+
| [../CHANGELOG.md](../CHANGELOG.md) | Version history |
|
|
14
|
+
| [../.claude/CLAUDE.md](../.claude/CLAUDE.md) | 100+ commands, architecture, development guidelines |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## docs/ Sections
|
|
19
|
+
|
|
20
|
+
### Strategy & GTM
|
|
21
|
+
|
|
22
|
+
| Doc | Purpose |
|
|
23
|
+
| -------------------------------------------------------------------- | ----------------------------------------------------- |
|
|
24
|
+
| [strategy/README.md](strategy/README.md) | Strategic docs index — market research, brand, GTM |
|
|
25
|
+
| [strategy/01-market-research.md](strategy/01-market-research.md) | Market size, competitive landscape, customer segments |
|
|
26
|
+
| [strategy/02-mission-and-brand.md](strategy/02-mission-and-brand.md) | Mission, vision, brand positioning, messaging |
|
|
27
|
+
| [strategy/03-gtm-and-roadmap.md](strategy/03-gtm-and-roadmap.md) | Go-to-market, 4-phase roadmap, success metrics |
|
|
28
|
+
|
|
29
|
+
### Team Patterns (Wave-Style)
|
|
30
|
+
|
|
31
|
+
| Doc | Purpose |
|
|
32
|
+
| ------------------------------------------------------------------------ | --------------------------------------------- |
|
|
33
|
+
| [patterns/README.md](patterns/README.md) | Wave patterns index — parallel agent work |
|
|
34
|
+
| [patterns/feature-implementation.md](patterns/feature-implementation.md) | Multi-component feature builds |
|
|
35
|
+
| [patterns/research-exploration.md](patterns/research-exploration.md) | Codebase exploration |
|
|
36
|
+
| [patterns/test-generation.md](patterns/test-generation.md) | Test coverage campaigns |
|
|
37
|
+
| [patterns/refactoring.md](patterns/refactoring.md) | Large-scale transformations |
|
|
38
|
+
| [patterns/bug-hunt.md](patterns/bug-hunt.md) | Tracking complex bugs |
|
|
39
|
+
| [patterns/audit-loop.md](patterns/audit-loop.md) | Self-reflection and quality gates in the loop |
|
|
40
|
+
|
|
41
|
+
### tmux Research
|
|
42
|
+
|
|
43
|
+
| Doc | Purpose |
|
|
44
|
+
| ------------------------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
45
|
+
| [tmux-research/TMUX-RESEARCH-INDEX.md](tmux-research/TMUX-RESEARCH-INDEX.md) | Index and reading guide |
|
|
46
|
+
| [tmux-research/TMUX-BEST-PRACTICES-2025-2026.md](tmux-research/TMUX-BEST-PRACTICES-2025-2026.md) | Configuration bible |
|
|
47
|
+
| [tmux-research/TMUX-ARCHITECTURE.md](tmux-research/TMUX-ARCHITECTURE.md) | Visual architecture, integration patterns |
|
|
48
|
+
| [tmux-research/TMUX-QUICK-REFERENCE.md](tmux-research/TMUX-QUICK-REFERENCE.md) | Fast lookup, keybindings |
|
|
49
|
+
| [tmux-research/TMUX-AUDIT.md](tmux-research/TMUX-AUDIT.md) | Shipwright tmux config audit report |
|
|
50
|
+
|
|
51
|
+
### Platform & AGI
|
|
52
|
+
|
|
53
|
+
| Doc | Purpose |
|
|
54
|
+
| ---------------------------------------------------- | ------------------------------------------- |
|
|
55
|
+
| [AGI-PLATFORM-PLAN.md](AGI-PLATFORM-PLAN.md) | Phased refactor for autonomous product dev |
|
|
56
|
+
| [AGI-WHATS-NEXT.md](AGI-WHATS-NEXT.md) | Gaps, not-yet-implemented, E2E audit status |
|
|
57
|
+
| [PLATFORM-TODO-BACKLOG.md](PLATFORM-TODO-BACKLOG.md) | TODO/FIXME/HACK triage backlog |
|
|
58
|
+
| [config-policy.md](config-policy.md) | Policy config schema and usage |
|
|
59
|
+
|
|
60
|
+
### Reference & Troubleshooting
|
|
61
|
+
|
|
62
|
+
| Doc | Purpose |
|
|
63
|
+
| -------------------------------------------------------------- | --------------------------------------------------- |
|
|
64
|
+
| [TIPS.md](TIPS.md) | Power user tips, team patterns |
|
|
65
|
+
| [KNOWN-ISSUES.md](KNOWN-ISSUES.md) | Tracked bugs and workarounds |
|
|
66
|
+
| [definition-of-done.example.md](definition-of-done.example.md) | Template for `shipwright loop --definition-of-done` |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## .claude/ Agent Definitions
|
|
71
|
+
|
|
72
|
+
| File | Purpose |
|
|
73
|
+
| -------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
74
|
+
| [../.claude/DEFINITION-OF-DONE.md](../.claude/DEFINITION-OF-DONE.md) | Pipeline completion checklist |
|
|
75
|
+
| [../.claude/agents/](../.claude/agents/) | Role definitions (pipeline-agent, code-reviewer, test-specialist, etc.) |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## See Also
|
|
80
|
+
|
|
81
|
+
- [demo/README.md](../demo/README.md) — Demo app for pipeline testing
|
|
82
|
+
- [claude-code/CLAUDE.md.shipwright](../claude-code/CLAUDE.md.shipwright) — Downstream repo template
|
|
83
|
+
- [.github/pull_request_template.md](../.github/pull_request_template.md) — PR checklist
|
package/docs/TIPS.md
CHANGED
|
@@ -145,7 +145,7 @@ Press `prefix + G` to toggle zoom on the current pane. This makes one agent fill
|
|
|
145
145
|
|
|
146
146
|
### Synchronized input
|
|
147
147
|
|
|
148
|
-
Press `prefix + Alt-t` to toggle synchronized panes. When enabled, anything you type goes to ALL panes simultaneously. Useful for:
|
|
148
|
+
Press `prefix + S` or `prefix + Alt-t` (M-t) to toggle synchronized panes. When enabled, anything you type goes to ALL panes simultaneously. Useful for:
|
|
149
149
|
|
|
150
150
|
- Stopping all agents at once (`Ctrl-C` in all panes)
|
|
151
151
|
- Running the same command in all agent directories
|
|
@@ -154,7 +154,7 @@ Press `prefix + Alt-t` to toggle synchronized panes. When enabled, anything you
|
|
|
154
154
|
|
|
155
155
|
### Capture pane contents
|
|
156
156
|
|
|
157
|
-
Press `prefix + Alt-s` to save the current pane's visible content to a file in `/tmp/`. Useful for debugging agent output after the fact.
|
|
157
|
+
Press `prefix + Alt-s` (M-s) to save the current pane's visible content to a file in `/tmp/`. Useful for debugging agent output after the fact.
|
|
158
158
|
|
|
159
159
|
---
|
|
160
160
|
|
|
@@ -341,3 +341,40 @@ Each agent writes findings/results to a file in this directory. The team lead re
|
|
|
341
341
|
| [Test Generation](patterns/test-generation.md) | 3-4+ | 2-3 | Coverage campaigns |
|
|
342
342
|
| [Refactoring](patterns/refactoring.md) | 3-4 | 2 | Large-scale transformations |
|
|
343
343
|
| [Bug Hunt](patterns/bug-hunt.md) | 3-4 | 2-3 | Complex, elusive bugs |
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Shipwright-Specific Tips
|
|
348
|
+
|
|
349
|
+
### Use `--worktree` for parallel builds
|
|
350
|
+
|
|
351
|
+
When running multiple agents or pipelines concurrently, use worktree isolation to avoid conflicts:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
shipwright pipeline start --issue 42 --worktree
|
|
355
|
+
shipwright loop "Refactor auth" --agents 2 --worktree
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Keep docs in sync
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
shipwright docs check # Report stale AUTO sections (exit 1 if any)
|
|
362
|
+
shipwright docs sync # Regenerate all stale sections
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Definition of Done for loops
|
|
366
|
+
|
|
367
|
+
Use a DoD file with `shipwright loop` to prevent premature completion:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
shipwright loop "Add RBAC" --quality-gates --definition-of-done dod.md
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Template at `docs/definition-of-done.example.md` (or `~/.shipwright/templates/` after install).
|
|
374
|
+
|
|
375
|
+
### Run all test suites
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
npm test # All 96+ test suites
|
|
379
|
+
./scripts/sw-pipeline-test.sh # Pipeline tests only (no real Claude/GitHub)
|
|
380
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Shipwright Policy Configuration
|
|
2
|
+
|
|
3
|
+
**Location:** `config/policy.json` (repo) or `~/.shipwright/policy.json` (user override)
|
|
4
|
+
|
|
5
|
+
All tunable policy — timeouts, limits, thresholds — should live in policy config. Scripts may still have in-code defaults for backwards compatibility but should prefer policy when present. Adaptive/learned values (e.g. from `~/.shipwright/adaptive-*.json`, optimization outputs) override policy when available.
|
|
6
|
+
|
|
7
|
+
## Why centralize policy?
|
|
8
|
+
|
|
9
|
+
- **AGI-level self-improvement:** Strategic agent and platform-refactor scans can suggest moving more values here instead of hardcoding.
|
|
10
|
+
- **Single place to tune:** Daemon, pipeline, quality, strategic, and sweep behavior can be adjusted without editing scripts.
|
|
11
|
+
- **Clean architecture:** Policy is data, not code; easier to validate, document, and evolve.
|
|
12
|
+
|
|
13
|
+
## Schema (high level)
|
|
14
|
+
|
|
15
|
+
| Section | Purpose |
|
|
16
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `daemon` | Poll interval, health timeouts per stage, auto-scale/optimize/stale-reaper intervals, stale thresholds, `stale_timeout_multiplier`, `stale_state_hours` |
|
|
18
|
+
| `pipeline` | Max iterations, coverage/quality gate thresholds, memory baseline fallbacks, `max_cycles_convergence_cap` |
|
|
19
|
+
| `quality` | Coverage and gate score thresholds, `audit_weights` (test_pass, coverage, security, etc.) |
|
|
20
|
+
| `strategic` | Max issues per cycle, cooldown, overlap threshold, strategy line limit |
|
|
21
|
+
| `sweep` | Cron interval, stuck threshold, retry template and iteration caps |
|
|
22
|
+
| `hygiene` | Artifact age for cleanup |
|
|
23
|
+
| `recruit` | Agent recruitment: self_tune, match thresholds, model, promote thresholds |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
- **From bash:** Prefer `jq` to read values, e.g. `jq -r '.daemon.poll_interval_seconds // 60' config/policy.json`.
|
|
28
|
+
- **Override:** If `~/.shipwright/policy.json` exists, scripts may merge or prefer it over repo `config/policy.json`.
|
|
29
|
+
- **Adaptive overrides:** Daemon/pipeline already use learned timeouts and iteration counts when present; those continue to override policy.
|
|
30
|
+
|
|
31
|
+
## Schema
|
|
32
|
+
|
|
33
|
+
- **config/policy.schema.json** — JSON Schema (draft-07) for policy. Validate in CI with `jq empty config/policy.json`; optional full validation with `ajv validate -s config/policy.schema.json -d config/policy.json`.
|
|
34
|
+
|
|
35
|
+
## Roadmap
|
|
36
|
+
|
|
37
|
+
- ~~Add `scripts/lib/policy.sh`~~ (done)
|
|
38
|
+
- ~~Migrate daemon/pipeline/quality/strategic/hygiene defaults to read from policy~~ (done)
|
|
39
|
+
- Strategic agent can recommend issues like "Move more tunables to config/policy.json."
|
|
40
|
+
- Future: Add `recruit` section to `policy.schema.json` for full validation; schema currently allows additional properties.
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Use this template with `shipwright loop --definition-of-done <file>` to enforce completion criteria.
|
|
4
4
|
Copy and customize for your project.
|
|
5
5
|
|
|
6
|
+
> **Shipwright contributors:** See `.claude/DEFINITION-OF-DONE.md` for the project-specific checklist (bash standards, pipeline compliance, etc.).
|
|
7
|
+
|
|
6
8
|
## Checklist
|
|
7
9
|
|
|
8
10
|
- [ ] All specified functionality is implemented
|
package/docs/patterns/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Each wave:
|
|
|
35
35
|
| [Test Generation](test-generation.md) | Comprehensive test coverage campaigns | 3-4+ | 2-3 agents |
|
|
36
36
|
| [Refactoring](refactoring.md) | Large-scale code transformations | 3-4 | 2 agents |
|
|
37
37
|
| [Bug Hunt](bug-hunt.md) | Tracking down complex, elusive bugs | 3-4 | 2-3 agents |
|
|
38
|
+
| [Audit Loop](audit-loop.md) | Self-reflection, quality gates in loop | N/A | 1-2 agents |
|
|
38
39
|
|
|
39
40
|
---
|
|
40
41
|
|
|
@@ -147,3 +148,7 @@ Choose the right model for each agent's task:
|
|
|
147
148
|
| Architecture decisions, complex debugging | `opus` | Best reasoning |
|
|
148
149
|
| Test generation | `sonnet` | Good pattern matching |
|
|
149
150
|
| Documentation, reports | `sonnet` | Clear writing |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
See also: [docs/README.md](../README.md) — Documentation hub
|
|
@@ -57,7 +57,7 @@ Shipwright orchestrates autonomous Claude Code agent teams with full-cycle deliv
|
|
|
57
57
|
|
|
58
58
|
**Headline:** From GitHub issue to merged PR with zero human in the loop
|
|
59
59
|
**Description:** Label a GitHub issue with `shipwright` and walk away. The daemon watches, triages, plans, designs, builds, tests, reviews, gates, and merges — all while learning from failures and adapting its approach. Teams get back 20+ hours per engineer per month by eliminating manual triage, code review, and routine feature shipping.
|
|
60
|
-
**Proof Point:** Shipwright dogfoods itself — this repo processes its own issues with zero human intervention. See [live examples](
|
|
60
|
+
**Proof Point:** Shipwright dogfoods itself — this repo processes its own issues with zero human intervention. See [live examples](../../.github/workflows/shipwright-pipeline.yml).
|
|
61
61
|
|
|
62
62
|
### 2. **Autonomous Teams That Learn**
|
|
63
63
|
|
|
@@ -572,8 +572,8 @@ This document will evolve. Update it when:
|
|
|
572
572
|
- Metrics show messaging isn't landing
|
|
573
573
|
- Team adds new features that shift differentiation
|
|
574
574
|
|
|
575
|
-
**Last updated:**
|
|
576
|
-
**Next review:**
|
|
575
|
+
**Last updated:** 2026-02-14
|
|
576
|
+
**Next review:** 2026-05-14 (quarterly)
|
|
577
577
|
**Owner:** Brand / Product Marketing
|
|
578
578
|
|
|
579
579
|
---
|
package/docs/strategy/README.md
CHANGED
|
@@ -167,6 +167,7 @@ Enterprise Edition ($5K-$50K/yr)
|
|
|
167
167
|
|
|
168
168
|
See also:
|
|
169
169
|
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
170
|
+
- [docs/README.md](../README.md) — Documentation hub
|
|
171
|
+
- [README.md](../../README.md) — Project overview
|
|
172
|
+
- [.claude/CLAUDE.md](../../.claude/CLAUDE.md) — Technical documentation
|
|
173
|
+
- [.github/workflows/shipwright-pipeline.yml](../../.github/workflows/shipwright-pipeline.yml) — Production CI/CD
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
**Repository:** `/Users/sethford/Documents/shipwright`
|
|
6
6
|
**Scope:** tmux configuration, CLI scripts, and integration code
|
|
7
7
|
|
|
8
|
+
> **Note:** This audit is a point-in-time snapshot. Some issues may have been resolved since (e.g. sw-reaper.sh now uses `#{pane_id}` per line 117). Re-run the audit or verify each finding before acting.
|
|
9
|
+
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
## Executive Summary
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# tmux Research Index: Best-in-Class 2025-2026
|
|
2
2
|
|
|
3
|
+
↑ [docs/](../README.md) — Documentation hub
|
|
4
|
+
|
|
3
5
|
**Research Completion Date**: February 12, 2026
|
|
4
6
|
**Focus Areas**: 14 comprehensive topics
|
|
5
7
|
**Total Documentation**: 4 detailed guides + this index
|
|
@@ -87,6 +89,21 @@ This research compiled best-in-class tmux configurations, patterns, and integrat
|
|
|
87
89
|
|
|
88
90
|
---
|
|
89
91
|
|
|
92
|
+
### 4. TMUX-AUDIT.md
|
|
93
|
+
|
|
94
|
+
**Shipwright tmux configuration audit (this repo)**
|
|
95
|
+
|
|
96
|
+
| Section | Content |
|
|
97
|
+
| ------------------ | ---------------------------------------------------- |
|
|
98
|
+
| Executive Summary | Findings, severity counts (critical/major/minor) |
|
|
99
|
+
| Critical Issues | Race conditions, command injection, pane format bugs |
|
|
100
|
+
| Major Issues | Pane referencing, error handling, version compat |
|
|
101
|
+
| Test Coverage Gaps | Integration scenarios, edge cases |
|
|
102
|
+
|
|
103
|
+
**When to Use**: Understanding Shipwright's tmux integration issues, triage for fixes
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
90
107
|
## Key Findings Summary
|
|
91
108
|
|
|
92
109
|
### Best-in-Class Configuration (2025-2026)
|