docs(skills): literary analysis corrections from the Moby Dick run - #1459
Conversation
Findings from running the skill's Phase 5 against the 206-note Moby Dick graph on the bm read verbs (#1398): - The source text must be read as `<work>/<work>.txt`; the bare filename the skill documented fails with "names a project, not a note" because the prefix check drops the extension and the stem equals the project name in this layout (#1458). - After the first batch, check where enrichment landed: on this graph every character append had gone under Relations and prose prepends above the H1, so section reads returned the seed stubs. - Replace the wildcard build-context example: it is capped at 100 related rows and returns one primary row per observation. The working recipe for co-occurrence is one grep -F "features [[" call plus a local parse. - grep rows are case-insensitive, note-level, and content is cut at 4000 characters with no marker (#1455). - The paging footer is a TTY feature; --plain has none (#1457); agents read has_more from --json. --fields returns strings (#1456), so the coverage jq's tonumber handling is load-bearing. - orphans does not find dangling [[targets]]; check to_entity_id in a single-note build-context. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88f5bd182a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Check a chapter's links with `bm tool build-context memory://chapters/<slug> --depth 1 | ||
| --project <work> --json` and look for relations whose `to_entity_id` is `null`; fix the | ||
| spelling or add the alias, then re-run the chapter. |
There was a problem hiding this comment.
Raise the relation cap before validating dangling links
For chapters with more than ten related rows, this command cannot validate every link: bm tool build-context --help documents --max-related as “Maximum related items to return [default: 10],” and resolved edges consume rows for both the relation and target entity. A typical chapter with several characters, themes, symbols, and sequence links therefore reaches the cap, allowing an unresolved relation outside the returned subset to remain undetected. Pass an adequate --max-related value or use a query that directly inventories unresolved relations.
Useful? React with 👍 / 👎.
|
|
||
| ```bash | ||
| bm tool build-context 'memory://characters/major/*' --depth 2 # the character web | ||
| bm grep -F "features [[" --page-size 200 --project <work> --json # every chapter's cast, one call |
There was a problem hiding this comment.
Fetch full notes before parsing the cast
This cannot reliably return “every chapter's cast” in one call because the same section later notes that each result's content is truncated at 4,000 characters without a marker. Since the template places features relations after all observations, a long chapter can match in the full-text index while its returned row omits the relation lines; parsing those rows then silently undercounts co-occurrences. Fetch the full note for hits whose returned content does not contain the matched relation, or use a non-truncated relation query.
Useful? React with 👍 / 👎.
| **3b. After the first batch, check where the enrichment landed.** On a 206-note graph built | ||
| with this pipeline, every character's `append` under `heading="Observations"` had gone under | ||
| `## Relations`, and the prose prepends had landed above the H1, so `cat <note> --section | ||
| Observations` returned the seed stub for every major character. One check catches it: | ||
|
|
There was a problem hiding this comment.
Replace the section-agnostic enrichment recipe
This new check diagnoses the misplaced observations but leaves users with “fix the heading discipline” while the preceding recipe remains deterministic: heading aliases the section argument, but operation="append" ignores it and always writes at the end of the note, under the final ## Relations heading. Every subsequent batch therefore repeats the canonical-content corruption the check found; change the recipe to a section-aware operation such as insert_before_section targeting ## Relations rather than merely checking after the first batch.
AGENTS.md reference: AGENTS.md:L156-L160
Useful? React with 👍 / 👎.
Summary
Corrections to
skills/memory-literary-analysis/SKILL.mdfrom running its Phase 5 questions against the 206-note Moby Dick graph on thebmread verbs (#1398, item 3). Each change is tied to something that failed or misled on that run.<work>/<work>.txt. The baremoby-dick.txtthe skill documented fails with "names a project, not a note" in this very layout (A note named after its project cannot be read by bare identifier (cat refuses it as the project) #1458).## Relationsand prose prepends above the H1, so--section Observationsreturned the seed stub for every major character. Added a two-command check.build-contextis capped at 100 related rows and returns one primary row per observation; replaced with thegrep -F "features [["one-call recipe that answered the co-occurrence question.contentcut at 4000 characters with no marker (Search results truncate note content at 4000 characters with no indicator #1455).--plainhas none (bm find/ls --plain omit the paging footer, so truncation is invisible outside a TTY #1457); readhas_morefrom--json.--fieldsreturns strings (find --fields returns numeric frontmatter values as strings #1456), so the coverage jq'stonumberhandling is load-bearing.bm orphansdoes not find unresolved[[targets]]; checkto_entity_idin a single-notebuild-context.just package-check-skillspasses (15 skills validated).🤖 Generated with Claude Code
https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp