xtrm-tools 0.7.16 → 0.7.18
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/.xtrm/config/hooks.json +2 -0
- package/.xtrm/config/instructions/agents-top.md +2 -1
- package/.xtrm/registry.json +432 -707
- package/.xtrm/skills/default/creating-service-skills/scripts/bootstrap.py +82 -156
- package/.xtrm/skills/default/creating-service-skills/scripts/scaffolder.py +73 -121
- package/.xtrm/skills/default/hook-development/references/patterns.md +1 -1
- package/.xtrm/skills/default/last30days/scripts/test-v1-vs-v2.sh +2 -2
- package/.xtrm/skills/default/planning/SKILL.md +75 -29
- package/.xtrm/skills/default/releasing/SKILL.md +163 -57
- package/.xtrm/skills/default/security-pipeline/SKILL.md +192 -0
- package/.xtrm/skills/default/security-pipeline/scripts/security-bootstrap.sh +294 -0
- package/.xtrm/skills/default/security-pipeline/templates/.githooks/pre-push.template +39 -0
- package/.xtrm/skills/default/security-pipeline/templates/.github/workflows/gitleaks.yml +33 -0
- package/.xtrm/skills/default/security-pipeline/templates/.github/workflows/osv-scanner.yml +33 -0
- package/.xtrm/skills/default/security-pipeline/templates/.github/workflows/semgrep.yml +41 -0
- package/.xtrm/skills/default/security-pipeline/templates/.gitleaks.toml +44 -0
- package/.xtrm/skills/default/security-pipeline/templates/.pre-commit-config.yaml +67 -0
- package/.xtrm/skills/default/security-pipeline/templates/.semgrepignore +46 -0
- package/.xtrm/skills/default/security-pipeline/templates/scripts/security-scan.sh +57 -0
- package/.xtrm/skills/default/security-pipeline/templates/scripts/semgrep-diff.sh +68 -0
- package/.xtrm/skills/default/session-close-report/SKILL.md +167 -6
- package/.xtrm/skills/default/sync-docs/SKILL.md +1 -1
- package/.xtrm/skills/default/update-specialists/SKILL.md +204 -77
- package/.xtrm/skills/default/update-xt/SKILL.md +270 -4
- package/.xtrm/skills/default/updating-service-skills/scripts/drift_detector.py +22 -0
- package/.xtrm/skills/default/using-kpi/SKILL.md +47 -5
- package/.xtrm/skills/default/using-script-specialists/SKILL.md +7 -5
- package/.xtrm/skills/default/using-specialists/SKILL.md +13 -12
- package/.xtrm/skills/default/using-specialists-auto/SKILL.md +137 -0
- package/.xtrm/skills/default/using-specialists-v2/SKILL.md +15 -22
- package/.xtrm/skills/default/using-specialists-v3/SKILL.md +1074 -0
- package/.xtrm/skills/default/vaultctl/SKILL.md +2 -2
- package/CHANGELOG.md +91 -3
- package/cli/dist/index.cjs +12425 -3770
- package/cli/dist/index.cjs.map +1 -1
- package/cli/package.json +9 -3
- package/package.json +27 -7
- package/packages/pi-extensions/extensions/xtrm-ui/index.ts +76 -1
- package/packages/pi-extensions/package.json +1 -1
- package/.xtrm/config/pi/extensions/custom-footer/.pi/structured-returns/83051fe4-97da-4e2c-bdaa-343b32f4e714.combined.log +0 -7
- package/.xtrm/config/pi/extensions/custom-footer/.pi/structured-returns/83051fe4-97da-4e2c-bdaa-343b32f4e714.stderr.log +0 -0
- package/.xtrm/config/pi/extensions/custom-footer/.pi/structured-returns/83051fe4-97da-4e2c-bdaa-343b32f4e714.stdout.log +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/LICENSE +0 -22
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/README.md +0 -29
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.d.ts +0 -3
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.js +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.js +0 -27
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.d.ts +0 -11
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.js +0 -100
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.d.ts +0 -25
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.js +0 -104
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.d.ts +0 -10
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.js +0 -293
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.d.ts +0 -10
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.js +0 -26
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.js +0 -51
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.js +0 -60
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.js +0 -38
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.d.ts +0 -5
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.js +0 -33
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.d.ts +0 -24
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.js +0 -30
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.d.ts +0 -11
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.js +0 -43
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.js +0 -41
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.js +0 -53
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.js +0 -27
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.js +0 -53
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.js +0 -60
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.js +0 -38
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.d.ts +0 -6
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.js +0 -257
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.js +0 -71
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.d.ts +0 -6
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.js +0 -173
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.d.ts +0 -26
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.js +0 -195
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.d.ts +0 -121
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.js +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.js +0 -18
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.js +0 -110
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.js +0 -32
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.js +0 -13
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.js +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.d.ts +0 -5
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.js +0 -58
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.js +0 -27
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.js +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/package.json +0 -40
- package/.xtrm/skills/default/planning/evals/evals.json +0 -19
- package/.xtrm/skills/default/quality-gates/evals/evals.json +0 -181
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/FINAL-EVAL-SUMMARY.md +0 -75
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/edge-case-auto-fix-verification/with_skill/outputs/response.md +0 -59
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/edge-case-mixed-language-project/with_skill/outputs/response.md +0 -60
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/eval-summary.md +0 -105
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/partial-install-python-only/with_skill/outputs/response.md +0 -93
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/python-refactor-request/with_skill/outputs/response.md +0 -104
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/quality-gate-error-fix/with_skill/outputs/response.md +0 -74
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/should-not-trigger-general-chat/with_skill/outputs/response.md +0 -18
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/should-not-trigger-math-question/with_skill/outputs/response.md +0 -18
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/should-not-trigger-unrelated-coding/with_skill/outputs/response.md +0 -56
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/tdd-guard-blocking-confusion/with_skill/outputs/response.md +0 -67
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/typescript-feature-with-tests/with_skill/outputs/response.md +0 -97
- package/.xtrm/skills/default/sync-docs/evals/evals.json +0 -89
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/benchmark.json +0 -293
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/benchmark.md +0 -13
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/outputs/result.md +0 -210
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/outputs/result.md +0 -101
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/outputs/result.md +0 -198
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/outputs/result.md +0 -94
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/outputs/result.md +0 -237
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/outputs/result.md +0 -134
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/benchmark.json +0 -297
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/benchmark.md +0 -13
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/outputs/result.md +0 -137
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/grading.json +0 -92
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/outputs/result.md +0 -134
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/grading.json +0 -86
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/outputs/result.md +0 -193
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/grading.json +0 -72
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/outputs/result.md +0 -211
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/grading.json +0 -91
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/outputs/result.md +0 -182
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/outputs/result.md +0 -222
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/grading.json +0 -88
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/benchmark.json +0 -298
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/benchmark.md +0 -13
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/outputs/result.md +0 -125
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/grading.json +0 -97
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/outputs/result.md +0 -144
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/grading.json +0 -78
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/outputs/result.md +0 -104
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/grading.json +0 -91
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/outputs/result.md +0 -79
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/grading.json +0 -82
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase1_context.json +0 -302
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase2_drift.txt +0 -33
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase3_analysis.json +0 -114
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase4_fix.txt +0 -118
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase5_validate.txt +0 -38
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/result.md +0 -158
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/outputs/result.md +0 -71
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/grading.json +0 -90
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/test-planning/evals/evals.json +0 -23
- package/.xtrm/skills/default/using-specialists/SKILL.safe.md +0 -1082
- package/.xtrm/skills/default/using-specialists/SKILL.ultra.md +0 -1082
- package/.xtrm/skills/default/using-specialists/evals/evals.json +0 -68
- package/packages/pi-extensions/.serena/project.yml +0 -130
|
@@ -1,1082 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: using-specialists
|
|
3
|
-
description: >
|
|
4
|
-
Use this skill whenever you're about to start a substantial task — pause first and
|
|
5
|
-
route the work through specialists instead of doing discovery or implementation
|
|
6
|
-
yourself. Consult before any: code review, security audit, deep bug investigation,
|
|
7
|
-
test generation, multi-file refactor, architecture analysis, or multi-chain
|
|
8
|
-
specialist orchestration. Also use for the mechanics of delegation: --bead
|
|
9
|
-
workflow, --context-depth, background jobs, MCP tool (`use_specialist`),
|
|
10
|
-
or specialists doctor. Don't wait for the user to say
|
|
11
|
-
"use a specialist" — proactively evaluate whether delegation makes sense.
|
|
12
|
-
version: 4.6
|
|
13
|
-
synced_at: zz22-docs
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# Using Specialists (Safe Caveman)
|
|
17
|
-
|
|
18
|
-
> Derived from `SKILL.md` via caveman-style compression.
|
|
19
|
-
> Goal: preserve full workflow semantics; shorten prose only.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# Specialists Usage
|
|
23
|
-
|
|
24
|
-
When skill is loaded, you **orchestrator** — think CEO or CTO. You set direction, route work, unblock specialists, and synthesize outcomes. You no implement.
|
|
25
|
-
|
|
26
|
-
Specialists handle **99% of tasks**. only things you do yourself are things are genuinely trivial (one-liner, quick config) or require global overview only you can provide. Everything else goes to specialist. When in doubt, delegate.
|
|
27
|
-
|
|
28
|
-
Your job is routing, sequencing, monitoring, and synthesis — not exploration or implementation. Do **ZERO implementation** yourself for substantial work: no file reads, no code writing, no docs, no self-investigation. If you catch yourself doing discovery, stop and dispatch explorer instead.
|
|
29
|
-
|
|
30
|
-
> **Sleep timers**: When you dispatch specialist for longer task, set sleep timer and step back. Don't poll manually — set timer appropriate to expected run time, sleep, check results. lets you work independently and iterate without babysitting jobs.
|
|
31
|
-
|
|
32
|
-
Specialists are autonomous AI agents run independently — fresh context, different model, no prior bias. reason isn't speed — it's quality. specialist has no competing context, leaves tracked record via beads, and can run in background while you stay unblocked.
|
|
33
|
-
|
|
34
|
-
> **Session start**: Run `sp --help` once to see full command surface. `sp` is short alias for `specialists` — `sp run`, `sp feed`, `sp resume` etc. all work. useful: `sp run --help`, `sp resume --help`, `sp feed --help` for flag details.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Hard Rules
|
|
39
|
-
|
|
40
|
-
1. **Zero implementation by orchestrator.** When skill is active for substantial work, you no implement solution yourself.
|
|
41
|
-
2. **Never explore yourself.** All discovery, codebase mapping, and read-only investigation go through **explorer** (or **debugger** for root-cause analysis).
|
|
42
|
-
3. **Run explorer before executor when context is lacking.** If bead already has clear scope — files, symbols, approach — send executor directly. Only run explorer first when issue lacks clear track.
|
|
43
|
-
4. **For tracked work, bead is prompt.** bead description, notes, and parent context are instruction surface.
|
|
44
|
-
5. **`--bead` and `--prompt` are mutually exclusive.** If you need to refine instructions, update bead notes; no add `--prompt`.
|
|
45
|
-
6. **Chains belong to epics.** chain is worktree lineage (executor → reviewer → fix). epic is merge-gated identity owns chains. Use `sp epic merge <epic>` to publish — never merge individual chains belong to unresolved epic.
|
|
46
|
-
7. **Merge through epics, not manual git.** Use `sp epic merge <epic-id>` for wave-bound chains or `sp merge <chain-root-bead>` for standalone chains. Never use manual `git merge` for specialist work.
|
|
47
|
-
8. **No destructive operations by specialists.** No `rm -rf`, no force pushes, no database drops, no credential rotation, no mass deletes, no history rewrites. Surface destructive requirements to user.
|
|
48
|
-
9. **Executor no run tests.** Executor runs lint + tsc only. Tests are reviewer's and test-runner's responsibility in chained pipeline.
|
|
49
|
-
10. **Keep specialists alive through review cycle.** Never `sp stop` executor or debugger before reviewer delivers its verdict. specialist stays in `waiting` so you can `resume` it — to commit changes, apply fixes from reviewer feedback, or continue work. Only stop after final reviewer PASS and confirmed commit.
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## When to Use This Skill
|
|
54
|
-
|
|
55
|
-
**Default: always delegate.** Specialists handle 99% of tasks. orchestrator only acts directly for things are genuinely trivial (one-liner, quick config tweak) or require global overview only you can provide.
|
|
56
|
-
|
|
57
|
-
**Do it yourself only when:**
|
|
58
|
-
- It's one-liner or formatting fix
|
|
59
|
-
- It's quick config change needs no investigation
|
|
60
|
-
- It genuinely requires high-level synthesis only you can do (e.g. reading results across multiple jobs and forming next-step decision)
|
|
61
|
-
|
|
62
|
-
Everything else — investigation, implementation, review, testing, docs, planning, design — goes to specialist.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Canonical Workflow
|
|
67
|
-
|
|
68
|
-
### CLI commands
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Discovery
|
|
72
|
-
specialists list # discover available specialists
|
|
73
|
-
specialists doctor # health check: hooks, MCP, zombie jobs
|
|
74
|
-
|
|
75
|
-
# Running
|
|
76
|
-
specialists run <name> --bead <id> # foreground run (streams output)
|
|
77
|
-
specialists run <name> --bead <id> --background # background run
|
|
78
|
-
specialists run <name> --bead <id> --worktree # isolated worktree (edit-capable specialists)
|
|
79
|
-
specialists run <name> --bead <id> --job <job-id> # reuse another job's worktree
|
|
80
|
-
specialists run <name> --bead <id> --epic <epic-id> # explicitly declare epic membership
|
|
81
|
-
specialists run <name> --prompt "..." # ad-hoc (no bead tracking)
|
|
82
|
-
specialists run <name> --bead <id> --keep-alive # keep session alive after first turn
|
|
83
|
-
specialists run <name> --bead <id> --context-depth 2 # inject parent bead context
|
|
84
|
-
|
|
85
|
-
# Monitoring
|
|
86
|
-
specialists ps # list all jobs (status, specialist, elapsed, bead, epic)
|
|
87
|
-
specialists ps <job-id> # inspect single job (full detail + ctx% badge)
|
|
88
|
-
specialists feed -f # tail merged feed (all jobs) — shows [ctx%] context window usage
|
|
89
|
-
specialists feed <job-id> # events for a specific job
|
|
90
|
-
specialists result <job-id> # final output text
|
|
91
|
-
specialists status --job <job-id> # single-job detail view (legacy — prefer `sp ps <id>`)
|
|
92
|
-
|
|
93
|
-
# Epic lifecycle (canonical publication path)
|
|
94
|
-
specialists epic list [--unresolved] # list epics with lifecycle state
|
|
95
|
-
specialists epic status <epic-id> # show chains, blockers, readiness
|
|
96
|
-
specialists epic resolve <epic-id> # transition open -> resolving
|
|
97
|
-
specialists epic merge <epic-id> [--pr] # publish all epic-owned chains
|
|
98
|
-
|
|
99
|
-
# Merge (for standalone chains only)
|
|
100
|
-
specialists merge <chain-root-bead> [--rebuild] # publish ONE standalone chain
|
|
101
|
-
|
|
102
|
-
# Session close (chain-aware, epic-aware)
|
|
103
|
-
specialists end [--pr] # close session, publish via merge or PR
|
|
104
|
-
|
|
105
|
-
# Interaction
|
|
106
|
-
specialists steer <job-id> "new direction" # redirect ANY running job mid-run
|
|
107
|
-
specialists resume <job-id> "next task" # resume a waiting keep-alive job
|
|
108
|
-
specialists stop <job-id> # cancel a job
|
|
109
|
-
|
|
110
|
-
# Management
|
|
111
|
-
specialists edit <name> # edit specialist config (dot-path, --preset)
|
|
112
|
-
specialists clean # purge old job dirs + worktree GC
|
|
113
|
-
specialists clean --processes # kill all running/starting specialist jobs
|
|
114
|
-
specialists init --sync-skills # re-sync skills only (no full init)
|
|
115
|
-
specialists init --no-xtrm-check # skip xtrm prerequisite check (CI/testing)
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Taxonomy: Job | Chain | Epic
|
|
121
|
-
|
|
122
|
-
specialists orchestration model uses three levels:
|
|
123
|
-
|
|
124
|
-
| Term | Definition | Persisted? | Merge scope |
|
|
125
|
-
|------|------------|:----------:|:-----------:|
|
|
126
|
-
| **Job** | One specialist run (atomic execution unit) | Yes (SQLite + files) | — |
|
|
127
|
-
| **Chain** | Worktree lineage: all specialists sharing one workspace from first dispatch to merge (explorer → executor → reviewer → fix) | Yes (`worktree_owner_job_id`) | `sp merge <chain-root>` |
|
|
128
|
-
| **Epic** | Top merge-gated identity that owns chains across stages | Yes (`epic_runs` table) | `sp epic merge <epic>` |
|
|
129
|
-
| **Wave** | Human shorthand for dispatch batches ("Wave 1", "Wave 2b") — **speech only, NOT persisted** | No | — |
|
|
130
|
-
|
|
131
|
-
### Key relationships
|
|
132
|
-
|
|
133
|
-
- **Chains belong to epics**: When `--bead` is used, chain defaults to bead's parent epic. Override with `--epic <id>`.
|
|
134
|
-
- **Jobs belong to chains**: Jobs sharing `worktree_owner_job_id` form one chain.
|
|
135
|
-
- **Merge through epics**: `sp epic merge <epic-id>` is **canonical publication path** for wave-bound chains.
|
|
136
|
-
- **Standalone chains**: `sp merge <chain-root-bead>` works only for chains NOT belonging to unresolved epic.
|
|
137
|
-
|
|
138
|
-
### Epic lifecycle
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
open → resolving → merge_ready → merged
|
|
142
|
-
↘ failed
|
|
143
|
-
↘ abandoned
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
| State | Meaning | Chains mergeable? |
|
|
147
|
-
|-------|---------|:-----------------:|
|
|
148
|
-
| `open` | Epic created, chains not yet running | — |
|
|
149
|
-
| `resolving` | Chains are actively running | ✗ |
|
|
150
|
-
| `merge_ready` | All chains terminal, reviewer PASS | ✓ (via `sp epic merge`) |
|
|
151
|
-
| `merged` | Publication complete | — |
|
|
152
|
-
| `failed` | One or more chains failed | — |
|
|
153
|
-
| `abandoned` | Cancelled without merge | — |
|
|
154
|
-
|
|
155
|
-
### Migration from "waves" vocabulary
|
|
156
|
-
|
|
157
|
-
**Old terminology → New terminology:**
|
|
158
|
-
|
|
159
|
-
| Old | New | Notes |
|
|
160
|
-
|-----|-----|-------|
|
|
161
|
-
| "Wave 1" | Stage 1 / Prep phase | Speech shorthand still works — just not persisted |
|
|
162
|
-
| "Wave 2" | Implementation chains | Chains are the operative unit, grouped by epic |
|
|
163
|
-
| "Between waves merge" | `sp epic merge` | Epic is the merge-gated identity |
|
|
164
|
-
| "Parallel in wave" | Parallel chains under epic | Use `--epic` to declare membership explicitly |
|
|
165
|
-
|
|
166
|
-
**Why change?**
|
|
167
|
-
|
|
168
|
-
1. **Waves had no identity**: "Wave 2" was speech — no code could track it.
|
|
169
|
-
2. **Merge gates were implicit**: Operators had to remember which chains to merge together.
|
|
170
|
-
3. **Epics are explicit**: epic bead ID persists, enabling `sp epic status` and `sp epic merge`.
|
|
171
|
-
|
|
172
|
-
**Backward compatibility**: All existing workflows work unchanged. new vocabulary is additive — you can still think in waves, but system tracks epics.
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## Chained Bead Pipeline
|
|
177
|
-
|
|
178
|
-
is **standard for ALL tracked work**. Every specialist run gets its own child bead.
|
|
179
|
-
Each step's output accumulates on its bead. Downstream steps see upstream output automatically
|
|
180
|
-
via `--context-depth 2`. bead chain IS context chain — zero manual wiring needed.
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
task-abc: "Fix auth token refresh"
|
|
184
|
-
└── abc-exp: explorer (READ_ONLY — auto-appends output to abc-exp notes)
|
|
185
|
-
└── abc-impl: executor (self-appends output to abc-impl notes, closes bead)
|
|
186
|
-
└── abc-rev: reviewer (READ_ONLY — auto-appends verdict via --job <exec-job>)
|
|
187
|
-
└── abc-fix: executor (if reviewer PARTIAL — fix bead, same worktree via --job)
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
**How context flows (`--context-depth 2` = own + parent + grandparent = 3 beads):**
|
|
191
|
-
|
|
192
|
-
| Step | Specialist sees | Via |
|
|
193
|
-
|------|----------------|-----|
|
|
194
|
-
| abc-exp | abc-exp (own) + task-abc (parent) | `--bead abc-exp --context-depth 2` |
|
|
195
|
-
| abc-impl | abc-impl (own) + abc-exp (explorer findings in notes) + task-abc | `--bead abc-impl --context-depth 2` |
|
|
196
|
-
| reviewer | abc-impl bead (with executor output + reviewer verdict in notes) | `--bead abc-impl --job <exec-job>` |
|
|
197
|
-
| abc-fix | abc-fix (own) + abc-impl (executor output + reviewer verdict) + abc-exp | `--bead abc-fix --job <exec-job> --context-depth 2` |
|
|
198
|
-
|
|
199
|
-
- No copy-paste, no manual note injection between steps
|
|
200
|
-
- Every step has full audit trail on its own bead
|
|
201
|
-
- dep graph IS context graph — self-documenting
|
|
202
|
-
|
|
203
|
-
### Complete flow example
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
# 1. Create the task bead
|
|
207
|
-
bd create --title "Fix auth token refresh bug" --type bug --priority 2
|
|
208
|
-
# -> unitAI-abc
|
|
209
|
-
|
|
210
|
-
# 2. Create chained child beads (create all upfront for clarity)
|
|
211
|
-
bd create --title "Explore: map token refresh code paths" --type task --priority 2
|
|
212
|
-
# -> unitAI-abc-exp
|
|
213
|
-
bd dep add abc-exp abc
|
|
214
|
-
|
|
215
|
-
bd create --title "Implement: fix token refresh retry on 401" --type task --priority 2
|
|
216
|
-
# -> unitAI-abc-impl
|
|
217
|
-
bd dep add abc-impl abc-exp
|
|
218
|
-
|
|
219
|
-
# 3. Wave 1 — Explorer
|
|
220
|
-
specialists run explorer --bead abc-exp --context-depth 2 --background
|
|
221
|
-
# -> Job started: e1f2g3
|
|
222
|
-
# Explorer output auto-appends to abc-exp notes (READ_ONLY behavior)
|
|
223
|
-
specialists result e1f2g3
|
|
224
|
-
|
|
225
|
-
# 4. [MERGE] Merge any worktree branches from Wave 1 into master
|
|
226
|
-
# READ_ONLY waves have no worktrees to merge
|
|
227
|
-
|
|
228
|
-
# 5. Wave 2 — Executor
|
|
229
|
-
specialists run executor --worktree --bead abc-impl --context-depth 2 --background
|
|
230
|
-
# -> Job started: a1b2c3
|
|
231
|
-
# Executor sees: abc-impl + abc-exp (with explorer notes) + abc via context-depth
|
|
232
|
-
# Executor self-appends output to abc-impl notes, closes abc-impl on completion
|
|
233
|
-
|
|
234
|
-
# 6. [MERGE] Merge impl worktree branch into master
|
|
235
|
-
sp merge abc-impl --rebuild
|
|
236
|
-
|
|
237
|
-
# 7. Wave 3 — Reviewer (no separate bead — uses --job + --prompt to enter executor's worktree)
|
|
238
|
-
specialists run reviewer --job a1b2c3 --keep-alive --background --prompt "Review the token refresh fix"
|
|
239
|
-
# -> Job started: r4v5w6
|
|
240
|
-
# Reviewer reads task bead from job a1b2c3's status.json automatically
|
|
241
|
-
# Reviewer auto-appends verdict to bead notes (READ_ONLY)
|
|
242
|
-
specialists result r4v5w6
|
|
243
|
-
# -> PASS: close task bead. PARTIAL/FAIL: go to step 8.
|
|
244
|
-
|
|
245
|
-
# 8. If PARTIAL — fix loop (same worktree, new child bead)
|
|
246
|
-
bd create --title "Fix: reviewer gaps on abc-impl" --type bug --priority 1
|
|
247
|
-
# -> unitAI-abc-fix
|
|
248
|
-
bd dep add abc-fix abc-impl
|
|
249
|
-
|
|
250
|
-
specialists run executor --bead abc-fix --job a1b2c3 --context-depth 2 --background
|
|
251
|
-
# Fixer runs in same worktree (via --job a1b2c3)
|
|
252
|
-
# Sees: abc-fix + abc-impl (executor output + reviewer verdict) + abc-exp via context-depth
|
|
253
|
-
# Repeat reviewer --job → fix loop until PASS
|
|
254
|
-
|
|
255
|
-
# 9. Close when reviewer says PASS
|
|
256
|
-
bd close abc --reason "Fixed: token refresh retries on 401. Reviewer PASS."
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
**Why chaining matters:**
|
|
260
|
-
- Every step's output is preserved — full audit trail on each bead
|
|
261
|
-
- `--context-depth 2` gives each specialist previous step's findings automatically
|
|
262
|
-
- No copy-pasting results between steps
|
|
263
|
-
- orchestrator only creates beads and dispatches — zero context injection
|
|
264
|
-
|
|
265
|
-
---
|
|
266
|
-
|
|
267
|
-
## --job, --worktree, and --epic Semantics
|
|
268
|
-
|
|
269
|
-
flags control **workspace isolation** and **epic membership**. Executors run in isolated git worktrees so concurrent jobs don't corrupt shared files. Chains declare epic membership to enable merge-gated publication.
|
|
270
|
-
|
|
271
|
-
| Flag | Semantics | Creates worktree? | Sets epic? |
|
|
272
|
-
|------|-----------|:----------------:|:----------:|
|
|
273
|
-
| `--worktree` | Provision a new isolated workspace; requires `--bead` | Yes | Inherited from bead.parent |
|
|
274
|
-
| `--job <id>` | Reuse the workspace of an existing job | No | Inherited from target job |
|
|
275
|
-
| `--epic <id>` | Explicitly declare epic membership | No | Yes (overrides default) |
|
|
276
|
-
|
|
277
|
-
`--worktree` and `--job` are **mutually exclusive**. Specifying both exits with error.
|
|
278
|
-
|
|
279
|
-
### Epic membership
|
|
280
|
-
|
|
281
|
-
When `--bead` is used, chain defaults to bead's parent epic (if parent is epic-type bead). Override with `--epic <id>`:
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
# Chain inherits bead.parent as epic
|
|
285
|
-
specialists run executor --worktree --bead unitAI-impl
|
|
286
|
-
# → epic_id = bead.parent (if epic-type)
|
|
287
|
-
|
|
288
|
-
# Explicit epic declaration (e.g., prep job with non-epic parent)
|
|
289
|
-
specialists run explorer --bead prep-task.1 --epic unitAI-3f7b
|
|
290
|
-
# → epic_id = unitAI-3f7b (explicit override)
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
**Why explicit --epic?** Prep jobs (explorer, planner, overthinker) often have non-epic parents but need to belong to epic for `sp ps` grouping and `sp epic status` visibility.
|
|
294
|
-
|
|
295
|
-
### `--worktree`
|
|
296
|
-
|
|
297
|
-
Provisions new git worktree + branch for specialist run. Branch name is derived
|
|
298
|
-
deterministically from bead id: `feature/<beadId>-<specialist-slug>`.
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
specialists run executor --worktree --bead hgpu.3
|
|
302
|
-
# stderr: [worktree created: /repo/.worktrees/hgpu.3/hgpu.3-executor branch: feature/hgpu.3-executor]
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
If worktree already exists (interrupted run), it is **reused**, not recreated.
|
|
306
|
-
|
|
307
|
-
### `--job <id>`
|
|
308
|
-
|
|
309
|
-
Reads `worktree_path` from target job's `status.json` and uses directory as `cwd`.
|
|
310
|
-
caller's own `--bead` remains authoritative — `--job` only selects workspace.
|
|
311
|
-
|
|
312
|
-
```bash
|
|
313
|
-
# Reviewer enters executor's worktree to review exactly what was written
|
|
314
|
-
specialists run reviewer --job 49adda --keep-alive --background
|
|
315
|
-
|
|
316
|
-
# Fix executor re-enters same worktree (--bead provides new fix bead, --job provides workspace)
|
|
317
|
-
specialists run executor --bead hgpu.3-fix --job 49adda --context-depth 2 --background
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
**Concurrency guard (MEDIUM/HIGH specialists):**
|
|
321
|
-
|
|
322
|
-
Blocked from entering while target job is `starting` or `running` — prevents concurrent file corruption.
|
|
323
|
-
|
|
324
|
-
| Target status | MEDIUM/HIGH | READ_ONLY/LOW |
|
|
325
|
-
|---------------|:-----------:|:-------------:|
|
|
326
|
-
| `starting` | ✗ Blocked | ✓ Allowed |
|
|
327
|
-
| `running` | ✗ Blocked | ✓ Allowed |
|
|
328
|
-
| `waiting` | ✓ Allowed | ✓ Allowed |
|
|
329
|
-
| `done`/`error`/`cancelled` | ✓ Allowed | ✓ Allowed |
|
|
330
|
-
| Unknown | ✗ Blocked (conservative) | ✓ Allowed |
|
|
331
|
-
|
|
332
|
-
**Bypass with `--force-job`:**
|
|
333
|
-
|
|
334
|
-
```bash
|
|
335
|
-
specialists run executor --job 49adda --force-job --bead fix-123
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
Use when caller explicitly accepts concurrent write risk (e.g., target job known to be stalled but not yet terminal, emergency fix entry).
|
|
339
|
-
|
|
340
|
-
### When to use each flag
|
|
341
|
-
|
|
342
|
-
| Scenario | Flag to use |
|
|
343
|
-
|----------|------------|
|
|
344
|
-
| First executor run for a task | `--worktree --bead <impl-bead>` |
|
|
345
|
-
| Reviewer on executor's output | `--job <exec-job-id>` (no `--worktree`) |
|
|
346
|
-
| Fix executor after reviewer PARTIAL | `--bead <fix-bead> --job <exec-job-id>` |
|
|
347
|
-
| Force entry to blocked worktree | `--bead <fix-bead> --job <exec-job-id> --force-job` |
|
|
348
|
-
| Prep job belonging to epic (non-epic parent) | `--bead <prep-bead> --epic <epic-id>` |
|
|
349
|
-
| Explorer (READ_ONLY) | Neither — explorers don't need worktrees |
|
|
350
|
-
| Overthinker, planner, debugger | Neither — read-only and interactive specialists |
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
### Worktree write-boundary enforcement
|
|
355
|
-
|
|
356
|
-
Specialists running in worktrees are **prevented from writing outside their boundary**. session generates Pi extension hooks `tool_call` events and blocks `edit`/`write`/`multiEdit`/`notebookEdit` tools with absolute paths outside worktree.
|
|
357
|
-
|
|
358
|
-
**What's blocked:**
|
|
359
|
-
- `edit` with `/absolute/path/outside/worktree/file.ts`
|
|
360
|
-
- `write` with `/absolute/path/outside/worktree/new-file.ts`
|
|
361
|
-
|
|
362
|
-
**What's allowed:**
|
|
363
|
-
- Relative paths (`src/file.ts`) — resolve within worktree cwd
|
|
364
|
-
- Absolute paths inside worktree boundary
|
|
365
|
-
|
|
366
|
-
enforcement is automatic when `--worktree` is used. No configuration required. If extension fails to generate (tmpdir permissions), warning is logged and session proceeds without protection.
|
|
367
|
-
|
|
368
|
-
---
|
|
369
|
-
|
|
370
|
-
## Dependency Mapping
|
|
371
|
-
|
|
372
|
-
Map bead dependencies to match execution pipeline. dep graph IS wave plan.
|
|
373
|
-
|
|
374
|
-
### Simple bug fix
|
|
375
|
-
```
|
|
376
|
-
task → explore → impl
|
|
377
|
-
└── reviewer via --job (no own bead needed)
|
|
378
|
-
└── fix (if PARTIAL) → child of impl
|
|
379
|
-
```
|
|
380
|
-
```bash
|
|
381
|
-
bd dep add explore task
|
|
382
|
-
bd dep add impl explore
|
|
383
|
-
# reviewer: specialists run reviewer --job <impl-job>
|
|
384
|
-
# fix: bd dep add fix impl
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
### Complex feature (overthinker)
|
|
388
|
-
```
|
|
389
|
-
task → explore → design → impl → [reviewer via --job] → [fix if PARTIAL]
|
|
390
|
-
```
|
|
391
|
-
```bash
|
|
392
|
-
bd dep add explore task
|
|
393
|
-
bd dep add design explore
|
|
394
|
-
bd dep add impl design
|
|
395
|
-
# reviewer: specialists run reviewer --job <impl-job>
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
### Epic with N children
|
|
399
|
-
Each child gets its own explore → impl chain. Reviewer runs via `--job` per impl.
|
|
400
|
-
```
|
|
401
|
-
epic
|
|
402
|
-
├── child-1 → explore-1 → impl-1 (reviewer via --job impl-1-job)
|
|
403
|
-
├── child-2 → explore-2 → impl-2 (reviewer via --job impl-2-job)
|
|
404
|
-
└── child-N → explore-N → impl-N (reviewer via --job impl-N-job)
|
|
405
|
-
```
|
|
406
|
-
Children (chains) within same epic can run **in parallel** if they own disjoint files.
|
|
407
|
-
|
|
408
|
-
### Parallel chains (same stage)
|
|
409
|
-
Chains in same stage share no intra-stage dependencies. They depend on previous stage's output (same epic parent), not on each other.
|
|
410
|
-
```
|
|
411
|
-
# Stage 2 parallel executors (after shared Stage 1 explorer):
|
|
412
|
-
bd dep add impl-a explore # impl-a depends on explore, NOT on impl-b
|
|
413
|
-
bd dep add impl-b explore # impl-b depends on explore, NOT on impl-a
|
|
414
|
-
```
|
|
415
|
-
Each runs in its own `--worktree`. Merge via `sp epic merge <epic>` before Stage 3.
|
|
416
|
-
|
|
417
|
-
### Test beads (batched)
|
|
418
|
-
Tests are **batched** — one test bead covers all impls in stage, not per-impl.
|
|
419
|
-
test bead depends on **all** impl beads it covers.
|
|
420
|
-
```
|
|
421
|
-
bd dep add tests impl-a
|
|
422
|
-
bd dep add tests impl-b
|
|
423
|
-
bd dep add tests impl-c
|
|
424
|
-
# specialists run test-runner --bead tests --context-depth 2
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
---
|
|
428
|
-
|
|
429
|
-
## Review and Fix Loop
|
|
430
|
-
|
|
431
|
-
review → fix loop is mechanism for iterative quality improvement within single worktree.
|
|
432
|
-
|
|
433
|
-
### Standard loop
|
|
434
|
-
|
|
435
|
-
```
|
|
436
|
-
1. Executor provisions --worktree, implements, enters waiting.
|
|
437
|
-
-> Job: exec-job (KEEP ALIVE — do not stop)
|
|
438
|
-
|
|
439
|
-
2. Reviewer enters same worktree via --job exec-job.
|
|
440
|
-
-> sp ps shows the chain:
|
|
441
|
-
feature/unitAI-impl-executor · unitAI-impl
|
|
442
|
-
◐ exec-job executor waiting
|
|
443
|
-
└ ◐ rev-job reviewer starting
|
|
444
|
-
-> Auto-appends verdict (PASS/PARTIAL/FAIL) to bead notes.
|
|
445
|
-
|
|
446
|
-
3a. PASS:
|
|
447
|
-
-> Resume executor: "Reviewer PASS. Commit your changes."
|
|
448
|
-
-> Verify commit landed on branch (git log)
|
|
449
|
-
-> Stop reviewer, then stop executor
|
|
450
|
-
-> Merge via sp merge
|
|
451
|
-
|
|
452
|
-
3b. PARTIAL/FAIL:
|
|
453
|
-
-> Resume the SAME executor: "Reviewer PARTIAL. Fix: <specific findings>"
|
|
454
|
-
-> Executor retains full conversation context — no re-dispatch needed
|
|
455
|
-
-> Executor applies fixes, enters waiting again
|
|
456
|
-
-> Return to step 2 (new reviewer on same --job)
|
|
457
|
-
|
|
458
|
-
4. Repeat until PASS.
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
### Commands
|
|
462
|
-
|
|
463
|
-
```bash
|
|
464
|
-
# Step 1 — Executor with worktree (enters waiting after first turn)
|
|
465
|
-
specialists run executor --worktree --bead unitAI-impl --context-depth 2 --background
|
|
466
|
-
# -> Job started: exec-job (e.g. 49adda)
|
|
467
|
-
# DO NOT sp stop — executor stays alive for the entire review cycle
|
|
468
|
-
|
|
469
|
-
# Step 2 — Reviewer enters same worktree
|
|
470
|
-
specialists run reviewer --job 49adda --keep-alive --background --prompt "Review impl changes"
|
|
471
|
-
# -> Job started: rev-job
|
|
472
|
-
specialists result rev-job
|
|
473
|
-
|
|
474
|
-
# Step 3a — PASS: resume executor to commit, then stop both
|
|
475
|
-
specialists resume 49adda "Reviewer PASS. Git add and commit your changes."
|
|
476
|
-
# Wait for commit, verify with: git log feature/unitAI-impl-executor --oneline -1
|
|
477
|
-
specialists stop rev-job
|
|
478
|
-
specialists stop 49adda
|
|
479
|
-
sp merge unitAI-impl --rebuild
|
|
480
|
-
|
|
481
|
-
# Step 3b — PARTIAL: resume executor with fix instructions (same session, full context)
|
|
482
|
-
specialists resume 49adda "Reviewer PARTIAL. Fix: <paste specific findings here>"
|
|
483
|
-
# Executor applies fixes, enters waiting again
|
|
484
|
-
# Dispatch new reviewer:
|
|
485
|
-
specialists run reviewer --job 49adda --keep-alive --background --prompt "Re-review after fix"
|
|
486
|
-
# Repeat until PASS
|
|
487
|
-
|
|
488
|
-
# After final PASS + commit + stop:
|
|
489
|
-
bd close unitAI-task --reason "Reviewer PASS. All findings addressed."
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
### Why resume instead of re-dispatch
|
|
493
|
-
|
|
494
|
-
Resuming original executor/debugger is **always preferred** over dispatching new fix executor:
|
|
495
|
-
|
|
496
|
-
- **Full context**: specialist remembers what it changed and why — no re-discovery
|
|
497
|
-
- **No new bead needed**: no fix bead creation, no dep wiring overhead
|
|
498
|
-
- **Same worktree**: no `--job` coordination needed, it's already there
|
|
499
|
-
- **Cheaper**: one resumed turn vs full new specialist session with context injection
|
|
500
|
-
|
|
501
|
-
Only dispatch new fix executor when original specialist is dead (crashed, stopped prematurely, or context exhausted at >80%).
|
|
502
|
-
|
|
503
|
-
### Key invariants
|
|
504
|
-
- **Never stop executor/debugger before reviewer verdict.** specialist stays in `waiting` throughout review cycle. Stopping prematurely kills resume path and risks uncommitted changes.
|
|
505
|
-
- **Executors no auto-commit.** After reviewer PASS, you must resume executor with explicit commit instructions. Verify commit landed before stopping.
|
|
506
|
-
- Each fix iteration uses `resume` on same specialist — not new child bead or new executor.
|
|
507
|
-
- Multiple reviewer → resume → re-review cycles are expected. worktree and specialist session are stable across all cycles.
|
|
508
|
-
- Only stop after: (1) reviewer PASS, (2) executor committed, (3) commit verified on branch.
|
|
509
|
-
|
|
510
|
-
---
|
|
511
|
-
|
|
512
|
-
## Chain Lifecycle — Members Are Alive Until Merge
|
|
513
|
-
|
|
514
|
-
chain is not worktree — it is **living group of specialists** sharing one workspace. All members of chain are alive (running or waiting) until chain is merged or abandoned. Treat chain members as unit.
|
|
515
|
-
|
|
516
|
-
### Rules
|
|
517
|
-
|
|
518
|
-
1. **Never kill individual chain members prematurely.** chain may include explorer, overthinker, executor, reviewer — all sharing one worktree via `--job`. no `sp stop` any member while chain is active, unless member has crashed or is context-exhausted (>80%).
|
|
519
|
-
2. ** chain is alive until merge.** From first dispatch (even if it's READ_ONLY explorer) through reviewer PASS and executor commit — chain is one living unit. Members stay in `waiting` between turns.
|
|
520
|
-
3. **Resume, don't re-dispatch.** When chain member needs to act again (executor fixing reviewer findings, overthinker answering follow-ups), use `sp resume` on existing member. Only dispatch replacement if original is dead.
|
|
521
|
-
4. **Merge kills chain.** When `sp merge` or `sp epic merge` publishes chain's branch, all chain members become obsolete. *(Future: `sp merge` will auto-stop all chain members on successful merge — no manual cleanup needed.)*
|
|
522
|
-
5. **Stop order matters (until auto-cleanup).** When manually stopping chain members after merge: stop dependents first (reviewer), chain owner (executor/explorer). prevents race conditions with resume paths.
|
|
523
|
-
|
|
524
|
-
### Chain member states
|
|
525
|
-
|
|
526
|
-
| Member state | Meaning | Action |
|
|
527
|
-
|-------------|---------|--------|
|
|
528
|
-
| `running` | Actively working | Wait or steer |
|
|
529
|
-
| `waiting` | Idle, retains full context | Resume when needed |
|
|
530
|
-
| `done` | Finished its turn, output appended | Leave alone — chain may still need it |
|
|
531
|
-
| `error` | Crashed or failed | May need replacement dispatch |
|
|
532
|
-
|
|
533
|
-
### What "don't kill" means in practice
|
|
534
|
-
|
|
535
|
-
```bash
|
|
536
|
-
# BAD — killing executor before review cycle completes
|
|
537
|
-
sp stop exec-job # ✗ kills resume path, risks uncommitted work
|
|
538
|
-
|
|
539
|
-
# BAD — killing overthinker before executor uses its output
|
|
540
|
-
sp stop overthinker-job # ✗ loses context if follow-up questions arise
|
|
541
|
-
|
|
542
|
-
# GOOD — chain completes naturally
|
|
543
|
-
sp resume exec-job "Reviewer PASS. Commit your changes."
|
|
544
|
-
# verify commit...
|
|
545
|
-
sp merge unitAI-impl # publishes branch
|
|
546
|
-
# THEN stop members (future: auto-stopped by merge)
|
|
547
|
-
sp stop rev-job
|
|
548
|
-
sp stop exec-job
|
|
549
|
-
```
|
|
550
|
-
|
|
551
|
-
---
|
|
552
|
-
|
|
553
|
-
## Merge Protocol — Epic Publication
|
|
554
|
-
|
|
555
|
-
orchestrator owns merge timing, but **no longer performs manual git merges**. Use `sp epic merge` or `sp merge` instead.
|
|
556
|
-
|
|
557
|
-
### The canonical path: `sp epic merge <epic-id>`
|
|
558
|
-
|
|
559
|
-
** is ONLY legal publication path for wave-bound chains.**
|
|
560
|
-
|
|
561
|
-
epic is merge-gated: all chains must be terminal with reviewer PASS before publication. Use `sp epic merge` for:
|
|
562
|
-
|
|
563
|
-
- Publishing multiple chains under one epic (topological order)
|
|
564
|
-
- Ensuring merge gates are satisfied (no running jobs)
|
|
565
|
-
- PR mode (`--pr`) for staged publication
|
|
566
|
-
|
|
567
|
-
```bash
|
|
568
|
-
# Check epic readiness
|
|
569
|
-
sp epic status unitAI-3f7b
|
|
570
|
-
# Shows: chains, blockers, readiness state, reviewer verdicts
|
|
571
|
-
|
|
572
|
-
# Publish all epic-owned chains
|
|
573
|
-
sp epic merge unitAI-3f7b
|
|
574
|
-
# → merges in topological order, tsc gate after each
|
|
575
|
-
|
|
576
|
-
# PR mode (creates PR instead of direct merge)
|
|
577
|
-
sp epic merge unitAI-3f7b --pr
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
**What `sp epic merge` does:**
|
|
581
|
-
|
|
582
|
-
1. Reads epic state from observability SQLite
|
|
583
|
-
2. Checks all chains are terminal (`done`/`error`)
|
|
584
|
-
3. Verifies latest reviewer verdict is PASS
|
|
585
|
-
4. Topologically sorts chains by bead dependencies
|
|
586
|
-
5. For each chain: `git merge <branch> --no-ff --no-edit`
|
|
587
|
-
6. Runs `bunx tsc --noEmit` after each merge
|
|
588
|
-
7. Optionally creates PR with `--pr` flag
|
|
589
|
-
8. Updates epic state to `merged` on success
|
|
590
|
-
|
|
591
|
-
### When NOT to merge: `sp merge <chain-root>` is blocked
|
|
592
|
-
|
|
593
|
-
**Standalone chains only.** `sp merge <chain-root-bead>` works ONLY for chains NOT belonging to unresolved epic:
|
|
594
|
-
|
|
595
|
-
```bash
|
|
596
|
-
# This FAILS if chain belongs to epic with status=open/resolving/merge_ready
|
|
597
|
-
sp merge unitAI-impl
|
|
598
|
-
# Error: Chain unitAI-impl belongs to unresolved epic unitAI-3f7b (status: resolving).
|
|
599
|
-
# Use 'sp epic merge unitAI-3f7b' to publish all chains together.
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
**Why guard exists:**
|
|
603
|
-
|
|
604
|
-
1. **Merge gates are per-epic**: Publishing one chain without its siblings breaks wave model.
|
|
605
|
-
2. **Topological order matters**: Chain may depend on Chain B — merging first breaks deps.
|
|
606
|
-
3. **Epics are explicit**: epic bead ID is tracked in SQLite, enabling guard.
|
|
607
|
-
|
|
608
|
-
### When to merge within a chain vs NOT
|
|
609
|
-
|
|
610
|
-
**no merge within chain.** chain is sequence of specialists sharing one worktree:
|
|
611
|
-
executor → reviewer → fix → re-review. worktree stays live throughout. No merge until
|
|
612
|
-
reviewer says PASS.
|
|
613
|
-
|
|
614
|
-
```
|
|
615
|
-
executor --worktree --bead impl ← creates worktree
|
|
616
|
-
reviewer --job <exec-job> ← enters same worktree (no merge)
|
|
617
|
-
executor --bead fix --job <exec-job> ← re-enters same worktree (no merge)
|
|
618
|
-
reviewer --job <exec-job> ← re-enters same worktree (no merge)
|
|
619
|
-
PASS → NOW run sp epic merge <epic>
|
|
620
|
-
```
|
|
621
|
-
|
|
622
|
-
**DO merge between stages (via epic).** When next stage's chains depend on stage's code existing on master, merge epic first. dep graph tells you: beads connected by `--job` are one chain (same worktree, no merge). Beads connected by `bd dep add` across different file scopes are separate chains under same epic.
|
|
623
|
-
|
|
624
|
-
### Planning context upfront
|
|
625
|
-
|
|
626
|
-
Before dispatching any chains, identify:
|
|
627
|
-
- **Epics** — top merge-gated identity (create epic-type bead first)
|
|
628
|
-
- **Chains** — worktree lineages belong to epic (use `--epic` for prep jobs)
|
|
629
|
-
- **Stages** — batches of independent chains ("Stage 1" / "Stage 2" are orchestrator speech)
|
|
630
|
-
|
|
631
|
-
dep graph encodes . If bead B depends on bead and they touch different files, they're separate chains under same epic with merge point between stages.
|
|
632
|
-
|
|
633
|
-
### Epic lifecycle commands
|
|
634
|
-
|
|
635
|
-
```bash
|
|
636
|
-
# List epics with state
|
|
637
|
-
sp epic list
|
|
638
|
-
sp epic list --unresolved # show non-terminal epics
|
|
639
|
-
|
|
640
|
-
# Inspect one epic
|
|
641
|
-
sp epic status unitAI-3f7b
|
|
642
|
-
# Shows: persisted_state, readiness_state, chains[], blockers[], summary
|
|
643
|
-
|
|
644
|
-
# Transition states (manual)
|
|
645
|
-
sp epic resolve unitAI-3f7b # open → resolving
|
|
646
|
-
|
|
647
|
-
# Publish
|
|
648
|
-
sp epic merge unitAI-3f7b # merge_ready → merged
|
|
649
|
-
sp epic merge unitAI-3f7b --pr # PR mode
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
### Conflict handling
|
|
653
|
-
|
|
654
|
-
If merge hits conflict:
|
|
655
|
-
|
|
656
|
-
1. Command fails with list of conflicting files
|
|
657
|
-
2. Resolve conflicts manually in your editor
|
|
658
|
-
3. Run `bunx tsc --noEmit` to verify
|
|
659
|
-
4. Continue with next chain (or re-run `sp epic merge <epic>` to resume)
|
|
660
|
-
|
|
661
|
-
**Common conflict pattern:** Parallel chains in same stage may both create same utility file (e.g. `job-root.ts`). is expected — implementations must be identical. Keep one, delete duplicate during conflict resolution.
|
|
662
|
-
|
|
663
|
-
---
|
|
664
|
-
|
|
665
|
-
## Bead-First Workflow (`--bead` is the prompt)
|
|
666
|
-
|
|
667
|
-
For tracked work, bead is not bookkeeping — it is specialist's prompt.
|
|
668
|
-
specialist reads:
|
|
669
|
-
- bead title + description
|
|
670
|
-
- bead notes (including output appended by previous specialists in chain)
|
|
671
|
-
- parent/ancestor bead context (controlled by `--context-depth`)
|
|
672
|
-
|
|
673
|
-
**Automatic context injection**: Runner injects ~3800 tokens of project memory at spawn:
|
|
674
|
-
- `.xtrm/memory.md` (SSOT: no Repeat, How Project Works, Active Context)
|
|
675
|
-
- `bd prime` output (workflow rules + all bd memories dump)
|
|
676
|
-
- GitNexus cheatsheet (when `.gitnexus/meta.json` exists — ~100 tokens)
|
|
677
|
-
|
|
678
|
-
prevents specialists from rediscovering known gotchas on every run.
|
|
679
|
-
|
|
680
|
-
`--prompt` and `--bead` can't be combined. When you need to give specialist
|
|
681
|
-
specific instructions beyond what's in bead description, update bead notes first:
|
|
682
|
-
|
|
683
|
-
```bash
|
|
684
|
-
bd update unitAI-abc --notes "INSTRUCTION: Rewrite docs/cli-reference.md from current
|
|
685
|
-
source. Read every command in src/cli/ and src/index.ts. Document all flags and examples."
|
|
686
|
-
|
|
687
|
-
specialists run executor --bead unitAI-abc --context-depth 2 --background
|
|
688
|
-
```
|
|
689
|
-
|
|
690
|
-
**`--context-depth N`** — how many levels of parent-bead context to inject (default: 1).
|
|
691
|
-
Use **`--context-depth 2`** for all chained bead workflows. gives each specialist its
|
|
692
|
-
own bead + immediate predecessor's output + one more level of context.
|
|
693
|
-
|
|
694
|
-
**`--no-beads`** — skip creating auto-tracking sub-bead, but still reads `--bead` input.
|
|
695
|
-
|
|
696
|
-
**Edit gate access**: Specialists with `--bead` automatically set `bead-claim:<id>` KV key,
|
|
697
|
-
enabling write access in worktrees without session-scoped claims. Cleared on run completion.
|
|
698
|
-
|
|
699
|
-
---
|
|
700
|
-
|
|
701
|
-
## Choosing the Right Specialist
|
|
702
|
-
|
|
703
|
-
Run `specialists list` to see what's available. Match by task type:
|
|
704
|
-
|
|
705
|
-
| Task type | Best specialist | Why |
|
|
706
|
-
|-----------|----------------|-----|
|
|
707
|
-
| Architecture exploration / initial discovery | **explorer** (claude-haiku) | Fast codebase mapping, READ_ONLY. Output auto-appends to bead. |
|
|
708
|
-
| Live docs / library lookup / code discovery | **researcher** (claude-haiku) | Targeted (ctx7/deepwiki) or discovery (ghgrep → deepwiki) modes. `--keep-alive`. |
|
|
709
|
-
| Bug fix / feature implementation | **executor** (gpt-codex) | HIGH perms, writes code, runs lint+tsc, closes beads. `interactive: true` by default — enters `waiting` after first turn, orchestrator must stop explicitly. |
|
|
710
|
-
| Bug investigation / "why is X broken" | **debugger** (claude-sonnet) | 4-phase debug-fix-verify cycle. HIGH perms, keep-alive. GitNexus-first. |
|
|
711
|
-
| Complex design / tradeoff analysis | **overthinker** (gpt-4) | 4-phase: analysis → devil's advocate → synthesis → conclusion. `--keep-alive`. |
|
|
712
|
-
| Code review / compliance | **reviewer** (claude-sonnet) | PASS/PARTIAL/FAIL verdict. Use via `--job <exec-job>`. `--keep-alive`. |
|
|
713
|
-
| Multi-backend review | **parallel-review** (claude-sonnet) | Concurrent review across multiple backends |
|
|
714
|
-
| Planning / scoping | **planner** (claude-sonnet) | Structured issue breakdown with deps |
|
|
715
|
-
| Doc audit / drift detection / targeted sync | **sync-docs** (qwen3.5-plus) | 3-mode: targeted (named docs), area (time-window), full audit. MEDIUM perms, `--keep-alive`. |
|
|
716
|
-
| Doc writing / updates | **executor** (gpt-codex) | For heavy doc rewrites; sync-docs handles targeted updates directly |
|
|
717
|
-
| Test generation / suite execution | **test-runner** (claude-haiku) | Runs suites, interprets failures |
|
|
718
|
-
| Specialist authoring | **specialists-creator** (claude-sonnet) | Guides JSON creation against schema |
|
|
719
|
-
|
|
720
|
-
### Specialist selection notes
|
|
721
|
-
|
|
722
|
-
- **executor no run tests** — it runs `lint + tsc` only. Tests belong to reviewer or test-runner phase.
|
|
723
|
-
- **executor enters `waiting` after first turn** — `interactive: true` is now default. **Never stop executor before reviewer verdict.** Keep it alive so you can: (1) resume with fix instructions if reviewer says PARTIAL, (2) resume with "commit your changes" after reviewer PASS. Executors no auto-commit — you must explicitly resume them to commit. Only `sp stop` after commit is verified on branch.
|
|
724
|
-
- **explorer** is READ_ONLY — its output auto-appends to input bead's notes. No implementation.
|
|
725
|
-
- **reviewer** is best dispatched via `--job <exec-job> --prompt "..."` — it enters same worktree to see exactly what was written. `--job` alone is not enough; `--prompt` or `--bead` is always required.
|
|
726
|
-
- **debugger** over **explorer** when you need root cause analysis — GitNexus call-chain tracing, ranked hypotheses, evidence-backed remediation.
|
|
727
|
-
- **overthinker** before **executor** for any non-trivial task — surfaces edge cases, challenges assumptions, produces solution direction. Cheap relative to wrong implementation.
|
|
728
|
-
- **researcher** is docs specialist — never look up library docs yourself, delegate to researcher.
|
|
729
|
-
- **sync-docs** is interactive — always `--keep-alive`, use `resume` to approve/deny after audit.
|
|
730
|
-
|
|
731
|
-
### Example dispatches
|
|
732
|
-
|
|
733
|
-
```bash
|
|
734
|
-
specialists run explorer --bead unitAI-exp --context-depth 2 --background
|
|
735
|
-
specialists run researcher --bead unitAI-research --context-depth 2 --keep-alive --background
|
|
736
|
-
specialists run debugger --bead unitAI-bug --context-depth 2 --background
|
|
737
|
-
specialists run planner --bead unitAI-scope --context-depth 2 --background
|
|
738
|
-
specialists run overthinker --bead unitAI-design --context-depth 2 --keep-alive --background
|
|
739
|
-
specialists run executor --worktree --bead unitAI-impl --context-depth 2 --background
|
|
740
|
-
specialists run reviewer --job <exec-job-id> --keep-alive --background --prompt "Review the <feature> implementation"
|
|
741
|
-
specialists run sync-docs --bead unitAI-docs --context-depth 2 --keep-alive --background
|
|
742
|
-
specialists run test-runner --bead unitAI-tests --context-depth 2 --background
|
|
743
|
-
specialists run specialists-creator --bead unitAI-skill --context-depth 2 --background
|
|
744
|
-
```
|
|
745
|
-
|
|
746
|
-
### Overthinker-first pattern for complex tasks
|
|
747
|
-
|
|
748
|
-
```bash
|
|
749
|
-
# Full chain: task → explore → design → impl
|
|
750
|
-
bd create --title "Redesign auth middleware" --type feature --priority 2 # -> unitAI-task
|
|
751
|
-
bd create --title "Explore: map auth middleware" --type task --priority 2 # -> unitAI-exp
|
|
752
|
-
bd dep add exp task
|
|
753
|
-
bd create --title "Design: auth middleware approach" --type task --priority 2 # -> unitAI-design
|
|
754
|
-
bd dep add design exp
|
|
755
|
-
bd create --title "Implement: auth middleware redesign" --type task --priority 2 # -> unitAI-impl
|
|
756
|
-
bd dep add impl design
|
|
757
|
-
|
|
758
|
-
# Wave 1: Explorer
|
|
759
|
-
specialists run explorer --bead unitAI-exp --context-depth 2 --background
|
|
760
|
-
# (output auto-appends to exp notes)
|
|
761
|
-
|
|
762
|
-
# Wave 2: Overthinker (sees exp findings via context-depth)
|
|
763
|
-
specialists run overthinker --bead unitAI-design --context-depth 2 --keep-alive --background
|
|
764
|
-
# enters waiting after Phase 4
|
|
765
|
-
|
|
766
|
-
specialists resume <job-id> "What about the edge case where X?"
|
|
767
|
-
specialists resume <job-id> "Is option B safer than option A here?"
|
|
768
|
-
specialists stop <job-id> # when satisfied
|
|
769
|
-
# (overthinker output is on unitAI-design notes)
|
|
770
|
-
|
|
771
|
-
# Wave 3: Executor (sees design + exp + task via context-depth — no manual wiring)
|
|
772
|
-
specialists run executor --worktree --bead unitAI-impl --context-depth 2 --background
|
|
773
|
-
```
|
|
774
|
-
|
|
775
|
-
### Monitoring with `sp ps` and `sp list --live`
|
|
776
|
-
|
|
777
|
-
Use `specialists ps` (alias `sp ps`) for job monitoring instead of manual JSON polling:
|
|
778
|
-
|
|
779
|
-
```bash
|
|
780
|
-
# Quick overview — all jobs
|
|
781
|
-
specialists ps
|
|
782
|
-
# Output: ID, status, specialist, elapsed, bead, [ctx%] badge
|
|
783
|
-
|
|
784
|
-
# Inspect specific job
|
|
785
|
-
specialists ps <job-id>
|
|
786
|
-
# Shows: full status, worktree path, chain, ctx% (context window utilization)
|
|
787
|
-
|
|
788
|
-
# The ctx% in `sp feed` and `sp ps` shows context window utilization:
|
|
789
|
-
# - 0-40% = OK (plenty of room)
|
|
790
|
-
# - 40-65% = MONITOR
|
|
791
|
-
# - 65-80% = WARN (▲ indicator shown)
|
|
792
|
-
# - >80% = CRITICAL (▲ indicator shown)
|
|
793
|
-
```
|
|
794
|
-
|
|
795
|
-
**Live tmux session selector (`sp list --live`):**
|
|
796
|
-
|
|
797
|
-
```bash
|
|
798
|
-
# Interactive selector for running/waiting tmux sessions
|
|
799
|
-
specialists list --live
|
|
800
|
-
# Shows: tmux session name, specialist, elapsed, status
|
|
801
|
-
# Arrow keys to select, Enter to attach
|
|
802
|
-
|
|
803
|
-
# Include dead sessions (PID or tmux gone)
|
|
804
|
-
specialists list --live --show-dead
|
|
805
|
-
# Dead sessions shown with 'dead' status instead of filtered out
|
|
806
|
-
```
|
|
807
|
-
|
|
808
|
-
Dead job detection (`is_dead`) is computed at read time — never persisted to avoid stale state. job is dead when:
|
|
809
|
-
- PID no longer exists (`kill -0 <pid>` fails)
|
|
810
|
-
- tmux session gone (`tmux has-session -t <name>` fails or times out)
|
|
811
|
-
|
|
812
|
-
---
|
|
813
|
-
|
|
814
|
-
### Pi extensions and packages
|
|
815
|
-
|
|
816
|
-
Pi extensions are global at `~/.pi/agent/extensions/`. Pi packages are global npm installs.
|
|
817
|
-
Specialists run with `--no-extensions` and selectively re-enable:
|
|
818
|
-
|
|
819
|
-
- `quality-gates` — lint/typecheck enforcement (non-READ_ONLY only)
|
|
820
|
-
- `service-skills` — service catalog activation
|
|
821
|
-
- `pi-gitnexus` — call-chain tracing, blast radius analysis (resolved from global npm)
|
|
822
|
-
- `pi-serena-tools` — token-efficient LSP reads/edits (resolved from global npm)
|
|
823
|
-
|
|
824
|
-
When gitnexus tools are used during run, supervisor accumulates `gitnexus_summary`
|
|
825
|
-
in `run_complete` event: `files_touched`, `symbols_analyzed`, `highest_risk`,
|
|
826
|
-
`tool_invocations`.
|
|
827
|
-
|
|
828
|
-
---
|
|
829
|
-
|
|
830
|
-
## Steering and Resume
|
|
831
|
-
|
|
832
|
-
### Steer — redirect any running job
|
|
833
|
-
|
|
834
|
-
`steer` sends message to running specialist. Delivered after current tool call
|
|
835
|
-
finishes, before next LLM call.
|
|
836
|
-
|
|
837
|
-
```bash
|
|
838
|
-
specialists steer a1b2c3 "STOP what you are doing. Focus only on supervisor.ts"
|
|
839
|
-
specialists steer a1b2c3 "Do NOT audit. Write the actual file to disk now."
|
|
840
|
-
```
|
|
841
|
-
|
|
842
|
-
### Resume — continue a keep-alive session
|
|
843
|
-
|
|
844
|
-
`resume` sends new prompt to specialist in `waiting` state. Retains full conversation history.
|
|
845
|
-
|
|
846
|
-
**Specialists always use `--keep-alive`:**
|
|
847
|
-
|
|
848
|
-
| Specialist | Enters `waiting` after | What to send via `resume` |
|
|
849
|
-
|-----------|----------------------|--------------------------|
|
|
850
|
-
| **executor** | First turn completion (may be partial if bailed early) | "proceed, this is additive", "Reviewer PARTIAL. Fix: <findings>", or "Reviewer PASS. Git add and commit your changes." |
|
|
851
|
-
| **researcher** | Delivering research findings | Follow-up question, new angle, or "done, thanks" |
|
|
852
|
-
| **reviewer** | Delivering verdict (PASS/PARTIAL/FAIL) | Your response, clarification, or "accepted, close out" |
|
|
853
|
-
| **overthinker** | Phase 4 conclusion | Follow-up question, counter-argument, or "done, thanks" |
|
|
854
|
-
| **debugger** | Phase 3 fix attempt or Phase 4 verify result | Follow-up fix, "try different approach", "Reviewer PASS. Git add and commit your changes.", or "done" |
|
|
855
|
-
| **sync-docs** | Audit report or targeted update result | "approve", "deny", or specific instructions |
|
|
856
|
-
|
|
857
|
-
> **Warning:** job in `waiting` looks identical to stalled job. **Always check with `sp ps`
|
|
858
|
-
> before killing keep-alive job.**
|
|
859
|
-
|
|
860
|
-
> **Critical:** Never stop executor or debugger before reviewer delivers its verdict.
|
|
861
|
-
> Stopping prematurely: (1) kills resume path for fix loops, (2) risks uncommitted changes
|
|
862
|
-
> (executors don't auto-commit), and (3) forces dispatching new specialist instead of resuming.
|
|
863
|
-
|
|
864
|
-
```bash
|
|
865
|
-
# Check before stopping
|
|
866
|
-
specialists ps d4e5f6
|
|
867
|
-
# -> status: waiting ← healthy, expecting input
|
|
868
|
-
|
|
869
|
-
specialists resume d4e5f6 "What about backward compatibility?"
|
|
870
|
-
specialists stop d4e5f6 # only when truly done iterating — after reviewer PASS + commit verified
|
|
871
|
-
```
|
|
872
|
-
|
|
873
|
-
---
|
|
874
|
-
|
|
875
|
-
## Chain and Epic Orchestration
|
|
876
|
-
|
|
877
|
-
For multi-step work, dispatch chains under **epic**.
|
|
878
|
-
|
|
879
|
-
**chain** is worktree lineage (executor → reviewer → fix → re-review). Chains within same epic may run in parallel **only if they are independent** (disjoint file scopes). Stages are strictly sequential: **never start Stage N+1 before Stage N completes AND is merged via `sp epic merge`**.
|
|
880
|
-
|
|
881
|
-
### Chain rules
|
|
882
|
-
|
|
883
|
-
1. **Sequence between stages.** Prep (explorer/planner) → implementation chains → review → tests → doc sync.
|
|
884
|
-
2. **Parallelize only within stage.** Chains don't depend on each other may run together.
|
|
885
|
-
3. **no overlap stages.** Wait for every chain job, read results, update beads, merge epic.
|
|
886
|
-
4. **Bead deps encode pipeline.** dependency graph must match stage order.
|
|
887
|
-
5. **`--context-depth 2` for all chained runs.** Each specialist sees parent + predecessor.
|
|
888
|
-
6. **Merge via `sp epic merge` is mandatory.** See Merge Protocol above.
|
|
889
|
-
|
|
890
|
-
### Polling chains
|
|
891
|
-
|
|
892
|
-
```bash
|
|
893
|
-
specialists ps # list all jobs — shows epic grouping, status, elapsed
|
|
894
|
-
specialists ps abc123 # inspect specific job (full detail)
|
|
895
|
-
specialists ps --follow # live dashboard with epic grouping
|
|
896
|
-
```
|
|
897
|
-
|
|
898
|
-
`sp ps` shows epic-level grouping:
|
|
899
|
-
|
|
900
|
-
```
|
|
901
|
-
◆ epic:unitAI-3f7b · merge_ready · state:resolving · prep done=2/2 · chains pass=3/3
|
|
902
|
-
prep:exp-1 · done
|
|
903
|
-
prep:plan-2 · done
|
|
904
|
-
chain:impl-a (reviewer PASS) · branch:feature/unitAI-impl-a-executor
|
|
905
|
-
chain:impl-b (reviewer PASS) · branch:feature/unitAI-impl-b-executor
|
|
906
|
-
chain:impl-c (reviewer PASS) · branch:feature/unitAI-impl-c-executor
|
|
907
|
-
```
|
|
908
|
-
|
|
909
|
-
stage is complete when every chain is terminal AND you have:
|
|
910
|
-
1. Read results: `specialists result <job-id>` for each
|
|
911
|
-
2. Updated/closed beads as needed
|
|
912
|
-
3. Published via `sp epic merge <epic-id>`
|
|
913
|
-
|
|
914
|
-
### Canonical multi-stage example
|
|
915
|
-
|
|
916
|
-
```bash
|
|
917
|
-
# 0. Create epic bead (top merge-gated identity)
|
|
918
|
-
bd create --title "Add worktree isolation to executor" --type epic --priority 1
|
|
919
|
-
# -> unitAI-3f7b
|
|
920
|
-
|
|
921
|
-
# 1. Create prep and impl beads as children of the epic
|
|
922
|
-
bd create --title "Explore: map job run architecture" --type task --priority 2 # -> unitAI-exp
|
|
923
|
-
bd dep add exp 3f7b
|
|
924
|
-
bd create --title "Implement: worktree isolation" --type task --priority 2 # -> unitAI-impl
|
|
925
|
-
bd dep add impl exp
|
|
926
|
-
# Note: reviewer runs via --job, inherits epic from impl bead.parent
|
|
927
|
-
|
|
928
|
-
# Stage 1 — Explorer (prep job, declares epic explicitly)
|
|
929
|
-
specialists run explorer --bead unitAI-exp --epic unitAI-3f7b --context-depth 2 --background
|
|
930
|
-
# -> Job started: job1
|
|
931
|
-
specialists result job1
|
|
932
|
-
|
|
933
|
-
# [NO MERGE] Prep stage has no worktrees to merge
|
|
934
|
-
|
|
935
|
-
# Stage 2 — Executor (chain inherits epic from bead.parent)
|
|
936
|
-
specialists run executor --worktree --bead unitAI-impl --context-depth 2 --background
|
|
937
|
-
# -> Job started: job2 (worktree: .worktrees/unitAI-impl/unitAI-impl-executor)
|
|
938
|
-
# epic_id = bead.parent (unitAI-3f7b)
|
|
939
|
-
specialists result job2
|
|
940
|
-
|
|
941
|
-
# Stage 3 — Reviewer (uses --job, same worktree)
|
|
942
|
-
specialists run reviewer --job job2 --keep-alive --background --prompt "Review implementation"
|
|
943
|
-
# -> Job started: job3
|
|
944
|
-
specialists result job3
|
|
945
|
-
# PASS → ready for epic merge. PARTIAL → fix loop.
|
|
946
|
-
|
|
947
|
-
# Stage 4 — Fix loop (if PARTIAL)
|
|
948
|
-
bd create --title "Fix: reviewer gaps on impl" --type bug --priority 1 # -> unitAI-fix1
|
|
949
|
-
bd dep add fix1 impl
|
|
950
|
-
specialists run executor --bead fix1 --job job2 --context-depth 2 --background
|
|
951
|
-
# Re-review
|
|
952
|
-
specialists run reviewer --job job2 --keep-alive --background --prompt "Re-review after fix"
|
|
953
|
-
|
|
954
|
-
# [MERGE] Publish epic
|
|
955
|
-
sp epic status unitAI-3f7b # verify readiness: merge_ready, all chains PASS
|
|
956
|
-
sp epic merge unitAI-3f7b --rebuild
|
|
957
|
-
|
|
958
|
-
# Close
|
|
959
|
-
bd close 3f7b --reason "Worktree isolation implemented. Reviewer PASS. Epic merged."
|
|
960
|
-
```
|
|
961
|
-
|
|
962
|
-
### Within-stage parallelism (multiple chains)
|
|
963
|
-
|
|
964
|
-
```bash
|
|
965
|
-
# Parallel executors — disjoint files, same parent epic
|
|
966
|
-
bd create --title "Implement: component A" --type task --priority 2 # -> unitAI-impl-a
|
|
967
|
-
bd dep add impl-a exp
|
|
968
|
-
bd create --title "Implement: component B" --type task --priority 2 # -> unitAI-impl-b
|
|
969
|
-
bd dep add impl-b exp
|
|
970
|
-
|
|
971
|
-
specialists run executor --worktree --bead unitAI-impl-a --context-depth 2 --background
|
|
972
|
-
specialists run executor --worktree --bead unitAI-impl-b --context-depth 2 --background
|
|
973
|
-
# Each runs in its own worktree, both belong to unitAI-3f7b (via bead.parent)
|
|
974
|
-
|
|
975
|
-
# Do NOT start next stage until BOTH complete AND epic is merged
|
|
976
|
-
sp epic merge unitAI-3f7b
|
|
977
|
-
```
|
|
978
|
-
|
|
979
|
-
---
|
|
980
|
-
|
|
981
|
-
## Coordinator Responsibilities
|
|
982
|
-
|
|
983
|
-
### 1. Route work — don't explore or implement yourself
|
|
984
|
-
Discovery goes to **explorer** first; implementation goes to **executor** only after discovery is done.
|
|
985
|
-
|
|
986
|
-
### 2. Validate combined output after each stage
|
|
987
|
-
```bash
|
|
988
|
-
npm run lint # project quality gate
|
|
989
|
-
npx tsc --noEmit # type check
|
|
990
|
-
git diff --stat # review what changed
|
|
991
|
-
```
|
|
992
|
-
|
|
993
|
-
### 3. Handle failures — don't silently fall back
|
|
994
|
-
```bash
|
|
995
|
-
specialists feed <job-id> # see what happened
|
|
996
|
-
specialists doctor # check for systemic issues
|
|
997
|
-
```
|
|
998
|
-
|
|
999
|
-
Options when specialist fails:
|
|
1000
|
-
- **Steer**: `specialists steer <id> "Focus on X instead"`
|
|
1001
|
-
- **Switch**: e.g. sync-docs stalls → try executor
|
|
1002
|
-
- **Stop and report** to user before doing it yourself
|
|
1003
|
-
|
|
1004
|
-
### 4. Merge via epic (CRITICAL)
|
|
1005
|
-
See Merge Protocol above. Use `sp epic merge <epic-id>` — no exceptions.
|
|
1006
|
-
|
|
1007
|
-
### 5. Run drift detection after doc-heavy sessions
|
|
1008
|
-
```bash
|
|
1009
|
-
python3 .xtrm/skills/default/sync-docs/scripts/drift_detector.py scan --json
|
|
1010
|
-
python3 .xtrm/skills/default/sync-docs/scripts/drift_detector.py update-sync <file>
|
|
1011
|
-
```
|
|
1012
|
-
|
|
1013
|
-
---
|
|
1014
|
-
|
|
1015
|
-
## MCP Tools (Claude Code)
|
|
1016
|
-
|
|
1017
|
-
| Tool | Purpose |
|
|
1018
|
-
|------|---------|
|
|
1019
|
-
| `use_specialist` | Foreground run; pass `bead_id` for tracked work, get final output in conversation context |
|
|
1020
|
-
|
|
1021
|
-
MCP is intentionally minimal. Use CLI for orchestration, monitoring, steering, resume, and cancellation.
|
|
1022
|
-
|
|
1023
|
-
---
|
|
1024
|
-
|
|
1025
|
-
## Known Issues
|
|
1026
|
-
|
|
1027
|
-
- **READ_ONLY output auto-appends** to input bead after completion (via Supervisor). Output available via `specialists result`.
|
|
1028
|
-
- **`--bead` and `--prompt` conflict** by design. For tracked work, update bead notes: `bd update <id> --notes "INSTRUCTION: ..."` `--bead` only.
|
|
1029
|
-
- **Job in `waiting` now shows magenta status** with resume hint in `status`, WAIT banner in `feed`, and resume footer in `result`. Always check before stopping keep-alive job.
|
|
1030
|
-
- **Explorer (qwen) may produce empty output** — model sometimes completes tool calls but fails to emit final text summary. bead notes will be empty. If happens, either re-run with different model or do investigation yourself.
|
|
1031
|
-
- **`specialists init` requires xtrm** — `.xtrm/` directory and `xt` CLI must exist. Use `--no-xtrm-check` to bypass in CI/testing.
|
|
1032
|
-
- **`specialists doctor` now detects skill drift** — compares `config/skills/` hashes against `.xtrm/skills/default/` and validates symlink chains.
|
|
1033
|
-
|
|
1034
|
-
---
|
|
1035
|
-
|
|
1036
|
-
## Troubleshooting
|
|
1037
|
-
|
|
1038
|
-
```bash
|
|
1039
|
-
specialists doctor # health check: hooks, MCP, zombie jobs, skill drift detection
|
|
1040
|
-
specialists edit <name> # edit specialist config (dot-path, --preset)
|
|
1041
|
-
specialists clean --processes # kill stale/zombie specialist processes
|
|
1042
|
-
```
|
|
1043
|
-
|
|
1044
|
-
- **RPC timeout on worktree job start** (30s, `command id=1`) → pi runs `npm install` in fresh
|
|
1045
|
-
worktrees if `.pi/settings.json` lists local packages. Root cause: worktree gets stale copy
|
|
1046
|
-
of `.pi/settings.json` from branch point. Fix: ensure `.pi/settings.json` has
|
|
1047
|
-
`"packages": []` (packages are global now). `provisionWorktree()` symlinks
|
|
1048
|
-
`.pi/npm/node_modules` to main repo's as safety net.
|
|
1049
|
-
- **RPC timeout on non-worktree job** → check for: (1) zombie vitest/tinypool processes
|
|
1050
|
-
(`ps aux | grep vitest`, `kill`), (2) stale dist (`npm run build`),
|
|
1051
|
-
(3) model provider issues (try different model to isolate).
|
|
1052
|
-
- **"specialist not found"** → `specialists list` (project-scope only)
|
|
1053
|
-
- **Job hangs** → `specialists steer <id> "finish up"` or `specialists stop <id>`
|
|
1054
|
-
- **Config skipped** → stderr shows `[specialists] skipping <file>: <reason>`
|
|
1055
|
-
- **Stall timeout** → specialist hit 120s inactivity. Check `specialists feed <id>`, retry or switch.
|
|
1056
|
-
- **`--prompt` and `--bead` conflict** → use bead notes: `bd update <id> --notes "INSTRUCTION: ..."` `--bead` only.
|
|
1057
|
-
- **Worktree already exists** → it will be reused (not recreated). Safe to re-run.
|
|
1058
|
-
- **`--job` fails: worktree_path missing** → target job was not started with `--worktree`. Use `--worktree` on next run.
|
|
1059
|
-
- **`--job` without `--prompt` or `--bead`** → reviewer/executor requires one of . Use `--prompt "Review the X implementation"` with `--job`.
|
|
1060
|
-
- **Stale specialist processes** → SessionStart hook warns about old binary versions. Run `specialists clean --processes` to kill them all.
|
|
1061
|
-
- **`specialists init` fails with xtrm error** → xtrm must be installed first: `npm install -g xtrm-tools && xt install`. Use `--no-xtrm-check` in CI.
|
|
1062
|
-
- **Skill drift detected by doctor** → Run `specialists init --sync-skills` to re-sync canonical skills to `.xtrm/skills/default/` and refresh active symlinks.
|
|
1063
|
-
|
|
1064
|
-
## Coverage Checklist
|
|
1065
|
-
- [x] Hard Rules
|
|
1066
|
-
- [x] When to Use This Skill
|
|
1067
|
-
- [x] Canonical Workflow
|
|
1068
|
-
- [x] Taxonomy: Job | Chain | Epic
|
|
1069
|
-
- [x] Chained Bead Pipeline
|
|
1070
|
-
- [x] --job, --worktree, and --epic Semantics
|
|
1071
|
-
- [x] Dependency Mapping
|
|
1072
|
-
- [x] Review and Fix Loop
|
|
1073
|
-
- [x] Chain Lifecycle — Members Are Alive Until Merge
|
|
1074
|
-
- [x] Merge Protocol — Epic Publication
|
|
1075
|
-
- [x] Bead-First Workflow (`--bead` is the prompt)
|
|
1076
|
-
- [x] Choosing the Right Specialist
|
|
1077
|
-
- [x] Steering and Resume
|
|
1078
|
-
- [x] Chain and Epic Orchestration
|
|
1079
|
-
- [x] Coordinator Responsibilities
|
|
1080
|
-
- [x] MCP Tools (Claude Code)
|
|
1081
|
-
- [x] Known Issues
|
|
1082
|
-
- [x] Troubleshooting
|