@esoteric-logic/praxis-harness 2.2.0 → 2.3.1
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 +13 -1
- package/base/CLAUDE.md +2 -1
- package/base/rules/context-management.md +12 -0
- package/base/rules/memory-boundary.md +56 -0
- package/base/skills/sync-memory/SKILL.md +94 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,11 +74,14 @@ For technical research: `/discover` (structured options evaluation before decisi
|
|
|
74
74
|
| `verify-app` | End-to-end verification with regression analysis |
|
|
75
75
|
| `session-retro` | End-of-session retrospective with learnings extraction |
|
|
76
76
|
| `status-update` | Manual vault status.md update |
|
|
77
|
+
| `repair` | Structured 3-attempt fix-and-verify loop for failed milestones |
|
|
78
|
+
| `sync-memory` | Bridge auto-memory insights to Obsidian vault |
|
|
79
|
+
| `context-probe` | Assess context health and recommend action |
|
|
77
80
|
| `context-reset` | Reload context from vault without clearing session |
|
|
78
81
|
|
|
79
82
|
## Rules
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
16 rules across universal and scoped categories. Universal rules load every session. Scoped rules load only when matching file patterns are detected.
|
|
82
85
|
|
|
83
86
|
Key additions in this version:
|
|
84
87
|
- **context-management** — context brackets (FRESH/MODERATE/DEPLETED/CRITICAL) adapt behavior to session stage
|
|
@@ -113,6 +116,9 @@ Key additions in this version:
|
|
|
113
116
|
|-----|----------|-------------|
|
|
114
117
|
| web-designer | `/kit:web-designer` | Design system init → component build → accessibility audit → production lint |
|
|
115
118
|
| infrastructure | `/kit:infrastructure` | Terraform plan → apply → drift detection → compliance check |
|
|
119
|
+
| api | `/kit:api` | RESTful conventions → OpenAPI specs → contract testing |
|
|
120
|
+
| security | `/kit:security` | Threat modeling → IAM review → OWASP audit |
|
|
121
|
+
| data | `/kit:data` | Schema design → migration planning → query optimization |
|
|
116
122
|
|
|
117
123
|
More kits coming. See `docs/creating-a-kit.md` to build your own.
|
|
118
124
|
|
|
@@ -205,6 +211,12 @@ bash install.sh
|
|
|
205
211
|
|
|
206
212
|
The git-clone + `install.sh` path uses symlinks instead of copies, so edits in the repo are immediately reflected.
|
|
207
213
|
|
|
214
|
+
**Testing:**
|
|
215
|
+
```bash
|
|
216
|
+
bash scripts/lint-harness.sh . # structure, frontmatter, placeholders, registry
|
|
217
|
+
bash scripts/test-harness.sh . # shellcheck, JSON, cross-skill refs, hook wiring, kit structure
|
|
218
|
+
```
|
|
219
|
+
|
|
208
220
|
## Requirements
|
|
209
221
|
|
|
210
222
|
- macOS or Linux
|
package/base/CLAUDE.md
CHANGED
|
@@ -130,7 +130,7 @@ Kit manifests live in `~/.claude/kits/<name>/KIT.md`.
|
|
|
130
130
|
|
|
131
131
|
## Rules Registry — Load on Demand Only
|
|
132
132
|
|
|
133
|
-
### Universal — always active (
|
|
133
|
+
### Universal — always active (7 rules)
|
|
134
134
|
| File | Purpose |
|
|
135
135
|
|------|---------|
|
|
136
136
|
| `~/.claude/rules/profile.md` | Who the user is, identities, working style |
|
|
@@ -139,6 +139,7 @@ Kit manifests live in `~/.claude/kits/<name>/KIT.md`.
|
|
|
139
139
|
| `~/.claude/rules/git-workflow.md` | Commits, branches, identity verification, pre-commit checks |
|
|
140
140
|
| `~/.claude/rules/vault.md` | Second brain integration — vault backend, file purposes |
|
|
141
141
|
| `~/.claude/rules/context-management.md` | Context anti-rot, phase scoping, context reset protocol |
|
|
142
|
+
| `~/.claude/rules/memory-boundary.md` | Auto-memory boundary, MEMORY.md cap, dream integration |
|
|
142
143
|
|
|
143
144
|
### Scoped — load only when paths match
|
|
144
145
|
| File | Loads when |
|
|
@@ -82,6 +82,18 @@ ls -la {vault_path}/plans/
|
|
|
82
82
|
stat -f "%Sm" {vault_path}/status.md
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
## Memory Hygiene — Conventions (WARN on violation)
|
|
86
|
+
|
|
87
|
+
### Before starting a new kit or major task
|
|
88
|
+
1. Run `/dream` (if available) to consolidate stale auto-memory
|
|
89
|
+
2. Run `/sync-memory` to bridge durable insights to Obsidian vault
|
|
90
|
+
3. Proceed with clean, consolidated context
|
|
91
|
+
|
|
92
|
+
### MEMORY.md cap
|
|
93
|
+
- Keep under 80 lines. Auto-dream and `/sync-memory` enforce this.
|
|
94
|
+
- If MEMORY.md exceeds 80 lines: run `/sync-memory` before continuing.
|
|
95
|
+
- See `~/.claude/rules/memory-boundary.md` for full boundary rules.
|
|
96
|
+
|
|
85
97
|
---
|
|
86
98
|
|
|
87
99
|
## Removal Condition
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Memory Boundary — Rules
|
|
2
|
+
# Scope: All projects, all sessions
|
|
3
|
+
# Defines what goes where across CLAUDE.md, MEMORY.md, and Obsidian vault
|
|
4
|
+
|
|
5
|
+
## Invariants — BLOCK on violation
|
|
6
|
+
|
|
7
|
+
### CLAUDE.md rules always win
|
|
8
|
+
- If a MEMORY.md entry conflicts with a CLAUDE.md rule or base/ rule, the rule wins.
|
|
9
|
+
- Never override architectural decisions, coding standards, or workflow sequences via auto-memory.
|
|
10
|
+
- Auto-memory supplements rules — it does not replace them.
|
|
11
|
+
|
|
12
|
+
### No architectural decisions in MEMORY.md
|
|
13
|
+
- Architecture decisions, design patterns, and system constraints belong in CLAUDE.md or Obsidian vault specs/.
|
|
14
|
+
- If Claude discovers a decision-worthy pattern during a session, surface it to the user for CLAUDE.md or vault — do not write it to MEMORY.md.
|
|
15
|
+
|
|
16
|
+
### MEMORY.md cap
|
|
17
|
+
- Keep MEMORY.md under 80 lines. Use topic files for overflow.
|
|
18
|
+
- Prefer linking to Obsidian vault notes over expanding MEMORY.md.
|
|
19
|
+
- If MEMORY.md exceeds 80 lines: run `/sync-memory` before continuing.
|
|
20
|
+
- The 200-line hard limit means lines beyond 200 are silently dropped — the 80-line cap leaves headroom for topic file index entries.
|
|
21
|
+
|
|
22
|
+
## Conventions — WARN on violation
|
|
23
|
+
|
|
24
|
+
### What belongs where
|
|
25
|
+
|
|
26
|
+
| Content | Destination | Managed by |
|
|
27
|
+
|---------|-------------|------------|
|
|
28
|
+
| Coding standards, workflows, architecture | `CLAUDE.md` / `base/rules/` | User (Praxis) |
|
|
29
|
+
| Build quirks, CLI flags, error patterns | `MEMORY.md` | Claude (auto-memory + auto-dream) |
|
|
30
|
+
| Architecture decisions, project status, session summaries | Obsidian vault | User (via Praxis skills) |
|
|
31
|
+
| Kit configs, path-scoped rules | `kits/` and `base/rules/` | User (Praxis) |
|
|
32
|
+
| Stale or conflicting memory entries | Deleted | Auto-dream consolidation or `/sync-memory` |
|
|
33
|
+
|
|
34
|
+
### Auto-memory territory (appropriate for MEMORY.md)
|
|
35
|
+
- Build commands and environment quirks Claude discovers
|
|
36
|
+
- Debugging insights specific to this working tree
|
|
37
|
+
- API gotchas, error patterns, CLI flags that worked
|
|
38
|
+
- User preferences Claude infers from corrections
|
|
39
|
+
- Tool configuration that varies per machine
|
|
40
|
+
|
|
41
|
+
### Not auto-memory territory (redirect elsewhere)
|
|
42
|
+
- Decisions that affect system design → CLAUDE.md or vault specs/
|
|
43
|
+
- Cross-project learnings → vault notes/learnings.md
|
|
44
|
+
- Session summaries → vault notes/ (auto-documented by Stop hook)
|
|
45
|
+
- Task tracking → vault tasks.md
|
|
46
|
+
- Plans and milestones → vault plans/
|
|
47
|
+
|
|
48
|
+
### Dream and consolidation
|
|
49
|
+
- Run `/dream` (if available) between sessions to consolidate stale memory
|
|
50
|
+
- Run `/sync-memory` to bridge durable insights from MEMORY.md to Obsidian vault
|
|
51
|
+
- Auto-dream fires automatically after 24h + 5 sessions — the memory-boundary rules guide what it keeps vs prunes
|
|
52
|
+
- After `/dream` or auto-dream runs: verify MEMORY.md is under 80 lines
|
|
53
|
+
|
|
54
|
+
## Removal Condition
|
|
55
|
+
Remove when Claude Code provides native memory scoping that respects rule hierarchies
|
|
56
|
+
and vault integration without manual boundary enforcement.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-memory
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
description: "Bridge auto-memory insights to Obsidian vault. Reads MEMORY.md and topic files, syncs durable entries to vault learnings, prunes stale content. Side-effect skill — never auto-triggers."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# sync-memory Skill
|
|
8
|
+
|
|
9
|
+
You are syncing Claude's auto-memory to the Obsidian vault.
|
|
10
|
+
|
|
11
|
+
## Vault Path Resolution
|
|
12
|
+
Read vault_path from `~/.claude/praxis.config.json`.
|
|
13
|
+
|
|
14
|
+
## Acceptance
|
|
15
|
+
- [ ] MEMORY.md and topic files read
|
|
16
|
+
- [ ] Durable insights synced to vault
|
|
17
|
+
- [ ] Stale entries pruned
|
|
18
|
+
- [ ] MEMORY.md under 80 lines after sync
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
**Step 1 — Locate memory files**
|
|
23
|
+
- Find the auto-memory directory for the current project:
|
|
24
|
+
`~/.claude/projects/-{escaped-cwd}/memory/`
|
|
25
|
+
- Read `MEMORY.md` (the index file)
|
|
26
|
+
- Read all topic files referenced by MEMORY.md (e.g., `user_preferences.md`, `feedback_testing.md`)
|
|
27
|
+
- If no memory files exist: "No auto-memory to sync." Exit.
|
|
28
|
+
|
|
29
|
+
**Step 2 — Classify each entry**
|
|
30
|
+
|
|
31
|
+
For each entry in MEMORY.md and topic files, classify:
|
|
32
|
+
|
|
33
|
+
| Classification | Action |
|
|
34
|
+
|---------------|--------|
|
|
35
|
+
| **Project-specific insight** (error pattern, build quirk, API gotcha) | Append to `vault/notes/learnings.md` as `[LEARN:memory-sync]` |
|
|
36
|
+
| **Global preference** (coding style, tool preference) | Present to user: "Add to CLAUDE.md Error Learning? [entry]" |
|
|
37
|
+
| **Architecture decision** | Present to user: "This belongs in vault specs/ or CLAUDE.md — not MEMORY.md" |
|
|
38
|
+
| **Already in vault** | Skip — note as duplicate |
|
|
39
|
+
| **Stale/outdated** (references deleted files, old versions, resolved bugs) | Mark for pruning |
|
|
40
|
+
| **Machine-specific** (paths, env vars, tool locations) | Keep in MEMORY.md — appropriate for auto-memory |
|
|
41
|
+
|
|
42
|
+
**Step 3 — Sync to vault**
|
|
43
|
+
|
|
44
|
+
For project-specific insights, append to `vault/notes/learnings.md`:
|
|
45
|
+
```markdown
|
|
46
|
+
## [LEARN:memory-sync] [short title]
|
|
47
|
+
- **What**: [the insight]
|
|
48
|
+
- **So What**: [why it matters]
|
|
49
|
+
- **Now What**: [how to apply it]
|
|
50
|
+
- **Date**: [YYYY-MM-DD]
|
|
51
|
+
- **Source**: auto-memory sync
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Step 4 — Prune MEMORY.md**
|
|
55
|
+
|
|
56
|
+
After syncing:
|
|
57
|
+
1. Remove entries that were synced to vault (they now live in the canonical store)
|
|
58
|
+
2. Remove stale/outdated entries
|
|
59
|
+
3. Keep machine-specific and active debugging entries
|
|
60
|
+
4. Verify MEMORY.md is under 80 lines
|
|
61
|
+
5. If still over 80 lines: consolidate further — merge similar entries, shorten descriptions
|
|
62
|
+
|
|
63
|
+
**Step 5 — Report**
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
MEMORY SYNC
|
|
67
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
68
|
+
Synced: [n] entries → vault learnings
|
|
69
|
+
Surfaced: [n] entries for CLAUDE.md review
|
|
70
|
+
Pruned: [n] stale entries removed
|
|
71
|
+
Kept: [n] entries in MEMORY.md
|
|
72
|
+
Lines: [n] / 80 limit
|
|
73
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Error Handling
|
|
77
|
+
|
|
78
|
+
| Condition | Action |
|
|
79
|
+
|-----------|--------|
|
|
80
|
+
| No memory files found | Exit cleanly |
|
|
81
|
+
| Vault path missing | Warn, skip vault sync, still prune |
|
|
82
|
+
| MEMORY.md empty | "Nothing to sync." Exit. |
|
|
83
|
+
| Cannot classify an entry | Keep it — don't prune what you don't understand |
|
|
84
|
+
|
|
85
|
+
## When to Run
|
|
86
|
+
|
|
87
|
+
- Before starting a new kit (`/kit:<name>`)
|
|
88
|
+
- Before `/context-reset` or `/clear`
|
|
89
|
+
- At session end (optional — Stop prompt handles most vault writes)
|
|
90
|
+
- When MEMORY.md exceeds 80 lines
|
|
91
|
+
|
|
92
|
+
## Removal Condition
|
|
93
|
+
Remove when Claude Code provides native memory-to-vault sync or when
|
|
94
|
+
auto-dream learns to respect vault integration boundaries natively.
|
package/package.json
CHANGED