symbiote-cli 0.2.2 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "symbiote-cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Symbiote bonds with your AI tools — giving them memory, context, and your coding DNA.",
5
5
  "type": "module",
6
6
  "imports": {
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: symbiote-dna
3
+ description: Manage Symbiote's Developer DNA — the learned coding preferences, style rules, and anti-patterns that persist across sessions. This skill should be used when the user asks to "show my coding preferences", "manage DNA", "update my coding style", "what are my coding rules", "switch DNA profile", "export DNA", "import DNA profile", or "share coding preferences".
4
+ ---
5
+
6
+ # Symbiote Developer DNA
7
+
8
+ Manage developer coding preferences that Symbiote learns and enforces across sessions.
9
+
10
+ ## What is Developer DNA
11
+
12
+ DNA entries are coding rules Symbiote tracks with confidence scores. They have:
13
+
14
+ - **rule** — the specific coding preference
15
+ - **reason** — why it matters
16
+ - **category** — formatting, patterns, architecture, workflow, testing, tooling, ai-collaboration
17
+ - **confidence** — 0.0 to 1.0 (auto-promoted as patterns are observed)
18
+ - **applies_to** — language/framework scope
19
+ - **source** — explicit (user-stated), correction (from feedback), observed (from code patterns)
20
+
21
+ ## Commands
22
+
23
+ ### View Current DNA
24
+
25
+ Use the `get_developer_dna` MCP tool. Filter by category:
26
+
27
+ ```
28
+ get_developer_dna({ category: "formatting" })
29
+ get_developer_dna({ category: "patterns" })
30
+ get_developer_dna({}) // all entries
31
+ ```
32
+
33
+ ### Record a New Preference
34
+
35
+ Use the `record_instruction` MCP tool:
36
+
37
+ ```
38
+ record_instruction({
39
+ rule: "Always use early returns over nested if-else",
40
+ reason: "Reduces cognitive load and keeps functions flat",
41
+ category: "patterns",
42
+ applies_to: ["typescript", "javascript"],
43
+ source: "explicit"
44
+ })
45
+ ```
46
+
47
+ ### CLI Profile Management
48
+
49
+ ```bash
50
+ npx -y symbiote-cli dna # Show active profile summary
51
+ npx -y symbiote-cli dna list # List all profiles
52
+ npx -y symbiote-cli dna switch # Switch active profile
53
+ npx -y symbiote-cli dna export # Export profile to .dna.json
54
+ npx -y symbiote-cli dna import # Import a shared profile
55
+ npx -y symbiote-cli dna diff # Compare two profiles
56
+ ```
57
+
58
+ ### Export and Share
59
+
60
+ Export the current profile for team sharing:
61
+
62
+ ```bash
63
+ npx -y symbiote-cli dna export
64
+ ```
65
+
66
+ This creates a `.dna.json` file that teammates can import:
67
+
68
+ ```bash
69
+ npx -y symbiote-cli dna import path/to/.dna.json
70
+ ```
71
+
72
+ ### Compare Profiles
73
+
74
+ Diff two profiles to see divergence:
75
+
76
+ ```bash
77
+ npx -y symbiote-cli dna diff
78
+ ```
79
+
80
+ ## Output
81
+
82
+ When showing DNA, format as a clean grouped list:
83
+
84
+ ```
85
+ ## Developer DNA — {profile name}
86
+
87
+ ### Formatting ({count})
88
+ - Use 4-space indentation everywhere (confidence: 1.0)
89
+ - Single quotes for strings (confidence: 0.9)
90
+
91
+ ### Patterns ({count})
92
+ - Prefer early returns over nesting (confidence: 1.0)
93
+ - const over let, never var (confidence: 0.8)
94
+
95
+ ### Architecture ({count})
96
+ - ...
97
+ ```
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: symbiote-impact
3
+ description: Trace the blast radius of a code change using Symbiote's dependency graph. This skill should be used when the user asks to "analyze impact", "what will this change break", "show affected files", "check blast radius", "impact analysis", or "what depends on this".
4
+ ---
5
+
6
+ # Symbiote Impact Analysis
7
+
8
+ Analyze the blast radius of a code change before making it — trace dependencies, find affected files, and surface risks.
9
+
10
+ ## When to Use
11
+
12
+ - Before refactoring a widely-used function or module
13
+ - When renaming a symbol across the codebase
14
+ - To understand what tests might break from a change
15
+ - When planning a large-scale migration
16
+
17
+ ## Process
18
+
19
+ ### Step 1: Identify the Target
20
+
21
+ Determine what the user wants to change:
22
+
23
+ - A specific symbol (function, class, type) → use `get_impact`
24
+ - Uncommitted git changes → use `detect_changes`
25
+ - A file's full dependency tree → use `get_context_for_file`
26
+
27
+ ### Step 2: Run Impact Analysis
28
+
29
+ **For a specific symbol:**
30
+
31
+ Use the `get_impact` MCP tool with the symbol name. It returns every affected file with confidence scores and traversal depth (max 3 levels).
32
+
33
+ **For uncommitted changes:**
34
+
35
+ Use the `detect_changes` MCP tool. It maps git diffs to modules and assigns risk levels.
36
+
37
+ **For a file's dependency tree:**
38
+
39
+ Use the `get_context_for_file` MCP tool to see all dependencies and dependents.
40
+
41
+ ### Step 3: Trace Deeper (if needed)
42
+
43
+ For high-risk changes, go deeper:
44
+
45
+ - `trace_flow` — trace execution from an entry point through the call graph
46
+ - `trace_data` — trace data flow forward or backward from a symbol
47
+ - `find_implementations` — find all classes implementing an interface
48
+
49
+ ### Step 4: Check for Safe Rename
50
+
51
+ If the change is a rename, use `rename_symbol` MCP tool to get a preview of all files that would change (dry-run, no writes).
52
+
53
+ ### Step 5: Present Results
54
+
55
+ Summarize in this format:
56
+
57
+ ```
58
+ ## Impact Analysis: {symbol or change description}
59
+
60
+ **Direct dependents:** {count} files
61
+ **Transitive impact:** {count} files (depth {N})
62
+ **Risk level:** {low|medium|high}
63
+
64
+ ### Affected Files
65
+ - `path/to/file.ts` — {why it's affected}
66
+ - `path/to/other.ts` — {why it's affected}
67
+
68
+ ### Recommendations
69
+ - {what to test}
70
+ - {what to update}
71
+ - {risks to watch for}
72
+ ```
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: symbiote-scan
3
+ description: Trigger a full codebase rescan to update Symbiote's knowledge graph with latest changes. This skill should be used when the user asks to "rescan the project", "update the code graph", "rebuild symbiote index", "rescan codebase", or "refresh symbiote". Optionally regenerates embeddings for semantic search.
4
+ ---
5
+
6
+ # Symbiote Rescan
7
+
8
+ Trigger a full codebase rescan to update the knowledge graph with latest file changes.
9
+
10
+ ## When to Use
11
+
12
+ - After significant refactoring or restructuring
13
+ - When symbiote's context feels stale or out of date
14
+ - After pulling large changesets from remote
15
+ - When semantic search returns outdated results
16
+
17
+ ## Process
18
+
19
+ ### Step 1: Check Server Status
20
+
21
+ ```bash
22
+ curl -s http://127.0.0.1:$(cat .brain/port)/internal/health 2>/dev/null || echo "not running"
23
+ ```
24
+
25
+ If not running, start it after the scan completes.
26
+
27
+ ### Step 2: Run the Scan
28
+
29
+ For a standard rescan (structure + symbols + call graph):
30
+
31
+ ```bash
32
+ npx -y symbiote-cli scan
33
+ ```
34
+
35
+ For a full rescan with embedding regeneration (slower, enables better semantic search):
36
+
37
+ ```bash
38
+ npx -y symbiote-cli scan --embeddings
39
+ ```
40
+
41
+ To force a clean rescan ignoring cached state:
42
+
43
+ ```bash
44
+ npx -y symbiote-cli scan --force
45
+ ```
46
+
47
+ ### Step 3: Restart Server (if was running)
48
+
49
+ If the server was running before the scan, restart it to pick up the new graph:
50
+
51
+ ```bash
52
+ npx -y symbiote-cli serve --no-open > /dev/null 2>&1 &
53
+ ```
54
+
55
+ Wait for it:
56
+
57
+ ```bash
58
+ sleep 3 && curl -s http://127.0.0.1:$(cat .brain/port)/internal/health
59
+ ```
60
+
61
+ ### Step 4: Verify
62
+
63
+ Use the `get_project_overview` MCP tool to confirm the updated stats (file count, node count, edge count).
64
+
65
+ ## Output
66
+
67
+ One line:
68
+
69
+ ```
70
+ Symbiote rescan complete — {N} files indexed, {N} nodes, {N} edges.
71
+ ```