Repository navigation
Commit 090d8f2
WIP: Workflow skills, queues and task context paths are seeded; routing guards blocked on a matching change (#3543)
## Completed in This Session
- [x] Six saved queries seeded in core with fixed ids (packages/core/src/services/query_service/core_queries.rs): specs, plans and decisions by status, and the queues "Ready tasks", "In progress", "Awaiting review". Tests in packages/core/tests/it/core_queries_test.rs, including each "Ready tasks" condition excluding a task on its own.
- [x] Eight procedure skills seeded (SKILL_SEEDS in packages/agent/src/skill_pipeline.rs, bodies in seeds/skills/, 39 two-form rules in seeds/rules/{agent,skill-md}/): Writing a Spec, Writing a Plan, Breaking a Plan into Tasks, Implementing a Task, Reviewing a Task, Completing a Task, Recording a Decision, Authoring a Skill. applies_to links per row; attached_to links from Implementing a Task to "Ready tasks" and "In progress" and from Reviewing a Task to "Awaiting review" (link_seeded_skills).
- [x] task seeded with context paths spec, plan, decisions, spec.decisions, project. Context paths are a third seed aspect (SeedAspect::ContextPaths) with reconcile, pending, keep and take through core, daemon, CLI (--context-paths) and the app. The pending_seed_update CHECK changed in the DDL: databases need a reset.
- [x] The agent's context rows carry node_version and checkbox ids (context_node_summary in local_agent/tools.rs); create_node strips a nodespace:// parent id; the version-conflict message points at get_node_context.
- [x] packages/agent/tests/it/workflow_seeds.rs: seeds and links, a task carrying the procedure of its stage, a project-attached skill, and both procedures driven step by step through GraphToolExecutor with the gate Plays live.
- [x] Confusion matrix (tests/it/skill_confusion_matrix.rs) has cases for all eight skills and passes on the live embedding model; tests/golden/skill_retrieval/current.tsv and its digest are recorded from the seeded text.
## Remaining Work
- [ ] DECIDED WITH THE USER, NOT STARTED: change matching so procedure skills that are handed over through queues do not compete for the built-in agent's three routed slots. The issue lists matching as a non-goal, so start by settling the design with the user in conversation (likely an ADR amending ADR-038/ADR-094, and possibly its own issue) before writing code.
- [ ] After that change: rerun live_skill_retrieval_stability (12 guards fail today, on 11 requests), then decide which benchmark-fitted not_for sentences on the eight skills can be deleted.
- [ ] Two guards rest on premises that changed and need a decision, not a retune: without_the_add_rule_those_adds_lead_with_a_skill_that_removes (Recording a Decision now serves "add ... decision to our architecture decisions"), and relationship_management_not_for_leaves_linking_scores_unchanged (needs Relationship Management inside find_skills' top 10 of what is now 20 skills).
- [ ] live_skill_guidance_fetch::writing_a_spec_and_implementing_a_ready_task_fetch_their_procedures: written; failed its first run because it read the agent-form body; now renders external_skill_body but that fix has not been run.
- [ ] Regenerate the three stale prompt goldens with UPDATE_GOLDEN=1 (stage1_request, stage2_lookup_block, stage2_tool_surface) and review the diff.
- [ ] A routing or golden test that the built-in agent, asked to write a spec, creates it as draft with checkbox criteria and does not approve it.
- [ ] Docs in ../nodespace-docs: components/seeded-nodes.md (queries, the eight skills, "Core seeds no attached_to link" is now false, a third seed aspect), architecture/prompt-skill-system.md (skill list), components/schema-management.md and components/node-types.md ("No core schema is seeded with any" context paths is now false).
- [ ] bun run test:changed, bun run quality:fix, PR, /pragmatic-code-review and /address-review. The user asked for the merge to follow automatically once no re-review is needed.
## Current State
- Files modified: packages/agent/src/{skill_pipeline.rs,skill_rules.rs,local_agent/tools.rs,seeds/}, packages/core/src/services/{query_service/core_queries.rs,node_service/{mod.rs,seed_updates.rs,crud.rs}}, packages/core/src/{models/core_schemas.rs,models/seed_update.rs,db/schema.rs,schema/mod.rs}, packages/daemon/src/services/node_service.rs, packages/cli/src/commands/seed.rs, desktop-app seed-updates store and settings section, packages/skill/references/cli.md
- Tests status: last full run of core, daemon, CLI and agent had 8 failures; four are fixed since and the matrix digest is re-recorded, three prompt goldens are stale, and pty::manager::tests::ultra_short_lived_processes_are_pruned failed once and looked unrelated. The four crates have not been run together since. bun run test and quality:fix not run on this tree.
- Known issues: the live routing guards above. SKILL_RERANK_POOL in core/src/ops/skill_ops.rs is 20 and the registry is now exactly 20 built-in skills, so one user-written skill puts it past the pool. link_seeded_skills remakes a seeded attached_to link on every open, so a user who detaches a procedure from a queue gets it back on restart.
- Dependencies: none open. #3542, #3554, #3555, #3557 are closed.
## Context for Next Session
Wording cannot carry this: measured on the locked nomic model, the eight skills score 0.80 to 0.90 on unrelated task, plan and decision requests while the existing skills hold their own requests at 0.77 to 0.83, and with 20 skills in a 3-slot window the incumbents are crowded out. A not_for holds about four sentences before earlier ones stop working (Writing a Plan at seven regressed two fixed requests), Implementing a Task alone collides with nine or more requests under every title and use_for tried, and a not_for weight of 2 to 5 simulated offline did not close it. The user approved re-owning requests that name a decision or a spec to record or track (REOWNED_BY_RECORDING_A_DECISION in the matrix) and then chose a matching change over more exclusions.
How the measuring was done, for reuse: a skill root is embedded as "Title\n\nTitle\n\nuse_for" and a not_for as "Title\n\nnot_for"; the score is cosine x 1.3 and the penalty is max(0, not_for score - score). A temporary ignored test in skill_confusion_matrix.rs embedded candidate documents against every matrix query and wrote the scores to JSON, so rankings for many wordings were computed offline in one run. SKILL_TEXT_OVERRIDES (live_skill_retrieval_stability.rs) tries a use_for or not_for on the real suite without a rebuild.
Left alone on purpose: the gate Plays' rejection messages do not name the skill that resolves them, which ADR-094 describes and the issue's criteria do not ask for.
## Decisions the User Made, in Order
1. Asked how to handle 9 matrix regressions that wording had not removed: "Re-own 4, tune 5". Requests that name a decision to log or link are re-owned to Recording a Decision; the other five were to be tuned, stopping to report if they would not move.
2. Asked about 11 further requests in the live guard suite: "Same rule, to green". Re-own the ones naming a spec or a decision to track or record, tune the rest.
3. Told that the guard suite cannot be brought to green by wording: change matching first (option 1), and hand off in a WIP commit for a new session.
Standing instruction from the start of the work: once the review cycle reports no re-review needed, proceed to merge.
## Choices Made Without Asking
- Titles are verb phrases, as the issue and ADR-092 name the procedures, not the noun phrases the older built-ins use ("Node Creation"). "Authoring a Skill" measured 1 collision alone against 4 for "Skill Authoring". Noun-phrase and task-free titles ("Working the Ready Queue") were measured and were no better overall.
- A seeded query states every field a user can change, unset ones as null, so a reset clears a field the user added (core_queries.rs, seeded_query).
- The three changes to the agent's tools listed under Completed are outside the issue's text; the procedures cannot be followed by the built-in agent without them.
## Benchmark and Fixture Expectations Changed
- skill_confusion_matrix.rs: REOWNED_BY_RECORDING_A_DECISION re-owns "log the design decisions for the system and who authored each one", "create a record of who made which architecture decision" and "point rebuild task at the decision it has to respect". "record an edge between the rebuild task and the storage decision" went from Relationship Management First to Window. SKILL_CASES in live_embedding_prefix_measurement.rs is untouched.
- The live guards are NOT yet re-owned or edited. Under decision 2 these were to be re-owned there: "begin tracking design decisions", "Start keeping the calls we make on how the system is built, and who made each one" (find_skills_ranks_by_knn_score_alone), "create a database for tracking our feature specs", and "point rebuild task at the decision it has to respect" (scenario_11c) with "record an edge ..." in add_shaped_requests_for_another_skill_keep_their_leader.
- Fixtures renamed because they collided with seeded names: user-written skill "Recording a Decision" to "Logging a Team Decision" (agent and CLI tests, and the fetch example in packages/skill/references/cli.md); unknown-name "Writing a Spec" to "Writing a Sonnet"; the saved query "Ready tasks" in core/src/ops/query_ops.rs tests to "Startable tasks".
- core_type_registry_test passes Some(100) to mention_autocomplete: with six seeded queries beside the seeded plays, the default limit of 10 no longer reaches a test's own page. The empty-prefix mention list in a fresh database is now filled by seeded nodes.
- play_tools::the_play_authoring_skill_is_seeded_and_linked_to_the_play_schema now asserts every built-in links to exactly the schemas its row names.
## The 11 Guard Requests Still Lost (live model, seeded wording)
- "set up Runbooks with a service and a last reviewed date": Schema Creation out of the top 3 (Reviewing a Task, Implementing a Task, Writing a Plan above it)
- "why hasn't the sprint close-out rule fired for this ticket?": Completing a Task leads Play Workflow State
- "Start keeping the calls we make on how the system is built, and who made each one": Recording a Decision leads Schema Creation
- "stop that rule firing for low priority tasks": Implementing a Task and Completing a Task lead Play Authoring
- "the launch task is blocked by the security review": Relationship Management is 11th of 20, outside the 10 find_skills returns
- "remove the done tasks": Completing a Task leads Node Deletion
- "begin tracking design decisions": Recording a Decision leads Schema Creation
- "track planning cycles": Writing a Plan leads Schema Creation
- "could you find the write-up on the embedding pipeline?": Writing a Plan and Writing a Spec lead Research & Search
- "move the offline sync spec's review to next week": Graph Editing out of the top 3 (Reviewing a Task, Conflict Journal, Schema Creation)
- "create a database for tracking our feature specs": Writing a Spec leads Schema Creation
Plus "point rebuild task at the decision it has to respect" and "record an edge between the rebuild task and the storage decision", already re-owned in the matrix, and the two add-rule requests naming a decision.
## The Context-Paths Slice Was Built by a Subagent
Merged from a patch and not reviewed line by line. Its deviations from the brief:
- The modified flag is written inside update_schema's transaction, only when a core schema's call adds or removes a path.
- reconcile_core_context_paths runs in NodeService::new_with_extensions and an error from it fails the open, unlike the core plays and queries reconciles, which only warn.
- crud.rs skips the generic _seed stamp for a schema root and for a child under one.
- CLI wording changed for every aspect, not only the new one: take prints "Replaced your {aspect} of ... with the shipped version", and the ambiguity error is "More than one part of ... is pending: ... Pass --config or --guidance."
- nodespace-app-lib was not compiled after its one doc-comment change.
## Acceptance Criteria Status
From issue #3543:
- [x] The eight skills are seeded with fixed ids, Markdown bodies and applies_to links
- [x] No body opens with an H1; tool-specific steps are two-form rules; other prose names no tool
- [ ] Retrieval benchmark has cases for all eight (done) and no existing built-in skill regresses (matrix green; live guard suite not)
- [x] "Implementing a task" is one procedure start to finish, with what a version conflict means
- [x] "Reviewing a task" is one procedure for "Awaiting review"; neither tells its reader to do the other's work
- [x] "Implementing a task" covers the six steps in order
- [x] Approval is the user's; a rejected write is resolved at its cause
- [x] "Authoring a skill" says to search first and to write use_for as when the skill applies
- [x] Six query nodes seeded with fixed ids; they appear where saved views appear
- [x] "Ready tasks" conditions and ordering, with the exclusion test
- [x] Seeded attached_to links
- [x] task seeded with its context paths
- [x] Ready tasks with context returns the task, its governing nodes and the implementing procedure; the procedure follows the stage
- [x] A skill a user links to a project comes with every task of that project
- [x] A user's edit to a seeded skill or query survives a restart; reset restores it
- [x] A user's change to task's context paths survives a restart; a shipped change is put to them as pending
- [ ] The built-in agent, asked to write a spec, creates a draft with checkbox criteria; routing or golden test
- [ ] Live skill-fetch test covers writing a spec and implementing a ready task (written, unverified)
- [ ] Prompt and routing goldens regenerated and reviewed
- [ ] Docs updated
- [ ] Code passes bun run quality:fix
- [ ] Tests pass (bun run test:changed)
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent e8c265e commit 090d8f2
0 file changed
0 commit comments