@curdx/flow 2.0.0-beta.15 → 2.0.0-beta.16

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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
9
- "version": "2.0.0-beta.15"
9
+ "version": "2.0.0-beta.16"
10
10
  },
11
11
  "plugins": [
12
12
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curdx-flow",
3
- "version": "2.0.0-beta.15",
3
+ "version": "2.0.0-beta.16",
4
4
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
5
5
  "author": {
6
6
  "name": "wdx",
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to CurDX-Flow will be documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ### Fixed
8
+
9
+ - `hooks/hooks.json` + `hooks/scripts/inject-karpathy.sh` — migrated the L1 baseline injector from the `InstructionsLoaded` event to `SessionStart` with `matcher: "startup|clear|compact"`. Per the Claude Code hooks docs (code.claude.com/docs/en/hooks), `InstructionsLoaded` is an observability-only event: its hook schema has no `hookSpecificOutput` field, so the injector's `{"hookSpecificOutput":{"hookEventName":"InstructionsLoaded","additionalContext":…}}` payload was rejected at session boot with `Hook JSON output validation failed — (root): Invalid input`, producing the `SessionStart:startup hook error` banner on every Claude Code launch. The `startup|clear|compact` matcher preserves the original "baseline survives compaction" intent. Also updated `docs/architecture.md` and `README.zh.md` hook-event inventories.
10
+
7
11
  ### BREAKING
8
12
 
9
13
  - **`context7` and `sequential-thinking` moved from plugin-bundled MCPs to user-level MCPs.** Previously `.claude-plugin/plugin.json` declared both in `mcpServers`, so Claude Code auto-registered them as `plugin:curdx-flow:context7` and `plugin:curdx-flow:sequential-thinking` when the plugin installed. This is no longer the case — the `mcpServers` block is gone. Instead, `curdx-flow install` now runs `claude mcp add context7 …` + `claude mcp add sequential-thinking …` against the user's `~/.claude.json`, which keeps them as standard user-level registrations named `context7` and `sequential-thinking`.
package/README.zh.md CHANGED
@@ -23,7 +23,7 @@ CurDX-Flow 是一个 Claude Code 插件,把 6 个验证过的 AI 工程工作
23
23
  - **8 个可组合 Gate** — Karpathy / Verification / TDD / Coverage / Adversarial / Edge-Case / Security / DevEx
24
24
  - **4 种执行策略** — linear / subagent / stop-hook / wave(自动路由)
25
25
  - **10 个知识文档** — 规格驱动 / POC-First / 原子提交 / 执行策略 / ...
26
- - **4 个 hook 事件** — SessionStart / InstructionsLoaded / Stop / PreToolUse
26
+ - **3 个 hook 事件** — SessionStart / Stop / PreToolUse
27
27
  - **2 个自动安装的 MCP + 1 个推荐插件** — context7 / sequential-thinking(plugin.json 内置)+ chrome-devtools-mcp(recommended,beta.8 解耦)
28
28
  - **优雅降级** — 依赖缺失时进入 fallback 模式并清晰告知
29
29
 
package/hooks/hooks.json CHANGED
@@ -8,10 +8,9 @@
8
8
  "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/session-start.sh"
9
9
  }
10
10
  ]
11
- }
12
- ],
13
- "InstructionsLoaded": [
11
+ },
14
12
  {
13
+ "matcher": "startup|clear|compact",
15
14
  "hooks": [
16
15
  {
17
16
  "type": "command",
@@ -1,10 +1,13 @@
1
1
  #!/usr/bin/env bash
2
- # CurDX-Flow InstructionsLoaded Hook
2
+ # CurDX-Flow SessionStart baseline injection
3
3
  # Injects the L1 baseline (Karpathy 4 principles + mandatory tool rules + 3 red lines)
4
- # into every session after CLAUDE.md is loaded.
4
+ # as additionalContext at every session boot (startup, /clear, post-compact).
5
5
  #
6
- # This is what makes the baseline "always on" — it doesn't rely on CLAUDE.md being
7
- # present in every project, and it survives context compaction.
6
+ # Wired under SessionStart rather than InstructionsLoaded because Claude Code's
7
+ # InstructionsLoaded event is observability-only its hook schema rejects
8
+ # hookSpecificOutput / additionalContext. SessionStart with matcher
9
+ # "startup|clear|compact" gives the same "baseline is always on, even after
10
+ # compaction" property while staying within the supported schema.
8
11
 
9
12
  set -u
10
13
 
@@ -46,7 +49,7 @@ CONTEXT='## CurDX-Flow Mind Baseline (L1 — always on)
46
49
  # Emit JSON with safe encoding
47
50
  if command -v python3 >/dev/null 2>&1; then
48
51
  ESCAPED="$(printf '%s' "$CONTEXT" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')"
49
- printf '{"hookSpecificOutput":{"hookEventName":"InstructionsLoaded","additionalContext":%s}}\n' "$ESCAPED"
52
+ printf '{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":%s}}\n' "$ESCAPED"
50
53
  fi
51
54
 
52
55
  exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "2.0.0-beta.15",
3
+ "version": "2.0.0-beta.16",
4
4
  "description": "CLI installer for CurDX-Flow — AI engineering workflow meta-framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {