Skill: OpenCode Reconstituter
Goal
Use the reconstitute CLI to index OpenCode sessions into Chroma, search for relevant context, and generate reconstruction notes for a target path.
Use This Skill When
- You need to rebuild context for a project from OpenCode sessions.
- You want to generate
.reconstitute/outputartifacts for a target repo. - You need to run the
reconstituteloop with search and tool-assisted notes.
Do Not Use This Skill When
- You only need to search sessions without the reconstruction loop (use
opencode-session-search). - You only need raw snapshot diffs (use
opencode-extract-diffs). - The OpenCode session index is missing and you cannot run the index step.
Inputs
- Target path (for
runcommand) - Search query (for
searchcommand) - Environment configuration for OpenCode, Chroma, and Ollama
Steps
Index Sessions
- Ensure OpenCode, Chroma, and Ollama are available.
- Run the index command.
- Verify new records were upserted into the sessions collection.
Search Sessions
- Run a search query against the sessions collection.
- Review the
context_messagespayload.
Run Reconstitution
- Provide a target path under the workspace.
- Run the
reconstitute run <path>command. - Inspect the markdown output under
.reconstitute/output.
Output
- Indexed session embeddings in Chroma.
- Search results with
context_messagesfor Ollama. - Markdown descriptions and notes under
.reconstitute/output.
Common Commands
pnpm -C packages/reconstituter reconstitute index
pnpm -C packages/reconstituter reconstitute search "orgs/octave-commons/cephalon-clj websocket rpc"
pnpm -C packages/reconstituter reconstitute run orgs/octave-commons/cephalon-clj
Strong Hints
LEVEL_DIRdefaults to.reconstitute/level.OUTPUT_DIRdefaults to.reconstitute/output.CHROMA_COLLECTION_SESSIONSdefaults toopencode_messages_v1(model suffix appended).- Use
MAX_PATHSandMAX_PATH_EXTRACTION_PASSESto limit traversal.
References
- CLI implementation:
packages/reconstituter/src/reconstitute.ts - (Separate) OpenPlanner index/search:
packages/reconstituter/src/opencode-sessions.ts
Suggested Next Skills
Check the Skill Graph for the full workflow.
