Skip to content

docs(skills): literary analysis corrections from the Moby Dick run - #1459

Merged
phernandez merged 1 commit into
mainfrom
docs/literary-analysis-skill-moby-findings
Sep 3, 2026
Merged

docs(skills): literary analysis corrections from the Moby Dick run#1459
phernandez merged 1 commit into
mainfrom
docs/literary-analysis-skill-moby-findings

Conversation

@phernandez

Copy link
Copy Markdown
Member

Summary

Corrections to skills/memory-literary-analysis/SKILL.md from running its Phase 5 questions against the 206-note Moby Dick graph on the bm read verbs (#1398, item 3). Each change is tied to something that failed or misled on that run.

just package-check-skills passes (15 skills validated).

🤖 Generated with Claude Code

https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T19:28:06.442025Z 88f5bd1 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@phernandez
phernandez merged commit 7d837de into main Sep 3, 2026
20 checks passed
@phernandez
phernandez deleted the docs/literary-analysis-skill-moby-findings branch September 3, 2026 19:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +667 to +669
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +436 to +440
**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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant