Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The kernel (`acp-kernel`) guarantees, and billion-context RELIES on: within a se

The compression kernel lives IN THIS REPO under `kernel/` (migrated verbatim from ranxianglei/acp-kernel @ v0.0.101 on 2026-10-04; the old repo stays frozen until the move has settled). It keeps its own identity — npm name `acp-kernel`, own `version`, own unit suite (`kernel/tests/`), own build chain (tsup → `kernel/dist` + d.ts) — and the host consumes it through `"acp-kernel": "file:./kernel"` exactly like the old registry package (same exports map, same typing, same JS inlined by tsup). The merge exists to end cross-repo maintenance pain WITHOUT making the kernel easy to disturb. Enforced rules:

1. **Declare before you touch.** Every PR touching anything under `kernel/**` MUST declare `kernel-change: <reason>` in its body (CI job `kernel-guard` fails otherwise) AND needs owner approval BEFORE implementation, via a dedicated issue stating why the host side cannot solve the problem. Commits use the `kernel:` prefix.
1. **Declare before you touch.** Every PR touching anything under `kernel/**` MUST declare `kernel-change: <reason>` in its body (CI job `kernel-guard` fails otherwise); commits use the `kernel:` prefix. Any OTHER kernel change additionally needs owner approval BEFORE implementation, via a dedicated issue stating why the host side cannot solve the problem. **Mechanical-bug exemption (#5819):** a kernel defect provable at a glance — a wrong literal, a typo, or a falsifiable guard predicate whose failure a test demonstrates — may be fixed directly WITHOUT that pre-implementation dedicated-issue approval, provided the fixing PR (i) adds a regression test that fails on the buggy code and passes on the fix, (ii) names the bug in its `kernel-change:` declaration, and (iii) reports in-thread what changed, why it is safe (the change alters nothing beyond the bug), and which test pins it. The human-only review tier (rule 3) still gates the merge — that approval IS the required report, no separate sign-off. Every other rule in this boundary is unchanged.
2. **Version discipline (CI-enforced).** Any change under `kernel/src/**` (or `kernel/tsup.config.ts` / `kernel/tsconfig.json`) MUST bump `version` in `kernel/package.json`; a bump without such a change also fails. Normal kernel changes ride along with billion-context releases; when enough accumulates, a dedicated kernel release publishes `acp-kernel` standalone (§5, Kernel releases).
3. **Human-only review, always.** ALL kernel changes sit at the same review tier as `src/update.ts` and security (§7.4): no auto-merge, ever.
4. **Behavior constants are golden-pinned.** `tests/golden/wire-contract/kernel.json` pins not just the tool schemas but the behavior surface hosts silently depend on: `defaultConfig(100_000)` (incl. the flat-50K nudge constants), `defaultPrompts` (the four load-bearing prompt rules), tool-name tables, wire markers. Regeneration requires stated justification in the PR; the ledger never shrinks (#1304).
Expand Down Expand Up @@ -233,7 +233,7 @@ Releases are fully automated via CI (`.github/workflows/release.yml`): the Agent

## 6. Contributing

Before changes: (1) `npm run typecheck` clean, (2) `npm test` green, (3) understand the module dependency graph, (4) **consider BOTH compression modes** — any change touching the wire (message rebuild, system/developer handling, tool injection, `acp_summary` stripping, preflight, nudge) must be reasoned in BOTH plugin mode and proxy mode; correct-in-one-mode can break the other (#377 only manifested in proxy mode). See TECHNICAL-NOTES.md "Two compression modes" and the `pluginMode` comment in `src/server.ts`. (5) **Kernel changes follow the Kernel Boundary** — declaration marker, owner approval, version discipline, two-layer tests; the kernel is relatively stable by design, touch it only when necessary. (6) **`pi-subagents/` changes follow the Pi-Subagents Boundary** — version discipline + two-layer tests, lighter gating than `kernel/` (see that section).
Before changes: (1) `npm run typecheck` clean, (2) `npm test` green, (3) understand the module dependency graph, (4) **consider BOTH compression modes** — any change touching the wire (message rebuild, system/developer handling, tool injection, `acp_summary` stripping, preflight, nudge) must be reasoned in BOTH plugin mode and proxy mode; correct-in-one-mode can break the other (#377 only manifested in proxy mode). See TECHNICAL-NOTES.md "Two compression modes" and the `pluginMode` comment in `src/server.ts`. (5) **Kernel changes follow the Kernel Boundary** — declaration marker, owner approval (mechanical-bug exemption per rule 1), version discipline, two-layer tests; the kernel is relatively stable by design, touch it only when necessary. (6) **`pi-subagents/` changes follow the Pi-Subagents Boundary** — version discipline + two-layer tests, lighter gating than `kernel/` (see that section).

Commit convention: `feat:` / `fix:` / `refactor:` / `test:` / `docs:` / `release:`.

Expand Down
Loading