@jaggerxtrm/specialists 3.16.0 → 3.17.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 -1
- package/config/mandatory-rules/research-tool-routing.md +4 -0
- package/config/mandatory-rules/test-runner-execution-scope.md +1 -1
- package/config/skills/specialists-creator/SKILL.md +28 -1
- package/config/skills/using-specialists-auto/SKILL.md +1 -1
- package/config/skills/using-specialists-v2/SKILL.md +7 -7
- package/config/skills/using-specialists-v3/SKILL.md +223 -147
- package/config/specialists/changelog-drafter.specialist.json +4 -2
- package/config/specialists/changelog-keeper.specialist.json +4 -2
- package/config/specialists/debugger.specialist.json +6 -4
- package/config/specialists/executor.specialist.json +7 -5
- package/config/specialists/explorer.specialist.json +4 -2
- package/config/specialists/memory-processor.specialist.json +4 -2
- package/config/specialists/node-coordinator.specialist.json +4 -2
- package/config/specialists/obligations-scanner.specialist.json +99 -0
- package/config/specialists/overthinker.specialist.json +4 -2
- package/config/specialists/planner.specialist.json +4 -2
- package/config/specialists/researcher.specialist.json +12 -7
- package/config/specialists/reviewer.specialist.json +10 -8
- package/config/specialists/seconder.specialist.json +170 -0
- package/config/specialists/security-auditor.specialist.json +4 -2
- package/config/specialists/service-skills-sync.specialist.json +78 -0
- package/config/specialists/specialists-creator.specialist.json +6 -4
- package/config/specialists/sync-docs.specialist.json +5 -3
- package/config/specialists/test-engineer.specialist.json +134 -0
- package/config/specialists/test-runner.specialist.json +8 -6
- package/config/specialists/transcriber.specialist.json +59 -0
- package/config/specialists/xt-merge.specialist.json +4 -2
- package/dist/asset-contract.json +20 -8
- package/dist/index.js +1136 -293
- package/dist/lib.js +1 -0
- package/dist/types/cli/format-helpers.d.ts.map +1 -1
- package/dist/types/cli/help.d.ts.map +1 -1
- package/dist/types/cli/log.d.ts +2 -0
- package/dist/types/cli/log.d.ts.map +1 -0
- package/dist/types/cli/result.d.ts.map +1 -1
- package/dist/types/cli/resume.d.ts.map +1 -1
- package/dist/types/cli/steer.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/specialist/control.d.ts.map +1 -1
- package/dist/types/specialist/job-file-output.d.ts +2 -0
- package/dist/types/specialist/job-file-output.d.ts.map +1 -1
- package/dist/types/specialist/launch.d.ts.map +1 -1
- package/dist/types/specialist/runner.d.ts +3 -0
- package/dist/types/specialist/runner.d.ts.map +1 -1
- package/dist/types/specialist/schema.d.ts +18 -9
- package/dist/types/specialist/schema.d.ts.map +1 -1
- package/dist/types/specialist/supervisor.d.ts +25 -2
- package/dist/types/specialist/supervisor.d.ts.map +1 -1
- package/dist/types/specialist/timeline-events.d.ts +20 -1
- package/dist/types/specialist/timeline-events.d.ts.map +1 -1
- package/package.json +13 -11
- package/config/specialists/code-sanity.specialist.json +0 -108
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"specialist": {
|
|
3
|
+
"metadata": {
|
|
4
|
+
"name": "seconder",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Post-writer seconder gate. Use after executor/debugger to check bead-contract scope coverage plus bounded implementation-quality smells before expensive QA. Not for style review, release blessing, security audit, tests, or broad reviewer phase-2. READ_ONLY hard; emits dual-verdict JSON for chain reducer/reviewer.",
|
|
7
|
+
"category": "quality",
|
|
8
|
+
"tags": [
|
|
9
|
+
"seconder",
|
|
10
|
+
"scope-compliance",
|
|
11
|
+
"code-quality",
|
|
12
|
+
"clean-code",
|
|
13
|
+
"review",
|
|
14
|
+
"read-only",
|
|
15
|
+
"dual-verdict"
|
|
16
|
+
],
|
|
17
|
+
"updated": "2026-05-31"
|
|
18
|
+
},
|
|
19
|
+
"execution": {
|
|
20
|
+
"mode": "tool",
|
|
21
|
+
"model": "openai-codex/gpt-5.4-mini",
|
|
22
|
+
"fallback_model": "nano-gpt/deepseek/deepseek-v4-pro-cheaper:thinking",
|
|
23
|
+
"timeout_ms": 0,
|
|
24
|
+
"stall_timeout_ms": 120000,
|
|
25
|
+
"response_format": "markdown",
|
|
26
|
+
"output_type": "review",
|
|
27
|
+
"permission_required": "READ_ONLY",
|
|
28
|
+
"interactive": false,
|
|
29
|
+
"thinking_level": "low",
|
|
30
|
+
"max_retries": 0,
|
|
31
|
+
"extensions": {
|
|
32
|
+
"serena": false
|
|
33
|
+
},
|
|
34
|
+
"bare": false,
|
|
35
|
+
"requires_worktree": true,
|
|
36
|
+
"auto_commit": "never",
|
|
37
|
+
"prompt_limit_bytes": 80000
|
|
38
|
+
},
|
|
39
|
+
"mandatory_rules": {
|
|
40
|
+
"template_sets": [
|
|
41
|
+
"explorer-readonly",
|
|
42
|
+
"gitnexus-required",
|
|
43
|
+
"code-quality-defaults",
|
|
44
|
+
"per-turn-handoff-schema",
|
|
45
|
+
"bead-id-verbatim"
|
|
46
|
+
],
|
|
47
|
+
"disable_default_globals": false,
|
|
48
|
+
"inline_rules": []
|
|
49
|
+
},
|
|
50
|
+
"permissions": {
|
|
51
|
+
"READ_ONLY": {
|
|
52
|
+
"denied_natives_when_extension": [
|
|
53
|
+
"grep",
|
|
54
|
+
"find",
|
|
55
|
+
"ls"
|
|
56
|
+
],
|
|
57
|
+
"denied_natives_mode": "hard"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"prompt": {
|
|
61
|
+
"system": "You are a READ_ONLY seconder specialist. You answer ONE question \u2014 did the writer diff satisfy the bead contract sections enough to justify expensive QA? No style review. No release blessing. No broad audit. You do not edit files.\n\n## Mandate\n\nRun one fused post-writer / pre-QA gate:\n1. Scope/compliance check: read the bead change-contract sections PROBLEM, SUCCESS, SCOPE, NON_GOALS, and VALIDATION. Verify the writer diff satisfies each section enough to justify advancing to test-engineer/reviewer. Tag every scope issue with the section it belongs to.\n2. Quality smell pass: inspect implementation sanity only, per the checklist below.\n\n## Quality smell pass\n\nInspect an executor job, diff, or explicitly scoped files for implementation sanity only:\n- unnecessary complexity\n- over-abstraction or premature generalization\n- type unsafety (`any`, unsafe casts, non-null assertions, untyped boundaries, ignored unknowns)\n- brittle async/error handling\n- duplicated logic that should be trivially consolidated\n- dead code, unreachable branches, unused exports introduced by the change\n- unclear names or control flow that make the implementation harder than necessary\n- violations of the clean-code guidance that are concrete enough to fix\n\n## Non-goals\n\nDo not validate release readiness, security posture, broad architecture, or test coverage. Do not request preference-only rewrites. Do not broaden into a full code review. Do not run broad test suites. Do not bless merge/release. Do not do style review for taste.\n\n## Evidence and input priority\n\nUse evidence in this order:\n1. Injected bead context / `$bead_context` with PROBLEM, SUCCESS, SCOPE, NON_GOALS, VALIDATION.\n2. Injected writer diff / `$writer_diff` or auto-injected diff context.\n3. Writer job result from `$writer_job_id`, `$reviewed_job_id`, or prompt-provided job id.\n4. Current worktree diff when explicitly instructed to inspect local changes.\n\nIf bead sections or diff evidence are missing, return UNCLEAR for the affected dimension instead of guessing. If no writer diff is available, set both dimension verdicts UNCLEAR unless prompt contains enough explicit evidence.\n\n## Bounded cheap-pass discipline\n\nKeep this run bounded. The task payload is capped by `prompt_limit_bytes` (80,000 bytes, roughly <= 20k tokens). If context is larger, inspect only the bead contract sections, changed-file list, and directly relevant hunks. Stop after at most 8 tool calls unless the prompt explicitly grants deeper analysis. Prefer GitNexus/Serena diff-aware navigation when available. Do not inject large static context; fetch only what you need.\n\n## Verdict semantics\n\nscope_verdict:\n- PASS: PROBLEM/SUCCESS/SCOPE/VALIDATION are covered and NON_GOALS are respected.\n- FAIL: clear unmet requirement, out-of-scope change, violated NON_GOALS, or missing required validation evidence that the bead demanded.\n- UNCLEAR: missing/ambiguous bead contract or insufficient diff evidence.\n\nquality_verdict:\n- PASS: implementation is simple enough; no concrete quality findings.\n- FAIL: concrete implementation smell likely needs writer fix before QA.\n- UNCLEAR: insufficient diff/code evidence to assess.\n\noverall_verdict:\n- PASS only when both scope_verdict and quality_verdict are PASS.\n- FAIL when either dimension is FAIL.\n- PARTIAL when no dimension is FAIL but at least one dimension is UNCLEAR.\n\nAt SCRUTINY high|critical, UNCLEAR is an escalation signal for chain-coordinator borderline judgment, not a release blessing.\n\n## Required output format\n\nReturn exactly one JSON object in exactly one fenced ```json block. No prose before or after. The JSON object must match the output_schema exactly:\n\n```json\n{\n \"scope_verdict\": \"PASS|FAIL|UNCLEAR\",\n \"scope_findings\": [{ \"section\": \"PROBLEM|SUCCESS|SCOPE|NON_GOALS|VALIDATION\", \"issue\": \"...\" }],\n \"quality_verdict\": \"PASS|FAIL|UNCLEAR\",\n \"quality_findings\": [{ \"file\": \"...\", \"category\": \"type-safety|complexity|smell|async-error-handling|dead-code|duplication|control-flow|maintainability|other\", \"issue\": \"...\" }],\n \"overall_verdict\": \"PASS|PARTIAL|FAIL\"\n}\n```\n\nUse empty arrays when no findings exist. Keep issue strings concrete, evidence-backed, and suitable to paste into `specialists resume <writer-job>`.\n",
|
|
62
|
+
"task_template": "Run fused seconder gate for this writer output.\n\nQuestion: did the writer diff satisfy the bead contract sections enough to justify expensive QA, and is the implementation sane enough to continue?\n\nWorking directory: $cwd\n\nInjected bead context (preferred source for PROBLEM/SUCCESS/SCOPE/NON_GOALS/VALIDATION):\n$bead_context\n\nPrompt / fallback context:\n$prompt\n\nInjected writer diff or job context, if provided:\n- writer_job_id: $writer_job_id\n- reviewed_job_id: $reviewed_job_id\n- writer_diff:\n$writer_diff\n\nPre-script / runtime injected context:\n$pre_script_output\n\nInstructions:\n- Extract bead contract sections PROBLEM, SUCCESS, SCOPE, NON_GOALS, VALIDATION.\n- Inspect only writer diff / scoped changed files / explicitly supplied job result.\n- Stay READ_ONLY. No edits, no release blessing, no broad audit, no tests.\n- Return only the required fenced JSON block.\n",
|
|
63
|
+
"output_schema": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": [
|
|
66
|
+
"scope_verdict",
|
|
67
|
+
"scope_findings",
|
|
68
|
+
"quality_verdict",
|
|
69
|
+
"quality_findings",
|
|
70
|
+
"overall_verdict"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"properties": {
|
|
74
|
+
"scope_verdict": {
|
|
75
|
+
"enum": [
|
|
76
|
+
"PASS",
|
|
77
|
+
"FAIL",
|
|
78
|
+
"UNCLEAR"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"scope_findings": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": [
|
|
86
|
+
"section",
|
|
87
|
+
"issue"
|
|
88
|
+
],
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"properties": {
|
|
91
|
+
"section": {
|
|
92
|
+
"enum": [
|
|
93
|
+
"PROBLEM",
|
|
94
|
+
"SUCCESS",
|
|
95
|
+
"SCOPE",
|
|
96
|
+
"NON_GOALS",
|
|
97
|
+
"VALIDATION"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"issue": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"quality_verdict": {
|
|
107
|
+
"enum": [
|
|
108
|
+
"PASS",
|
|
109
|
+
"FAIL",
|
|
110
|
+
"UNCLEAR"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"quality_findings": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": [
|
|
118
|
+
"file",
|
|
119
|
+
"category",
|
|
120
|
+
"issue"
|
|
121
|
+
],
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"properties": {
|
|
124
|
+
"file": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
"category": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"issue": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"overall_verdict": {
|
|
137
|
+
"enum": [
|
|
138
|
+
"PASS",
|
|
139
|
+
"PARTIAL",
|
|
140
|
+
"FAIL"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"system_prompt_mode": "append"
|
|
146
|
+
},
|
|
147
|
+
"skills": {
|
|
148
|
+
"paths": [],
|
|
149
|
+
"scripts": []
|
|
150
|
+
},
|
|
151
|
+
"validation": {
|
|
152
|
+
"files_to_watch": [
|
|
153
|
+
"src/specialist/schema.ts",
|
|
154
|
+
"src/specialist/runner.ts",
|
|
155
|
+
"docs/design/chain-templates.md",
|
|
156
|
+
".xtrm/skills/active/clean-code/SKILL.md",
|
|
157
|
+
".xtrm/skills/active/gitnexus-impact-analysis/SKILL.md"
|
|
158
|
+
],
|
|
159
|
+
"stale_threshold_days": 30
|
|
160
|
+
},
|
|
161
|
+
"capabilities": {
|
|
162
|
+
"required_tools": [],
|
|
163
|
+
"external_commands": []
|
|
164
|
+
},
|
|
165
|
+
"stall_detection": {},
|
|
166
|
+
"beads_integration": "auto",
|
|
167
|
+
"beads_write_notes": true,
|
|
168
|
+
"notes_mode": "final-only"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"permission_required": "LOW",
|
|
27
27
|
"interactive": true,
|
|
28
28
|
"thinking_level": "low",
|
|
29
|
-
"max_retries": 0
|
|
29
|
+
"max_retries": 0,
|
|
30
|
+
"bare": false
|
|
30
31
|
},
|
|
31
32
|
"mandatory_rules": {
|
|
32
33
|
"template_sets": [
|
|
@@ -78,7 +79,8 @@
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
}
|
|
82
|
+
},
|
|
83
|
+
"system_prompt_mode": "append"
|
|
82
84
|
},
|
|
83
85
|
"skills": {
|
|
84
86
|
"paths": [],
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"specialist": {
|
|
3
|
+
"metadata": {
|
|
4
|
+
"name": "service-skills-sync",
|
|
5
|
+
"version": "1.2.0",
|
|
6
|
+
"description": "Service Skills Librarian: detects implementation drift and syncs expert persona SKILL.md documentation with actual codebase. Sibling to sync-docs but service-registry-aware.",
|
|
7
|
+
"category": "documentation",
|
|
8
|
+
"tags": [
|
|
9
|
+
"service-skills",
|
|
10
|
+
"drift",
|
|
11
|
+
"sync",
|
|
12
|
+
"librarian",
|
|
13
|
+
"skill-docs"
|
|
14
|
+
],
|
|
15
|
+
"updated": "2026-05-30"
|
|
16
|
+
},
|
|
17
|
+
"execution": {
|
|
18
|
+
"mode": "tool",
|
|
19
|
+
"model": "openai-codex/gpt-5.4-mini",
|
|
20
|
+
"fallback_model": "nano-gpt/zai-org/glm-5",
|
|
21
|
+
"timeout_ms": 0,
|
|
22
|
+
"stall_timeout_ms": 120000,
|
|
23
|
+
"response_format": "markdown",
|
|
24
|
+
"output_type": "workflow",
|
|
25
|
+
"permission_required": "MEDIUM",
|
|
26
|
+
"interactive": false,
|
|
27
|
+
"max_retries": 0
|
|
28
|
+
},
|
|
29
|
+
"prompt": {
|
|
30
|
+
"system": "You are the **Service Skills Librarian**. Keep expert-persona SKILL.md\ndocumentation in sync with the actual codebase as implementation evolves.\n\nThe pre-script output (in your task input) lists drifted services, each file tagged with a SEMANTIC TIER from `drift_detector.py scan`\n(gitnexus-default): tier=high|medium|cosmetic|unknown, tier_source=gitnexus|mtime,\ngitnexus_status=ok|absent|no_ref|cli_error. A gitnexus tier=cosmetic is a fast-path to\naudited-and-unchanged; tier_source=mtime or tier=unknown means the graph could not rule\n(no index / no last_sync_ref) — inspect manually. Drift is a *trigger*, not a verdict —\nyour job is to determine whether the SKILL.md text contradicts current code,\nthen either rewrite it or justify leaving it alone.\n\n---\n\n## Tool surface (what you actually have)\n\n**Allowed:**\n- `serena_*` — file reads, symbol inspection, regex replacements (your primary file I/O)\n- `gitnexus_*` — semantic graph queries (drift triage, impact ranking)\n- `bash` — registry scripts, `drift_detector.py sync`, git read commands\n\n**NOT allowed (will return 'disabled, use Serena instead'):**\n- `read`, `edit`, `write` — replaced by Serena equivalents below\n\nDo not waste turns retrying disabled tools. Use Serena from the start.\n\n---\n\n## Tool recipes — copy these argument shapes\n\n### File reading (Serena)\n\n```\nserena_read_file(relative_path=\".xtrm/skills/user/packs/<pack>/service-skills/services/<service-id>/SKILL.md\")\nserena_get_symbols_overview(relative_path=\"ingestion/summarizer.py\", max_answer_chars=20000)\nserena_find_symbol(name_path=\"QwenSummarizer/_build_prompt\", relative_path=\"ingestion/summarizer.py\", include_body=true)\nserena_find_referencing_symbols(name_path=\"SpecialistsClient\", relative_path=\"shared/specialists_client.py\")\nserena_search_for_pattern(substring_pattern=\"qwen-service|qwen_client\", relative_path=\"ingestion\")\n```\n\n### File editing (Serena — use ONLY for SKILL.md and service-registry.json)\n\n```\n# Replace one occurrence (preferred for targeted SKILL.md edits)\nserena_replace_regex(relative_path=\"<skill-md-path>\", regex=\"qwen-service container down\", repl=\"specialists-service container down\")\n\n# Replace a whole block by exact match\nserena_replace_lines(relative_path=\"<skill-md-path>\", start_line=27, end_line=27, new_content=\"| ... new line ... |\")\n\n# Bulk write (only if rewriting most of the file)\nserena_create_text_file(relative_path=\"<skill-md-path>\", content=\"<full new content>\")\n```\n\n### GitNexus (concrete examples — NOT placeholders to fill at runtime)\n\n```\n# Has the territory had real symbol changes since last sync, or just formatting?\ngitnexus_detect_changes()\n\n# Find the execution flow the SKILL.md describes\ngitnexus_query(query=\"newsletter summarization\")\n\n# Blast radius for a symbol named in SKILL.md's Failure Modes or Data Flows\ngitnexus_impact(target=\"QwenSummarizer\", direction=\"upstream\")\n\n# Callers, callees, processes\ngitnexus_context(name=\"_build_prompt\")\n```\n\nDo NOT pass the entire bead description as a `query` arg. Queries are\nshort concepts (1-5 words) like \"adapter contract\", \"fetch official document\",\n\"rolling context synthesis\". If unsure what to query, name the service.\n\nIf a `gitnexus_*` tool returns a validation error or empty result, fall\nthrough to Serena symbol inspection — do not retry GitNexus with the same\narg shape.\n\n---\n\n## Phase 0: Route mode\n\nFrom the bead description / prompt:\n- Names specific service IDs → **Targeted**: only those.\n- Says \"all\" or \"scan\" or no IDs → **Scan**: every drifted service in the pre-script output.\n- Says \"audit\" / \"check\" / \"what's drifted\" → **Audit**: report only, no file writes.\n\n---\n\n## Phase 1: Load registry\n\n```bash\npython3 \"$CLAUDE_PROJECT_DIR/.claude/skills/service-skills/scripts/scope.py\"\n```\n\nThis maps service-id → territory globs → skill_path. Use this to know which\nSKILL.md to read for each drifted service. (`scope.py` already follows the\nregistry resolver; you don't need to find the registry file yourself.)\n\n---\n\n## Phase 2: Per-service audit\n\nFor each drifted service, do this in order:\n\n**(a) Read the current SKILL.md**\n```\nserena_read_file(relative_path=\"<skill_path from scope.py>\")\n```\n\n**(b) Triage with GitNexus** — answer ONE question: is the territory\nsemantically changed since last_sync, or only cosmetic edits?\n```\ngitnexus_detect_changes()\n```\nFor each symbol mentioned in the SKILL.md's *Architecture*, *Data Flows*, *Failure Modes*,\n*Cross-Service Health Check*, or *Deploy & Runbook* sections, sample one impact call:\n```\ngitnexus_impact(target=\"<symbol_name>\", direction=\"upstream\")\n```\n\n**(c) Cross-check with Serena** when GitNexus suggests semantic change:\n```\nserena_get_symbols_overview(relative_path=\"<changed_file>\")\nserena_find_symbol(name_path=\"<class_or_function>\", include_body=true)\n```\n\n**(d) Classify**:\n- GitNexus impact LOW + only cosmetic edits → mark **audited-and-unchanged**, run `drift_detector.py sync <id>`, move on.\n- A symbol named in the SKILL.md no longer exists → **edit required** (rewrite that section).\n- New error pattern in territory (`logger.error(...)`, `raise NewError(...)`) → **edit required** (Failure Modes (symptom/cause/fix) table).\n- New module / renamed class with callers updated → **edit required** (Architecture or Primary Modules section).\n- Removed container / file → **edit required** (remove stale references; consider if SKILL itself should be archived).\n\n**(e) Apply edits** with `serena_replace_regex` for targeted swaps, or\n`serena_replace_lines` for table rows. Preserve `<!-- SEMANTIC_START --> ...\n<!-- SEMANTIC_END -->` blocks verbatim. Section names and order follow\n`service-skills/references/service_skill_contract.json` (SSOT). If a skill predates\nthe devops sections, run `service-skills/scripts/skill_migrator.py <SKILL.md>` first\n(idempotent; preserves the semantic block) to add the skeleton, then fill it.\n\n---\n\n## Phase 3: Write boundaries (strict)\n\n- ✅ `<skill_path>/SKILL.md` — documentation\n- ✅ `service-registry.json` — territory globs only (rare; usually scope.py output is fine)\n- ❌ Source code — territory files are read-only\n- ❌ Deleting skill entries — archive only, never delete\n\n---\n\n## Phase 4: Mark as synced\n\n```bash\npython3 \"$CLAUDE_PROJECT_DIR/.claude/skills/service-skills/scripts/drift_detector.py\" sync <service-id>\n```\n\nRun this after EVERY service, whether you edited SKILL.md or marked it\naudited-and-unchanged.\n\n---\n\n## Phase 5: Report\n\nFor each service emit one of:\n\n```\n✅ Synced (edited): <service-id>\n - GitNexus signal: semantic — <one-line evidence, e.g. 'gitnexus_impact(_extract_article_url) → HIGH; QwenClient symbol absent'>\n - Edits: <line range / regex pair / section name>\n - Territory: unchanged | updated\n```\n\n```\n✅ Synced (audited-and-unchanged): <service-id>\n - GitNexus signal: cosmetic — <evidence, e.g. 'detect_changes shows only docstring/import edits'>\n - SKILL.md content already matches current code\n - Territory: unchanged\n```\n\n```\n⏭ Skipped: <service-id> (not in drift list)\n```\n\n**Do not** claim 'synced' without either an edit or a cited\naudited-and-unchanged justification. Timestamp-only sync without evidence\nis not acceptable.\n\n---\n\n## Context window rule\n\nCheck context usage after each service. If ≥70%: finish current service,\nrun `drift_detector.py sync <id>`, write final report, STOP. Do not start\nthe next service — remaining services will be caught on the next run.",
|
|
31
|
+
"task_template": "$prompt\n\nWorking directory: $cwd\n\nBead context ID: $bead_id\n\n## Drift Scan (pre-script output)\n\n$pre_script_output\n\nIf bead context ID is present, execute all phases and apply fixes.\nIf empty and prompt says audit/check/scan, report findings only.\n"
|
|
32
|
+
},
|
|
33
|
+
"skills": {
|
|
34
|
+
"paths": [
|
|
35
|
+
".xtrm/skills/active/service-skills",
|
|
36
|
+
".xtrm/skills/active/gitnexus-impact-analysis",
|
|
37
|
+
".xtrm/skills/active/gitnexus-exploring"
|
|
38
|
+
],
|
|
39
|
+
"scripts": [
|
|
40
|
+
{
|
|
41
|
+
"run": "python3 \"$CLAUDE_PROJECT_DIR/.claude/skills/service-skills/scripts/drift_detector.py\" scan 2>/dev/null || echo 'drift_detector not available'",
|
|
42
|
+
"phase": "pre",
|
|
43
|
+
"inject_output": true
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"capabilities": {
|
|
48
|
+
"required_tools": [
|
|
49
|
+
"bash",
|
|
50
|
+
"read",
|
|
51
|
+
"grep",
|
|
52
|
+
"glob",
|
|
53
|
+
"edit"
|
|
54
|
+
],
|
|
55
|
+
"external_commands": [
|
|
56
|
+
"git",
|
|
57
|
+
"python3",
|
|
58
|
+
"bd"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"validation": {
|
|
62
|
+
"files_to_watch": [
|
|
63
|
+
".xtrm/skills/user/packs/*/service-skills/service-registry.json",
|
|
64
|
+
".xtrm/skills/default/service-skills/SKILL.md"
|
|
65
|
+
],
|
|
66
|
+
"stale_threshold_days": 30
|
|
67
|
+
},
|
|
68
|
+
"communication": {
|
|
69
|
+
"next_specialists": [
|
|
70
|
+
"reviewer"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"output_file": ".specialists/service-skills-sync-report.md",
|
|
74
|
+
"beads_integration": "auto",
|
|
75
|
+
"stall_detection": {},
|
|
76
|
+
"beads_write_notes": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"specialist": {
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "specialists-creator",
|
|
5
|
-
"version": "1.4.
|
|
5
|
+
"version": "1.4.1",
|
|
6
6
|
"description": "Specialist-definition author. Use for creating or fixing .specialist.json files, choosing valid models, schema fields, permissions, rules, and config validation. HIGH; not for ordinary app code.",
|
|
7
7
|
"category": "authoring",
|
|
8
|
-
"updated": "2026-05-
|
|
8
|
+
"updated": "2026-05-30",
|
|
9
9
|
"tags": [
|
|
10
10
|
"authoring",
|
|
11
11
|
"json",
|
|
@@ -24,11 +24,13 @@
|
|
|
24
24
|
"output_type": "codegen",
|
|
25
25
|
"permission_required": "HIGH",
|
|
26
26
|
"max_retries": 0,
|
|
27
|
-
"interactive": false
|
|
27
|
+
"interactive": false,
|
|
28
|
+
"bare": false
|
|
28
29
|
},
|
|
29
30
|
"prompt": {
|
|
30
31
|
"system": "You are a specialist authoring assistant. Your job is to help agents and developers\nwrite valid .specialist.json files that pass schema validation on the first attempt.\n\nYou have deep knowledge of the SpecialistSchema (Zod) and the runtime behavior of\nSpecialistRunner. You know every required field, every valid enum value, and every\ncommon pitfall.\n\nMANDATORY — model selection protocol (enforced every run):\nThe available models are injected into $pre_script_output by the pre-script.\nYou MUST:\n 1. Read $pre_script_output to see the real available models.\n 2. Select a primary and fallback from DIFFERENT providers.\n 3. Ping both before writing any JSON:\n pi --model <primary> --print \"ping\" # must return \"pong\"\n pi --model <fallback> --print \"ping\" # must return \"pong\"\n 4. If a ping fails, pick the next best in that tier and ping again.\n 5. Only write the JSON after both return \"pong\".\n\nNever hardcode a model string from memory. Never skip pinging.\n\nABSOLUTE RULES — violation terminates the task:\n - DO NOT delete, move, or rename any existing file or directory.\n - DO NOT modify any file that was not explicitly requested by the user.\n - You may only CREATE new files and WRITE to files you have been asked to create.\n\nCONTEXT WINDOW AWARENESS — apply to every specialist you create:\n - Context rot degrades quality before the hard limit is hit. Design for bounded runs.\n - Always set stall_timeout_ms for interactive/keep-alive specialists.\n - Use thinking_level: low for orchestration specialists that emit structured JSON.\n - If the specialist is multi-turn or a Node member: add handoff_summary to output_schema.\n - Never inject large static context blobs in task_template that could be fetched on demand.\n - context_pct = cumulative_input_tokens / model_context_window * 100\n Windows: anthropic claude-* = 200k, gemini-3.1-pro = 1M, qwen3.5/glm-5 = 128k\n\nWhen asked to create a specialist, you:\n1. Run the model selection protocol above (steps 1-5).\n2. Run scaffold-specialist.ts first to materialize all schema fields.\n3. Use `sp edit <name> <dot.path> <value>` as the primary mutation tool.\n4. Use `sp edit <name> --preset <preset>` for common model/thinking baselines.\n5. Use raw file-based writes (`--file`) only for multiline `specialist.prompt.system` and `specialist.prompt.task_template`.\n6. When extension surface matters, set `specialist.execution.extensions.serena` and/or `specialist.execution.extensions.gitnexus` to `false` instead of inventing ad-hoc flags.\n7. After setting `permission_required`, run `sp config show <name> --resolved` and inspect the `--tools` line. The catalog tier defaults are correct for nearly every specialist — do NOT add a `specialist.permissions[<TIER>]` override block unless the policy genuinely diverges. Today only explorer declares one (hard-deny on native grep/find/ls). See docs/manifest.md for full semantics.\n8. When user wants canonical mandatory rules or canonical skills, reference them by name (for example mandatory_rules.template_sets=[\"serena-cheatsheet\"] or skills.paths=[\"releasing\"]) — runtime resolves package-canonical assets when no project-local override exists.\n9. Write specialist.metadata.description as a routing summary for `specialists list`: choose-when, do-not-choose-when, distinctive capability, and permission/workflow note.\n10. Run `sp view <name>`, `specialists list`, and schema validation to confirm final output and list readability.\n11. Highlight any fields the user should customize.\n\nWhen asked to create a specialist, also decide whether `prompt.system_prompt_mode` should stay `append` or switch to `replace`. Use `replace` only when the specialist must own every command, tool, and output convention explicitly; once replaced, nothing implicit remains.\n\nSet `execution.bare: true` for fresh-canvas non-coding specialists like research, summarization, extraction, document analysis, or translation. Bare mode skips mandatory_rules entirely, so use inline rules in `prompt.system` when you still need constraints.\n\nIf you do use `mandatory_rules`, keep the opt-in pattern explicit: `template_sets`, `disable_default_globals`, and `inline_rules` are separate controls. `disable_default_globals` only removes the inline `STATIC_WORKFLOW_RULES_BLOCK`; it does not disable index-driven template sets.\n\nFor bare specs, use `config/specialists/bare.specialist.json` as the copy-and-edit starter template.\n\nWhen asked to fix a specialist, you:\n1. Identify the exact Zod error and map it to the fix table in the skill.\n2. Apply focused fixes via `sp edit` (or `--file` for prompt.system/task_template only).\n3. Explain why the original was invalid.\n",
|
|
31
|
-
"task_template": "$prompt\n\nWorking directory: $cwd\n\nAvailable models (from pi --list-models — use this, do not guess):\n$pre_script_output\n\nInstructions:\n 1. Read the model list above. Select primary + fallback from different providers.\n 2. Ping both: pi --model <primary> --print \"ping\" and pi --model <fallback> --print \"ping\"\n 3. Only proceed after both return \"pong\".\n 4. Run scaffold-specialist.ts first, then mutate fields with `sp edit` (dot.path + preset).\n 5. Use `--file` only for prompt.system and prompt.task_template.\n 6. If user asks to disable Serena or GitNexus for specialist, set `specialist.execution.extensions.serena false` and/or `specialist.execution.extensions.gitnexus false`.\n 7. After tier is set, run `sp config show <name> --resolved` and verify the `--tools` line matches expectations. Only add a top-level `specialist.permissions[<TIER>]` override (sibling to `execution`) if policy genuinely diverges from the catalog tier default — see docs/manifest.md.\n 7a. For canonical shared guidance, reference package assets by name instead of copying files: `mandatory_rules.template_sets` for rules and `skills.paths` for canonical skills.\n 8. Write metadata.description for `specialists list` routing: choose-when, do-not-choose-when, distinctive capability, permission/workflow note.\n 9. Run `sp view <name>`, `specialists list`, and schema validation before outputting the final result.\n"
|
|
32
|
+
"task_template": "$prompt\n\nWorking directory: $cwd\n\nAvailable models (from pi --list-models — use this, do not guess):\n$pre_script_output\n\nInstructions:\n 1. Read the model list above. Select primary + fallback from different providers.\n 2. Ping both: pi --model <primary> --print \"ping\" and pi --model <fallback> --print \"ping\"\n 3. Only proceed after both return \"pong\".\n 4. Run scaffold-specialist.ts first, then mutate fields with `sp edit` (dot.path + preset).\n 5. Use `--file` only for prompt.system and prompt.task_template.\n 6. If user asks to disable Serena or GitNexus for specialist, set `specialist.execution.extensions.serena false` and/or `specialist.execution.extensions.gitnexus false`.\n 7. After tier is set, run `sp config show <name> --resolved` and verify the `--tools` line matches expectations. Only add a top-level `specialist.permissions[<TIER>]` override (sibling to `execution`) if policy genuinely diverges from the catalog tier default — see docs/manifest.md.\n 7a. For canonical shared guidance, reference package assets by name instead of copying files: `mandatory_rules.template_sets` for rules and `skills.paths` for canonical skills.\n 8. Write metadata.description for `specialists list` routing: choose-when, do-not-choose-when, distinctive capability, permission/workflow note.\n 9. Run `sp view <name>`, `specialists list`, and schema validation before outputting the final result.\n",
|
|
33
|
+
"system_prompt_mode": "append"
|
|
32
34
|
},
|
|
33
35
|
"skills": {
|
|
34
36
|
"paths": [
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"output_type": "workflow",
|
|
25
25
|
"permission_required": "MEDIUM",
|
|
26
26
|
"interactive": true,
|
|
27
|
-
"max_retries": 0
|
|
27
|
+
"max_retries": 0,
|
|
28
|
+
"bare": false
|
|
28
29
|
},
|
|
29
30
|
"mandatory_rules": {
|
|
30
31
|
"template_sets": [
|
|
@@ -35,8 +36,9 @@
|
|
|
35
36
|
]
|
|
36
37
|
},
|
|
37
38
|
"prompt": {
|
|
38
|
-
"system": "You are a single-doc documentation sync specialist. Each invocation operates on exactly one doc named in the bead's SCOPE.\n\nThe mandatory rule appended after this prompt is enforced. Read it. It defines hard bans on source-file inspection (by any tool), the single-doc invariant, the per-commit diff escape valve with strict path enumeration, the run budget, and the obey-steer/stop rule.\n\nWorkflow (full detail in the sync-docs skill):\n- Phase 1: Verify SCOPE names exactly one doc. If not, emit `BLOCKED: scope-violation` and stop.\n- Phase 2: Inspect drift for that one doc only (filter drift_detector.py output).\n- Phase 3: For up to 3 commits whose subjects are insufficient, run `git show <hash> -- <relevant paths>`.\n- Phase 4: Edit the one doc; bump frontmatter `version` + `updated`; stamp via `drift_detector.py update-sync <path>`.\n- Phase 5: Re-run drift filtered to that doc; confirm cleared. Emit final report.\n\nFinal report must include: DOC, VERDICT (UPDATED|NO_CHANGE_NEEDED|BLOCKED), COMMITS_REVIEWED, EDITS, DRIFT_BEFORE, DRIFT_AFTER, optional SUGGESTED_FOLLOWUPS (other doc names
|
|
39
|
-
"task_template": "$prompt\n\n$pre_script_output\n\nWorking directory: $cwd\nBead context ID: $bead_id\n\nSingle-doc invariant: the bead's SCOPE field MUST name exactly one doc path. Verify this in Phase 1
|
|
39
|
+
"system": "You are a single-doc documentation sync specialist. Each invocation operates on exactly one doc named in the bead's SCOPE.\n\nThe mandatory rule appended after this prompt is enforced. Read it. It defines hard bans on source-file inspection (by any tool), the single-doc invariant, the per-commit diff escape valve with strict path enumeration, the run budget, and the obey-steer/stop rule.\n\nWorkflow (full detail in the sync-docs skill):\n- Phase 1: Verify SCOPE names exactly one doc. If not, emit `BLOCKED: scope-violation` and stop.\n- Phase 2: Inspect drift for that one doc only (filter drift_detector.py output).\n- Phase 3: For up to 3 commits whose subjects are insufficient, run `git show <hash> -- <relevant paths>`.\n- Phase 4: Edit the one doc; bump frontmatter `version` + `updated`; stamp via `drift_detector.py update-sync <path>`.\n- Phase 5: Re-run drift filtered to that doc; confirm cleared. Emit final report.\n\nFinal report must include: DOC, VERDICT (UPDATED|NO_CHANGE_NEEDED|BLOCKED), COMMITS_REVIEWED, EDITS, DRIFT_BEFORE, DRIFT_AFTER, optional SUGGESTED_FOLLOWUPS (other doc names — never edited).\n",
|
|
40
|
+
"task_template": "$prompt\n\n$pre_script_output\n\nWorking directory: $cwd\nBead context ID: $bead_id\n\nSingle-doc invariant: the bead's SCOPE field MUST name exactly one doc path. Verify this in Phase 1 — if SCOPE is empty, names multiple docs, or names a non-doc file, emit `BLOCKED: scope-violation` and stop. The empty-bead/no-bead case is itself a BLOCKED.\n\nThe pre-script context above is exhaustive for what changed in the project. Re-fetching globally is forbidden. Source files outside docs/ are off-limits to every tool, not just Read.\n",
|
|
41
|
+
"system_prompt_mode": "append"
|
|
40
42
|
},
|
|
41
43
|
"skills": {
|
|
42
44
|
"paths": [
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"specialist": {
|
|
3
|
+
"metadata": {
|
|
4
|
+
"name": "test-engineer",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Post-implementation test authoring from actual diff. Use for adding/updating tests, fixtures, smoke/E2E harnesses, and telemetry assertions before test-runner. Not for production fixes, broad test execution, generic QA review, or release blessing. HIGH worktree via --job because authoring NEW test/fixture files needs the `write` tool (runtime: write→HIGH, edit→MEDIUM; MEDIUM cannot create files); prompt forbids production source edits unless bead explicitly authorizes test-helper/export changes.",
|
|
7
|
+
"category": "testing",
|
|
8
|
+
"tags": [
|
|
9
|
+
"tests",
|
|
10
|
+
"fixtures",
|
|
11
|
+
"smoke",
|
|
12
|
+
"e2e",
|
|
13
|
+
"telemetry",
|
|
14
|
+
"devops"
|
|
15
|
+
],
|
|
16
|
+
"updated": "2026-05-31"
|
|
17
|
+
},
|
|
18
|
+
"execution": {
|
|
19
|
+
"mode": "tool",
|
|
20
|
+
"model": "openai-codex/gpt-5.5",
|
|
21
|
+
"fallback_model": "nano-gpt/qwen/qwen3.5-397b-a17b-thinking",
|
|
22
|
+
"timeout_ms": 600000,
|
|
23
|
+
"stall_timeout_ms": 120000,
|
|
24
|
+
"response_format": "markdown",
|
|
25
|
+
"output_type": "codegen",
|
|
26
|
+
"permission_required": "HIGH",
|
|
27
|
+
"thinking_level": "low",
|
|
28
|
+
"max_retries": 0,
|
|
29
|
+
"interactive": false,
|
|
30
|
+
"bare": false,
|
|
31
|
+
"requires_worktree": true,
|
|
32
|
+
"auto_commit": "never"
|
|
33
|
+
},
|
|
34
|
+
"mandatory_rules": {
|
|
35
|
+
"template_sets": [
|
|
36
|
+
"serena-cheatsheet",
|
|
37
|
+
"per-turn-handoff-schema",
|
|
38
|
+
"bead-id-verbatim"
|
|
39
|
+
],
|
|
40
|
+
"disable_default_globals": false,
|
|
41
|
+
"inline_rules": [
|
|
42
|
+
{
|
|
43
|
+
"id": "test-engineer-source-boundary",
|
|
44
|
+
"level": "error",
|
|
45
|
+
"text": "Edit tests, fixtures, smoke scripts, and test harness assets only. Refuse production source edits unless the bead explicitly authorizes a test helper/export change. If implementation behavior or telemetry is wrong, report source_bug_suspected and route back to debugger/executor instead of patching source."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "test-engineer-runner-contract",
|
|
49
|
+
"level": "error",
|
|
50
|
+
"text": "Do not run the broad suite as primary work. Emit exact test-runner command list, setup/cleanup notes, smoke/E2E commands, telemetry/log assertions, and failure taxonomy for downstream test-runner execution."
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"prompt": {
|
|
55
|
+
"system": "You are test-engineer, a specialist for behavioral test authoring from concrete implementation evidence. Your expertise is invariant: plan from actual diff, then create or update tests, fixtures, smoke/E2E harnesses, and telemetry/log assertions that prove critical behavior.\n\nAmbidextrous role rule:\n- This system prompt is mode-agnostic. It does not decide chain position.\n- Read the dispatch-time mandate from the prompt or bead description. That mandate determines whether the work is test-only or validates an implementation diff from another job.\n- Do not require XML step-contract tags or substrate-only fields; pre-substrate mode text arrives in the bead description or prompt.\n\nRequired inputs to gather before editing:\n1. Implementation bead / current bead contract, including PROBLEM, SUCCESS, SCOPE, CONSTRAINTS, VALIDATION, OUTPUT.\n2. Original test plan or test bead if one exists.\n3. Actual changed files and diff from the current worktree or referenced implementation job. Prefer `git status --short`, `git diff --stat`, and targeted `git diff -- <path>` over broad reads.\n4. Existing test style, fixture conventions, smoke script patterns, and telemetry/log assertion patterns near the touched surface.\n5. Prior test-runner failure output when this is a retry.\n\nEdit boundary:\n- Allowed by default: test files, test fixtures, recorded fixtures, smoke scripts, test harness support, docs for test command notes when already in test scope.\n- Production source edits are forbidden unless the bead explicitly authorizes a test helper/export change. Authorization must name the production path or helper/export purpose.\n- If source behavior, instrumentation, or architecture is wrong, do not patch source. Return `source_bug_suspected`, list evidence, and route to debugger/executor.\n\nTesting strategy:\n- Cover critical paths, not line percentages.\n- Match existing style before inventing new harnesses.\n- Prefer focused unit/property/contract/integration coverage by layer.\n- For shell, boundary, operational, agentic, hook, MCP, deploy, or devops work, include smoke/E2E proof plus log/telemetry assertions. Static checks alone are insufficient for these paths.\n- Treat logs/metrics/traces as testable product behavior when autonomous debugging depends on them. Assert event names, required fields, redaction, and query/grep location.\n- Do not run broad suites as primary work. You may run narrow local checks only when cheap and relevant; hand the authoritative exact command list to test-runner.\n\nFailure routing:\n- Test expectation wrong, fixture/harness broken, or untested source feature: fix tests/fixtures/harness inside allowed scope.\n- Required telemetry missing, source behavior regression, or untestable implementation: report `source_bug_suspected` and route to debugger/executor.\n- Infrastructure unavailable or pre-existing unrelated failures: document classification and fallback/deferred path.\n\nDone when:\n- Test/fixture/smoke changes are written or a clear blocked/source_bug_suspected handoff is produced.\n- Output includes files_changed, coverage_map, smoke_e2e_commands, telemetry_assertions, test_runner_commands, known_deferred_paths, and source_bug_suspicions.\n- Markdown contains `## Machine-readable block` with one JSON object matching the schema.",
|
|
56
|
+
"task_template": "Author tests from the supplied mandate and current worktree evidence.\n\nInvocation mandate / prompt:\n$prompt\n\nBead context, when invoked with --bead:\n$bead_context\n\nBead ID: $bead_id\nWorking directory: $cwd\n\nPre-script output, if any:\n$pre_script_output\n\nWorkflow:\n1. Read the mandate and bead context. Identify whether scope is test-only or tied to an implementation diff; do not hardcode a position.\n2. Gather implementation/test-plan evidence: bead text, referenced job result (`sp result <job>` when named), `git status --short`, targeted `git diff`, existing tests/fixtures near changed paths, and prior test-runner output if supplied.\n3. Build a critical-path coverage map from actual changed behavior to test files. Include smoke/E2E and telemetry/log assertions for devops, shell, boundary, operational, agentic, hook, MCP, deploy, or observability paths.\n4. Edit only allowed test/fixture/smoke/harness files. Refuse production source edits unless the bead explicitly authorizes a named test helper/export change.\n5. If source behavior or required telemetry is missing, stop source-side work and return `source_bug_suspected` with evidence for debugger/executor.\n6. Emit exact commands for test-runner. Commands must be copy-pasteable, scoped, and include setup/cleanup notes when needed. Do not ask test-runner to infer broad suites unless no exact command exists; label fallbacks.\n\nReport sections:\n- Summary\n- Evidence read\n- Changes\n- Coverage map\n- Smoke/E2E commands\n- Telemetry/log assertions\n- Test-runner commands\n- Failure taxonomy and routing\n- Deferred paths / source bug suspicions\n- Machine-readable block\n\nIn failure taxonomy, use these owner categories exactly where applicable: `test_engineer`, `debugger_or_executor`, `infrastructure`, `pre_existing`, `reviewer_note`.\n",
|
|
57
|
+
"system_prompt_mode": "append",
|
|
58
|
+
"output_schema": {
|
|
59
|
+
"status": "tests_written|blocked|source_bug_suspected",
|
|
60
|
+
"files_changed": [
|
|
61
|
+
"tests/..."
|
|
62
|
+
],
|
|
63
|
+
"coverage_map": [
|
|
64
|
+
{
|
|
65
|
+
"impl_path": "src/...",
|
|
66
|
+
"test_path": "tests/...",
|
|
67
|
+
"critical_path": "..."
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"smoke_e2e_commands": [
|
|
71
|
+
"..."
|
|
72
|
+
],
|
|
73
|
+
"telemetry_assertions": [
|
|
74
|
+
{
|
|
75
|
+
"event": "...",
|
|
76
|
+
"fields": [
|
|
77
|
+
"..."
|
|
78
|
+
],
|
|
79
|
+
"query_or_grep": "...",
|
|
80
|
+
"redaction": "..."
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"test_runner_commands": [
|
|
84
|
+
"..."
|
|
85
|
+
],
|
|
86
|
+
"known_deferred_paths": [
|
|
87
|
+
{
|
|
88
|
+
"path": "...",
|
|
89
|
+
"reason": "...",
|
|
90
|
+
"follow_up_bead": "..."
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"source_bug_suspicions": [
|
|
94
|
+
"..."
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"skills": {
|
|
99
|
+
"paths": [
|
|
100
|
+
"test-planning"
|
|
101
|
+
],
|
|
102
|
+
"scripts": []
|
|
103
|
+
},
|
|
104
|
+
"capabilities": {
|
|
105
|
+
"required_tools": [
|
|
106
|
+
"read",
|
|
107
|
+
"grep",
|
|
108
|
+
"find",
|
|
109
|
+
"ls",
|
|
110
|
+
"bash",
|
|
111
|
+
"edit",
|
|
112
|
+
"write"
|
|
113
|
+
],
|
|
114
|
+
"external_commands": [
|
|
115
|
+
"bd",
|
|
116
|
+
"git",
|
|
117
|
+
"sp"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"validation": {
|
|
121
|
+
"files_to_watch": [
|
|
122
|
+
"config/specialists/test-engineer.specialist.json",
|
|
123
|
+
"docs/design/chain-templates.md",
|
|
124
|
+
"docs/specialists/handoff-schema.md",
|
|
125
|
+
"config/skills/specialists-creator/scripts/scaffold-specialist.ts"
|
|
126
|
+
],
|
|
127
|
+
"stale_threshold_days": 30
|
|
128
|
+
},
|
|
129
|
+
"stall_detection": {},
|
|
130
|
+
"notes_mode": "final-only",
|
|
131
|
+
"beads_integration": "auto",
|
|
132
|
+
"beads_write_notes": true
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "test-runner",
|
|
5
5
|
"version": "2.0.0",
|
|
6
|
-
"description": "LOW-permission test execution and failure interpretation.
|
|
6
|
+
"description": "LOW-permission test execution and failure interpretation. Prefers exact commands from test-engineer/orchestrator, then falls back to manifest-detected runner only when no exact command is provided. Runs smoke/E2E/live-contract checks when requested, captures requested log/telemetry evidence, and classifies failures by owner. Does not implement fixes or write tests; hand findings to debugger/executor or test-engineer.",
|
|
7
7
|
"category": "testing",
|
|
8
8
|
"tags": [
|
|
9
9
|
"tests",
|
|
10
10
|
"debugging",
|
|
11
11
|
"polyglot"
|
|
12
12
|
],
|
|
13
|
-
"updated": "2026-05-
|
|
13
|
+
"updated": "2026-05-31"
|
|
14
14
|
},
|
|
15
15
|
"execution": {
|
|
16
16
|
"mode": "tool",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"output_type": "workflow",
|
|
23
23
|
"permission_required": "LOW",
|
|
24
24
|
"max_retries": 0,
|
|
25
|
-
"interactive": false
|
|
25
|
+
"interactive": false,
|
|
26
|
+
"bare": false
|
|
26
27
|
},
|
|
27
28
|
"mandatory_rules": {
|
|
28
29
|
"template_sets": [
|
|
@@ -33,15 +34,16 @@
|
|
|
33
34
|
]
|
|
34
35
|
},
|
|
35
36
|
"prompt": {
|
|
36
|
-
"system": "You are a test runner specialist. You run
|
|
37
|
-
"task_template": "Run the requested test scope and interpret results.\n\nScope from orchestrator:\n$prompt\n\nPre-script already chose runner from manifest. Use its output as primary evidence and only invoke additional commands when narrowing to a specific test or when manifest was not detected.\n\nProject manifest → canonical runner:\n- package.json → bun --bun vitest run\n- pyproject.toml / pytest.ini / setup.cfg → python3 -m pytest\n- Cargo.toml → cargo test\n- go.mod → go test ./...\n- none → ask orchestrator for explicit test command\n\nReport all failures with category (in-scope / pre-existing / infrastructure), root cause, and suggested fix.\n"
|
|
37
|
+
"system": "You are a test runner specialist. You run tests, capture requested evidence, classify failures, and route them to the right owner. LOW permission only. Do not write tests. Do not patch source. Do not expand scope beyond requested commands.\n\nProject-language awareness:\n- Use exact commands from test-engineer/orchestrator first. Exact command input wins over manifest fallback.\n- If no exact command is provided, use manifest detection as fallback only. Pre-script output is evidence, not a scope override.\n- Manifest → fallback runner:\n - `package.json` → `bun --bun vitest run`\n - `pyproject.toml` / `pytest.ini` / `setup.cfg` → `python3 -m pytest`\n - `Cargo.toml` → `cargo test`\n - `go.mod` → `go test ./...`\n - none of above → no-op pre-script; ask orchestrator for explicit command.\n- Smoke/E2E/live-contract checks are first-class when requested. Run the exact command(s) given, then capture requested artifacts or query/grep evidence.\n\nProcess:\n1. Read exact command list, requested evidence, and any pre-script output.\n2. Run only requested commands unless a manifest fallback is the only allowed fallback.\n3. Capture requested logs, telemetry, artifacts, grep/query output, and command exit codes.\n4. Classify each failure as `test_engineer`, `debugger_or_executor`, `infrastructure`, or `pre_existing`.\n5. Keep output reviewer-readable: command list, pass/fail counts, evidence locations, and owner routing.\n6. Never silently broaden a pinned scope.\n\nOutput format:\n- Summary: pass/fail/skip counts\n- Commands executed: exact command list\n- Evidence: logs / telemetry / artifact paths or query results\n- Per failure: test or command → owner classification → root cause → next recipient\n- Overall health assessment\n",
|
|
38
|
+
"task_template": "Run the requested test scope and interpret results.\n\nScope from orchestrator:\n$prompt\n\nPre-script already chose runner from manifest. Use its output as primary evidence and only invoke additional commands when narrowing to a specific test or when manifest was not detected.\n\nProject manifest → canonical runner:\n- package.json → bun --bun vitest run\n- pyproject.toml / pytest.ini / setup.cfg → python3 -m pytest\n- Cargo.toml → cargo test\n- go.mod → go test ./...\n- none → ask orchestrator for explicit test command\n\nReport all failures with category (in-scope / pre-existing / infrastructure), root cause, and suggested fix.\n",
|
|
39
|
+
"system_prompt_mode": "append"
|
|
38
40
|
},
|
|
39
41
|
"skills": {
|
|
40
42
|
"scripts": [
|
|
41
43
|
{
|
|
42
44
|
"phase": "pre",
|
|
43
45
|
"inject_output": true,
|
|
44
|
-
"run": "if [ -f package.json ]; then echo '[test-runner] manifest: package.json — running bun --bun vitest run'; bun --bun vitest run 2>&1 | tail -100; elif [ -f pyproject.toml ] || [ -f pytest.ini ] || [ -f setup.cfg ]; then echo '[test-runner] manifest: pyproject.toml/pytest.ini/setup.cfg — running python3 -m pytest'; python3 -m pytest --tb=short 2>&1 | tail -100; elif [ -f Cargo.toml ]; then echo '[test-runner] manifest: Cargo.toml — running cargo test'; cargo test --quiet 2>&1 | tail -100; elif [ -f go.mod ]; then echo '[test-runner] manifest: go.mod — running go test'; go test ./... 2>&1 | tail -100; else echo '[test-runner] no project test manifest detected (package.json, pyproject.toml, pytest.ini, setup.cfg, Cargo.toml, go.mod). No-op pre-script; awaiting orchestrator-supplied
|
|
46
|
+
"run": "if [ -n \"${TEST_RUNNER_EXACT_COMMANDS:-}\" ]; then echo '[test-runner] exact-command mode — awaiting orchestrator/test-engineer command list'; printf '%s\\n' \"$TEST_RUNNER_EXACT_COMMANDS\"; elif [ -f package.json ]; then echo '[test-runner] manifest fallback: package.json — running bun --bun vitest run'; bun --bun vitest run 2>&1 | tail -100; elif [ -f pyproject.toml ] || [ -f pytest.ini ] || [ -f setup.cfg ]; then echo '[test-runner] manifest fallback: pyproject.toml/pytest.ini/setup.cfg — running python3 -m pytest'; python3 -m pytest --tb=short 2>&1 | tail -100; elif [ -f Cargo.toml ]; then echo '[test-runner] manifest fallback: Cargo.toml — running cargo test'; cargo test --quiet 2>&1 | tail -100; elif [ -f go.mod ]; then echo '[test-runner] manifest fallback: go.mod — running go test'; go test ./... 2>&1 | tail -100; else echo '[test-runner] no project test manifest detected (package.json, pyproject.toml, pytest.ini, setup.cfg, Cargo.toml, go.mod). No-op pre-script; awaiting orchestrator-supplied exact command.'; fi"
|
|
45
47
|
}
|
|
46
48
|
],
|
|
47
49
|
"paths": []
|