Repository navigation
feat(agent): serve long topics as an outline with sections on request - #693
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 3m 10s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing. SummaryThis is a well-executed, mechanically sound feature. The core mechanism ( Spot-checked I posted three inline findings, all minor and non-blocking:
The four "open questions for review" the author flagged in the PR body (the |
Address review on #693: splitSections throws when two headings share a slug, agent rejects --section combined with --full, and the outline's table of contents drops a tautological slug check.
All three inline findings are addressed in 99a7785 (tautological slug check removed, duplicate section names now throw, — AI Coding Agent |
taskless agent <topic> prints a long recipe's steps and a list of the sections it serves on request; --section <name> prints one and --full prints all of it. onboard and update serve the same outline. A test holds every outline and every section to 8 KiB. Refs #672
Reference material (quirk tables, engine reach lists, input schemas, ledger entries, templates) moves into sections served on request; the steps stay in each topic's outline and link to them. Archives the agent-topics-toc change. Closes #672
Address review on #693: splitSections throws when two headings share a slug, agent rejects --section combined with --full, and the outline's table of contents drops a tautological slug check.
Rebasing onto main brought in text from #682, #683, #686 and #691 that pushed three outputs past 8 KiB: - create-sg-rule outline: the `taskless ast` guidance moves to an on-demand Reading kinds section, step 4 points at it, and step 5 drops its quirk enumeration (the Quirks table lists them). - create-sg-rule pattern-quirks: the relational entries (follows/precedes, has/inside, not) move to a Relational quirks section; validate-rule names it beside the other two. - route outline: #686's note on recipes that limit questions moves to an on-demand Limits on asking section, with a one-line pointer in Preconditions.
99a7785 to
098f503
Compare
|
Rebased onto main after #682, #683, #685, #686, #687, #688, #689 and #691 landed. Conflicts and what the resolution did:
A separate commit (
— AI Coding Agent |
Address review on #693: splitSections throws when two headings share a slug, agent rejects --section combined with --full, and the outline's table of contents drops a tautological slug check.
Closes #672
What
taskless agent <topic>now prints a long topic as an outline that fits one agent tool call: the purpose, the steps, and a## Sections on requestlist at the end. Reference material is printed on its own withtaskless agent <topic> --section <name>.--fullprints the whole recipe.packages/cli/src/prompts/sections.ts, new):##heading is a section, named by its slug.<!-- on-demand -->(on the line above its heading) to leave it out of the outline. The marker is stripped at load, and a misplaced marker throws.[Quirks](#quirks)). The full text keeps them as links. The outline and section output rewrite a link to an unprinted section as "sectionquirks".agent.ts):--sectionand--fullflags.--section.cli_agentwith asectionproperty and never carries the feedback invite.taskless onboardandtaskless updateserve the same outline.@taskless/cli/promptsis unchanged: it still renders whole recipes, with the markers removed.updateledger entries, CI templates.route's step 4 now tells the agent to print theast-grep-reach,vale-reachandlegacy-linterssections before deciding.cli-agentgains the outline/section requirement. The change is archived in this PR, since it is a single-PR delivery.Budget
test/recipe-sections.test.tsholds every topic's outline, and every section printed alone, to 8 KiB (8192 bytes).](#name)link and everyagent X --section ycitation resolves.Before, at default output:
create-vale-rule68KB,update36KB,report25KB,create-sg-rule24KB,route21KB, and 12 more over 8KB. After, all are under 8KB.create-vale-rule's outline is about 5.4KB.Open questions for review
report --section facts-schemais over budget (~14KB). It is one fenced%(INPUT_SCHEMA)s, and compact JSON would still be 8.3KB. The test carries it as the only explicit exemption, and fails if the exemption goes stale. Fitting it needs the schema served in parts, which I left for a follow-up.onboardis tight. Its outline is 7.9KB with the default host-tools text. With a realhostToolslist and a nightly invocation it can pass 8KB. The test measures default caller state only.route's outline is also tight, at about 8.0KB.A few redundant sentences were dropped while restructuring rather than moved, all restatements of nearby text. In
onboard.md:routedecidescirecipe"In
ci.md: the repeated full/diff bullets and the three outcomes. Everything else was moved, not deleted.Possible follow-up:
update --jsoncould list the ledger section names the walk covers, so an agent would not have to match versions itself.Diff size: about 3.6k insertions and 2.0k deletions. Most of it is recipe text moved between sections. A split would leave a layer whose budget test is red.