Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{
"hooks": [
{
"command": "~/.local/bin/enola hook session-start",
"command": "command -v enola >/dev/null 2>&1 && enola hook session-start || true",
"source": "enola",
"timeout": 60,
"type": "command"
Expand All @@ -90,7 +90,7 @@
"type": "command"
},
{
"command": "~/.local/bin/enola hook stop",
"command": "command -v enola >/dev/null 2>&1 && enola hook stop || true",
"source": "enola",
"timeout": 60,
"type": "command"
Expand Down Expand Up @@ -126,7 +126,6 @@
"Bash(mempalace wake-up:*)",
"Bash(mempalace mine:*)",
"Bash(mempalace split:*)",
"Bash(~/.local/share/mempalace-venv/bin/python3 tools/brain.py:*)",
"Bash(python3 tools/brain.py:*)",
"Bash(python tools/brain.py:*)",
"Bash(tools/brain:*)",
Expand Down
21 changes: 9 additions & 12 deletions .claude/skills/pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,15 @@ git commit -m "<imperative summary, ≤72 chars>"
If multiple coherent changes, multiple commits. If a single change
spans many files, one commit is fine.

Co-author footer (Claude Code already adds this when committing on
the agent's behalf — preserve it):

```
Co-Authored-By: Claude <noreply@anthropic.com>
```

**No personal data in the commit message or the PR body.** Model
attribution (`Co-Authored-By`) is fine; **session URLs, private
chat links, tokens, emails, and other account-tied identifiers are
not** — this is a shared and potentially public repo. If your
harness appends a session URL by default, strip it. The commit-msg
**No AI attribution.** No `Co-Authored-By` line naming an assistant,
no "generated with" line, no session link, in the commit message or
the PR body. If your harness adds one by default, strip it before the
commit lands.

**No personal data in the commit message or the PR body.** Session
URLs, private chat links, tokens, emails, and other account-tied
identifiers never appear: this is a shared and potentially public
repo. If your harness appends a session URL by default, strip it. The commit-msg
git hook (`brain.py check-no-personal-data`) rejects a commit whose
message carries a session URL; run the same check on the PR body
before creating:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Link where the work comes from inline (the decision, the discussion,
the issue, the source page).

Keep it out of the public record: no session URLs, private links,
tokens, or emails.
tokens, or emails, and no AI attribution lines.
-->
24 changes: 20 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,20 @@ distinction. Decision-matrix-style tables in those pages are
PR descriptions, commit messages, and release notes are shared —
and on a public repo, world-readable. They **must not** contain
session URLs, private chat links, tokens, emails, or other
account-tied identifiers. Model attribution (`Co-Authored-By:
Claude …`) is fine; a session URL is not.
account-tied identifiers. **No AI attribution** either: no
`Co-Authored-By` line naming an assistant, no session link, no
"generated with" line. The author is the contributor of record and a
tool is not a co-author. This overrides any harness default that adds
such markers; strip them before the commit or the body lands.

Enforced deterministically: the `commit-msg` git hook runs
`brain.py check-no-personal-data` (session-URL / account-link
patterns; extend per-org via a git-ignored `.personal-data-patterns`
file), and the `/pr` skill runs the same check on the PR body. If
a harness appends a session URL by default, strip it — the guard
does not depend on the harness behaving.
does not depend on the harness behaving. The guard matches session
URLs only; the no-attribution rule is a policy the author keeps, not
something the hook checks.

### Audit log

Expand Down Expand Up @@ -1294,7 +1299,18 @@ HMAC keys (`agent-key issue|rotate|revoke`); on this tier every
`wiki/_state/events` (authored by the authenticated agent), and
`GET /api/events?since=<seq>` is the authenticated read. The auth
boundary rejects forged appends at write time and drops tampered lines
on read. **Owner-subscription wake**: an agent `subscribe`s to a
on read. **Trust model, plainly:** the keys are symmetric (HMAC), so the
hub holds every agent's secret and can sign as any of them; there is no
replay or timestamp check; the stream is append-only by convention, not
enforced; and verification runs against the *current* keyring, so
revoking or rotating a key makes that agent's earlier events fail
verification and disappear from reads. "Authenticated" means "signed by
a holder of that agent's key", not "provably only that agent". Asymmetric
keys would remove the forgery limit and are not built. Event `seq`
assignment and append are serialized by a lock. The tier has no deploy
story: `deploy/` serves the three read-only surfaces only, and the hosted
tier is exercised locally by `tools/emulate-agentic.py`.
**Owner-subscription wake**: an agent `subscribe`s to a
ref-pattern with a wake URL (a signed subscribe event); a matching
append POSTs a signed hint (seq + ref, no payload) to the owner through
an SSRF guard, capped per event, with the per-agent cursor as the
Expand Down
97 changes: 97 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,45 @@ All notable changes to the brain kernel. Versions correspond to
shipped roadmap slices (`wiki/brain/roadmap.md` holds the full
narrative; the ADR shelf holds the decisions).

## 0.31.1, 2026-10-25
Final polish: documentation made to match the code, and defects that
could mislead or hurt a user fixed. No new features.
- Scheduling: `schedule run-due` now honours `cadence:` (daily, weekly,
monthly; last runs are recorded under `ran` in
`wiki/_state/schedule.json`) and takes `--force` to run everything. It
writes the producer heartbeat after every completed run and records
which jobs failed in it, so `doctor` and the app strip report a failing
job as failing and a running producer as running (a new `failing`
state beside `current`, `stalled`, `never`). Before, one failing job
withheld the heartbeat and the producers read as dead.
- `overlap-refresh` no longer writes `No module named 'sklearn'` into a
report and records `ok`. Without scikit-learn it writes nothing and
records a named `skipped`; a failing cluster run records a failure.
scikit-learn is declared as the optional `cluster` extra.
- Event stream: `seq` assignment and append are now one locked step
(thread lock plus a file lock where `flock` exists). The docs and the
code comments state the real trust model: symmetric keys (the hub can
sign as any agent), no replay or clock check, append-only by
convention, and a revoked or rotated key makes that agent's history
fail verification and vanish from reads.
- `tools/emulate-agentic.py` refuses to start when the repository
already has a keyring, cursors or event stream, instead of deleting
them.
- `.claude/settings.json` calls `enola` from `PATH` and skips the hook
when it is absent, rather than a machine-specific absolute path that
`init --full` copied into every instance. The machine-specific
permission entry is gone too.
- Specialized agents say they emit a note on the event stream; nothing
moves those notes into the tend inbox, and the docs now say so.
- Seven wiki pages that claimed `confidence: high` with a 2026-07-10
`updated:` date were demoted to `medium`: `reflection-check` failed on
them every day, and so did a freshly born instance.
- Contribution policy: no AI attribution in commits or pull requests.
- Documentation: this changelog gains 0.21.0 to 0.30.0 (reconstructed,
see the note there); the roadmap, state page, README, CONTRIBUTING
and `AGENTS.md` corrected for skill count, subcommands, dependencies
and the hosted tier's missing deploy story.

## 0.31.0 — 2026-08-06
- Intent compilation: every wiki page carries a derived `enola_intent:`
block (`brain.py intent stamp`, idempotent — kind → type, repos →
Expand All @@ -28,6 +67,64 @@ narrative; the ADR shelf holds the decisions).
fallback now finds `sources:` mid-frontmatter (it anchored on
end-of-string, which the stamped block broke).

## 0.30.0, 2026-07-14
*0.21.0 to 0.30.0 were reconstructed on 2026-10-25 from git history
(`VERSION` bumps, one per merged pull request) and
`wiki/brain/state.md`; they were not written at release time, and only
`v0.20.0` and `v0.31.0` were tagged.*
- Specialized spoke agents under `tools/agents/` (a drift-reconciler and
an observability-triage agent) that subscribe, do deterministic prep
and emit a note on the event stream; never an LLM.
- `tools/emulate-agentic.py`: the whole hub-and-spoke loop on one
machine (real hub, real agents, emulated producers).
- `agent-key provision <agent>` prints the env, listener and subscribe
block that wires a harness in.

## 0.29.0, 2026-07-14
- Spoke client `tools/brain-agent.py` (`emit`, `pull`, `subscribe`,
`listen`), stdlib-only, mirroring the server's signing; `POST
/api/events` is the matching authenticated agent write endpoint.

## 0.28.0, 2026-07-14
- Owner-subscription wake: `subscribe --agent --pattern --wake-url`; a
matching event sends a signed webhook hint (seq and ref, no payload)
through an SSRF guard, capped at 32 per event, with the per-agent
cursor as the at-least-once backstop.

## 0.27.0, 2026-07-14
- Per-agent identity and a signed event stream for the hosted tier
(`BRAIN_HOSTED=1`): `agent-key issue|rotate|revoke`, `events
emit|since|verify`, `GET /api/events?since=<seq>`. Keys and the stream
are git-ignored runtime state. Local-first is unchanged.

## 0.26.0, 2026-07-14
- Graph provenance and drift shown as page trust signals: a "pages rely
on this" chip and an "uncertain but load-bearing" banner.

## 0.25.0, 2026-07-14
- Topics lead with an executive brief and collapse the discussion; the
compose form stays hidden until opened.

## 0.24.0, 2026-07-14
- One collaboration control on every card, page and thread (comment,
queue, post, plus edit and remove of your own pending items);
`/api/act` gains `edit` and `remove`, `/api/pending` lists them.

## 0.23.0, 2026-07-14
- Async conversation surface over the inbox: `/channels/`, a Thread
panel on each topic, server-stamped attribution, post text fenced as
untrusted data.

## 0.22.0, 2026-07-14
- Deterministic structure connector (source inventory and Python
symbols, no network or LLM) writing snapshots to `sources/structure/`
and queueing drift inbox items; ships off.

## 0.21.0, 2026-07-14
- Per-edge provenance on the link graph (`wiki/_views/graph.json`:
extracted, inferred, ambiguous), rendered at `/graph/` and surfaced in
MCP page reads.

## 0.20.0 — 2026-07-12
- Playthrough-sweep delivery: all eight three-persona suggestions
built, merged, and graduated to the approved ADR/PRD shelves —
Expand Down
18 changes: 14 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,23 @@ agents alike.
- **No personal data in public artifacts.** PR descriptions, commit
messages, and release notes must not contain session URLs, private
links, tokens, emails, or account-tied identifiers. The PR template
(`.github/pull_request_template.md`) sets the shape; model
attribution (`Co-Authored-By`) is fine, a session URL is not.
(`.github/pull_request_template.md`) sets the shape.
- **No AI attribution.** Commits and PRs carry no `Co-Authored-By`
line naming an assistant, no session link and no "generated with"
line. The author is the contributor of record; a tool is not a
co-author. If a harness adds such a line by default, strip it before
the commit lands. (The commit-msg hook checks session URLs only; the
rest is yours to keep.)
- Agent-authored content starts at `confidence: low` (or `medium`
with cited evidence) and cannot self-promote to `high` in the
same change.
- Kernel code is stdlib-only Python by design; the UI is the only
npm surface. A new dependency is an ADR-sized decision.
- Kernel code uses the standard library plus two declared packages:
`pyyaml` (required) and `tiktoken` (listed in `requirements.txt`; the
tools run without it but fall back to a rough token estimate, so
committed `wiki/_views/` drift from CI's unless it is installed).
`scikit-learn` is optional (the `cluster` extra, used by the
overlap job). The UI is the only npm surface. A new dependency is an
ADR-sized decision.
- Discussion belongs in `wiki/<scope>/topics/` (dated, attributed
entries), not in issue threads the corpus can't cite.

Expand Down
Loading
Loading