Repository navigation
Refactor skill node guidance to real markdown children; retire prompt type; expose skill in nav - #1824
Conversation
… agent-guidance (closes #1699) seed_skill_nodes() no longer routes children through child_node_type: Some("prompt") — they now come out as ordinary header/text nodes via markdown type inference, consistent with every other markdown-ingested document in NodeSpace. The prompt schema/behavior is retired, but PromptAssembler's base-system-prompt override nodes had a live, every-turn consumer keyed on node_type == "prompt", so this introduces a purpose-named agent-guidance schema in its place rather than leaving that lookup with no valid identity. agent-guidance carries no discovery metadata (unlike skill, which is matched via search_skills) — it's simply fetched by type, same mechanism prompt used, just named for what it is. NON_EMBEDDABLE_CONTAINER_TYPES and its parity test were updated in lockstep so embeddability stays correctly gated. The subtree-render consolidation and SIDENAV_CORE_TYPES nav exposure from this issue's remaining scope already shipped in #1755. Co-Authored-By: Claude <[email protected]>
Code Review SummaryThis PR does what it says: skill guidance children stop being force-typed The one real problem is a migration gap: The other significant finding is a genuine test-coverage gap: nothing exercises Everything else — the Requirements Check (issue #1699, scoped items 1 and 3 only)
FindingsCritical IssuesNone. The one structural gap found (schema-node seeding) doesn't corrupt data or break the feature for the actual target environment (fresh installs / the seeded-content re-seed already handles new Important1. let task_exists = store.get_node("task").await?.is_some();
if task_exists {
tracing::info!("✅ Core schemas already seeded");
return Ok(());
}
Net effect on any pre-existing dev database: the Engineering principle: a single migration/reconciliation strategy should apply uniformly to everything a "seed" step manages, not just the parts a previous incident happened to touch. Given Recommendation: Either (a) extend 2. No automated test exercises the real Confirmed by reading each candidate:
Engineering principle: the acceptance criterion here is specifically about the shape of the output (children are real markdown types, not Recommendation: add one test — e.g. in Suggestions1. Stale-looking placeholder string in generic mechanism tests. These five 2. The new 7-line doc comment (vs. neighboring one-liners like 3.
4. Nit: Verification of specific investigation points (all independently confirmed)
Additional finding not in the original investigation list: the Recommendation: COMMENTThis is a net positive, well-executed, correctly-scoped rename with sound reasoning behind its one deliberate deviation from the issue's literal wording. Nothing here is a security, correctness, or architectural regression severe enough to block. I'm not selecting APPROVE only because there are two concrete, cheap-to-close gaps (schema-node migration parity, skill-children type-inference test coverage) that map directly onto this PR's own stated goals and a very recent sibling bug-class in the same codebase — both are worth resolving in this PR rather than carried forward, given how small each fix is relative to the review cycle cost of coming back to them later. |
malibio
left a comment
There was a problem hiding this comment.
COMMENT: net-positive rename, well-executed and correctly scoped, with two non-blocking but concrete gaps flagged in the full review above (schema-node seed-migration parity gap in seed_core_schemas_if_needed; missing test coverage for seed_skill_nodes()'s real markdown type-inference path on children).
…inference test Fixes two Important findings from the PR review: 1. seed_core_schemas_if_needed() gated the entire schema-seeding batch on a single task_exists check — the exact type-level skip pattern #1818 (06a94ee) eliminated for seeded content, just one abstraction level up. On any pre-existing dev database, the new agent-guidance schema node introduced by this PR would never be created, silently orphaning it. Now checks each core schema individually and creates only what's missing, so a schema added after a database's first run still reaches that database on the next start. Covered by a new test that deletes agent-guidance post-seed, reopens the same DB file (mirroring a daemon restart), and confirms it's recreated without touching the already-present task schema. 2. No test exercised seed_skill_nodes()'s real templates through the actual child_node_type: None inference path and asserted on the resulting children's node_type — the literal claim of this PR's item 1. Added a test that runs every seeded skill through prepare_nodes_from_template and confirms children are header/text (never prompt), with at least one header node per skill (every seed's guidance starts with a markdown heading). Verified both new tests fail against the pre-fix code and pass against the fix, by temporarily reverting each in isolation and confirming the failure before restoring. Suggestions from the same review (markdown_test.rs's inert "prompt" placeholder strings, core_schemas.rs's longer doc comment, props.rs's doc-example swap, the reconciliation test's count/comment update) were left as-is per the reviewer's own assessment that none warranted a change. Co-Authored-By: Claude <[email protected]>
Address Review SummaryAddressed both Important findings from the review. ✅ Addressed: ✅ Addressed: missing type-inference test coverage for skill children ⏭️ Skipped: all 4 Suggestions — the reviewer's own write-up already concluded none warranted a change (inert Full Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: Both changes are small, mechanical, and directly targeted at the exact gaps identified — a bug-fix-shaped generalization of an existing, already-reviewed pattern (per-node reconciliation) applied to a sibling function, plus a single new test with no production code changes. No new design surface, no architectural changes, nothing the original review didn't already scope. Both new tests were verified to fail against the pre-fix code and pass against the fix, which is the strongest signal available that they close the gaps as intended rather than just asserting something trivially true. Ready for merge pending your review. |
Closes #1699