Skip to content

Commit d553f2f

Browse files
committed
formatting and linting
1 parent b25646f commit d553f2f

45 files changed

Lines changed: 332 additions & 257 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bun.lock

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ import tsPlugin from '@typescript-eslint/eslint-plugin';
2626
export default [
2727
js.configs.recommended,
2828
{
29-
ignores: [
30-
'node_modules/**',
31-
'dist/**',
32-
'coverage/**',
33-
'src/store/migrations-data.ts',
34-
],
29+
ignores: ['node_modules/**', 'dist/**', 'coverage/**', 'src/store/migrations-data.ts'],
3530
},
3631
{
3732
files: ['**/*.ts'],

lefthook.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pre-commit:
2+
parallel: true
3+
jobs:
4+
- name: lint
5+
glob: '*.{ts,js}'
6+
run: bunx eslint {staged_files}
7+
8+
- name: format
9+
glob: '*.{ts,js,json,md,yml,yaml,sql}'
10+
run: bunx prettier --check {staged_files}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@typescript-eslint/parser": "^8.58.1",
5050
"eslint": "^9.39.4",
5151
"eslint-plugin-import": "^2.32.0",
52+
"lefthook": "^2.1.6",
5253
"prettier": "^3.8.2",
5354
"typescript": "^6.0.2"
5455
}

plugins/claude-code/README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ validate decisions as first-class MCP tools.
66

77
## What it does
88

9-
| Feature | How |
10-
|---|---|
11-
| **Decisions in context** | Session-start hook injects the Kauri projection (pinned + index) into Claude's context automatically |
12-
| **MCP tools** | Claude sees `kauri_record`, `kauri_query`, `kauri_show`, etc. alongside Bash/Read/Edit |
13-
| **Skills** | `/kauri:record-decision` and `/kauri:check-staleness` teach Claude when and how to use Kauri |
14-
| **Post-commit staleness** | After `git commit`, a hook checks for stale decisions and alerts Claude |
9+
| Feature | How |
10+
| ------------------------- | ---------------------------------------------------------------------------------------------------- |
11+
| **Decisions in context** | Session-start hook injects the Kauri projection (pinned + index) into Claude's context automatically |
12+
| **MCP tools** | Claude sees `kauri_record`, `kauri_query`, `kauri_show`, etc. alongside Bash/Read/Edit |
13+
| **Skills** | `/kauri:record-decision` and `/kauri:check-staleness` teach Claude when and how to use Kauri |
14+
| **Post-commit staleness** | After `git commit`, a hook checks for stale decisions and alerts Claude |
1515

1616
## Prerequisites
1717

@@ -75,30 +75,33 @@ automatically and exposes all 12 Kauri tools:
7575

7676
### Hooks
7777

78-
| Event | Trigger | Action |
79-
|---|---|---|
80-
| `SessionStart` (startup) | New session begins | Injects decision projection into context |
78+
| Event | Trigger | Action |
79+
| ------------------------ | -------------------- | ----------------------------------------------------- |
80+
| `SessionStart` (startup) | New session begins | Injects decision projection into context |
8181
| `SessionStart` (compact) | Context is compacted | Re-injects projection so decisions survive compaction |
82-
| `PostToolUse` (Bash) | After a `git commit` | Runs staleness check, alerts if records are stale |
82+
| `PostToolUse` (Bash) | After a `git commit` | Runs staleness check, alerts if records are stale |
8383

8484
### Skills
8585

86-
| Skill | Invocation | Purpose |
87-
|---|---|---|
86+
| Skill | Invocation | Purpose |
87+
| --------------- | -------------------------------- | -------------------------------------------- |
8888
| record-decision | `/kauri:record-decision [title]` | Guided workflow for recording a new decision |
89-
| check-staleness | `/kauri:check-staleness` | Review and resolve stale decisions |
89+
| check-staleness | `/kauri:check-staleness` | Review and resolve stale decisions |
9090

9191
## Troubleshooting
9292

9393
**"kauri: command not found"** — The `kauri` binary isn't in PATH. Either:
94+
9495
- Run `bun run build` in the Kauri repo and add `dist/` to your PATH
9596
- Or use `bun run /path/to/kauri/src/cli.ts` and update `.mcp.json` accordingly
9697

9798
**No decisions showing at session start** — Make sure you've run `kauri init`
9899
in your project directory and have at least one recorded decision.
99100

100101
**MCP tools not appearing** — Check that the plugin is loaded:
102+
101103
```
102104
/reload-plugins
103105
```
106+
104107
Then verify with `/kauri:check-staleness` — if the skill loads, the plugin is active.

plugins/claude-code/skills/check-staleness/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Check if recorded Kauri decisions are stale. Use when assessing cod
44
disable-model-invocation: false
55
user-invocable: true
66
allowed-tools: mcp__kauri__kauri_check mcp__kauri__kauri_show mcp__kauri__kauri_validate
7-
argument-hint: ""
7+
argument-hint: ''
88
---
99

1010
# Check Decision Staleness
@@ -28,6 +28,7 @@ Run a staleness check on all active Kauri decisions and help the user resolve an
2828
## What "stale" means
2929

3030
A record is stale when:
31+
3132
- **Time-based**: More than `ttl_days` have passed since last validation (default 90 days).
3233
- **File-based**: A file associated with the record has changed content since the last validation.
3334

plugins/claude-code/skills/consult/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Consult existing Kauri decisions before planning or implementing ch
44
disable-model-invocation: false
55
user-invocable: true
66
allowed-tools: mcp__kauri__kauri_query mcp__kauri__kauri_show mcp__kauri__kauri_taxonomy_list
7-
argument-hint: "[topic or file path]"
7+
argument-hint: '[topic or file path]'
88
---
99

1010
# Consult Existing Decisions

plugins/claude-code/skills/propose/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Draft a Kauri decision for human review before recording it. This s
44
disable-model-invocation: false
55
user-invocable: true
66
allowed-tools: mcp__kauri__kauri_taxonomy_list mcp__kauri__kauri_query mcp__kauri__kauri_record
7-
argument-hint: "[topic of the decision]"
7+
argument-hint: '[topic of the decision]'
88
---
99

1010
# Propose a Decision
@@ -52,6 +52,7 @@ poorly-worded records from accumulating.
5252
## Quality guidelines
5353

5454
A good decision record:
55+
5556
- **Title**: One sentence, starts with a verb or states the choice clearly.
5657
Good: "Use JWT with 15-minute refresh tokens". Bad: "Auth stuff".
5758
- **Body**: Explains WHY, not just WHAT. Includes the trade-off or
@@ -67,4 +68,4 @@ A good decision record:
6768

6869
- Trivial choices (variable naming, import order)
6970
- Temporary workarounds with a known fix date
70-
- Facts or observations — decisions are *choices with rationale*
71+
- Facts or observations — decisions are _choices with rationale_

plugins/claude-code/skills/record-decision/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Record a project decision using Kauri. Use when you've chosen an ar
44
disable-model-invocation: false
55
user-invocable: true
66
allowed-tools: mcp__kauri__kauri_record mcp__kauri__kauri_taxonomy_list mcp__kauri__kauri_query
7-
argument-hint: "[title of the decision]"
7+
argument-hint: '[title of the decision]'
88
---
99

1010
# Record a Decision
@@ -19,6 +19,7 @@ You are recording a project decision using Kauri. The decision should be a delib
1919
## Recording the decision
2020

2121
Use `kauri_record` with:
22+
2223
- **title**: A short, scannable title (the user provided: "$ARGUMENTS")
2324
- **body**: The full rationale in markdown. Include:
2425
- What was decided
@@ -33,7 +34,7 @@ Use `kauri_record` with:
3334

3435
- Trivial implementation details (variable names, formatting)
3536
- Temporary workarounds intended to be removed immediately
36-
- Facts or observations (decisions are *choices*, not notes)
37+
- Facts or observations (decisions are _choices_, not notes)
3738

3839
## After recording
3940

plugins/claude-code/skills/review/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Review recent code changes against Kauri decisions. Use after imple
44
disable-model-invocation: false
55
user-invocable: true
66
allowed-tools: Bash(git diff *) Bash(git log *) mcp__kauri__kauri_query mcp__kauri__kauri_show mcp__kauri__kauri_validate Read
7-
argument-hint: "[file or commit range]"
7+
argument-hint: '[file or commit range]'
88
---
99

1010
# Review Changes Against Decisions

0 commit comments

Comments
 (0)