Skip to content

Commit bb25a7d

Browse files
fix(v0.9.8): P0 correctness batch — Codex substitution + autoload parity + fail-open detector
- codex compiler: transform copied trees (rules/knowledge/templates/security/lib), /add: → /add- namespace rule, .template/.toml in substitution set, agent TOMLs substituted, handoff-detect.sh messages fixed at source - shared rule_autoloads() predicate for both runtimes; explicit autoload: key required on every rule (design-system.md was Claude-only autoloaded) - posttooluse-scan.sh: audit skipped:no-python3 instead of silently disabling the critical unicode-tag-block detector - compile.py --check: snapshot + content-diff (catches pre-drifted trees) - AGENTS.md: global.md read-before-work pointer; adapter.yaml truth-pass (advisory-only injection defense on Codex, real output_shape, no false strip claim) - scan-secrets.sh: ~/.codex/add catalog fallback Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 251c3eb commit bb25a7d

113 files changed

Lines changed: 682 additions & 506 deletions

File tree

Some content is hidden

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

.add/agents-md.stale

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":"2026-06-14T19:41:44Z","changed":["core/rules/model-roles.md"]}
1+
{"timestamp":"2026-07-12T16:38:27Z","changed":["core/rules/design-system.md"]}

.add/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://github.com/MountainUnicorn/add/config.schema.json",
3-
"version": "0.9.7",
3+
"version": "0.9.8",
44
"project": {
55
"name": "ADD",
66
"description": "Agent Driven Development \u2014 Claude Code plugin implementing an AI-native SDLC methodology",

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ All notable changes to ADD are documented here. Format loosely follows [Keep a C
44

55
For commit-level detail see `git log`.
66

7+
## [0.9.8] — 2026-07-12
8+
9+
P0 correctness patch from a full token-sensitivity audit (four parallel deep-dives across rules, skills, the Codex runtime, and the operational machinery). Fixes cross-runtime divergence and fail-open security behavior; opens the three-release path to v1.0 (v0.9.9 token architecture, v0.9.10 dedup + hygiene).
10+
11+
### Fixed
12+
13+
- **Codex substitution leaks.** The compiler applied `codex_substitute` only to skill bodies and references — `rules/`, `knowledge/`, `templates/`, `security/`, `lib/` docs and agent TOMLs shipped with raw `${CLAUDE_PLUGIN_ROOT}` paths and **286 `/add:` Claude-namespace command references** (Codex commands are `/add-<name>`). `copy_tree` now takes a transform; a `/add:``/add-` substitution rule was added; `.template`/`.toml` files joined the substitution set; `handoff-detect.sh` messages corrected at source. `scan-secrets.sh` additionally resolves its catalog at `~/.codex/add/security/` when env/script-relative resolution misses.
14+
- **Claude/Codex autoload divergence.** The Claude `@rules` list included a rule unless `autoload: false`; the Codex AGENTS.md invariants required `autoload: true``design-system.md` (no key) autoloaded on Claude but was missing from Codex invariants. Both runtimes now share one `rule_autoloads()` predicate, and **every rule must declare `autoload:` explicitly** (compile hard-fails otherwise).
15+
- **Critical injection detector failed open.** Hex-escape patterns (incl. the `critical` `unicode-tag-block` invisible-injection detector) silently no-op'd when `python3` was absent. The scanner now emits an `ADD-SEC … action=skipped-no-python3` warning and a `skipped:"no-python3"` audit event.
16+
- **`compile.py --check` could false-pass on a pre-drifted tree** (it compared before-vs-after `git status --porcelain` strings, identical either way). Now snapshots the output dirs and content-diffs after recompile — git-independent, works uncommitted.
17+
- **Codex sessions never saw `knowledge/global.md`.** `adapter.yaml` claimed AGENTS.md was built from it, but the compiler never read it. The slim manifest now carries the read-before-work pointer to Tier-1 global learnings + `.add/learnings-active.md`.
18+
19+
### Changed
20+
21+
- **`adapter.yaml` truth-pass.** The `limitations` section previously described an injection-scan hook writing audit events on Codex — no such hook ships. It now states plainly: injection defense on Codex is **advisory-only** (no scanner hook, no audit events; parity targeted at v1.0), `filter-learnings.sh` ships but is not auto-registered, and hook stderr is not surfaced. `output_shape` now documents all real emit targets (`rules/`, `knowledge/`, `lib/`, `security/`); the false `rules.strip` frontmatter claim replaced with `preserve: true` (the maturity-loader reads rule `maturity:` keys at runtime).
22+
723
## [0.9.7] — 2026-06-18
824

925
Methodology reframe + a security trust signal. Positions ADD as the policy layer over native orchestration, leads with the maturity-ladder moat, and dogfoods the injection defense.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<br>
1414
<br>
1515
<a href="https://github.com/MountainUnicorn/add/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
16-
<a href="#"><img src="https://img.shields.io/badge/version-0.9.7-brightgreen.svg" alt="Version"></a>
16+
<a href="#"><img src="https://img.shields.io/badge/version-0.9.8-brightgreen.svg" alt="Version"></a>
1717
<a href="#"><img src="https://img.shields.io/badge/Claude_Code-plugin-blueviolet.svg" alt="Claude Code Plugin"></a>
1818
</p>
1919

core/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.7
1+
0.9.8

core/lib/scan-secrets.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ resolve_catalog() {
143143
(cd "$(dirname "$candidate")" && printf '%s/%s\n' "$(pwd)" "$(basename "$candidate")")
144144
return
145145
fi
146+
# Codex runtime: the adapter installs the compiled tree at ~/.codex/add/
147+
# and CLAUDE_PLUGIN_ROOT is never set there.
148+
if [ -f "$HOME/.codex/add/security/secret-patterns.json" ]; then
149+
echo "$HOME/.codex/add/security/secret-patterns.json"
150+
return
151+
fi
146152
echo ""
147153
}
148154

core/rules/design-system.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
autoload: true
23
description: "Design system for visual artifacts — loads full reference on demand"
34
maturity: ga
45
globs: ["docs/infographic.svg", "reports/*.html"]

core/templates/migrations.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema_version": "1.0.0",
3-
"plugin_version": "0.9.7",
3+
"plugin_version": "0.9.8",
44
"migrations": [
55
{
66
"from": "0.1.0",
@@ -260,6 +260,12 @@
260260
"to": "0.9.7",
261261
"steps": [],
262262
"description": "v0.9.7 \u2014 methodology reframe. swarm-protocol.md + agent-coordination.md reframed as policy-over-native-Workflows (manual fallback retained; WIP semantics invariant); swarm-state machine-readable format contract pinned; README leads with the maturity ladder; skill self-scan CI gate added (scripts/self-scan-skills.py + skill-self-scan guardrail); runtimes/claude/workflows/ scaffold (inert). No consumer config changes."
263+
},
264+
{
265+
"from": "0.9.7",
266+
"to": "0.9.8",
267+
"steps": [],
268+
"description": "v0.9.8 \u2014 P0 correctness patch. Codex compiler now rewrites ${CLAUDE_PLUGIN_ROOT} paths and /add: command namespace in rules/knowledge/templates/security/lib and agent TOMLs (previously leaked Claude-isms verbatim); Claude and Codex runtimes share one autoload predicate (explicit autoload: key now required on every rule; design-system.md was autoloaded on Claude but missing from Codex invariants); Codex AGENTS.md points to knowledge/global.md (was silently dropped); posttooluse-scan.sh records a skipped:no-python3 audit event instead of silently disabling the critical unicode-tag-block detector; compile.py --check content-diffs against a snapshot (git-independent, catches pre-drifted trees); adapter.yaml limitations rewritten to state Codex injection defense is advisory-only. No consumer config changes."
263269
}
264270
]
265271
}

dist/codex/.agents/skills/add-agents-md/SKILL.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: add-agents-md
3-
description: "[ADD v0.9.7] Generate or sync a portable AGENTS.md from ADD project state — writes, checks drift, or merges with hand-curated content"
3+
description: "[ADD v0.9.8] Generate or sync a portable AGENTS.md from ADD project state — writes, checks drift, or merges with hand-curated content"
44
argument-hint: "[--write|--check|--merge|--import] [--dry-run]"
55
---
66

7-
# ADD AGENTS.md Skill v0.9.7
7+
# ADD AGENTS.md Skill v0.9.8
88

99
Generate a portable [`AGENTS.md`](https://agents.md) at project root from the project's `.add/` state. `AGENTS.md` is the cross-tool open standard for project-level agent instructions — any agent (Claude Code, Cursor, Codex CLI, Windsurf, Amp, Devin, Copilot) will read it on session start. Publishing one lets mixed-toolchain teams respect the same invariants without installing ADD.
1010

@@ -13,11 +13,11 @@ This skill is the only way to regenerate AGENTS.md. A PostToolUse hook marks the
1313
## Invocation
1414

1515
```
16-
/add:agents-md # default: --write
17-
/add:agents-md --check # drift detection, CI-friendly (exit 1 on drift)
18-
/add:agents-md --merge # prepend ADD block to an existing hand-curated AGENTS.md
19-
/add:agents-md --import # one-time absorption (same as --merge; explicit intent)
20-
/add:agents-md --dry-run # preview without writing (combines with any mode)
16+
/add-agents-md # default: --write
17+
/add-agents-md --check # drift detection, CI-friendly (exit 1 on drift)
18+
/add-agents-md --merge # prepend ADD block to an existing hand-curated AGENTS.md
19+
/add-agents-md --import # one-time absorption (same as --merge; explicit intent)
20+
/add-agents-md --dry-run # preview without writing (combines with any mode)
2121
```
2222

2323
## Pre-Flight Checks
@@ -144,14 +144,14 @@ Marker contents:
144144
}
145145
```
146146

147-
The hook does **not** rewrite `AGENTS.md`. The next `/add:agents-md` invocation announces the stale state, lists the changed sources, then regenerates when the human runs `--write`.
147+
The hook does **not** rewrite `AGENTS.md`. The next `/add-agents-md` invocation announces the stale state, lists the changed sources, then regenerates when the human runs `--write`.
148148

149149
## Integration With Other Skills
150150

151-
- **`/add:init`** — calls `/add:agents-md` at the end of the init flow to write the initial `AGENTS.md`.
152-
- **`/add:spec`** — after a new spec becomes the "spec under work", prompts: "Update AGENTS.md active-spec pointer? (Y/n)". On yes, runs `/add:agents-md --write`.
153-
- **`/add:verify`** — opt-in Gate 4.5: if `agentsMd.gateOnVerify: true` is set in `.add/config.json`, `/add:verify` runs `--check` and fails the gate on drift. Off by default.
154-
- **`/add:promote`** — maturity bumps recommend a regen (since the verbosity level changes) but do not auto-rewrite.
151+
- **`/add-init`** — calls `/add-agents-md` at the end of the init flow to write the initial `AGENTS.md`.
152+
- **`/add-spec`** — after a new spec becomes the "spec under work", prompts: "Update AGENTS.md active-spec pointer? (Y/n)". On yes, runs `/add-agents-md --write`.
153+
- **`/add-verify`** — opt-in Gate 4.5: if `agentsMd.gateOnVerify: true` is set in `.add/config.json`, `/add-verify` runs `--check` and fails the gate on drift. Off by default.
154+
- **`/add-promote`** — maturity bumps recommend a regen (since the verbosity level changes) but do not auto-rewrite.
155155

156156
## Configuration
157157

@@ -206,7 +206,7 @@ AGENTS.md drift detected.
206206
@@ ... @@
207207
...unified diff...
208208
209-
Run /add:agents-md --write to regenerate.
209+
Run /add-agents-md --write to regenerate.
210210
Exit code: 1
211211
```
212212

dist/codex/.agents/skills/add-away/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: add-away
3-
description: "[ADD v0.9.7] Declare absence — get autonomous work plan for the duration"
3+
description: "[ADD v0.9.8] Declare absence — get autonomous work plan for the duration"
44
argument-hint: "[duration, e.g. '4 hours', '30 minutes', 'end of day']"
55
---
66

@@ -26,14 +26,14 @@ argument-hint: "[duration, e.g. '4 hours', '30 minutes', 'end of day']"
2626
2727
---
2828

29-
# ADD Away Command v0.9.7
29+
# ADD Away Command v0.9.8
3030

3131
The human is stepping away. Establish what work can proceed autonomously and what must wait.
3232

3333
## Phase 1: Understand the Absence
3434

3535
Parse the duration from $ARGUMENTS. If not provided, default to **2 hours**. Do not ask — just acknowledge the default:
36-
"No duration specified — I'll plan for a 2-hour session. Say `/add:away 4 hours` next time to adjust."
36+
"No duration specified — I'll plan for a 2-hour session. Say `/add-away 4 hours` next time to adjust."
3737

3838
## Phase 2: Assess Available Work
3939

0 commit comments

Comments
 (0)