Skip to content

WIP review needed: skills tranche 1 (store, attachment, shelf, use_skill) - #1327

Draft
santoshkumarradha wants to merge 16 commits into
feat/1089-custom-connectionsfrom
skills/tranche-1
Draft

santoshkumarradha wants to merge 16 commits into
feat/1089-custom-connectionsfrom
skills/tranche-1

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

  • The five-part skill record lives in internal/store and internal/resident: trust, cost-card and digest fields, and serving that marks consumption.
  • Ordered per-node skill attachment on briefs: every briefed plan leaf now carries an ordered Skills list on plan.Node and on the journaled store.NodeBrief, composed at brief time by plan.ComposeSkills with pinned skills (names the person's proposal text says outright) first and deterministic cue/scope retrieval behind them. Function words never count as cues, one shared doc word is coincidence, three candidates at most.
  • The worker's brief renders the attachment through plan.RenderSkillsBlock beside the working method; a leaf with nothing attached renders byte for byte what it rendered before.
  • A windowed chat skill catalog (eight lines, scored, overflow line) and the depth-gated use_skill tool (list and get) are on the session belt wherever a store exists.
  • Live wiring of NodeBrief.Skills: the chat engine reads the active shelf once per build, hands it to plan.Build frozen at both brief-journaling sites (the main plan and the remainder replan), and each dispatched leaf carries its plan node's attachment onto the task that runs it.

Design

Test state

  • go build ./... - clean.
  • go test ./internal/plan/... ./internal/orchestrate/... ./internal/session/... ./internal/store/... ./internal/resident/... -count=1 -timeout 30m - all ok: plan 1.208s, orchestrate 0.598s, session 272.439s, store 14.302s, resident 17.970s.
  • go test ./internal/exec/ -count=1 -timeout 20m - ok, 259.328s (added beyond the list above because internal/exec/linear.go, the render site, changed).
  • New tests cover: a proposal naming a skill attaches it pinned and first on every briefed leaf (checked against the journaled store event and the graph node); a proposal naming nothing attaches nothing; retrieved candidates follow pinned entries; retrieval ignores function words and caps at three; the worker brief renders the block in composed order and renders nothing new when nothing resolves.

Notes

  • Later tranches: checks-on-attach, cost-card learning, and the forge.
  • Unrelated commits: origin/santos/dev..skills/tranche-1 carries 17 commits from the feat/1089-custom-connections wave that are not this tranche - the named/multiple custom connections work (Custom connections: named, multiple, switchable — in /connect and /settings #1089) with its task and merge commits, the fzf v2 fuzzy matcher wave, a settings-row inventory, the settings search box cursor fix, docs/test chores, and two poem-chapter commits. They were on the checkout's trunk history before the skills work started.
  • RenderSkillsBlock and SkillEntry moved from internal/orchestrate to internal/plan, beside ComposeSkills: the executor cannot import orchestrate (orchestrate imports the subharness, which imports the executor), and the render had no live caller.
  • The change entry in docs/changes/unreleased is added once the PR number exists: make changelog-new PR=<n> KIND=changed SLUG=skills-tranche-1.
  • origin/skills/tranche-1 already exists and points at 3bec541, an older lineage this branch does not carry (4 commits behind, including "session: fix ActivateSkill test callers after the skills merge"); a push will need reconciliation, which is the author's call.


Drafted with CodeAF · reviewed and owned by the author- Carried non-skill hunks, named for reviewers: internal/session/task_run.go (resumeTree canonicalizes the checkpoint dir; a legacy /var vs /private/var mismatch made a macOS test permanently red) and questionlifecycle_test.go / task_rename_compat_test.go (two time-bombed assertions that went red Sep 17 when the day-leading stamp law landed). Both were proven pre-existing by running against a pristine archive of the base.

agentfield-bot and others added 12 commits September 20, 2026 20:37
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (deepseek/deepseek-v4-flash)
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (deepseek/deepseek-v4-flash)
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (moonshotai/kimi-k3)
…e branch

Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (z-ai/glm-5.3-flash)
…ed tool)

Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (moonshotai/kimi-k3)
NodeBrief.Skills was plumbed but nothing in live flow populated it. The
brief pass now composes each leaf's attachment from the shelf the caller
hands the build frozen: skills the goal names outright first, then
deterministic cue/scope retrieval behind them (function words never count
as cues, a single shared word is coincidence, three candidates at most).
The same order is written onto the node, journaled on the node brief and
rendered into the worker's instruction beside the working method; a leaf
with nothing attached renders byte for byte what it rendered before.

RenderSkillsBlock and SkillEntry move from orchestrate to plan, beside
ComposeSkills: the executor cannot import orchestrate (it imports the
subharness, which imports the executor), and a render the worker brief
cannot call is a render that never runs.

Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (z-ai/glm-5.3-flash)
Both brief-journaling builds (the main plan and the remainder replan) now
read the active shelf once and hand it to plan.Build frozen, and each
dispatched leaf carries its plan node's attachment onto the task that
runs it. A store with no shelf composes nothing and changes no prompt.

Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (z-ai/glm-5.3-flash)
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (z-ai/glm-5.3-flash)
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (moonshotai/kimi-k3)
agentfield-bot and others added 4 commits September 20, 2026 23:28
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
… diff

Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com>
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
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.

2 participants