@precisionutilityguild/liquid-shadow 1.0.9 → 1.0.10

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.
Files changed (39) hide show
  1. package/README.md +3 -3
  2. package/dist/data/migrations/000_baseline.sql +17 -0
  3. package/dist/data/migrations/014_tribunal_state.sql +24 -0
  4. package/dist/data/migrations/015_repo_level_handoffs_nullable.sql +52 -0
  5. package/dist/data/migrations/016_repair_tribunal_artifact_fk.sql +58 -0
  6. package/dist/entry/cli/index.js +540 -493
  7. package/dist/entry/ember/index.js +44 -20
  8. package/dist/entry/mcp/server.js +388 -347
  9. package/dist/entry/tribunal/index.js +650 -0
  10. package/dist/index.js +387 -346
  11. package/dist/logic/parser/index.js +16 -16
  12. package/dist/skills/shadow_audit/SKILL.md +22 -30
  13. package/dist/skills/shadow_chronicle/SKILL.md +16 -29
  14. package/dist/skills/shadow_continue/SKILL.md +37 -53
  15. package/dist/skills/shadow_coordinate/SKILL.md +46 -0
  16. package/dist/skills/shadow_crystallize/SKILL.md +13 -27
  17. package/dist/skills/shadow_mission/SKILL.md +27 -41
  18. package/dist/skills/shadow_onboard/SKILL.md +26 -35
  19. package/dist/skills/shadow_research/SKILL.md +15 -23
  20. package/dist/skills/shadow_sync/SKILL.md +18 -9
  21. package/dist/skills/shadow_synthesize/SKILL.md +14 -36
  22. package/dist/skills/shadow_trace_impact/SKILL.md +30 -50
  23. package/dist/skills/shadow_understand/SKILL.md +37 -52
  24. package/dist/skills/shadow_workspace/SKILL.md +17 -17
  25. package/dist/web-manifest.json +13 -6
  26. package/package.json +1 -1
  27. package/skills/shadow_audit/SKILL.md +22 -30
  28. package/skills/shadow_chronicle/SKILL.md +16 -29
  29. package/skills/shadow_continue/SKILL.md +37 -53
  30. package/skills/shadow_coordinate/SKILL.md +46 -0
  31. package/skills/shadow_crystallize/SKILL.md +13 -27
  32. package/skills/shadow_mission/SKILL.md +27 -41
  33. package/skills/shadow_onboard/SKILL.md +26 -35
  34. package/skills/shadow_research/SKILL.md +15 -23
  35. package/skills/shadow_sync/SKILL.md +18 -9
  36. package/skills/shadow_synthesize/SKILL.md +14 -36
  37. package/skills/shadow_trace_impact/SKILL.md +30 -50
  38. package/skills/shadow_understand/SKILL.md +37 -52
  39. package/skills/shadow_workspace/SKILL.md +17 -17
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.9",
2
+ "version": "1.0.10",
3
3
  "toolsByPrefix": {
4
4
  "RECON": {
5
5
  "subcommands": [
@@ -50,6 +50,8 @@
50
50
  "release",
51
51
  "synthesize",
52
52
  "track",
53
+ "tribunal_status",
54
+ "tribunal_submit",
53
55
  "working_set_check"
54
56
  ],
55
57
  "description": "Create a new development mission or strategic initiative with goals and strategy."
@@ -90,18 +92,23 @@
90
92
  {
91
93
  "slug": "shadow_audit",
92
94
  "name": "AUDIT",
93
- "description": "Perform codebase health audits to identify dead code, circular dependencies, and technical debt. Use when auditing code quality, finding unused code, detecting circular dependencies, or when the user asks about codebase health, technical debt, or code cleanup."
95
+ "description": "Audit repository health with Shadow tools. Use when hunting dead code, import cycles, layer drift, orphaned config, structural risks, or when turning audit findings into cleanup work."
94
96
  },
95
97
  {
96
98
  "slug": "shadow_chronicle",
97
99
  "name": "CHRONICLE",
98
- "description": "Retrieve and analyze the repository's narrative archive as recorded in Git-native memory. Use when you need to understand historical decisions, catch up on repository progress, review recently completed missions, or when the user asks for a project history, changelog, or chronological overview of architectural changes."
100
+ "description": "Read the repository narrative archive. Use when you need project history, ADR context, recent completed work, release-note material, or a chronological view of architectural changes."
99
101
  },
100
102
  {
101
103
  "slug": "shadow_continue",
102
104
  "name": "CONTINUE",
103
105
  "description": "Get briefing, pick one mission from next_work_candidates, then work that mission to completion with all remaining steps in one run. Use when continuing work on missions, executing mission steps, or when the user asks to continue work, finish a mission, or proceed with development tasks."
104
106
  },
107
+ {
108
+ "slug": "shadow_coordinate",
109
+ "name": "COORDINATE",
110
+ "description": "Coordinate multi-agent or parallel work with working-set checks, file claims, dispatch waves, handoffs, and user-approved Tribunal review. Use when several agents may edit at once or when work must be transferred cleanly."
111
+ },
105
112
  {
106
113
  "slug": "shadow_crystallize",
107
114
  "name": "CRYSTALLIZE",
@@ -110,17 +117,17 @@
110
117
  {
111
118
  "slug": "shadow_mission",
112
119
  "name": "MISSION",
113
- "description": "Define the objective, strategy, and success criteria for a new development mission. Use when planning strategic initiatives, creating missions, setting up development goals, or when the user asks about mission planning, strategic alignment, or outcome contracts."
120
+ "description": "Define the objective, strategy, and success criteria for a mission. Use when planning new work, shaping initiatives, writing outcome contracts, or aligning a task before execution starts."
114
121
  },
115
122
  {
116
123
  "slug": "shadow_onboard",
117
124
  "name": "ONBOARD",
118
- "description": "Initialize and analyze a new repository for deep intelligence by building semantic index, syncing state, activating git hooks, and establishing missions. Use when onboarding to a new repository, initializing Shadow Engine, setting up git hooks, or when the user asks about repository setup, initialization, or first-time configuration."
125
+ "description": "Initialize and analyze a repository for Shadow workflows. Use when onboarding a repo, bootstrapping indexes and hooks, checking intelligence health, or preparing the first mission."
119
126
  },
120
127
  {
121
128
  "slug": "shadow_research",
122
129
  "name": "RESEARCH",
123
- "description": "Conduct high-signal research for external dependencies by combining local context, web search, and Context7 documentation. Use when researching libraries, checking integration examples, verifying versions, or when the user asks about external dependencies, library documentation, or integration patterns."
130
+ "description": "Research external dependencies without losing local context. Use when checking library usage, verifying versions, finding integration examples, or comparing official documentation against what the repo already does."
124
131
  },
125
132
  {
126
133
  "slug": "shadow_sync",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@precisionutilityguild/liquid-shadow",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Tactical Repository Intelligence Operative - Liquid Shadow Ecosystem",
5
5
  "homepage": "https://liquidshadow.pugcorp.online/",
6
6
  "repository": {
@@ -1,43 +1,35 @@
1
1
  ---
2
2
  name: audit
3
- description: Perform codebase health audits to identify dead code, circular dependencies, and technical debt. Use when auditing code quality, finding unused code, detecting circular dependencies, or when the user asks about codebase health, technical debt, or code cleanup.
3
+ description: Audit repository health with Shadow tools. Use when hunting dead code, import cycles, layer drift, orphaned config, structural risks, or when turning audit findings into cleanup work.
4
4
  ---
5
5
 
6
- # Codebase Audit
6
+ # Audit
7
7
 
8
- Comprehensive health audit using Shadow analyze toolkit.
8
+ Use this skill when the goal is repository health, not feature delivery.
9
9
 
10
- ## 🚀 Workflow
10
+ ## Start
11
11
 
12
- 1. **Session Context**: `shadow_ops_context` (repoPath) **ONE CALL** for hologram + chronicle + briefing. Get architecture baseline.
13
- 2. **Dead Code Detection**: `shadow_analyze_debt` (mode: "dead-code", limit: 100, includeTests: false, repoPath) — Unused exports.
14
- 3. **Circular Dependencies**: `shadow_analyze_debt` (mode: "circular-deps", limit: 20, repoPath) — Import cycles.
15
- 4. **Layer Integrity** (optional): `shadow_recon_topography` (repoPath) — Detailed layer analysis if hologram summary isn't enough.
16
- 5. **Log Findings**: `shadow_ops_log` (missionId, type: "discovery", content, repoPath).
17
- 6. **Create Cleanup Mission** (optional): `shadow_ops_plan` (name: "Codebase Cleanup", templateId: "refactoring", templateVars, repoPath).
12
+ 1. `shadow_ops_context({ repoPath, compact: true })`
13
+ 2. `shadow_analyze_debt({ repoPath, mode: "dead-code", confidenceThreshold: "high" })`
14
+ 3. `shadow_analyze_debt({ repoPath, mode: "circular-deps" })`
18
15
 
19
- ## 🛠 Precise Tooling
16
+ ## Add depth only when needed
20
17
 
21
- | Audit Target | Atomic Tool |
22
- | :------------------- | :------------------------------------------------------------------------------------- |
23
- | **Session Start** 🚀 | `shadow_ops_context` (repoPath) **START HERE** for baseline |
24
- | **Architecture** | `shadow_recon_hologram` (repoPath) if you need standalone |
25
- | **Dead Code** | `shadow_analyze_debt` (mode: "dead-code", limit: 100, **confidenceThreshold: "high"**) |
26
- | **Circular Deps** | `shadow_analyze_debt` (mode: "circular-deps") |
27
- | **Layers** | `shadow_recon_topography` — detailed breakdown if needed |
28
- | **Config Audit** | `shadow_search_config` (kind: "Env", **showUsage: true**) — find orphaned env vars |
29
- | **Event Mesh** | `shadow_analyze_mesh` (repoPath) — audit all HTTP routes, socket events, pubsub topics |
30
- | **Type Integrity** | `shadow_analyze_type_graph` (filePath, repoPath) — interface/type inheritance chains |
31
- | **Theme Patterns** | `shadow_ops_crystallize_theme` (query, repoPath) — recurring issues across missions |
18
+ - `shadow_recon_topography({ repoPath })` for layer drift and boundary violations.
19
+ - `shadow_recon_scout({ repoPath })` for architectural drift and anomalies.
20
+ - `shadow_search_config({ repoPath, kind: "Env", showUsage: true })` for orphaned config and env keys.
21
+ - `shadow_analyze_impact({ repoPath, symbolName, filePath? })` for risky hubs.
22
+ - `shadow_analyze_type_graph({ repoPath, symbolName, filePath? })` when a central interface or base class is involved.
23
+ - `shadow_analyze_mesh({ repoPath, topic, type? })` only when you already have a concrete route or event fragment such as `"/api/"` or `"order."`.
32
24
 
33
- ## 💡 Intelligence Options
25
+ ## Close the loop
34
26
 
35
- - **`shadow_analyze_debt` confidence levels**: Use `confidenceThreshold: "high"` for likely dead code, `"medium"` for possibly intentional (test fixtures, etc.), `"all"` for everything.
36
- - **`shadow_analyze_debt` exclusion filters**: Use `excludePatterns`, `includeMigrations: false`, `includeFixtures: false` to reduce noise.
37
- - **`shadow_search_config` with `showUsage: true`**: Cross-references config vars with code to show usage counts and identify orphaned vars (defined but never used).
27
+ - `shadow_ops_log({ repoPath, missionId?, type: "discovery", content, filePath?, symbolName? })`
28
+ - `shadow_ops_handoff({ repoPath, missionId?, kind: "debt_scan", findings, risks?, gaps? })`
29
+ - `shadow_ops_plan({ repoPath, name, goal, templateId: "refactoring", workingSet? })`
38
30
 
39
- ## 🔍 Health Criteria
31
+ ## Rules
40
32
 
41
- - **Critical Issues**: Circular deps in core logic, >50 dead exports, orphaned env vars with secrets
42
- - **Warning Signs**: Layer violations (Test → Logic), >20 dead exports, >10 orphaned configs
43
- - **Good Health**: Clean layers, <10 dead exports, no circular deps, all configs in use
33
+ - Start with `confidenceThreshold: "high"` and widen only if the user wants a broader sweep.
34
+ - `shadow_ops_crystallize_theme` takes `theme`, not `query`.
35
+ - `shadow_analyze_type_graph` requires `symbolName`.
@@ -1,40 +1,27 @@
1
1
  ---
2
2
  name: chronicle
3
- description: Retrieve and analyze the repository's narrative archive as recorded in Git-native memory. Use when you need to understand historical decisions, catch up on repository progress, review recently completed missions, or when the user asks for a project history, changelog, or chronological overview of architectural changes.
3
+ description: Read the repository narrative archive. Use when you need project history, ADR context, recent completed work, release-note material, or a chronological view of architectural changes.
4
4
  ---
5
5
 
6
- # Repository Chronicle
6
+ # Chronicle
7
7
 
8
- Retrieve narrative archive from Git-native memory.
8
+ Use this skill when the answer lives in mission history rather than the current code graph.
9
9
 
10
- ## 🚀 Workflow
10
+ ## Core calls
11
11
 
12
- 1. **Recent History**: `shadow_ops_chronicle` (limit: 10, format: "markdown", repoPath) — Last 10 entries.
13
- 2. **Time-Filtered**:
14
- - `shadow_ops_chronicle` (since: &lt;unix&gt;, limit: 20, repoPath)
15
- - `shadow_ops_chronicle` (until: &lt;unix&gt;, limit: 20, repoPath)
16
- 3. **Structured Data**: `shadow_ops_chronicle` (format: "json", limit: 50, repoPath) — For processing.
17
- 4. **Paginated**: `shadow_ops_chronicle` (limit: 10, offset: 10, repoPath) — Second page.
12
+ - Recent narrative: `shadow_ops_chronicle({ repoPath, limit: 10, format: "markdown" })`
13
+ - Structured output: `shadow_ops_chronicle({ repoPath, format: "json", limit: 50 })`
14
+ - Time window: `shadow_ops_chronicle({ repoPath, since, until })`
15
+ - Branch-scoped history: `shadow_ops_chronicle({ repoPath, branch, limit })`
16
+ - Pagination: `shadow_ops_chronicle({ repoPath, limit, offset })`
18
17
 
19
- ## 🛠 Precise Tooling
18
+ ## Good pairings
20
19
 
21
- | Chronicle Query | Atomic Tool |
22
- | :-------------------- | :---------------------------------------------------------------- |
23
- | **Recent (Markdown)** | `shadow_ops_chronicle` (limit: 10, format: "markdown") |
24
- | **Time Range** | `shadow_ops_chronicle` (since: &lt;unix&gt;, until: &lt;unix&gt;) |
25
- | **JSON Data** | `shadow_ops_chronicle` (format: "json", limit: 50) |
26
- | **Pagination** | `shadow_ops_chronicle` (limit: 10, offset: 10) |
20
+ - `shadow_ops_context({ repoPath, compact: true })` if you also need the current mission landscape.
21
+ - `shadow_ops_graph({ repoPath, missionId, format: "mermaid" })` when a historical mission hierarchy matters.
27
22
 
28
- ## Output Formats
23
+ ## Notes
29
24
 
30
- - **`format: "markdown"`** (default): Human-readable narrative feed with missions grouped as Strategic Initiatives and Standalone Episodes
31
- - **`format: "json"`**: Structured data for programmatic analysis (includes missionId, steps, timestamps, ADRs)
32
-
33
- ## Use Cases
34
-
35
- - **Onboarding**: Read last 10 entries to catch up
36
- - **Release Notes**: Get completed missions since last release
37
- - **ADR Review**: Extract all architectural decisions
38
- - **Progress Reports**: Show what's been done this week
39
-
40
- **Note:** Chronicle reads from Git Notes, so it's persistent across branches and clones.
25
+ - `format: "markdown"` is best for humans.
26
+ - `format: "json"` is best when another tool or agent will process the result.
27
+ - Chronicle is backed by Git Notes, so it survives across branches and clones.
@@ -3,61 +3,45 @@ name: continue
3
3
  description: Get briefing, pick one mission from next_work_candidates, then work that mission to completion with all remaining steps in one run. Use when continuing work on missions, executing mission steps, or when the user asks to continue work, finish a mission, or proceed with development tasks.
4
4
  ---
5
5
 
6
- **In one sentence:** Get briefing (+ optional trace), pick **one mission** from **next_work_candidates** (ranked by relevance), then work that mission to completion — all remaining steps in one run. Update and log as you go. No status reports; when you're done with that mission, it's done.
6
+ # Continue
7
7
 
8
- ---
8
+ Pick one mission from `next_work_candidates` and finish it end to end.
9
9
 
10
- ## 1. Context
11
-
12
- - **Option A (one shot):** `shadow_ops_context` (repoPath) → returns hologram + chronicle(5) + **briefing** (counts, **next_work_candidates** ranked by relevance). Use when you want architecture + history + backlog in one call at the start of /continue.
13
- - **Option B:** `shadow_ops_briefing` (scope: "project", repoPath) → **next_work_candidates** (relevance-ranked), hierarchy, analytics.
14
- - Use **altitude** to control output density: `orbit` (~200 tokens, counts + candidates only), `atmosphere` (default, strategy + crystals), `ground` (raw logs + working set + collisions).
15
- - `shadow_sync_trace` (repoPath) only if you care about external changes. Otherwise skip.
16
-
17
- ## 2. Pick one mission
18
-
19
- - **`next_work_candidates`** are ranked by the MissionRelevanceScorer (recency × 0.4 + activity × 0.3 + status × 0.2 + blockers × 0.1). Higher score = more relevant.
20
- - Choose the top-ranked candidate. Prefer in-progress over planned. Parent-only missions (umbrellas) are already filtered out.
21
-
22
- ## 3. Work the whole mission
23
-
24
- - For that mission, run through **all remaining steps** (not just one):
25
- - **Surgical Discovery:** `shadow_analyze_flow` (symbolName, filePath, repoPath).
26
- - **Execute Step**: Set in-progress → implement → `shadow_ops_track` (missionId, stepId, status: "completed", contextPivot, repoPath).
27
- - **Atomic Logging:** At least once per step. `shadow_ops_log` (missionId, type: "decision", content, symbolName, repoPath).
28
- - **Inter-agent handoff** (multi-agent pipelines only): When handing off findings to another agent, call `shadow_ops_handoff` (missionId, role, summary, findings, repoPath) to persist a typed artifact with embedding. The receiving agent calls `shadow_ops_handoff_read` (missionId, query, repoPath) to semantically retrieve relevant prior handoffs.
29
- - **Seal the mission**: `shadow_ops_track` (missionId, status: "completed", repoPath).
30
- - This **auto-triggers**: ADR synthesis, Git Notes persistence, and cascade parent completion (if all sibling missions are also done, the parent auto-completes too).
31
- - No need to call `shadow_ops_synthesize` separately — it's automatic on completion.
32
- - **Optional — Crystallize** (for long-running missions with many logs): `shadow_ops_crystallize` (missionId, repoPath) compresses raw intent logs into a single crystal summary. Useful mid-mission to keep briefings lean.
33
- - **Optional — Theme Crystallize** (cross-mission patterns): `shadow_ops_crystallize_theme` (query, repoPath) clusters semantically related intent logs across ALL missions to surface recurring architectural themes. Use when you sense a pattern repeating across missions.
34
-
35
- ## 🛠 Precise Tooling
36
-
37
- | Action | Atomic Tool | Example |
38
- | :--------------------- | :----------------------------- | :--------------------------------------------------------------- |
39
- | **Context (one shot)** | `shadow_ops_context` | repoPath — hologram + chronicle + briefing |
40
- | **Briefing** | `shadow_ops_briefing` | scope: "project", altitude: "orbit", repoPath |
41
- | **Flow Trace** | `shadow_analyze_flow` | symbolName: "handleRequest", filePath, repoPath |
42
- | **Step Update** | `shadow_ops_track` | missionId: 4, stepId: "s2", status: "completed" |
43
- | **Intent Log** | `shadow_ops_log` | missionId: 4, type: "fix", content: "..." |
44
- | **Complete Mission** | `shadow_ops_track` | missionId: 4, status: "completed" — auto-synthesizes ADR |
45
- | **Crystallize** | `shadow_ops_crystallize` | missionId: 4 — compress logs mid-mission |
46
- | **Theme Crystallize** | `shadow_ops_crystallize_theme` | query: "auth patterns" — cross-mission semantic clustering |
47
- | **Handoff (write)** | `shadow_ops_handoff` | missionId, role: "RECON", summary, findings — persist artifact |
48
- | **Handoff (read)** | `shadow_ops_handoff_read` | missionId, query: "auth findings" — semantic retrieval |
49
- | **Event Mesh** | `shadow_analyze_mesh` | repoPath — surface all HTTP routes, socket events, pubsub topics |
50
- | **Type Graph** | `shadow_analyze_type_graph` | filePath, repoPath — interface/type inheritance map |
51
- | **Explain Diff** | `shadow_analyze_explain_diff` | fromCommit, toCommit, repoPath — semantic diff narrative |
52
-
53
- _Note: Always use `symbolName` in `shadow_ops_log` to create Liquid Anchors._
54
-
55
- ## 4. Don't
10
+ ## Start
56
11
 
57
- - Don't do one step and stop /continue is "finish a mission," not "do one step."
58
- - Don't call `shadow_ops_synthesize` after completing it's automatic on `status: "completed"`.
59
- - Don't long status reports. Don't ask "what should I work on?" unless a real tie. Don't auto-commit.
12
+ 1. `shadow_ops_context({ repoPath, compact: true })` or `shadow_ops_briefing({ repoPath, scope: "project", altitude: "orbit" })`
13
+ 2. Pick one leaf mission from `next_work_candidates`. Prefer in-progress over planned.
14
+ 3. If there is no candidate, stop and plan new work instead of inventing a mission.
60
15
 
61
- ---
16
+ ## Work loop
17
+
18
+ - Mark the active step: `shadow_ops_track({ repoPath, missionId, stepId, status: "in-progress" })`
19
+ - If multiple agents may edit the same area, check and claim first:
20
+ - `shadow_working_set_check({ repoPath, filePaths })`
21
+ - `shadow_ops_claim({ repoPath, missionId, filePaths, agentTag? })`
22
+ - Do focused discovery with the relevant search, recon, analyze, and inspect tools.
23
+ - Record at least one meaningful log per step:
24
+ - `shadow_ops_log({ repoPath, missionId, type: "decision" | "discovery" | "fix", content, filePath?, symbolName? })`
25
+ - Mark each finished step:
26
+ - `shadow_ops_track({ repoPath, missionId, stepId, status: "completed", contextPivot? })`
62
27
 
63
- **Tools:** `shadow_ops_context` (optional start), `shadow_ops_briefing`, `shadow_ops_track`, `shadow_ops_log`, `shadow_ops_crystallize`, `shadow_ops_crystallize_theme`, `shadow_ops_handoff`, `shadow_ops_handoff_read`, `shadow_sync_trace`. For discovery: `shadow_search_*`, `shadow_recon_*`, `shadow_analyze_*` (including `shadow_analyze_mesh`, `shadow_analyze_type_graph`, `shadow_analyze_explain_diff`).
28
+ ## Finish
29
+
30
+ - Optional handoff for downstream agents:
31
+ - `shadow_ops_handoff({ repoPath, missionId, kind, findings, risks?, gaps?, confidence?, agentTag? })`
32
+ - `shadow_ops_handoff_read({ repoPath, missionId?, kind?, query?, limit? })`
33
+ - Optional review gate, but only after the user explicitly asks for Tribunal or clearly approves it:
34
+ - `shadow_ops_tribunal_submit({ repoPath, missionId })`
35
+ - `shadow_ops_tribunal_status({ repoPath, missionId })`
36
+ - Release any claims you took:
37
+ - `shadow_ops_release({ repoPath, missionId, filePaths? })`
38
+ - Complete the mission:
39
+ - `shadow_ops_track({ repoPath, missionId, status: "completed" })`
40
+
41
+ ## Rules
42
+
43
+ - Don't do one step and stop — /continue is "finish a mission," not "do one step."
44
+ - Don't call `shadow_ops_synthesize` after completion unless you are intentionally regenerating the record.
45
+ - Never run Tribunal without explicit user consent.
46
+ - `shadow_ops_handoff` does not take `role` or `summary`; use `kind` plus structured `findings`.
47
+ - `shadow_ops_crystallize_theme` takes `theme`, not `query`.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: coordinate
3
+ description: Coordinate multi-agent or parallel work with working-set checks, file claims, dispatch waves, handoffs, and user-approved Tribunal review. Use when several agents may edit at once or when work must be transferred cleanly.
4
+ ---
5
+
6
+ # Coordinate
7
+
8
+ Use this skill when execution risk comes from overlap, not code complexity.
9
+
10
+ ## Conflict control
11
+
12
+ - `shadow_working_set_check({ repoPath, filePaths })`
13
+ - `shadow_ops_claim({ repoPath, missionId, filePaths, agentTag? })`
14
+ - `shadow_ops_release({ repoPath, missionId, filePaths? })`
15
+
16
+ ## Parallel planning
17
+
18
+ - `shadow_ops_dispatch_plan({ repoPath, parentMissionId?, missionIds?, includeClaimCheck: true })`
19
+ - `shadow_ops_graph({ repoPath, missionId, depth?, format: "mermaid" | "json" })`
20
+
21
+ ## Handoffs
22
+
23
+ - Write: `shadow_ops_handoff({ repoPath, missionId?, kind, findings, risks?, gaps?, missionsCreated?, confidence?, agentTag? })`
24
+ - Read: `shadow_ops_handoff_read({ repoPath, missionId?, kind?, query?, limit? })`
25
+
26
+ Available `kind` values:
27
+
28
+ - `recon_report`
29
+ - `risk_assessment`
30
+ - `impact_map`
31
+ - `debt_scan`
32
+ - `custom`
33
+
34
+ ## Tribunal
35
+
36
+ Never run Tribunal unless the user explicitly asks for it or clearly approves it.
37
+
38
+ - `shadow_ops_tribunal_submit({ repoPath, missionId })`
39
+ - `shadow_ops_tribunal_status({ repoPath, missionId? or sessionId? })`
40
+
41
+ ## Rules
42
+
43
+ - Claim only the files you expect to edit.
44
+ - Release claims promptly when the work is done.
45
+ - Tribunal is opt-in only. Treat it as a user-consent gate, not an automatic review step.
46
+ - Handoffs must be structured. There is no `role` or `summary` field.
@@ -3,39 +3,25 @@ name: crystallize
3
3
  description: Compress a mission's intent logs into a dense crystal summary for token-efficient briefings. Use when a mission has accumulated many raw logs, when briefings are too verbose, or when the user asks about log compression, crystallization, or context reduction.
4
4
  ---
5
5
 
6
- # Intent Log Crystallization
6
+ # Crystallize
7
7
 
8
- Compress raw intent logs into a single crystal summary node. The crystal replaces verbose raw logs in briefings, reducing token usage while preserving the mission's key decisions, context, and consequences.
8
+ Compress raw intent logs into a crystal so briefings stay useful instead of noisy.
9
9
 
10
- ## When to Crystallize
10
+ ## Core calls
11
11
 
12
- - A mission has **10+ raw intent logs** and briefings are getting verbose.
13
- - Mid-mission, before requesting a detailed briefing keeps `atmosphere` altitude lean.
14
- - Before synthesis (optional) produces cleaner ADRs from compressed input.
15
- - The briefing at `atmosphere` altitude already prefers crystals over raw logs (`findByMissionPreferCrystal`), so crystallizing makes those briefings significantly leaner.
12
+ - Mission-level compression: `shadow_ops_crystallize({ repoPath, missionId })`
13
+ - Verify the result: `shadow_ops_briefing({ repoPath, scope: "mission", missionId, altitude: "atmosphere" })`
14
+ - Cross-mission theme compression: `shadow_ops_crystallize_theme({ repoPath, theme, missionIds?, limit? })`
16
15
 
17
- ## Workflow
16
+ ## When to use it
18
17
 
19
- 1. **Crystallize**: `shadow_ops_crystallize` (missionId, repoPath) — Compresses all raw logs into one crystal node. Raw logs are marked as `absorbed`.
20
- 2. **Verify**: `shadow_ops_briefing` (scope: "mission", missionId, altitude: "atmosphere", repoPath) — Crystal should appear in `recent_activity` instead of raw logs.
21
-
22
- ## Precise Tooling
23
-
24
- | Action | Atomic Tool | Usage |
25
- | :--------------- | :--------------------------------------------- | :-------------------------------------- |
26
- | **Crystallize** | `shadow_ops_crystallize` | missionId, repoPath — compress raw logs |
27
- | **Check Status** | `shadow_ops_briefing` (altitude: "atmosphere") | Verify crystal appears in activity |
28
- | **Full Logs** | `shadow_ops_briefing` (altitude: "ground") | Still shows raw logs if needed |
29
-
30
- ## What the Crystal Contains
31
-
32
- - Mission name and ID
33
- - Count of compressed logs and symbols
34
- - Log types present (decision, fix, discovery, blocker)
35
- - Structured breakdown: decisions, context, consequences, recommendations
18
+ - A mission has many raw logs and `atmosphere` briefings are getting bloated.
19
+ - You want cleaner synthesis input before closing a mission.
20
+ - You want to surface repeating patterns across missions with `theme`.
36
21
 
37
22
  ## Notes
38
23
 
39
24
  - Crystallization is **idempotent**: if no new raw logs exist, it reports `already_crystallized`.
40
- - New logs added after crystallization remain as raw until the next crystallize call.
41
- - Raw logs are **not deleted** they're marked as absorbed. `ground` altitude still shows them.
25
+ - Raw logs are not deleted; they are marked as absorbed.
26
+ - New logs stay raw until the next crystallize call.
27
+ - `shadow_ops_crystallize_theme` takes `theme`, not `query`.
@@ -1,53 +1,39 @@
1
1
  ---
2
2
  name: mission
3
- description: Define the objective, strategy, and success criteria for a new development mission. Use when planning strategic initiatives, creating missions, setting up development goals, or when the user asks about mission planning, strategic alignment, or outcome contracts.
3
+ description: Define the objective, strategy, and success criteria for a mission. Use when planning new work, shaping initiatives, writing outcome contracts, or aligning a task before execution starts.
4
4
  ---
5
5
 
6
- # Mission Strategy & Setup
6
+ # Mission
7
7
 
8
- Define the objective, strategy, and success criteria for a new mission. This workflow is for **Strategic Alignment and Planning**.
8
+ This skill is for planning. It stops at "ready to execute."
9
9
 
10
- > **IMPORTANT**: This workflow stops at the "Ready to Execute" state. For implementation and automated execution, use **/continue**.
10
+ ## Start
11
11
 
12
- ## Workflow
12
+ 1. `shadow_ops_context({ repoPath, compact: true })`
13
+ 2. If needed, expand with:
14
+ - `shadow_recon_topography({ repoPath })`
15
+ - `shadow_ops_briefing({ repoPath, scope: "project", altitude: "ground" })`
16
+ - `shadow_ops_chronicle({ repoPath, limit: 10 })`
17
+ 3. Reuse prior intelligence when available:
18
+ - `shadow_ops_handoff_read({ repoPath, missionId?, kind?, query? })`
19
+ - `shadow_ops_crystallize_theme({ repoPath, theme, missionIds? })`
13
20
 
14
- 1. **Session Context**: `shadow_ops_context` (repoPath) — **ONE CALL** for hologram + chronicle(5) + briefing (with relevance-ranked `next_work_candidates`). Check existing candidates and recent decisions before creating new work.
15
- 2. **Optional Expanded Context** (only if needed):
16
- - `shadow_recon_topography` (repoPath) — Detailed layer breakdown to align goal with architecture.
17
- - `shadow_ops_chronicle` (limit: 10, repoPath) — More historical ADRs if 5 isn't enough.
18
- - `shadow_ops_briefing` (scope: "project", altitude: "ground", repoPath) — Full detail with analytics, collisions, and working sets.
19
- 3. **Strategic Plan**: `shadow_ops_plan` (name, goal, outcomeContract, ...).
20
- - **Strategy DAG**: Define logical steps and verification rules.
21
- - **Initiative vs Mission**: Decide if this is a parent (Initiative) or a leaf (Mission). Parent missions auto-complete via cascade when all children finish.
22
- 4. **Alignment**: Present the plan to the user. Do not begin execution until the user approves the strategy.
21
+ ## Create the mission
23
22
 
24
- ## Precise Tooling
23
+ Use `shadow_ops_plan` with the fields that matter:
25
24
 
26
- | Setup Action | Precise Tool Call | Usage |
27
- | :-------------------- | :----------------------------------------- | :-------------------------------------------------------------------------------------------------- |
28
- | **Session Start** | `shadow_ops_context` | **START HERE** — hologram + chronicle + briefing in one call |
29
- | **Establish Plan** | `shadow_ops_plan` | Create the mission and strategy. |
30
- | **Architectural Map** | `shadow_recon_topography` | Contextualize the target layers (if context wasn't enough). |
31
- | **Detailed Briefing** | `shadow_ops_briefing` (altitude: "ground") | Full analytics, collisions, working sets. |
32
- | **Lean Briefing** | `shadow_ops_briefing` (altitude: "orbit") | Counts + candidates only (~200 tokens). |
33
- | **Graph View** | `shadow_ops_graph` | Visualize the initiative's hierarchy. |
34
- | **Theme Patterns** | `shadow_ops_crystallize_theme` | Before planning: surface recurring themes across past missions to avoid repeating solved problems. |
35
- | **Prior Handoffs** | `shadow_ops_handoff_read` | In multi-agent contexts: retrieve typed findings from a prior RECON agent before defining strategy. |
36
- | **Event Mesh** | `shadow_analyze_mesh` | When planning event-driven or API work: map all HTTP routes, socket events, pubsub topics. |
25
+ - `name`: short, concrete title
26
+ - `goal`: what changes and why
27
+ - `outcomeContract`: binary success test
28
+ - `strategy`: JSON step graph when the work has multiple stages
29
+ - `workingSet`: expected files or directories
30
+ - `templateId`: `refactoring`, `feature`, or `bug-fix`
31
+ - `parentId`: when this mission belongs under an initiative
37
32
 
38
- _Note: **Always start with `shadow_ops_context`** for instant mission landscape + architectural context. Ensure the `outcomeContract` is binary and verifiable. Parent initiatives auto-cascade on child completion — no manual closing needed._
33
+ ## Planning rules
39
34
 
40
- ## Briefing Altitude Levels
41
-
42
- - **`orbit`** (~200 tokens): Counts + relevance-ranked candidates only. Use for quick checks.
43
- - **`atmosphere`** (default): Strategy graphs, crystal summaries, hierarchy, analytics.
44
- - **`ground`** (full): Raw logs, working sets, collision analysis, ancestor activity.
45
-
46
- ## Intent Logging (Strategic Quality)
47
-
48
- Capture the "Why" and "How" during the planning phase to ensure the final ADR has architectural depth.
49
-
50
- - **Decision Logs**: Capture why a specific strategy or library was chosen.
51
- - **Discovery Logs**: Record insights found during initial reconnaissance.
52
-
53
- **Hand-off**: Once the mission is planned and logged, the setup phase is over. Execute via `/continue`.
35
+ - Prefer a leaf mission when one deliverable can be completed in one run.
36
+ - Use a parent initiative only when the work is intentionally split into child missions.
37
+ - Keep `outcomeContract` verifiable. "Looks good" is not a contract.
38
+ - If API or event boundaries matter, use `shadow_analyze_mesh({ repoPath, topic, type? })` with a concrete route or topic fragment.
39
+ - Present the plan for approval before execution. Use `/continue` for the actual implementation pass.
@@ -1,39 +1,30 @@
1
1
  ---
2
2
  name: onboard
3
- description: Initialize and analyze a new repository for deep intelligence by building semantic index, syncing state, activating git hooks, and establishing missions. Use when onboarding to a new repository, initializing Shadow Engine, setting up git hooks, or when the user asks about repository setup, initialization, or first-time configuration.
3
+ description: Initialize and analyze a repository for Shadow workflows. Use when onboarding a repo, bootstrapping indexes and hooks, checking intelligence health, or preparing the first mission.
4
4
  ---
5
5
 
6
- # Repository Onboarding
7
-
8
- Initialize and analyze a new repository for deep intelligence.
9
-
10
- ## Workflow
11
-
12
- 1. **Semantic Init**: `shadow_recon_onboard` (repoPath) — **Only run once** per repo to build the baseline. Auto-populates the hologram.
13
- 2. **Read Hologram**: `shadow_recon_hologram` (repoPath) — Get instant architectural context (~1300 tokens: topography + gravity zones).
14
- 3. **Unified Sync**: `shadow_sync_trace` (repoPath) — **The One-Stop Shop**. Performs indexing + ghost analysis + mission re-hydration.
15
- 4. **Active Briefing**: `shadow_ops_briefing` (scope: "project", altitude: "atmosphere", repoPath) — Resumes the shared backlog with relevance-ranked candidates.
16
- - Use `altitude: "orbit"` for a lean overview (~200 tokens), or `altitude: "ground"` for full detail.
17
- 5. **Architectural Deep Dive** (optional):
18
- - `shadow_recon_topography` (repoPath) — View layers (Entry/Logic/Data/Utility/Test).
19
- - `shadow_ops_chronicle` (limit: 5, repoPath) — Narrative feed.
20
- - `shadow_analyze_mesh` (repoPath) If repo is event-driven: map HTTP routes, socket events, pubsub topics immediately.
21
- - `shadow_env_diagnose` (repoPath) — Verify environment health: hooks installed, index state, ember daemon status.
22
- 6. **Hooks Activation**: `shadow_env_hooks` (action: "install", repoPath) installs post-commit and **post-checkout** hooks. Post-checkout fires incremental reindex in background on every branch switch.
23
- 7. **Establish Mission**: `shadow_ops_plan` (name, goal, repoPath).
24
-
25
- ## Precise Tooling
26
-
27
- | Action | Atomic Tool |
28
- | :---------------- | :----------------------------------------------------------------------------------- |
29
- | **Index** | `shadow_recon_onboard` |
30
- | **Hologram** | `shadow_recon_hologram` (repoPath) |
31
- | **Layers** | `shadow_recon_topography` |
32
- | **History** | `shadow_ops_chronicle` (limit: 10) |
33
- | **Resume (lean)** | `shadow_ops_briefing` (scope: "project", altitude: "orbit") |
34
- | **Resume (full)** | `shadow_ops_briefing` (scope: "project", altitude: "atmosphere") |
35
- | **Hooks** | `shadow_env_hooks` (action: "install") |
36
- | **Env Health** | `shadow_env_diagnose` (repoPath) — hooks status, index state, ember warming progress |
37
- | **Event Mesh** | `shadow_analyze_mesh` (repoPath) — event-driven repos: routes + topics surface |
38
-
39
- _Note: Always use absolute paths for `repoPath`. Call `shadow_recon_hologram` immediately after init for instant architectural context. `shadow_env_hooks` now installs both post-commit and post-checkout hooks — branch switches will auto-reindex in background via Ember daemon._
6
+ # Onboard
7
+
8
+ Use this skill when a repository needs its first Shadow pass or when a fresh clone needs to be made operational.
9
+
10
+ ## Core workflow
11
+
12
+ 1. `shadow_recon_onboard({ repoPath })`
13
+ 2. `shadow_recon_hologram({ repoPath, compact: true })`
14
+ 3. `shadow_sync_trace({ repoPath })`
15
+ 4. `shadow_ops_health({ repoPath })`
16
+ 5. `shadow_ops_context({ repoPath, compact: true })`
17
+
18
+ ## Useful follow-ups
19
+
20
+ - `shadow_recon_topography({ repoPath })` for layer breakdown.
21
+ - `shadow_ops_chronicle({ repoPath, limit: 5 })` for recent decisions.
22
+ - `shadow_env_diagnose({ repoPath })` for hooks, index, and daemon health.
23
+ - `shadow_env_hooks({ repoPath, action: "install", enableAutoRefresh: true, enableSymbolHealing: true })`
24
+ - `shadow_ops_plan({ repoPath, name, goal, outcomeContract? })` for the first mission.
25
+
26
+ ## Rules
27
+
28
+ - Always use an absolute `repoPath`.
29
+ - `shadow_recon_onboard` is the baseline bootstrap; `shadow_sync_trace` is the normal follow-up maintenance pass.
30
+ - Do not call `shadow_analyze_mesh` without a concrete `topic`.