@neikyun/ciel 6.8.0 → 6.9.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/assets/.claude/hooks/memory-bootstrap.sh +287 -0
- package/assets/.claude/hooks/memory-engine.py +718 -0
- package/assets/.claude/hooks/pre-agent-gate.sh +55 -0
- package/assets/.claude/hooks/pre-tool-write.sh +83 -0
- package/assets/.claude/hooks/session-start.sh +132 -0
- package/assets/.claude/hooks/session-version-check.sh +14 -0
- package/assets/.claude/hooks/user-prompt-submit.sh +112 -0
- package/assets/.claude/settings.json +4 -4
- package/assets/commands/ciel-audit.md +78 -17
- package/assets/commands/ciel-memory-bootstrap.md +160 -0
- package/assets/commands/ciel-status.md +1 -1
- package/assets/platforms/opencode/.opencode/agents/ciel-explorer.md +1 -1
- package/assets/platforms/opencode/.opencode/agents/ciel-improver.md +2 -2
- package/assets/platforms/opencode/.opencode/agents/ciel-researcher.md +1 -1
- package/assets/platforms/opencode/.opencode/commands/ciel-audit.md +40 -22
- package/dist/cli/claude.d.ts.map +1 -1
- package/dist/cli/claude.js +28 -13
- package/dist/cli/claude.js.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.cjs +11 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scan project for ingestable tribal docs (lessons.md, ciel-overlay.md, .claude/rules/, etc.) and propose ingestion into the cued-recall memory under .ciel/memory/. Reports findings if no sources found. Always confirms each candidate with the user before writing.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ciel-memory-bootstrap — Initialize Cued-Recall Memory
|
|
6
|
+
|
|
7
|
+
**Purpose:** First-run scan of an existing project to convert tribal knowledge already documented in `lessons.md`, `ciel-overlay.md`, `.claude/rules/`, and similar files into the structured cued-recall memory at `.ciel/memory/`.
|
|
8
|
+
|
|
9
|
+
**Usage:** `/ciel-memory-bootstrap` (no args)
|
|
10
|
+
|
|
11
|
+
This is **deterministic**: no agent dispatch, no pipeline, no DIVERGE/EVALUER. Just scan, propose, write on user confirmation.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Instructions
|
|
16
|
+
|
|
17
|
+
You are bootstrapping the cued-recall memory for this project. Follow these steps in order.
|
|
18
|
+
|
|
19
|
+
### Step 1 — Scan
|
|
20
|
+
|
|
21
|
+
Run the bootstrap script in `scan` mode:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Try installed location first, fallback to dev location
|
|
25
|
+
script="$CLAUDE_PROJECT_DIR/.claude/hooks/memory-bootstrap.sh"
|
|
26
|
+
[ -f "$script" ] || script="$CLAUDE_PROJECT_DIR/hooks/memory-bootstrap.sh"
|
|
27
|
+
bash "$script" scan
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or, if running on an installed Ciel: `bash "$HOME/.ciel/hooks/memory-bootstrap.sh" scan`.
|
|
31
|
+
|
|
32
|
+
Report the output verbatim to the user.
|
|
33
|
+
|
|
34
|
+
### Step 2 — Decide path
|
|
35
|
+
|
|
36
|
+
Based on the scan output:
|
|
37
|
+
|
|
38
|
+
- **If 0 sources found** → tell the user clearly: "No tribal docs to bootstrap from. The cued-recall memory will populate organically as you intervene with me. Nothing more to do." End here.
|
|
39
|
+
- **If sources found** → proceed to Step 3.
|
|
40
|
+
|
|
41
|
+
### Step 3 — Initialize structure
|
|
42
|
+
|
|
43
|
+
Run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
script="$CLAUDE_PROJECT_DIR/.claude/hooks/memory-bootstrap.sh"
|
|
47
|
+
[ -f "$script" ] || script="$CLAUDE_PROJECT_DIR/hooks/memory-bootstrap.sh"
|
|
48
|
+
bash "$script" ingest
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This creates `.ciel/memory/{episodes,concepts,guards}/` and an empty `index.json`. It does NOT auto-write memories — auto-ingestion would create cargo-cult entries from possibly-stale docs (see ADR-0001).
|
|
52
|
+
|
|
53
|
+
### Step 4 — Read each source
|
|
54
|
+
|
|
55
|
+
For each source found in Step 1, `Read` the file fully. Identify candidate memories:
|
|
56
|
+
|
|
57
|
+
| Source format | What becomes a memory |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `[YYYY-MM-DD] MISTAKE: X → RULE: Y` lines (lessons.md style) | One memory per line. Title = the rule. |
|
|
60
|
+
| `## Heading\n\n- rule\n- rule` (rules.md style) | One memory per rule. |
|
|
61
|
+
| Numbered lessons in `ciel-overlay.md` "Key Lessons" | One memory per lesson. |
|
|
62
|
+
| `## section` in CLAUDE.md/AGENTS.md describing a non-obvious convention | One memory per section. |
|
|
63
|
+
|
|
64
|
+
Skip:
|
|
65
|
+
- The pipeline / workflow descriptions (those belong in CLAUDE.md, not memory)
|
|
66
|
+
- General principles already in CLAUDE.md
|
|
67
|
+
- Anything that's just project description (READMEish)
|
|
68
|
+
- Code examples (those go in skills/, not memory)
|
|
69
|
+
|
|
70
|
+
### Step 5 — Propose batch capture
|
|
71
|
+
|
|
72
|
+
Once you have N candidate memories from the sources, present them to the user **as a batch**, not one by one (avoid 50 confirmation prompts). Use a single `AskUserQuestion` with the structure:
|
|
73
|
+
|
|
74
|
+
> "Found N candidates from your tribal docs. I'll list them; you tell me which to capture, which to skip, or 'all'."
|
|
75
|
+
|
|
76
|
+
For each candidate, show:
|
|
77
|
+
- **Title** (one line)
|
|
78
|
+
- **Source** (file:line)
|
|
79
|
+
- **Suggested tags** (paths, symbols, intents, language inferred from the lesson content)
|
|
80
|
+
|
|
81
|
+
The user replies with: "all", "1,3,5,8" (specific indices), or "skip".
|
|
82
|
+
|
|
83
|
+
### Step 6 — Write captured memories
|
|
84
|
+
|
|
85
|
+
For each captured candidate, create `.ciel/memory/episodes/<YYYY-MM-DD>-<slug>.md` with frontmatter:
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
---
|
|
89
|
+
id: mem_<NNN>
|
|
90
|
+
title: <title>
|
|
91
|
+
languages: [<inferred>]
|
|
92
|
+
path_patterns:
|
|
93
|
+
- <pattern>
|
|
94
|
+
symbols: [<inferred>]
|
|
95
|
+
intents: [<inferred>]
|
|
96
|
+
captured_at: <ISO8601 now>
|
|
97
|
+
captured_from: bootstrap
|
|
98
|
+
source: <original-file:line>
|
|
99
|
+
trigger_count: 0
|
|
100
|
+
last_triggered: null
|
|
101
|
+
stale_after_days: 90
|
|
102
|
+
stale: false
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
# <title>
|
|
106
|
+
|
|
107
|
+
<content from source, lightly cleaned>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
ID strategy: read existing `index.json` for max id, increment. Slug = first 5 words of title, kebab-cased.
|
|
111
|
+
|
|
112
|
+
### Step 7 — Rebuild index
|
|
113
|
+
|
|
114
|
+
After all writes, regenerate `.ciel/memory/index.json` by parsing every frontmatter under `.ciel/memory/{episodes,concepts,guards}/`:
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
# pseudo — use python3 -c '...' inline
|
|
118
|
+
for each *.md file:
|
|
119
|
+
parse frontmatter
|
|
120
|
+
add to memories dict by id
|
|
121
|
+
for each path_pattern, symbol, intent, language:
|
|
122
|
+
append id to corresponding by_* index
|
|
123
|
+
write back to index.json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Step 8 — Confirm
|
|
127
|
+
|
|
128
|
+
Report:
|
|
129
|
+
|
|
130
|
+
- N memories captured
|
|
131
|
+
- Sources processed
|
|
132
|
+
- Index rebuilt with M total entries
|
|
133
|
+
- Suggest: "Cued-recall memory now active. Memories will auto-inject when their cues match in future tasks. Run `/ciel-memory-bootstrap` again anytime to re-scan for new tribal docs."
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Constraints
|
|
138
|
+
|
|
139
|
+
- **Never write a memory without user confirmation.** Even on bulk confirmation ("all"), display the list first.
|
|
140
|
+
- **Do not delete the source files.** Bootstrap converts; the user keeps the originals as long as they want.
|
|
141
|
+
- **Tag conservatively.** A memory tagged with `**/*` will fire on every task and pollute. If unsure, narrow the path pattern.
|
|
142
|
+
- **No agent dispatch.** This command is deterministic and runs inline.
|
|
143
|
+
- **Idempotent.** Re-running on an already-bootstrapped project should detect existing memories (by source field) and offer to skip duplicates.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Failure modes
|
|
148
|
+
|
|
149
|
+
| Symptom | Cause | Fix |
|
|
150
|
+
|---|---|---|
|
|
151
|
+
| Script not found | `$CLAUDE_PROJECT_DIR` not set | Try `$HOME/.ciel/hooks/memory-bootstrap.sh` instead |
|
|
152
|
+
| Nothing scanned | No tribal docs in this project | Working as intended; report and end |
|
|
153
|
+
| Memories all tagged with broad paths | Source content didn't include path hints | Ask user to refine tags after listing |
|
|
154
|
+
| index.json malformed after rebuild | python3 parse error | Recreate empty index, re-run rebuild step |
|
|
155
|
+
|
|
156
|
+
## See also
|
|
157
|
+
|
|
158
|
+
- `docs/adrs/0001-cued-recall-memory.md` — full design rationale
|
|
159
|
+
- `skills/workflow/memoire/SKILL.md` — capture/recall flow
|
|
160
|
+
- `skills/workflow/memoire-consolidator/SKILL.md` — periodic maintenance
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
subtask: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
description: Audits the current Claude Code session for Ciel paradigm violations (missed Task dispatches, inline gathering, hook inactivity, skill overlaps, intent routing misses). Produces a structured report with a Ciel Health Score (0-100). If score < 75, creates a GitHub Issue on the Ciel repository with the findings and session timeline. Hook-independent — works even when Ciel hooks are broken.
|
|
2
|
+
description: Audits the current Claude Code session for Ciel paradigm violations (missed Task dispatches, inline gathering, hook inactivity, skill overlaps, intent routing misses). Produces a structured report with a Ciel Health Score (0-100). If score < 90, creates a GitHub Issue on the Ciel repository with the findings and session timeline. Hook-independent — works even when Ciel hooks are broken.
|
|
8
3
|
---
|
|
9
4
|
|
|
10
5
|
# /ciel-audit — Session post-mortem
|
|
11
6
|
|
|
12
|
-
*Generates a structured report of Ciel behavior violations observed in the current session. Calculates a Ciel Health Score (0-100). If the score is below
|
|
7
|
+
*Generates a structured report of Ciel behavior violations observed in the current session. Calculates a Ciel Health Score (0-100). If the score is below 90, creates a GitHub Issue on the Ciel repository (github.com/KaosKyun/Ciel) with the full timeline and findings — otherwise produces the report only without creating an issue.*
|
|
13
8
|
|
|
14
9
|
Usage: `/ciel-audit`
|
|
15
10
|
|
|
@@ -90,17 +85,42 @@ If npm version > local version, include an **Update notification** in the report
|
|
|
90
85
|
|
|
91
86
|
#### Dimension 8: Platform health — penalty up to -5
|
|
92
87
|
|
|
93
|
-
Check
|
|
88
|
+
Check that Ciel platform installations exist and are valid. Ciel currently supports two platforms: **claude** and **opencode**.
|
|
89
|
+
|
|
90
|
+
**Claude Code** — check for expected agent and hook files:
|
|
91
|
+
```bash
|
|
92
|
+
CLAUDE_AGENTS=$(ls .claude/agents/ciel-*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
93
|
+
CLAUDE_HOOK=$(test -f .claude/hooks/session-start.sh && echo "1" || echo "0")
|
|
94
|
+
CLAUDE_SETTINGS=$(test -f .claude/settings.json && echo "1" || echo "0")
|
|
95
|
+
echo "Claude: agents=$CLAUDE_AGENTS hook=$CLAUDE_HOOK settings=$CLAUDE_SETTINGS"
|
|
96
|
+
if [ "$CLAUDE_AGENTS" -ge 3 ] && [ "$CLAUDE_HOOK" = "1" ] && [ "$CLAUDE_SETTINGS" = "1" ]; then
|
|
97
|
+
echo "Claude platform: OK"
|
|
98
|
+
else
|
|
99
|
+
echo "Claude platform: INCOMPLETE"
|
|
100
|
+
fi
|
|
101
|
+
```
|
|
102
|
+
Expected: at least 3 agent files + session-start.sh + settings.json
|
|
94
103
|
|
|
104
|
+
**OpenCode** — check for expected plugin, agent, and command files:
|
|
95
105
|
```bash
|
|
96
|
-
|
|
106
|
+
OPENCODE_PLUGIN=$(test -f .opencode/plugins/ciel.ts && echo "1" || echo "0")
|
|
107
|
+
OPENCODE_AGENTS=$(ls .opencode/agents/ciel-*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
108
|
+
OPENCODE_COMMANDS=$(ls .opencode/commands/ciel*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
109
|
+
echo "OpenCode: plugin=$OPENCODE_PLUGIN agents=$OPENCODE_AGENTS commands=$OPENCODE_COMMANDS"
|
|
110
|
+
if [ "$OPENCODE_PLUGIN" = "1" ] && [ "$OPENCODE_AGENTS" -ge 3 ] && [ "$OPENCODE_COMMANDS" -ge 5 ]; then
|
|
111
|
+
echo "OpenCode platform: OK"
|
|
112
|
+
else
|
|
113
|
+
echo "OpenCode platform: INCOMPLETE"
|
|
114
|
+
fi
|
|
97
115
|
```
|
|
116
|
+
Expected: ciel.ts plugin + at least 3 agent files + at least 5 command files
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
Scoring:
|
|
119
|
+
- Both platforms fully present and valid: **0**
|
|
120
|
+
- One platform missing or incomplete: **-3**
|
|
121
|
+
- Both platforms missing or critically incomplete: **-5**
|
|
100
122
|
|
|
101
|
-
|
|
102
|
-
- Missing 1-2 platforms: **-3**
|
|
103
|
-
- Missing 3+ platforms: **-5**
|
|
123
|
+
**Important**: Do NOT check for `.claude/plugins/ciel/platforms/` or `.opencode/platforms/` directories — these are not part of the v6 architecture. Platform files are installed directly into `.claude/` and `.opencode/` respectively. Do NOT check for codex, cursor, kilocode, lmstudio, ollama, or windsurf — these platforms are not yet implemented.
|
|
104
124
|
|
|
105
125
|
---
|
|
106
126
|
|
|
@@ -111,9 +131,7 @@ Expected platforms: codex, cursor, kilocode, lmstudio, ollama, opencode, windsur
|
|
|
111
131
|
| Score range | Status | Issue created? |
|
|
112
132
|
|-------------|--------|----------------|
|
|
113
133
|
| 90-100 | Excellent | No |
|
|
114
|
-
|
|
|
115
|
-
| 50-74 | Needs improvement | **Yes** — creates issue with timeline |
|
|
116
|
-
| 0-49 | Critical | **Yes** — creates issue with timeline |
|
|
134
|
+
| 0-89 | Needs improvement | **Yes** — creates issue with timeline |
|
|
117
135
|
|
|
118
136
|
The score is calculated automatically from the detected violations.
|
|
119
137
|
|
|
@@ -129,7 +147,7 @@ Begin the output with the literal line `# Ciel Session Audit Report`. End with t
|
|
|
129
147
|
**Date**: <today's date>
|
|
130
148
|
**Ciel Health Score**: <N>/100 — <Excellent|Good|Needs improvement|Critical>
|
|
131
149
|
**npm**: local v<X.Y.Z> | npm v<X.Y.Z> | <up-to-date|update available>
|
|
132
|
-
**Platforms**:
|
|
150
|
+
**Platforms**: claude ✓ opencode ✓ (or ✗ if missing)
|
|
133
151
|
**Session summary**: <N> /ciel invocation(s), <N> total tool calls, <N> Task() dispatches, <N> inline Bash/Read/Grep/WebSearch calls in main session.
|
|
134
152
|
|
|
135
153
|
**Verdict**: <PASS | VIOLATIONS FOUND>
|
|
@@ -207,7 +225,7 @@ Output a single short section — **no issue is created** for PASS verdicts:
|
|
|
207
225
|
**Date**: <today's date>
|
|
208
226
|
**Ciel Health Score**: 100/100 — Excellent
|
|
209
227
|
**npm**: local v<X.Y.Z> | npm v<X.Y.Z> | up-to-date
|
|
210
|
-
**Platforms**:
|
|
228
|
+
**Platforms**: claude ✓ opencode ✓
|
|
211
229
|
**Session summary**: <N> /ciel invocation(s), <N> tool calls, <N> Task() dispatches.
|
|
212
230
|
**Verdict**: PASS
|
|
213
231
|
|
|
@@ -218,11 +236,11 @@ Output a single short section — **no issue is created** for PASS verdicts:
|
|
|
218
236
|
|
|
219
237
|
---
|
|
220
238
|
|
|
221
|
-
### GitHub Issue creation (only if score <
|
|
239
|
+
### GitHub Issue creation (only if score < 90)
|
|
222
240
|
|
|
223
|
-
If the Ciel Health Score is **below
|
|
241
|
+
If the Ciel Health Score is **below 90**, create a GitHub Issue with the report AND the session timeline.
|
|
224
242
|
|
|
225
|
-
**Important**: Do NOT create an issue if score >=
|
|
243
|
+
**Important**: Do NOT create an issue if score >= 90. Only create for scores < 90.
|
|
226
244
|
|
|
227
245
|
1. **Check for duplicate issues first**:
|
|
228
246
|
```bash
|
|
@@ -304,6 +322,6 @@ If the Ciel Health Score is **below 75**, create a GitHub Issue with the report
|
|
|
304
322
|
- Do NOT invoke other Ciel skills. This command is fully self-contained.
|
|
305
323
|
- Do NOT dispatch `Task()` agents. Audit happens inline.
|
|
306
324
|
- Do NOT ask clarifying questions. Produce the report with the information you have.
|
|
307
|
-
- Do NOT create an issue if score >=
|
|
325
|
+
- Do NOT create an issue if score >= 90. Only create for score < 90.
|
|
308
326
|
- Do NOT create duplicate issues — run the `gh issue list` check before creating.
|
|
309
327
|
- Do NOT restart, rerun, or attempt to fix the session in-flight. The audit report is the deliverable.
|
package/dist/cli/claude.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAgBD;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAKvD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,CAuIhE"}
|
package/dist/cli/claude.js
CHANGED
|
@@ -7,6 +7,19 @@ exports.installClaude = installClaude;
|
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const utils_1 = require("./utils");
|
|
10
|
+
// Hook scripts shipped by Ciel. Used both to copy assets on install
|
|
11
|
+
// and to detect Ciel-managed wrappers in mergeSettings — so legacy paths
|
|
12
|
+
// (e.g. $CLAUDE_PROJECT_DIR/hooks/x.sh) get migrated on --force upgrade
|
|
13
|
+
// rather than preserved alongside the new $CLAUDE_PROJECT_DIR/.claude/hooks/x.sh.
|
|
14
|
+
const CIEL_HOOK_FILES = [
|
|
15
|
+
"check-test-first.sh",
|
|
16
|
+
"block-destructive.sh",
|
|
17
|
+
"track-file.sh",
|
|
18
|
+
"meta-critiquer.sh",
|
|
19
|
+
"session-version-check.sh",
|
|
20
|
+
"pre-tool-write.sh",
|
|
21
|
+
"pre-agent-gate.sh",
|
|
22
|
+
];
|
|
10
23
|
/**
|
|
11
24
|
* Detect if the project has Claude Code configuration.
|
|
12
25
|
*/
|
|
@@ -50,13 +63,7 @@ function installClaude(opts) {
|
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
65
|
// Hook files
|
|
53
|
-
const
|
|
54
|
-
"check-test-first.sh",
|
|
55
|
-
"block-destructive.sh",
|
|
56
|
-
"track-file.sh",
|
|
57
|
-
"meta-critiquer.sh",
|
|
58
|
-
];
|
|
59
|
-
for (const hook of hookFiles) {
|
|
66
|
+
for (const hook of CIEL_HOOK_FILES) {
|
|
60
67
|
const src = (0, path_1.join)(srcDir, ".claude/hooks", hook);
|
|
61
68
|
const dest = (0, path_1.join)(hooksDest, hook);
|
|
62
69
|
if ((0, fs_1.existsSync)(src)) {
|
|
@@ -80,6 +87,9 @@ function installClaude(opts) {
|
|
|
80
87
|
"ciel-eval.md",
|
|
81
88
|
"ciel-create-skill.md",
|
|
82
89
|
"ciel-audit.md",
|
|
90
|
+
"ciel-memory-bootstrap.md",
|
|
91
|
+
"ciel-migrate.md",
|
|
92
|
+
"ciel-status.md",
|
|
83
93
|
];
|
|
84
94
|
for (const cmd of commandFiles) {
|
|
85
95
|
const src = (0, path_1.join)(srcDir, "commands", cmd);
|
|
@@ -197,10 +207,10 @@ function mkdirSafe(dir, fence) {
|
|
|
197
207
|
/**
|
|
198
208
|
* Merge the hooks section of a Ciel settings.json template into an existing
|
|
199
209
|
* settings file. Replaces Ciel-managed hook entries (those whose inner
|
|
200
|
-
* hooks[].command references
|
|
201
|
-
* user-added wrappers are preserved.
|
|
202
|
-
* permissions, etc.) are kept from
|
|
203
|
-
* Returns null if either file cannot be read or parsed.
|
|
210
|
+
* hooks[].command references a known Ciel hook script basename, regardless
|
|
211
|
+
* of path) with the template entries; user-added wrappers are preserved.
|
|
212
|
+
* All other top-level keys (mcpServers, permissions, etc.) are kept from
|
|
213
|
+
* the existing file. Returns null if either file cannot be read or parsed.
|
|
204
214
|
*/
|
|
205
215
|
function mergeSettings(existingPath, templatePath) {
|
|
206
216
|
let existing;
|
|
@@ -235,13 +245,18 @@ function mergeSettings(existingPath, templatePath) {
|
|
|
235
245
|
for (const event of allEvents) {
|
|
236
246
|
const templateEntries = templateHooks[event] ?? [];
|
|
237
247
|
const existingEntries = existingHooks[event] ?? [];
|
|
238
|
-
// A wrapper is Ciel-managed if any
|
|
248
|
+
// A wrapper is Ciel-managed if any inner hook command references a
|
|
249
|
+
// known Ciel hook script basename — matches both new `.claude/hooks/x.sh`
|
|
250
|
+
// and legacy `hooks/x.sh` paths so upgrades migrate cleanly.
|
|
239
251
|
const userEntries = existingEntries.filter((e) => {
|
|
240
252
|
const wrapper = e;
|
|
241
253
|
const inner = Array.isArray(wrapper.hooks)
|
|
242
254
|
? wrapper.hooks
|
|
243
255
|
: [];
|
|
244
|
-
return !inner.some((h) =>
|
|
256
|
+
return !inner.some((h) => {
|
|
257
|
+
const cmd = String(h.command ?? "");
|
|
258
|
+
return CIEL_HOOK_FILES.some((name) => cmd.includes(name));
|
|
259
|
+
});
|
|
245
260
|
});
|
|
246
261
|
const entries = [...templateEntries, ...userEntries];
|
|
247
262
|
// Omit event key if empty (avoids clobbering user events dropped from template)
|
package/dist/cli/claude.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,+EAA+E;;
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,+EAA+E;;AAmC/E,oCAKC;AAKD,sCAuIC;AAlLD,2BAAwH;AACxH,+BAAmD;AACnD,mCAAmC;AAcnC,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,kFAAkF;AAClF,MAAM,eAAe,GAAG;IACtB,qBAAqB;IACrB,sBAAsB;IACtB,eAAe;IACf,mBAAmB;IACnB,0BAA0B;IAC1B,mBAAmB;IACnB,mBAAmB;CACpB,CAAC;AAEF;;GAEG;AACH,SAAgB,YAAY,CAAC,SAAiB;IAC5C,OAAO,CACL,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;QACpD,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,IAAmB;IAC/C,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACjD,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,0BAA0B;IAC1B,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,gBAAgB,CAAC,CA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|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.1",
|
|
4
4
|
"description": "Ciel — Deep-reasoning pipeline for LLM-assisted development. OpenCode plugin + multi-platform CLI (OpenCode, Claude Code, more).",
|
|
5
5
|
"main": "./dist/plugin/index.js",
|
|
6
6
|
"types": "./dist/plugin/index.d.ts",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -210,6 +210,10 @@ async function main() {
|
|
|
210
210
|
writeFileSync(join(targetDir, ".ciel/map.json"), JSON.stringify({ modules: [], lastUpdated: "" }), "utf-8");
|
|
211
211
|
if (!existsSync(join(targetDir, ".ciel/parking.md")))
|
|
212
212
|
writeFileSync(join(targetDir, ".ciel/parking.md"), "# Ciel Parking Lot\n\n", "utf-8");
|
|
213
|
+
// Cued-recall memory directories
|
|
214
|
+
mkdirSync(join(targetDir, ".ciel/memory/episodes"), { recursive: true });
|
|
215
|
+
mkdirSync(join(targetDir, ".ciel/memory/concepts"), { recursive: true });
|
|
216
|
+
mkdirSync(join(targetDir, ".ciel/memory/guards"), { recursive: true });
|
|
213
217
|
|
|
214
218
|
// Installer
|
|
215
219
|
let total = 0;
|
|
@@ -221,6 +225,13 @@ async function main() {
|
|
|
221
225
|
|
|
222
226
|
// Sauvegarder version
|
|
223
227
|
writeFileSync(join(targetDir, ".ciel/memory.json"), JSON.stringify({ cielVersion: CIEL_VERSION, lastUpdated: new Date().toISOString() }, null, 2), "utf-8");
|
|
228
|
+
// Version sentinel — read by hooks/session-start.sh at runtime (no hardcoded MSG to drift).
|
|
229
|
+
writeFileSync(join(targetDir, ".ciel/version"), CIEL_VERSION + "\n", "utf-8");
|
|
230
|
+
try {
|
|
231
|
+
const userCielDir = join(require("os").homedir(), ".ciel");
|
|
232
|
+
mkdirSync(userCielDir, { recursive: true });
|
|
233
|
+
writeFileSync(join(userCielDir, "version"), CIEL_VERSION + "\n", "utf-8");
|
|
234
|
+
} catch {}
|
|
224
235
|
|
|
225
236
|
console.error(`\n ${green("✓")} Ciel v${CIEL_VERSION} installé !`);
|
|
226
237
|
if (platforms.includes("OpenCode")) console.error(` → plugin ${cyan("@neikyun/ciel")} ajouté à opencode.json`);
|