Skip to content

feat(skills): research skill + /research command - #453

Merged
growlf merged 4 commits into
mainfrom
452-add-a-research-skill-and-research-command-evidence
Oct 25, 2026
Merged

growlf merged 4 commits into
mainfrom
452-add-a-research-skill-and-research-command-evidence

Conversation

@growlf

@growlf growlf commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Closes #452

Adds research — an evidence ladder (repo/code → live tools → vendor docs → secondary), per-claim sources, confidence, and an explicit unverified list — plus /research <topic> to run it.

websearch stays the tool doc for the web rung; this is the procedure that decides when to reach for it.

Verification (2026-10-25)

Captured the real provider request by proxying OpenCode to the local llama.cpp endpoint, then restored the config.

  • GET /api/command?location[directory]=<repo> lists 34 commands including research — discovery works.
  • POST /api/session/{id}/command delivers the full 1,066-char template with the topic substituted.
  • That exact template, fed to the local coder model: answer, 7-row evidence table, confidence line, Unverified: none. It ran its own edge-case reproductions unasked.

Caveat, and it is the harness, not this change: opencode run "/research …" does not expand slash commands — it sends the literal text. Test /research from the TUI. An earlier draft of this PR drew wrong conclusions from run before that was understood.

Test

make test — 1713 passed, 1 skipped. Guards: canonical frontmatter, 60-line ceiling, command names the skill, the command keeps the three-part contract, AGENTS.md registration.

Fails while the skill does not exist. The guards exist because both halves
degrade silently: a command naming a deleted skill still runs and answers
from memory, and a skill missing a frontmatter field is simply never
advertised.
Answers a factual question by walking an evidence ladder — repo, then live
system state, then vendor docs, then secondary — and reports an evidence table
with confidence and an explicit unverified list.

Memory becomes a lead instead of a finding: no claim reaches the operator
unless a source was read this session. websearch stays the tool doc for the web
rung; this is the procedure that says when to reach for it.
@growlf growlf self-assigned this Oct 25, 2026
The command now carries the mandate and the three-part output contract, so
compliance no longer depends on the model choosing to load the skill first.

Verified through the command path (POST /api/session/{id}/command): the template
reaches the model with the topic substituted, and the local model returns the
answer, an evidence table, a confidence line, and an unverified line.

Correction: an earlier draft of this message claimed the model skipped the skill
and ignored the format when driven by 'opencode run'. That command does not
expand slash commands at all, so the template never reached the model. The
failure was in the test harness, not the model.
@growlf
growlf force-pushed the 452-add-a-research-skill-and-research-command-evidence branch from 4459ad6 to 4be10e5 Compare October 25, 2026 21:28
The command body is the only text guaranteed to reach the model on either
path, and the review found the format contract unguarded: dropping the table
or the confidence line would leave every test green while the deliverable
disappeared.
@growlf
growlf merged commit b7444b3 into main Oct 25, 2026
9 checks passed
@growlf
growlf deleted the 452-add-a-research-skill-and-research-command-evidence branch October 25, 2026 21:37
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.

Add a research skill and /research command: evidence-first answers, no guesses

1 participant