You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(skills+memory): agent wouldn't boot — two root causes
Reported symptom: `thesis style` printed four spec-compliance warnings
from deepagents then died with:
Invalid YAML in ...wiki-curator/SKILL.md: mapping values are not
allowed here, line 2, column 301: ... status: pending, update ...
agent error: generator didn't stop after throw()
Root cause 1 (real blocker): YAML frontmatter
The description field in wiki-curator/SKILL.md ran on one long line
and contained unquoted phrases like `status: pending` and
`status: curated`. PyYAML (via deepagents' skill loader) parsed
`status` as a new mapping key, blew up on the malformed document,
and propagated the error out of `build_agent`.
Fix: every SKILL.md frontmatter now uses a folded block scalar
(`description: >`) so colons, backticks, and quotes inside the text
carry no special meaning. Five files touched, content unchanged.
Root cause 2 (crash on error propagation): memory.make_store
`make_store` wrapped both the SqliteStore import AND the yield in
one `try/except Exception`. When the first exception from the agent
propagated back into the yield, the except branch caught it and
tried to yield InMemoryStore() as a fallback — but the generator had
already yielded once. Python's contextmanager protocol rejects this
with "generator didn't stop after throw()", masking the real error.
Fix: split the import attempt (pure function `_try_import_sqlite_store`)
from the context manager. Only one yield path per invocation, and no
exception handling around the yield point.
Tests (5 new, 267 total passing)
- Every SKILL.md now has a regression test via real `yaml.safe_load`
(my earlier ad-hoc frontmatter parser did not catch the bug — it
tolerated the unquoted colon).
- Existing frontmatter-key allowlist test migrated to yaml.safe_load
too, for consistency.
Smoke test: `thesis style` now boots past skill-load + memory setup
and reaches the provider API (fails only on the fake key, as expected).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: skills/citation-linter/SKILL.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
---
2
2
name: citation-linter
3
-
description: Use this skill when the user asks to lint, check, verify, audit, or review citations in thesis chapters. Scans a chapter (or all chapters) for `[src:<filename>]` markers, verifies each target exists under `research/raw/`, flags paragraphs making factual claims without any citation, and reports file+line issues in a short actionable table. Does not auto-edit unless explicitly asked. Triggers "lint citations", "check citations", "audit grounding", "verify sources", "review chapter".
3
+
description: >
4
+
Use this skill when the user asks to lint, check, verify, audit, or review
5
+
citations in thesis chapters. Scans a chapter (or all chapters) for
6
+
`[src:<filename>]` markers, verifies each target exists under `research/raw/`,
7
+
flags paragraphs making factual claims without any citation, and reports file
8
+
and line issues in a short actionable table. Does not auto-edit unless
Copy file name to clipboardExpand all lines: skills/ingest-sources/SKILL.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,12 @@
1
1
---
2
2
name: ingest-sources
3
-
description: Use this skill when the user asks to ingest, add, index, or import new source material (PDFs, DOCX, EPUB, Markdown, URLs) into the thesis research library, or after they have dropped new files into `research/raw/`. Explains how to run the deterministic ingest CLI and follow up by triggering curation. Triggers include phrases like "ingest", "add source", "index these", "import sources", "update knowledge base", "I just dropped files in raw".
3
+
description: >
4
+
Use this skill when the user asks to ingest, add, index, or import new source
5
+
material (PDFs, DOCX, EPUB, Markdown, URLs) into the thesis research library,
6
+
or after they have dropped new files into `research/raw/`. Explains how to run
7
+
the deterministic ingest CLI and follow up by triggering curation. Triggers
8
+
include phrases like "ingest", "add source", "index these", "import sources",
9
+
"update knowledge base", "I just dropped files in raw".
Copy file name to clipboardExpand all lines: skills/style-learner/SKILL.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
---
2
2
name: style-learner
3
-
description: Use this skill when the user asks you to learn their writing style, build/update the style guide, or when they have added new samples to `style/samples/`. Reads every file in `style/samples/`, extracts voice and mechanical patterns (sentence length, hedging, jargon density, POV, citation placement), and writes a prescriptive `style/STYLE.md` that the drafter will follow. Triggers "learn my style", "update style guide", "analyse my writing", "I added samples", "compile style".
3
+
description: >
4
+
Use this skill when the user asks you to learn their writing style,
5
+
build/update the style guide, or when they have added new samples to
6
+
`style/samples/`. Reads every file in `style/samples/`, extracts voice and
Copy file name to clipboardExpand all lines: skills/thesis-writer/SKILL.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
---
2
2
name: thesis-writer
3
-
description: Use this skill when the user asks you to draft, write, or expand a thesis section, chapter, paragraph, or the whole thesis. Enforces the grounding rule (every factual claim cites an indexed source), loads the user's writing style from `style/STYLE.md`, navigates the wiki for supporting material, and writes to `thesis/chapters/<NN>.md` matching `thesis/outline.md` numbering. Triggers "draft", "write section", "expand outline", "write chapter", "flesh out 2.1", "continue writing".
3
+
description: >
4
+
Use this skill when the user asks you to draft, write, or expand a thesis
5
+
section, chapter, paragraph, or the whole thesis. Enforces the grounding
6
+
rule (every factual claim cites an indexed source), loads the user's writing
7
+
style from `style/STYLE.md`, navigates the wiki for supporting material, and
8
+
writes to `thesis/chapters/<NN>.md` matching `thesis/outline.md` numbering.
Copy file name to clipboardExpand all lines: skills/wiki-curator/SKILL.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
---
2
2
name: wiki-curator
3
-
description: Use this skill to build or update the research wiki from newly-ingested raw sources following the Karpathy LLM Wiki pattern, one page per source file. Read the template from AGENTS.md and produce `research/wiki/<source_stem>.md` for every entry in `research/raw/_index.json` with `status: pending`, update `research/wiki/index.md`, flag contradictions (flag only — no merging), then flip status to `curated`. Triggers include "curate", "build wiki", "compile wiki", "update the wiki", "after ingest".
3
+
description: >
4
+
Use this skill to build or update the research wiki from newly-ingested raw
5
+
sources following the Karpathy LLM Wiki pattern, one page per source file.
6
+
Read the template from AGENTS.md and produce `research/wiki/<source_stem>.md`
7
+
for every entry in `research/raw/_index.json` with status "pending", update
8
+
`research/wiki/index.md`, flag contradictions (flag only, no merging), then
9
+
flip status to "curated". Triggers include "curate", "build wiki",
10
+
"compile wiki", "update the wiki", "after ingest".
0 commit comments