@jaggerxtrm/specialists 3.10.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/config/hooks/specialists-session-start.mjs +33 -1
- package/config/mandatory-rules/bead-id-verbatim.md +14 -0
- package/config/mandatory-rules/changelog-conventions.md +21 -0
- package/config/mandatory-rules/changelog-keeper-scope.md +50 -0
- package/config/mandatory-rules/gitnexus-required.md +6 -1
- package/config/mandatory-rules/per-turn-handoff-schema.md +16 -0
- package/config/mandatory-rules/sync-docs-scope-discipline.md +40 -0
- package/config/skills/releasing/SKILL.md +82 -0
- package/config/skills/specialists-creator/SKILL.md +100 -10
- package/config/skills/specialists-creator/scripts/validate-specialist.ts +1 -1
- package/config/skills/update-specialists/SKILL.md +192 -325
- package/config/skills/using-kpi/SKILL.md +236 -0
- package/config/skills/using-script-specialists/SKILL.md +208 -0
- package/config/skills/using-specialists-v2/SKILL.md +162 -28
- package/config/skills/using-specialists-v3/SKILL.md +562 -0
- package/config/skills/using-specialists-v3/evals/evals.json +89 -0
- package/config/specialists/changelog-drafter.specialist.json +62 -0
- package/config/specialists/changelog-keeper.specialist.json +80 -0
- package/config/specialists/code-sanity.specialist.json +108 -0
- package/config/specialists/debugger.specialist.json +7 -5
- package/config/specialists/executor.specialist.json +7 -5
- package/config/specialists/explorer.specialist.json +16 -5
- package/config/specialists/memory-processor.specialist.json +4 -4
- package/config/specialists/node-coordinator.specialist.json +3 -3
- package/config/specialists/overthinker.specialist.json +5 -4
- package/config/specialists/planner.specialist.json +7 -5
- package/config/specialists/researcher.specialist.json +5 -4
- package/config/specialists/reviewer.specialist.json +7 -5
- package/config/specialists/security-auditor.specialist.json +111 -0
- package/config/specialists/specialists-creator.specialist.json +6 -5
- package/config/specialists/sync-docs.specialist.json +18 -19
- package/config/specialists/test-runner.specialist.json +5 -4
- package/config/specialists/xt-merge.specialist.json +4 -4
- package/dist/index.js +3379 -1168
- package/dist/lib.js +518 -154
- package/dist/types/cli/clean.d.ts.map +1 -1
- package/dist/types/cli/config.d.ts.map +1 -1
- package/dist/types/cli/db.d.ts.map +1 -1
- package/dist/types/cli/doctor.d.ts.map +1 -1
- package/dist/types/cli/feed.d.ts.map +1 -1
- package/dist/types/cli/help.d.ts.map +1 -1
- package/dist/types/cli/init.d.ts.map +1 -1
- package/dist/types/cli/list.d.ts +4 -0
- package/dist/types/cli/list.d.ts.map +1 -1
- package/dist/types/cli/merge.d.ts +4 -2
- package/dist/types/cli/merge.d.ts.map +1 -1
- package/dist/types/cli/node.d.ts.map +1 -1
- package/dist/types/cli/prune-stale-defaults.d.ts +2 -0
- package/dist/types/cli/prune-stale-defaults.d.ts.map +1 -0
- package/dist/types/cli/ps.d.ts.map +1 -1
- package/dist/types/cli/result.d.ts.map +1 -1
- package/dist/types/cli/run.d.ts.map +1 -1
- package/dist/types/cli/script.d.ts.map +1 -1
- package/dist/types/cli/serve-hot-reload.d.ts +13 -0
- package/dist/types/cli/serve-hot-reload.d.ts.map +1 -0
- package/dist/types/cli/serve.d.ts +28 -0
- package/dist/types/cli/serve.d.ts.map +1 -1
- package/dist/types/cli/status.d.ts.map +1 -1
- package/dist/types/cli/stop.d.ts.map +1 -1
- package/dist/types/cli/version-check.d.ts +20 -0
- package/dist/types/cli/version-check.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/pi/session.d.ts +10 -0
- package/dist/types/pi/session.d.ts.map +1 -1
- package/dist/types/specialist/canonical-asset-resolver.d.ts +6 -0
- package/dist/types/specialist/canonical-asset-resolver.d.ts.map +1 -0
- package/dist/types/specialist/drift-detector.d.ts +39 -0
- package/dist/types/specialist/drift-detector.d.ts.map +1 -0
- package/dist/types/specialist/epic-lifecycle.d.ts.map +1 -1
- package/dist/types/specialist/epic-readiness.d.ts.map +1 -1
- package/dist/types/specialist/epic-reconciler.d.ts.map +1 -1
- package/dist/types/specialist/loader.d.ts +2 -1
- package/dist/types/specialist/loader.d.ts.map +1 -1
- package/dist/types/specialist/mandatory-rules.d.ts +5 -0
- package/dist/types/specialist/mandatory-rules.d.ts.map +1 -1
- package/dist/types/specialist/manifest-resolver.d.ts +55 -0
- package/dist/types/specialist/manifest-resolver.d.ts.map +1 -0
- package/dist/types/specialist/node-contract.d.ts +2 -2
- package/dist/types/specialist/observability-sqlite.d.ts +43 -0
- package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
- package/dist/types/specialist/payload-measure.d.ts +19 -0
- package/dist/types/specialist/payload-measure.d.ts.map +1 -0
- package/dist/types/specialist/porcelain-parser.d.ts +2 -0
- package/dist/types/specialist/porcelain-parser.d.ts.map +1 -0
- package/dist/types/specialist/resolution-diagnostics.d.ts +36 -0
- package/dist/types/specialist/resolution-diagnostics.d.ts.map +1 -0
- package/dist/types/specialist/runner.d.ts +8 -0
- package/dist/types/specialist/runner.d.ts.map +1 -1
- package/dist/types/specialist/schema.d.ts +27 -0
- package/dist/types/specialist/schema.d.ts.map +1 -1
- package/dist/types/specialist/script-runner.d.ts +44 -1
- package/dist/types/specialist/script-runner.d.ts.map +1 -1
- package/dist/types/specialist/supervisor.d.ts +4 -0
- package/dist/types/specialist/supervisor.d.ts.map +1 -1
- package/dist/types/specialist/timeline-events.d.ts +29 -1
- package/dist/types/specialist/timeline-events.d.ts.map +1 -1
- package/dist/types/specialist/timeline-query.d.ts.map +1 -1
- package/dist/types/specialist/tool-catalog.d.ts +126 -0
- package/dist/types/specialist/tool-catalog.d.ts.map +1 -0
- package/dist/types/tools/specialist/feed_specialist.tool.d.ts +2 -2
- package/dist/types/tools/specialist/use_specialist.tool.d.ts.map +1 -1
- package/package.json +4 -4
- package/config/specialists/.serena/project.yml +0 -151
package/README.md
CHANGED
|
@@ -79,9 +79,12 @@ specialists doctor
|
|
|
79
79
|
| Need | Doc |
|
|
80
80
|
|---|---|
|
|
81
81
|
| Install and bootstrap a project | [docs/bootstrap.md](docs/bootstrap.md) |
|
|
82
|
+
| Release notes and version history | [CHANGELOG.md](CHANGELOG.md) |
|
|
83
|
+
| Changelog drafting specialist | [config/specialists/changelog-keeper.specialist.json](config/specialists/changelog-keeper.specialist.json) |
|
|
82
84
|
| Run a script-class specialist over HTTP (`sp serve`) — overview & contract | [docs/specialists-service.md](docs/specialists-service.md) |
|
|
83
85
|
| Install `sp serve` in another project (sidecar Docker / Podman) | [docs/specialists-service-install.md](docs/specialists-service-install.md) |
|
|
84
86
|
| Build & publish the specialists-service image | [docs/release-image.md](docs/release-image.md) |
|
|
87
|
+
| Release flow (skill + specialist) | [config/skills/releasing/SKILL.md](config/skills/releasing/SKILL.md) |
|
|
85
88
|
| Bead-first workflow and semantics | [docs/workflow.md](docs/workflow.md) |
|
|
86
89
|
| CLI commands and flags | [docs/cli-reference.md](docs/cli-reference.md) |
|
|
87
90
|
| Background jobs, feed, result, stop | [docs/background-jobs.md](docs/background-jobs.md) |
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
// Hook type: SessionStart
|
|
10
10
|
|
|
11
11
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
12
|
-
import { join } from 'node:path';
|
|
12
|
+
import { dirname, join } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
13
14
|
import { homedir } from 'node:os';
|
|
14
15
|
|
|
15
16
|
const cwd = process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
|
|
@@ -17,6 +18,25 @@ const HOME = homedir();
|
|
|
17
18
|
const jobsDir = join(cwd, '.specialists', 'jobs');
|
|
18
19
|
const lines = [];
|
|
19
20
|
|
|
21
|
+
// Resolve specialists package version for hot-tips header.
|
|
22
|
+
function readSpecialistsVersion() {
|
|
23
|
+
// Walk up from this hook's location looking for package.json with name=@jaggerxtrm/specialists or name=specialists.
|
|
24
|
+
let dir = dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
for (let i = 0; i < 8; i++) {
|
|
26
|
+
const pkg = join(dir, 'package.json');
|
|
27
|
+
if (existsSync(pkg)) {
|
|
28
|
+
try {
|
|
29
|
+
const j = JSON.parse(readFileSync(pkg, 'utf-8'));
|
|
30
|
+
if (j?.name && j.name.includes('specialists')) return j.version ?? 'unknown';
|
|
31
|
+
} catch { /* skip */ }
|
|
32
|
+
}
|
|
33
|
+
const parent = dirname(dir);
|
|
34
|
+
if (parent === dir) break;
|
|
35
|
+
dir = parent;
|
|
36
|
+
}
|
|
37
|
+
return 'unknown';
|
|
38
|
+
}
|
|
39
|
+
|
|
20
40
|
// ── 1. Active background jobs ──────────────────────────────────────────────
|
|
21
41
|
if (existsSync(jobsDir)) {
|
|
22
42
|
let entries = [];
|
|
@@ -95,6 +115,18 @@ lines.push('specialists doctor # troubleshoot is
|
|
|
95
115
|
lines.push('```');
|
|
96
116
|
lines.push('');
|
|
97
117
|
lines.push('MCP tools: use_specialist (foreground only)');
|
|
118
|
+
lines.push('');
|
|
119
|
+
|
|
120
|
+
// ── 4. Hot tips (version-pinned, current sp release) ───────────────────────
|
|
121
|
+
const spVersion = readSpecialistsVersion();
|
|
122
|
+
lines.push(`## Specialists — Hot Tips (sp v${spVersion})`);
|
|
123
|
+
lines.push('');
|
|
124
|
+
lines.push('- `--bead` on edit-capable specialists auto-provisions worktree');
|
|
125
|
+
lines.push('- Reviewer enters with `--job <exec-job>`; `--worktree`/`--job` exclusive');
|
|
126
|
+
lines.push('- `sp epic merge <epic>` for epic chains; `sp merge <chain>` for standalone');
|
|
127
|
+
lines.push('- `sp ps`/`sp feed`/`sp result`');
|
|
128
|
+
lines.push('- `--keep-alive` required so reviewer/overthinker can be `sp resume`d');
|
|
129
|
+
lines.push('- `sp merge` fails after `sp stop` cleans status.json — see unitAI-ofjvj');
|
|
98
130
|
|
|
99
131
|
// ── Output ─────────────────────────────────────────────────────────────────
|
|
100
132
|
if (lines.length === 0) process.exit(0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# bead-id-verbatim
|
|
2
|
+
|
|
3
|
+
## Rule
|
|
4
|
+
Source bead-id arguments verbatim from injected context: `bead_id`, branch name, prior turn output, or `bd create` output. Do not retype bead ids from memory or regenerate them.
|
|
5
|
+
|
|
6
|
+
## Command scope
|
|
7
|
+
Applies only to bd commands that take a bead id, especially `bd close`, `bd update`, `bd dep add`, `bd dep list`, and `bd show`.
|
|
8
|
+
|
|
9
|
+
## Legit cases
|
|
10
|
+
- New bead creation: id may not exist yet; once `bd create` returns it, copy exact text forward.
|
|
11
|
+
- Narrative prose: may mention bead ids freely. Only command arguments must be verbatim.
|
|
12
|
+
|
|
13
|
+
## Failure example
|
|
14
|
+
Today logs showed `unitAI-m8744.2` and `unitAI-m8744.3` retyped as `unitAI-m87442` and `unitAI-m87443`; `bd close` then failed with `issue id not found`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: changelog-conventions
|
|
3
|
+
kind: mandatory-rule
|
|
4
|
+
rules:
|
|
5
|
+
- id: keep-a-changelog
|
|
6
|
+
level: required
|
|
7
|
+
text: "Use Keep-a-Changelog format with YAML frontmatter, version headers, and top-level sections Added, Changed, Fixed, Removed, Deprecated, Security."
|
|
8
|
+
- id: one-line-entries
|
|
9
|
+
level: required
|
|
10
|
+
text: "Keep each changelog entry to one line."
|
|
11
|
+
- id: bead-references
|
|
12
|
+
level: required
|
|
13
|
+
text: "Include bead-id references in parentheses when helpful, like (unitAI-123)."
|
|
14
|
+
- id: conventional-commit-mapping
|
|
15
|
+
level: required
|
|
16
|
+
text: "Map conventional commits to sections: feat -> Added, fix -> Fixed, refactor/perf -> Changed, docs -> Changed, chore -> Changed unless user-facing, revert -> Removed, sec/security -> Security."
|
|
17
|
+
- id: section-completeness
|
|
18
|
+
level: required
|
|
19
|
+
text: "Draft all applicable sections in this order: Added, Changed, Fixed, Removed, Deprecated, Security. Omit only empty sections."
|
|
20
|
+
---
|
|
21
|
+
Changelog drafting rules for release automation.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: changelog-keeper-scope
|
|
3
|
+
kind: mandatory-rule
|
|
4
|
+
---
|
|
5
|
+
SINGLE PURPOSE. You exist to produce one release: draft the next CHANGELOG.md section, bump package.json, rebuild dist, commit, tag, and push. Nothing else.
|
|
6
|
+
|
|
7
|
+
EDIT WHITELIST. You may write to ONLY these paths:
|
|
8
|
+
- `CHANGELOG.md` (insert the new release section above the previous one)
|
|
9
|
+
- `package.json` (version field only — no other field)
|
|
10
|
+
- `dist/index.js`, `dist/lib.js`, `dist/types/**` (regenerated by `npm run build` — never hand-edit)
|
|
11
|
+
|
|
12
|
+
EDIT BLACKLIST. NEVER write to ANY of:
|
|
13
|
+
- `src/**` (source code — out of scope, ever)
|
|
14
|
+
- `tests/**` (test code — out of scope)
|
|
15
|
+
- `docs/**` (any markdown except CHANGELOG.md is out of scope)
|
|
16
|
+
- `config/**` (specialist configs, mandatory rules, skills — out of scope)
|
|
17
|
+
- `.specialists/**` (runtime state — out of scope)
|
|
18
|
+
- `.xtrm/**`, `.wolf/**`, `.beads/**` (session bookkeeping — out of scope)
|
|
19
|
+
- `README.md`, `CLAUDE.md`, `AGENTS.md`, `XTRM-GUIDE.md` (top-level docs — out of scope)
|
|
20
|
+
- Any other file not in the EDIT WHITELIST above.
|
|
21
|
+
|
|
22
|
+
If you believe a file outside the whitelist must be edited, STOP and emit `BLOCKED: scope-violation` naming the file and the reason. Do not attempt the edit.
|
|
23
|
+
|
|
24
|
+
INPUT DISCIPLINE. Your synthesis input is xtrm session reports under `.xtrm/reports/`. The bead's SCOPE field names the relevant tag range. Read reports with `Read` and decide which apply. Supplement with `git log --oneline <prev-tag>..HEAD` for tag verification. Do not crawl `src/`, `docs/`, or other source. The reports are pre-filtered, curated synthesis input — that is why they exist.
|
|
25
|
+
|
|
26
|
+
SECTION FORMAT. Apply changelog-conventions (Keep-a-Changelog v1.0.0, one-line bullets, bead-id refs in parens, sections in order Added/Changed/Fixed/Removed/Deprecated/Security, omit empty). Default bucket is Changed. Deprecated is ONLY for explicit sunset/removal notices. No meta-commentary in bullets ("Conventional commit mapping applied", "Bead IDs included parenthetically", etc. — banned).
|
|
27
|
+
|
|
28
|
+
VERSION POLICY. Default is patch bump (`v3.10.0` → `v3.10.1`). Use minor for new features (`v3.11.0`), major only on explicit operator instruction. The bead names the target version explicitly OR specifies the bump type; if neither is present, STOP and emit `BLOCKED: version-not-specified`.
|
|
29
|
+
|
|
30
|
+
INSERT POSITION. The new section goes immediately above the most recent existing release section, below the `[Unreleased]` placeholder. Re-emit an empty `[Unreleased]` placeholder above the new section.
|
|
31
|
+
|
|
32
|
+
GIT DISCIPLINE. After file edits + rebuild succeed:
|
|
33
|
+
- `git add CHANGELOG.md package.json dist/` (no other paths)
|
|
34
|
+
- `git diff --cached --stat` and confirm only whitelisted paths are staged. If anything else is staged, STOP and report.
|
|
35
|
+
- `git commit -m "release: vX.Y.Z"` (exactly this format, no other prefix or suffix)
|
|
36
|
+
- `git tag -a vX.Y.Z -m "<one-line summary derived from changelog section>"`
|
|
37
|
+
- `git push --follow-tags origin <branch>`
|
|
38
|
+
- Optional: `gh release create vX.Y.Z --notes "<the changelog section body>"` (only if `gh` is available and the bead requests it)
|
|
39
|
+
|
|
40
|
+
NO DESTRUCTIVE OPS. Never `git reset --hard`, never `git push --force`, never delete tags, never rewrite history. If a prior release commit/tag is wrong, STOP and report — operator handles repair.
|
|
41
|
+
|
|
42
|
+
SELF-VERIFY. Before finishing, run `git diff --stat HEAD~1 HEAD` and confirm the result matches:
|
|
43
|
+
- `CHANGELOG.md` modified
|
|
44
|
+
- `package.json` modified
|
|
45
|
+
- `dist/**` modified
|
|
46
|
+
- nothing else
|
|
47
|
+
|
|
48
|
+
If anything else appears, the operator's manual edits leaked in. STOP and emit `BLOCKED: scope-leak` naming the offending paths.
|
|
49
|
+
|
|
50
|
+
OUTPUT SHAPE. Final report must include: `VERSION: vX.Y.Z`, `VERDICT: <RELEASED|BLOCKED>`, `SECTION_DRAFTED: <one-line summary>`, `FILES_CHANGED: <list>`, `COMMIT: <sha>`, `TAG: <vX.Y.Z>`, `PUSHED: <true|false>`, `GH_RELEASE: <url|none>`. On BLOCKED, name the precondition violated.
|
|
@@ -11,6 +11,11 @@ Tools (prefer MCP; fall back to CLI if MCP unavailable):
|
|
|
11
11
|
- Pre-commit scope check: `gitnexus_detect_changes()` (MCP only — fallback: `git diff --stat`).
|
|
12
12
|
|
|
13
13
|
Rules:
|
|
14
|
-
- Run impact for every symbol you modify; never edit without it.
|
|
14
|
+
- Run impact for every existing symbol you modify; never edit without it.
|
|
15
15
|
- Never rename via find-replace — use `gitnexus_rename({symbol_name, new_name, dry_run:true})` first.
|
|
16
16
|
- If index is stale, ask the user to run `npx gitnexus analyze`.
|
|
17
|
+
|
|
18
|
+
New-file scope (escape hatch):
|
|
19
|
+
- When the diff adds only new files (new specialist JSON, new mandatory-rule, new test, new doc) and modifies no existing functions/classes/methods, blast-radius analysis is moot. State this explicitly in your output ("new-file scope; no existing-symbol modifications") and skip the impact call.
|
|
20
|
+
- This applies to dispatch entries that merely add a routing case to an existing function (e.g. `src/index.ts` subcommand wiring): the touched symbol is the dispatcher, but the change is purely additive and equivalent to a registration. Note the dispatch addition and skip impact — list the new files instead.
|
|
21
|
+
- Reviewer compliance: when authoritative_diff shows only new files (or additive dispatch entries), the "verify blast radius" requirement is satisfied by the executor's new-file-scope statement; do not flag as unmet.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: per-turn-handoff-schema
|
|
3
|
+
kind: mandatory-rule
|
|
4
|
+
---
|
|
5
|
+
End every `run_complete` turn, resume turns included, with JSON last. Use `docs/specialists/handoff-schema.md` for required common fields and role-specific fields. Keep block small and valid. Minimal block:
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"status": "success",
|
|
10
|
+
"summary": "Done.",
|
|
11
|
+
"files_changed": [],
|
|
12
|
+
"follow_ups": [],
|
|
13
|
+
"risks": [],
|
|
14
|
+
"verification": []
|
|
15
|
+
}
|
|
16
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-docs-scope-discipline
|
|
3
|
+
kind: mandatory-rule
|
|
4
|
+
---
|
|
5
|
+
ONE DOC PER INVOCATION. The bead's `SCOPE` field MUST name exactly one doc path. If `SCOPE` names zero docs, more than one doc, or anything other than a single `docs/<name>.md` (or `CHANGELOG.md` / `README.md` if that IS the SCOPE doc), STOP immediately and emit a `BLOCKED: scope-violation` report. Do not proceed.
|
|
6
|
+
|
|
7
|
+
INPUTS ARE FIXED. Your only sources of truth for what changed in the project:
|
|
8
|
+
- The pre-script output above (latest xt report excerpt + recent master commits).
|
|
9
|
+
- Your one doc's content (read with `Read`).
|
|
10
|
+
- `python3 .xtrm/skills/default/sync-docs/scripts/drift_detector.py scan --json` — output MUST be filtered to your one SCOPE doc (jq or python filter). Discard all other entries.
|
|
11
|
+
- `python3 .xtrm/skills/default/sync-docs/scripts/context_gatherer.py --doc <YOUR_SCOPE_DOC>` — exactly that doc, no broader flags.
|
|
12
|
+
|
|
13
|
+
DIFF ESCAPE VALVE — STRICT. When a commit subject is insufficient to judge a claim in your doc, run `git show <hash> -- <path1> [<path2>...]` for ONE commit, naming only paths the doc actually claims about. Maximum 3 such commits per run. FORBIDDEN: `git diff <a>..<b>` (range diffs), `git show <hash>` without `--`, `git log -p`, `git log --stat` over more than 5 commits.
|
|
14
|
+
|
|
15
|
+
DO NOT INSPECT SOURCE FILES BY ANY TOOL. The following are forbidden on `src/`, `tests/`, `pi/`, `packages/`, `config/specialists/`, `.specialists/default/`, or any non-doc path:
|
|
16
|
+
- `Read` / `cat` / `head` / `tail` / `sed -n` / `awk` / `less` / `more`
|
|
17
|
+
- `Grep` / `grep` / `rg` / `git grep`
|
|
18
|
+
- `Glob` / `find` / `ls -R`
|
|
19
|
+
- `python -c "open(...)"`, `python -c "Path(...).read_text()"`, or any scripted file slurp
|
|
20
|
+
- `Bash` invocations that pipe source files anywhere (`< srcfile`, `cat srcfile | ...`)
|
|
21
|
+
|
|
22
|
+
The pre-script context plus per-commit `git show -- <paths>` is exhaustive. Reading source by any other route is the failure mode this specialist exists to prevent.
|
|
23
|
+
|
|
24
|
+
EXCEPTION (sole allowed source-inspection path): the `git show <hash> -- <paths>` form described above. No other tool, command, or pattern is permitted to read source files. The "DO NOT INSPECT SOURCE FILES" ban applies to every tool *except* this one bounded form.
|
|
25
|
+
|
|
26
|
+
EDIT BOUNDARY. Edit ONLY your one SCOPE doc. NEVER touch CHANGELOG (unless it IS your SCOPE doc), README, `.xtrm/skills/`, other docs, or any source file. Cross-cutting updates are separate beads with their own SCOPE.
|
|
27
|
+
|
|
28
|
+
NO RE-READING. If you have already gathered context this turn, refer to your prior output. Do NOT re-fetch after compaction. If prior gathered context is unreachable after compaction, STOP and emit `BLOCKED: context-lost-after-compaction` — do not re-run tools to recover.
|
|
29
|
+
|
|
30
|
+
OBEY STEER AND STOP. When the orchestrator or user issues a steer or stop, comply on the very next tool call. Do not finish "one more thing".
|
|
31
|
+
|
|
32
|
+
BUDGET. Per run: ONE drift scan (filtered), ONE context_gatherer call (only if pre-script context is insufficient), max THREE `git show <hash> -- <paths>` calls, ONE doc edit pass, ONE final drift validation. No exploratory loops.
|
|
33
|
+
|
|
34
|
+
STOP CONDITIONS. Stop and emit your final report when ANY is true:
|
|
35
|
+
- The one doc has been edited and stamped (`VERDICT: UPDATED`).
|
|
36
|
+
- You determine no edit is needed (`VERDICT: NO_CHANGE_NEEDED`, cite commit evidence).
|
|
37
|
+
- A precondition above is violated (`VERDICT: BLOCKED`, name the violation).
|
|
38
|
+
- Steer or stop received.
|
|
39
|
+
|
|
40
|
+
OUTPUT SHAPE. Final report must include: `DOC: <path>`, `VERDICT: <UPDATED|NO_CHANGE_NEEDED|BLOCKED>`, `COMMITS_REVIEWED: <hashes>`, `EDITS: <summary or "none">`, `DRIFT_BEFORE`, `DRIFT_AFTER`, optional `SUGGESTED_FOLLOWUPS: <other doc names — never edited>`.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: releasing
|
|
3
|
+
description: >-
|
|
4
|
+
Cut a release end-to-end via xt release. Use when the operator wants to
|
|
5
|
+
publish a new tag (vX.Y.Z) — drafts CHANGELOG section from xt reports,
|
|
6
|
+
bumps package.json, rebuilds dist, commits, tags, pushes, optional GH
|
|
7
|
+
release. Strict scope: only CHANGELOG.md + package.json + dist/.
|
|
8
|
+
version: 1.2.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# releasing
|
|
12
|
+
|
|
13
|
+
One-step release publication via specialist delegation.
|
|
14
|
+
|
|
15
|
+
## When to use
|
|
16
|
+
|
|
17
|
+
The operator wants to cut a release. They say "release it", "ship vX.Y.Z", "cut a tag", or just "release".
|
|
18
|
+
|
|
19
|
+
## How
|
|
20
|
+
|
|
21
|
+
1. Determine target version. Default is patch bump from most recent semver tag. Operator may specify `--minor`, `--major`, or explicit version.
|
|
22
|
+
|
|
23
|
+
2. Determine tag range. Default is `<latest-tag>..HEAD`. For backfills, operator names `--from` / `--to` explicitly.
|
|
24
|
+
|
|
25
|
+
3. Create release bead. Template:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
PROBLEM: Cut release vX.Y.Z covering <prev-tag>..HEAD.
|
|
29
|
+
SUCCESS: CHANGELOG.md updated with new section above prior release; package.json bumped; dist rebuilt; commit `release: vX.Y.Z` pushed with tag.
|
|
30
|
+
SCOPE: CHANGELOG.md, package.json, dist/. Synthesis input: xt reports under .xtrm/reports/ dated within <prev-tag-date>..HEAD.
|
|
31
|
+
NON_GOALS: No source/docs/config edits. No retroactive changes to prior release sections.
|
|
32
|
+
CONSTRAINTS: Keep-a-Changelog v1.0.0 format. One-line bullets. Default bucket Changed. Deprecated only for explicit sunsets.
|
|
33
|
+
VALIDATION: git diff --stat HEAD~1 HEAD shows only CHANGELOG.md, package.json, dist/.
|
|
34
|
+
OUTPUT: Final report with VERSION, COMMIT, TAG, PUSHED status.
|
|
35
|
+
GH_RELEASE: <true|false> # whether to also `gh release create`
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
4. Dispatch specialist:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
xt release prepare --from <prev-tag> --to HEAD --patch
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
or `xt release publish` once draft is approved. `xt release` invokes
|
|
45
|
+
`sp script changelog-keeper` synchronously, READ_ONLY, template-driven.
|
|
46
|
+
No HTTP. No bead. No worktree.
|
|
47
|
+
|
|
48
|
+
5. Verify diff after specialist completes.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git diff --stat HEAD~1 HEAD
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Output MUST show only:
|
|
55
|
+
- `CHANGELOG.md`
|
|
56
|
+
- `package.json`
|
|
57
|
+
- `dist/index.js`, `dist/lib.js`, `dist/types/**`
|
|
58
|
+
|
|
59
|
+
6. If diff check passes, release shipped. Confirm:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
git tag --list 'v*' | tail -3
|
|
63
|
+
git log --oneline -1
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Why this design
|
|
67
|
+
|
|
68
|
+
- Specialist does work itself. No CLI plumbing, no template substitution, no JSON output schema, no two-phase prepare/publish gate.
|
|
69
|
+
- Mandatory rule `changelog-keeper-scope` enforces edit whitelist.
|
|
70
|
+
- Operator gate is single `git diff --stat HEAD~1 HEAD` check after specialist finishes.
|
|
71
|
+
- xt reports are synthesis input, not git log + bd query. Reports are pre-curated, signal-rich, written in user-facing language.
|
|
72
|
+
- New pre-script injects a bounded xt report bundle first so changelog bullets can reflect intent and post-mortem context, not just file diffs.
|
|
73
|
+
|
|
74
|
+
## Parallel sessions
|
|
75
|
+
|
|
76
|
+
Each orchestrator runs this skill in its own session. Specialist commits + tags + pushes atomically. If two sessions try same version, first push wins; second sees remote tag conflict and aborts cleanly. Operator picks next version and retries.
|
|
77
|
+
|
|
78
|
+
## Don't
|
|
79
|
+
|
|
80
|
+
- Don't manually `sp release prepare`/`publish` — deprecated aliases only. Use `xt release prepare`/`publish`.
|
|
81
|
+
- Don't edit CHANGELOG.md outside release flow — manual edits leak into next release diff and break scope verification.
|
|
82
|
+
- Don't pre-stage files. Specialist stages exactly what it commits.
|
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
agent through writing a valid `.specialist.json`, choosing supported models,
|
|
6
6
|
validating against the schema, and avoiding common specialist authoring
|
|
7
7
|
mistakes.
|
|
8
|
-
version: 1.
|
|
8
|
+
version: 1.2
|
|
9
9
|
synced_at: 236ca5e6
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -13,6 +13,22 @@ synced_at: 236ca5e6
|
|
|
13
13
|
|
|
14
14
|
> Source of truth: `src/specialist/schema.ts` | Runtime: `src/specialist/runner.ts`
|
|
15
15
|
|
|
16
|
+
|
|
17
|
+
## Canonical References
|
|
18
|
+
|
|
19
|
+
When a custom specialist needs a standard rule or skill, reference the canonical asset by name instead of copying its file into the repo. Runtime/package fallback resolves canonical mandatory rules and skills when no project-local override exists.
|
|
20
|
+
|
|
21
|
+
Example:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mandatory_rules": { "template_sets": ["serena-cheatsheet"] },
|
|
26
|
+
"skills": { "paths": ["releasing"] }
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Only create project-local copies when intentionally changing canonical behavior. After setting references, run `sp config show <name> --resolved` to verify the resolved runtime surface.
|
|
31
|
+
|
|
16
32
|
---
|
|
17
33
|
|
|
18
34
|
## ACTION REQUIRED BEFORE ANYTHING ELSE
|
|
@@ -40,6 +56,7 @@ Model tiers:
|
|
|
40
56
|
Rules:
|
|
41
57
|
- Always pick the **highest version** in a family (`claude-sonnet-4-6` not `4-5`, `gemini-3.1-pro-preview` not `gemini-2.5-pro`)
|
|
42
58
|
- `model` and `fallback_model` must be **different providers**
|
|
59
|
+
- If a specialist needs a longer fallback chain, keep first fallback in `fallback_model` and let runtime supply any extra retry tier.
|
|
43
60
|
- Never write a model string you have not pinged in this session
|
|
44
61
|
|
|
45
62
|
---
|
|
@@ -162,6 +179,10 @@ specialists models # confirm assignments look balanced
|
|
|
162
179
|
|
|
163
180
|
---
|
|
164
181
|
|
|
182
|
+
## Canonical references
|
|
183
|
+
|
|
184
|
+
Reference any canonical skill or rule by name; runtime finds it.
|
|
185
|
+
|
|
165
186
|
## Quick Start: Scaffold + `sp edit`
|
|
166
187
|
|
|
167
188
|
```bash
|
|
@@ -201,19 +222,47 @@ bun config/skills/specialists-creator/scripts/validate-specialist.ts config/spec
|
|
|
201
222
|
|-------|------|----------|-------|
|
|
202
223
|
| `name` | string | yes | kebab-case: `[a-z][a-z0-9-]*` |
|
|
203
224
|
| `version` | string | yes | semver: `1.0.0` |
|
|
204
|
-
| `description` | string | yes |
|
|
225
|
+
| `description` | string | yes | Routing summary surfaced by `specialists list`; see Description writing below |
|
|
205
226
|
| `category` | string | yes | Free text (e.g. `workflow`, `analysis`, `codegen`) |
|
|
206
227
|
| `author` | string | no | Optional |
|
|
207
228
|
| `created` | string | no | Optional date |
|
|
208
229
|
| `updated` | string | no | Optional date, quote it: `"2026-03-22"` |
|
|
209
230
|
| `tags` | string[] | no | Optional list |
|
|
210
231
|
|
|
232
|
+
|
|
233
|
+
### Description writing for `specialists list`
|
|
234
|
+
|
|
235
|
+
`specialist.metadata.description` is the routing surface that orchestrators see in `specialists list`. Write it as an operational role definition, not marketing copy. Keep the first clause distinctive because list output may truncate.
|
|
236
|
+
|
|
237
|
+
A good description answers, in this order:
|
|
238
|
+
|
|
239
|
+
1. **Choose when** — the task shape that should route here.
|
|
240
|
+
2. **Do not choose when** — adjacent roles that should win instead.
|
|
241
|
+
3. **Distinctive capability** — what this specialist does that others do not.
|
|
242
|
+
4. **Permission/risk note** — READ_ONLY/LOW/MEDIUM/HIGH implication when it affects orchestration.
|
|
243
|
+
|
|
244
|
+
Pattern:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
<role noun>. Use for <specific task shape>. Not for <near misses>; use <better roles>. <permission/workflow distinction>.
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Examples:
|
|
251
|
+
|
|
252
|
+
```text
|
|
253
|
+
Scoped implementation only. Use when requirements, files/symbols, constraints, and validation are clear. Not diagnosis, planning, review, tests, release, or research. HIGH worktree.
|
|
254
|
+
|
|
255
|
+
Debug symptoms/errors/regressions first. Use when cause is unknown or tests fail unexpectedly; traces, fixes targeted code, and verifies. HIGH keep-alive.
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Avoid vague descriptions like "general purpose assistant" or "helps with code". Those cause orchestrators to overuse familiar specialists instead of routing to debugger, test-runner, researcher, sync-docs, or other sharper roles.
|
|
259
|
+
|
|
211
260
|
### `specialist.execution` (required)
|
|
212
261
|
|
|
213
262
|
| Field | Type | Default | Notes |
|
|
214
263
|
|-------|------|---------|-------|
|
|
215
264
|
| `model` | string | — | required — ping before using |
|
|
216
|
-
| `fallback_model` | string | — |
|
|
265
|
+
| `fallback_model` | string | — | first fallback only; runtime may append more tiers |
|
|
217
266
|
| `mode` | enum | `auto` | `tool` \| `skill` \| `auto` |
|
|
218
267
|
| `timeout_ms` | number | `120000` | ms |
|
|
219
268
|
| `stall_timeout_ms` | number | — | kill if no event for N ms |
|
|
@@ -234,17 +283,58 @@ bun config/skills/specialists-creator/scripts/validate-specialist.ts config/spec
|
|
|
234
283
|
- MCP `start_specialist`: `keep_alive` enables, `no_keep_alive` disables.
|
|
235
284
|
- Effective precedence: explicit disable (`--no-keep-alive` / `no_keep_alive`) → explicit enable (`--keep-alive` / `keep_alive`) → `execution.interactive` → one-shot default.
|
|
236
285
|
|
|
237
|
-
**Permission tiers** — controls
|
|
286
|
+
**Permission tiers** — controls the *native* pi tools the specialist gets. The full resolved tool set also includes catalog-defined GitNexus and Serena tools per tier; see [docs/manifest.md](../../../docs/manifest.md) for the complete picture.
|
|
238
287
|
|
|
239
|
-
| Level |
|
|
240
|
-
|
|
241
|
-
| `READ_ONLY` | `read,grep,find,ls` | Read-only analysis, no bash |
|
|
242
|
-
| `LOW` | `+bash` | Inspect/run commands, no file edits |
|
|
243
|
-
| `MEDIUM` | `+edit` | Can edit existing files |
|
|
244
|
-
| `HIGH` | `+write` | Full access — can create new files |
|
|
288
|
+
| Level | Native tools (cumulative) | Use when |
|
|
289
|
+
|-------|---------------------------|----------|
|
|
290
|
+
| `READ_ONLY` | `read, grep, find, ls` | Read-only analysis, no bash |
|
|
291
|
+
| `LOW` | `+ bash` | Inspect/run commands, no file edits |
|
|
292
|
+
| `MEDIUM` | `+ edit` | Can edit existing files |
|
|
293
|
+
| `HIGH` | `+ write` | Full access — can create new files |
|
|
294
|
+
|
|
295
|
+
After choosing a tier, verify the resolved tool list before dispatching:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
sp config show <name> --resolved
|
|
299
|
+
```
|
|
245
300
|
|
|
246
301
|
**Common pitfall:** `READ_WRITE` is **not** a valid value — use `LOW` or higher.
|
|
247
302
|
|
|
303
|
+
### Per-specialist `permissions[<TIER>]` override (rarely needed)
|
|
304
|
+
|
|
305
|
+
Most specialists use the catalog default deny baseline. **Do not declare an override unless this specialist's policy genuinely diverges from its tier.** When you do override, remember the specialist block replaces catalog defaults for that tier.
|
|
306
|
+
|
|
307
|
+
If divergence is real, add a top-level `permissions` block (sibling to `execution`):
|
|
308
|
+
|
|
309
|
+
```jsonc
|
|
310
|
+
{
|
|
311
|
+
"specialist": {
|
|
312
|
+
"execution": { "permission_required": "READ_ONLY" },
|
|
313
|
+
"permissions": {
|
|
314
|
+
"READ_ONLY": {
|
|
315
|
+
"denied_natives_when_extension": ["grep", "find", "ls"],
|
|
316
|
+
"denied_natives_mode": "hard"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
| Field | Type | Default | Effect |
|
|
324
|
+
|-------|------|---------|--------|
|
|
325
|
+
| `denied_natives_when_extension` | `string[]` | `[]` | Native tools to deny only when a replacement extension is healthy. Catalog defaults apply first; specialist override replaces them for that tier. |
|
|
326
|
+
| `denied_natives_mode` | `"soft"` \| `"hard"` | `"soft"` | `soft` keeps the tool with a preference hint; `hard` removes it (with auto-restore if the extension degrades) |
|
|
327
|
+
|
|
328
|
+
The override block can only *deny* natives — it cannot add new tools beyond the catalog tier. To add tools, change the tier or update the catalog file.
|
|
329
|
+
|
|
330
|
+
**Decision rule when authoring:**
|
|
331
|
+
1. Pick the lowest tier that satisfies the specialist's actual capability needs.
|
|
332
|
+
2. Run `sp config show <name> --resolved` and inspect the `--tools` line.
|
|
333
|
+
3. If the tools are right, you're done — no override needed.
|
|
334
|
+
4. If a native tool is genuinely worse than an extension equivalent for this specialist's task, declare a soft-deny first to observe behavior, then promote to hard-deny once you trust it.
|
|
335
|
+
|
|
336
|
+
See [docs/manifest.md](../../../docs/manifest.md) for full deny-mode semantics, extension health gating, and the canonical explorer example.
|
|
337
|
+
|
|
248
338
|
**Per-specialist extension opt-out**
|
|
249
339
|
|
|
250
340
|
Use `execution.extensions` only when this specialist must suppress default extension injection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
-
import { parseSpecialist } from "
|
|
2
|
+
import { parseSpecialist } from "../../../../src/specialist/schema.ts";
|
|
3
3
|
|
|
4
4
|
function printUsage(): void {
|
|
5
5
|
console.error("Usage: bun skills/specialist-author/scripts/validate-specialist.ts <path-to.specialist.yaml>");
|