-
Notifications
You must be signed in to change notification settings - Fork 236
feat(plugins): surface hook capture setup and health #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,16 @@ repo, default project, current directory, or previous local state. | |
| - `rememberFolder`: default `codex-remember`. | ||
| - `placementConventions`: a short note about where decisions, tasks, and research | ||
| notes should land. | ||
| - `captureEvents`: whether to record redacted lifecycle-event envelopes in the | ||
| local hook inbox. Default to `false`; SessionStart briefs and PreCompact | ||
| checkpoints work without it. | ||
| - `redactKeys` and `redactPaths`: optional additions to the built-in redaction | ||
| floor. Ask for these only when event capture is enabled or the user has | ||
| repo-specific privacy requirements. | ||
|
|
||
| Explain the capture tradeoff before asking: enabled capture adds a local, | ||
| redacted event trail that stays queued until `bm hook flush` projects it. It does | ||
| not write to team projects, and only the JSON boolean `true` enables it. | ||
|
|
||
| If there are duplicate names, show qualified names and ask the user which one to | ||
| use. Prefer qualified project names or project ids for cloud projects. Never pick | ||
|
|
@@ -59,14 +69,21 @@ After confirming the plan, write `.codex/basic-memory.json` in the repo: | |
| "captureFolder": "codex-sessions", | ||
| "rememberFolder": "codex-remember", | ||
| "recallTimeframe": "7d", | ||
| "captureEvents": false, | ||
| "redactKeys": [], | ||
| "redactPaths": [], | ||
| "placementConventions": "<short convention>" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Preserve unrelated keys if the file already exists. Include `projectMode` when | ||
| the user chose cloud, local, or mixed routing. This file is intentionally | ||
| Codex-specific; do not write `.claude/settings.json`. | ||
| the user chose cloud, local, or mixed routing. Always persist `captureEvents` as | ||
| a JSON boolean. Empty `redactKeys` and `redactPaths` lists may be omitted; when | ||
| present, they must be JSON arrays of strings. `redactKeys` extends payload-key | ||
| redaction, while `redactPaths` also protects working-directory and path-bearing | ||
| checkpoint content. This file is intentionally Codex-specific; do not write | ||
| `.claude/settings.json`. | ||
|
|
||
| ## Seed Schemas | ||
|
|
||
|
|
@@ -80,6 +97,11 @@ exist: | |
| - `decision.md` | ||
| - `task.md` | ||
|
|
||
| These schemas cover notes Codex writes directly. The normalized `session` and | ||
| `tool_ledger` artifacts written by `bm hook flush` are core-owned projections; | ||
| their shape belongs to the core projector and its tests, not duplicated plugin | ||
| schema files. They remain queryable by their `type` frontmatter. | ||
|
|
||
| Use `write_note` with `directory="schemas"`, `note_type="schema"`, schema | ||
| frontmatter as metadata, and the markdown body as content. Do not paste the YAML | ||
| frontmatter into content. | ||
|
|
@@ -94,8 +116,12 @@ Before closing, prove the mapping works: | |
|
|
||
| - Search the primary project for `type=schema` with page size 5. | ||
| - Search one shared project for open decisions if shared projects were configured. | ||
| - If either query errors, fix the project ref before finishing. | ||
|
|
||
| Finish with the project mapping, schemas seeded or skipped, and the verification | ||
| result. Tell the user that plugin hooks need to be reviewed and trusted in Codex | ||
| before they run. | ||
| - Run `basic-memory hook status --harness codex --project-dir <repo-root>` (using | ||
| `bm` or `uvx basic-memory` if needed). Confirm that it finds this repo's | ||
| settings, reports the selected project, and shows the intended capture state. | ||
|
Comment on lines
+119
to
+121
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The precondition for this skill accepts any Useful? React with 👍 / 👎. |
||
| Its inbox counts are shared across harnesses. | ||
| - If any check errors, fix the project ref or hook launcher before finishing. | ||
|
|
||
| Finish with the project mapping, schemas seeded or skipped, capture/redaction | ||
| choices, shared inbox status, and the verification result. Tell the user that | ||
| plugin hooks need to be reviewed and trusted in Codex before they run. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user follows this skill with an older local
basic-memorythat still satisfies the prerequisite above (>= 0.19.0), this new mandatory smoke test fails becausehook statusonly exists with the new core hook front door. The user can complete the interview and write settings, then be told to fix a project/launcher problem even though they followed the documented install path; bump the prerequisite to a version that includesbm hook statusor make this check fall back/optional for older launchers.Useful? React with 👍 / 👎.