Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5d29cd9
fix: prevent findDbPath from escaping git worktree boundary
carlos-alm Mar 16, 2026
deac23e
fix: address review — real git ceiling test, debug log, robust non-gi…
carlos-alm Mar 16, 2026
34820e6
Merge remote-tracking branch 'origin/main' into fix/db-path-worktree-…
carlos-alm Mar 16, 2026
83efde5
test: strengthen findRepoRoot and ceiling tests per review feedback
carlos-alm Mar 16, 2026
ccb8bd5
Revert "test: strengthen findRepoRoot and ceiling tests per review fe…
carlos-alm Mar 16, 2026
73c51a4
Reapply "test: strengthen findRepoRoot and ceiling tests per review f…
carlos-alm Mar 16, 2026
e3c1d4a
fix: address Greptile review — flaky non-git test and misleading impo…
carlos-alm Mar 16, 2026
5b4a5cd
merge: resolve conflict with main in db test imports
carlos-alm Mar 16, 2026
20013d4
fix: resolve symlinks in findDbPath to fix ceiling check on macOS
carlos-alm Mar 16, 2026
7c877d7
style: format connection.js try/catch block
carlos-alm Mar 16, 2026
7e69570
Merge remote-tracking branch 'origin/main' into fix/db-path-worktree-…
carlos-alm Mar 16, 2026
0d0fdd9
test: harden findDbPath fallback test to mock execFileSync
carlos-alm Mar 16, 2026
2fa9dfc
fix: normalize findRepoRoot paths with realpathSync for cross-platfor…
carlos-alm Mar 16, 2026
651c164
fix: use stat-based path comparison for ceiling check on Windows
carlos-alm Mar 16, 2026
5dc707a
fix: remove test-only _resetRepoRootCache from public barrel export
carlos-alm Mar 16, 2026
5a9dd2b
Merge branch 'main' into fix/db-path-worktree-boundary
carlos-alm Mar 16, 2026
b87a12b
fix: tighten test assertions and key repo root cache on cwd
carlos-alm Mar 16, 2026
1301b9f
fix: normalize ceiling path in test to handle Windows 8.3 short names
carlos-alm Mar 16, 2026
25e940b
Merge branch 'main' into fix/db-path-worktree-boundary
carlos-alm Mar 16, 2026
5a77db1
fix: normalize ceiling path with realpathSync to handle Windows 8.3 s…
carlos-alm Mar 16, 2026
de87d18
Merge branch 'fix/db-path-worktree-boundary' of https://github.com/op…
carlos-alm Mar 16, 2026
620128b
fix: normalize Windows 8.3 short paths in ceiling boundary test
carlos-alm Mar 16, 2026
e9e4de5
docs: add Titan Paradigm Claude Code skills for autonomous codebase c…
carlos-alm Mar 16, 2026
b3e46b5
merge: resolve conflicts with origin/main
carlos-alm Mar 16, 2026
a3ee610
fix: remove duplicate declarations in connection.js from merge
carlos-alm Mar 16, 2026
cc6dafd
docs: add /review skill for automated PR review sweeps
carlos-alm Mar 16, 2026
af0a536
Revert "docs: add /review skill for automated PR review sweeps"
carlos-alm Mar 16, 2026
9ae497b
fix: resolve Windows CI test failure and doc inaccuracies
carlos-alm Mar 16, 2026
26b8cfc
Merge branch 'main' into docs/titan-paradigm-skills
carlos-alm Mar 16, 2026
f73988a
fix: use dynamic snapshot deletion in titan-reset skill
carlos-alm Mar 16, 2026
92be28c
fix: add merge-conflict guard to titan-gauntlet and titan-sync pre-fl…
carlos-alm Mar 16, 2026
2f7bf1d
Merge remote-tracking branch 'origin/docs/titan-paradigm-skills' into…
carlos-alm Mar 16, 2026
3a98d37
fix: correct installation cp paths in skills README
carlos-alm Mar 17, 2026
f2f9acf
Merge branch 'main' into docs/titan-paradigm-skills
carlos-alm Mar 17, 2026
2bbb59d
Merge branch 'docs/titan-paradigm-skills' of https://github.com/optav…
carlos-alm Mar 17, 2026
2a0ac94
fix: remove out-of-scope db test changes from docs PR
carlos-alm Mar 17, 2026
6a3e6aa
Merge branch 'main' into docs/titan-paradigm-skills
carlos-alm Mar 17, 2026
3211b8e
fix: correct NDJSON example threshold in titan-gauntlet skill
carlos-alm Mar 17, 2026
e80ef7c
fix: use cross-platform stdin in titan-reset snapshot deletion
carlos-alm Mar 17, 2026
74a6a60
docs: add experimental warning to Claude Code skills README
carlos-alm Mar 17, 2026
362e875
merge: resolve conflicts with main (keep PR improvements for skills, …
carlos-alm Mar 17, 2026
1d75e02
fix: reset db.test.js to main (bad merge re-introduced tests without …
carlos-alm Mar 17, 2026
a4499a0
merge: resolve conflict in db.test.js by taking main's version
carlos-alm Mar 17, 2026
00b5acc
Merge branch 'main' into docs/titan-paradigm-skills
carlos-alm Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/skills/titan-gauntlet/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Your goal: audit every high-priority target from the RECON phase against 4 pilla
```bash
git fetch origin main && git merge origin/main --no-edit
```
If there are merge conflicts, stop: "Merge conflict detected. Resolve conflicts and re-run `/titan-gauntlet`."

3. **Load state.** Read `.codegraph/titan/titan-state.json`. If missing:
- Warn: "No RECON artifacts. Run `/titan-recon` first for best results."
Expand Down Expand Up @@ -276,7 +277,7 @@ codegraph fn-impact <target> -T --json
Append to `.codegraph/titan/gauntlet.ndjson` (one line per target):

```json
{"target": "<name>", "file": "<path>", "verdict": "FAIL", "pillarVerdicts": {"I": "fail", "II": "warn", "III": "pass", "IV": "pass"}, "metrics": {"cognitive": 28, "cyclomatic": 15, "maxNesting": 4, "mi": 32, "halsteadEffort": 12000, "halsteadBugs": 1.2, "sloc": 85}, "violations": [{"rule": 1, "pillar": "I", "metric": "cognitive", "detail": "28 > 30 threshold", "level": "fail"}], "blastRadius": {"direct": 5, "transitive": 18}, "recommendation": "Split: halstead.bugs 1.2 suggests ~1 defect. Separate validation from I/O."}
{"target": "<name>", "file": "<path>", "verdict": "FAIL", "pillarVerdicts": {"I": "fail", "II": "warn", "III": "pass", "IV": "pass"}, "metrics": {"cognitive": 35, "cyclomatic": 15, "maxNesting": 4, "mi": 32, "halsteadEffort": 12000, "halsteadBugs": 1.2, "sloc": 85}, "violations": [{"rule": 1, "pillar": "I", "metric": "cognitive", "detail": "35 > 30 threshold", "level": "fail"}], "blastRadius": {"direct": 5, "transitive": 18}, "recommendation": "Split: halstead.bugs 1.2 suggests ~1 defect. Separate validation from I/O."}
```

### 2i. Update state machine
Expand Down
17 changes: 4 additions & 13 deletions .claude/skills/titan-reset/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,14 @@ This restores the graph database to its pre-GAUNTLET state.
codegraph snapshot delete titan-baseline 2>/dev/null
```

Also delete any batch snapshots:
Also delete any batch snapshots dynamically:

```bash
codegraph snapshot delete titan-batch-1 2>/dev/null
codegraph snapshot delete titan-batch-2 2>/dev/null
codegraph snapshot delete titan-batch-3 2>/dev/null
codegraph snapshot delete titan-batch-4 2>/dev/null
codegraph snapshot delete titan-batch-5 2>/dev/null
codegraph snapshot delete titan-batch-6 2>/dev/null
codegraph snapshot delete titan-batch-7 2>/dev/null
codegraph snapshot delete titan-batch-8 2>/dev/null
codegraph snapshot delete titan-batch-9 2>/dev/null
codegraph snapshot delete titan-batch-10 2>/dev/null
for name in $(codegraph snapshot list --json 2>/dev/null | node -e "let d='';process.stdin.on('data',c=>d+=c).on('end',()=>{try{JSON.parse(d).filter(s=>s.name.startsWith('titan-batch-')).forEach(s=>console.log(s.name))}catch(e){}})"); do
codegraph snapshot delete "$name" 2>/dev/null
done
```

(Errors are expected for snapshots that don't exist — ignore them.)

---

## Step 3 — Remove all Titan artifacts
Expand Down
1 change: 1 addition & 0 deletions .claude/skills/titan-sync/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Your goal: analyze GAUNTLET results to find overlapping problems, identify share
```bash
git fetch origin main && git merge origin/main --no-edit
```
If there are merge conflicts, stop: "Merge conflict detected. Resolve conflicts and re-run `/titan-sync`."

3. **Load artifacts.** Read:
- `.codegraph/titan/titan-state.json` — state, domains, batches, file audits
Expand Down
6 changes: 4 additions & 2 deletions docs/examples/claude-code-skills/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Claude Code Skills for Codegraph

> **Experimental — agent-oriented extensions.** These skills are outside codegraph's core scope as a code intelligence engine. They orchestrate multi-step workflows that make decisions, modify code, and run automated pipelines — capabilities that go beyond codegraph's primary role of exposing dependency data to AI agents via MCP. Use them as reference implementations and starting points, not as production-grade automation. They may produce incorrect changes, miss edge cases, or behave unexpectedly on codebases with unusual structures. Always review their output before committing.

This directory contains example [Claude Code skills](https://docs.anthropic.com/en/docs/claude-code/skills) that use codegraph to power autonomous codebase cleanup — based on the [Titan Paradigm](../../use-cases/titan-paradigm.md).

## The Problem: Context Window Explosion
Expand Down Expand Up @@ -40,9 +42,9 @@ A single AI agent cannot hold an entire large codebase in context. The Titan Par
Copy the skill directories into your project's `.claude/skills/` directory:

```bash
# From your project root
# From your project root (assuming codegraph is installed)
mkdir -p .claude/skills
cp -r titan-recon titan-gauntlet titan-sync titan-gate titan-reset .claude/skills/
cp -r node_modules/@optave/codegraph/docs/examples/claude-code-skills/titan-* .claude/skills/
```

Then install codegraph if you haven't:
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/claude-code-skills/titan-gauntlet/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Your goal: audit every high-priority target from the RECON phase against 4 pilla
```bash
git fetch origin main && git merge origin/main --no-edit
```
If there are merge conflicts, stop: "Merge conflict detected. Resolve conflicts and re-run `/titan-gauntlet`."

3. **Load state.** Read `.codegraph/titan/titan-state.json`. If missing:
- Warn: "No RECON artifacts. Run `/titan-recon` first for best results."
Expand Down Expand Up @@ -276,7 +277,7 @@ codegraph fn-impact <target> -T --json
Append to `.codegraph/titan/gauntlet.ndjson` (one line per target):

```json
{"target": "<name>", "file": "<path>", "verdict": "FAIL", "pillarVerdicts": {"I": "fail", "II": "warn", "III": "pass", "IV": "pass"}, "metrics": {"cognitive": 28, "cyclomatic": 15, "maxNesting": 4, "mi": 32, "halsteadEffort": 12000, "halsteadBugs": 1.2, "sloc": 85}, "violations": [{"rule": 1, "pillar": "I", "metric": "cognitive", "detail": "28 > 30 threshold", "level": "fail"}], "blastRadius": {"direct": 5, "transitive": 18}, "recommendation": "Split: halstead.bugs 1.2 suggests ~1 defect. Separate validation from I/O."}
{"target": "<name>", "file": "<path>", "verdict": "FAIL", "pillarVerdicts": {"I": "fail", "II": "warn", "III": "pass", "IV": "pass"}, "metrics": {"cognitive": 35, "cyclomatic": 15, "maxNesting": 4, "mi": 32, "halsteadEffort": 12000, "halsteadBugs": 1.2, "sloc": 85}, "violations": [{"rule": 1, "pillar": "I", "metric": "cognitive", "detail": "35 > 30 threshold", "level": "fail"}], "blastRadius": {"direct": 5, "transitive": 18}, "recommendation": "Split: halstead.bugs 1.2 suggests ~1 defect. Separate validation from I/O."}
```

### 2i. Update state machine
Expand Down
17 changes: 4 additions & 13 deletions docs/examples/claude-code-skills/titan-reset/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,14 @@ This restores the graph database to its pre-GAUNTLET state.
codegraph snapshot delete titan-baseline 2>/dev/null
```

Also delete any batch snapshots:
Also delete any batch snapshots dynamically:

```bash
codegraph snapshot delete titan-batch-1 2>/dev/null
codegraph snapshot delete titan-batch-2 2>/dev/null
codegraph snapshot delete titan-batch-3 2>/dev/null
codegraph snapshot delete titan-batch-4 2>/dev/null
codegraph snapshot delete titan-batch-5 2>/dev/null
codegraph snapshot delete titan-batch-6 2>/dev/null
codegraph snapshot delete titan-batch-7 2>/dev/null
codegraph snapshot delete titan-batch-8 2>/dev/null
codegraph snapshot delete titan-batch-9 2>/dev/null
codegraph snapshot delete titan-batch-10 2>/dev/null
for name in $(codegraph snapshot list --json 2>/dev/null | node -e "let d='';process.stdin.on('data',c=>d+=c).on('end',()=>{try{JSON.parse(d).filter(s=>s.name.startsWith('titan-batch-')).forEach(s=>console.log(s.name))}catch(e){}})"); do
codegraph snapshot delete "$name" 2>/dev/null
done
```

(Errors are expected for snapshots that don't exist — ignore them.)

---

## Step 3 — Remove all Titan artifacts
Expand Down
1 change: 1 addition & 0 deletions docs/examples/claude-code-skills/titan-sync/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Your goal: analyze GAUNTLET results to find overlapping problems, identify share
```bash
git fetch origin main && git merge origin/main --no-edit
```
If there are merge conflicts, stop: "Merge conflict detected. Resolve conflicts and re-run `/titan-sync`."

3. **Load artifacts.** Read:
- `.codegraph/titan/titan-state.json` — state, domains, batches, file audits
Expand Down
Loading