@sffmc/cognition
v0.16.0
Published
Standalone package: max-mode parallel reasoning with judge selection + 18 markdown compose skills + plugin health diagnostics.
Maintainers
Readme
@sffmc/cognition
Parallel reasoning + structured-workflow skills + plugin health diagnostics for OpenCode. Three formerly-separate sub-features (@sffmc/max-mode, @sffmc/compose, @sffmc/health) live here as internal sub-folders; the package entry composes them into one plugin via mergeHooks().
What's inside
max-mode/—maxMode()tool. Run a workflow under several candidate generators in parallel; an LLM judge scores each output on configurable criteria and returns the winner. Useful when one generator is flaky and you want a second opinion rather than a retry loop.compose/skills/— 18 markdown skill files that load into OpenCode's prompt:plan.md,tdd.md,verify.md,review.md,debug.md,brainstorm.md, etc. The LLM knows when to load them based on the user's request.health/—sffmc_healthtool. Returns a JSON diagnostic of plugin load order, hook collisions, missing-config warnings, and per-package health. Useful forsffmc doctor-style reports in a chat session.
Architecture
packages/cognition/src/index.ts— composes the three sub-features withmergeHooks()packages/cognition/src/max-mode/src/index.ts—maxMode()implementationpackages/cognition/src/compose/src/index.ts— skill registrypackages/cognition/src/health/src/index.ts— health tool implementation
Install
// ~/.config/opencode/opencode.json
{
"plugins": [
"npm:@sffmc/cognition@^0.15.4"
]
}Skills
See packages/cognition/src/compose/skills/ for the full list. Each .md file is a self-contained prompt fragment the LLM loads on demand:
ask.md— clarify ambiguous user input before actingbenchmark.md— measure baseline cost / latency / accuracy before optimizingbrainstorm.md— generate multiple candidate plans before picking onecode-review.md— second-pass review against the specdebug.md— diagnose a failing test or buildexecute.md— drive a known-good plan to completion, reporting only deviationsfeedback.md— turn user feedback into concrete action itemsmerge.md— orchestrate merges when multiple agents touched the same filesnew-skill.md— meta: write a new skill fileparallel.md— split a large task across parallel agentsplan.md— produce a numbered implementation plan from a vague goalreport.md— summarize progress and remaining workreview.md— adversarial review of an agent's worksubagent.md— launch a sub-agent with a clear scope and return formattdd.md— write a failing test first, then the implementationverify.md— confirm an implementation satisfies the original requirementworktree.md— manage isolated git worktrees for parallel work
