Skills and processes declare their moments, and the UI for moments (milestone 458 steps 5–6) #202

Merged
bvandeusen merged 4 commits from dev into main 2026-10-05 15:41:56 -04:00
Owner

Milestone 458, steps 5 and 6. CI is green on dev at 5bcc603 (run 8181).

Step 5 (#4923): loading a procedure reaches the moment it is for

  • Each bundled skill declares metadata: moments: in its SKILL.md. The server ships the same declaration as Skill defaults (BUNDLED_SKILL_MOMENTS), and test_skill_moments holds the two together.
  • Stored processes take moments on create_process and update_process. They are resolved on the server when the scribe-proc-<slug> skill loads.
  • reachable_tools lists the skill loader whenever anything is mounted.
  • The plugin version is 2026.10.05.1823.

Step 6 (#4924): the human door

  • Rule editor: a moment picker beside the trigger.
  • Settings → General → Moments: what each moment means, the actions that reach it (add, remove, switch off or restore), its mount count, and deliveries and agent opens per moment.
  • retrieval_telemetry.moment_usage (also reported in retrieval_summary), and rulebooks.mount_counts.
  • GET /api/retrieval/moments carries mounted and usage. DELETE /moments/mappings also accepts query parameters.

🤖 Generated with Claude Code

Milestone 458, steps 5 and 6. CI is green on dev at 5bcc603 (run 8181). **Step 5 (#4923): loading a procedure reaches the moment it is for** - Each bundled skill declares `metadata: moments:` in its SKILL.md. The server ships the same declaration as Skill defaults (`BUNDLED_SKILL_MOMENTS`), and `test_skill_moments` holds the two together. - Stored processes take `moments` on `create_process` and `update_process`. They are resolved on the server when the `scribe-proc-<slug>` skill loads. - `reachable_tools` lists the skill loader whenever anything is mounted. - The plugin version is 2026.10.05.1823. **Step 6 (#4924): the human door** - Rule editor: a moment picker beside the trigger. - Settings → General → Moments: what each moment means, the actions that reach it (add, remove, switch off or restore), its mount count, and deliveries and agent opens per moment. - `retrieval_telemetry.moment_usage` (also reported in `retrieval_summary`), and `rulebooks.mount_counts`. - `GET /api/retrieval/moments` carries `mounted` and `usage`. `DELETE /moments/mappings` also accepts query parameters. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 4 commits 2026-10-05 15:41:53 -04:00
feat(moments): skills and stored processes declare the moments they are for (milestone 458 step 5, #4923)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Failing after 1m25s
CI & Build / Build & push image (push) Skipped
f1fdc4a951
Loading a procedure now also reaches the moment it is for. Loading the
reporting procedure is a report; loading the release procedure is a delivery.

- Bundled skills: each SKILL.md declares `metadata: moments:`. The same
  declaration ships as Skill defaults (BUNDLED_SKILL_MOMENTS), because the
  server never sees the plugin's files. test_skill_moments holds the two
  together and pins the plugin name that qualifies the skill.
- Stored processes: `moments` on create_process and update_process, stored
  in the note's data and returned by get_process. A `scribe-proc-<slug>`
  load resolves its process through the sync manifest at load time. The
  moments are not copied into the stub, which would go stale mid-session.
- reachable_tools lists the skill loader whenever anything is mounted, since
  a process's moments are known only when it loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(moments): an install removal still drops its tool while the skill loader stays listed (milestone 458 step 5, #4923)
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 19s
CI & Build / TypeScript typecheck (push) Successful in 1m2s
CI & Build / integration (push) Successful in 1m20s
CI & Build / Python tests (push) Successful in 2m12s
CI & Build / Build & push image (push) Successful in 33s
c489452a2d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(moments): the human door onto mounts, mappings and per-moment telemetry (milestone 458 step 6, #4924)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 18s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / Python tests (push) Failing after 1m34s
CI & Build / Build & push image (push) Skipped
CI & Build / integration (push) Successful in 2m7s
b73a689849
Everything an agent can do with moments, a person can now see and change
in the app.

- Rule editor: a moment picker beside the trigger. Catalog moments are
  ticked; a named procedure's `skill.<name>` is typed and checked as the
  server checks it. `moments` is always sent, so unticking the last moment
  unmounts the rule.
- Settings, Moments section (General tab): for each moment, what it
  means, the actions that reach it on this install (shipped ones can be
  switched off, the install's own removed), how many rules are mounted on
  it, and deliveries and agent opens over the window. Below that: named
  procedures with mounts, switched-off defaults with Restore, and a form to
  add an action.
- retrieval_telemetry.moment_usage: per moment, `delivered`, `rules`,
  `opened` (agent pulls after the first delivery there; an upper bound, as
  by_source is) and `last_delivered_at`. No ratio, because a mount is a
  person's statement, not a ranker's guess. Guarded on its own, and also
  reported in retrieval_summary as `moment_usage`.
- rulebooks.mount_counts; mounted_moments now derives from it.
- GET /api/retrieval/moments carries `mounted` and `usage` (?days=).
  DELETE /moments/mappings also reads the mapping from query parameters,
  since the browser's DELETE sends no body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(moments): the store loads rather than fetches, so the deadline guard does not read it as a bare fetch (milestone 458 step 6, #4924)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 52s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / Build & push image (push) Successful in 45s
5bcc603310
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit 2db9e0c0c1 into main 2026-10-05 15:41:56 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#202