opencode-metis 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -0
- package/dist/cli.cjs +63 -0
- package/dist/mcp-server.cjs +51 -0
- package/dist/plugin.cjs +4 -0
- package/dist/worker.cjs +224 -0
- package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
- package/opencode/agent/the-analyst/market-research.md +77 -0
- package/opencode/agent/the-analyst/project-coordination.md +81 -0
- package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
- package/opencode/agent/the-architect/compatibility-review.md +138 -0
- package/opencode/agent/the-architect/complexity-review.md +137 -0
- package/opencode/agent/the-architect/quality-review.md +67 -0
- package/opencode/agent/the-architect/security-review.md +127 -0
- package/opencode/agent/the-architect/system-architecture.md +119 -0
- package/opencode/agent/the-architect/system-documentation.md +83 -0
- package/opencode/agent/the-architect/technology-research.md +85 -0
- package/opencode/agent/the-chief.md +79 -0
- package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
- package/opencode/agent/the-designer/design-foundation.md +74 -0
- package/opencode/agent/the-designer/interaction-architecture.md +75 -0
- package/opencode/agent/the-designer/user-research.md +70 -0
- package/opencode/agent/the-meta-agent.md +155 -0
- package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
- package/opencode/agent/the-platform-engineer/containerization.md +106 -0
- package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
- package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
- package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
- package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
- package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
- package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
- package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
- package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
- package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
- package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
- package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
- package/opencode/agent/the-software-engineer/api-development.md +78 -0
- package/opencode/agent/the-software-engineer/component-development.md +79 -0
- package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
- package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
- package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
- package/opencode/command/analyze.md +149 -0
- package/opencode/command/constitution.md +178 -0
- package/opencode/command/debug.md +194 -0
- package/opencode/command/document.md +178 -0
- package/opencode/command/implement.md +225 -0
- package/opencode/command/refactor.md +207 -0
- package/opencode/command/review.md +229 -0
- package/opencode/command/simplify.md +267 -0
- package/opencode/command/specify.md +191 -0
- package/opencode/command/validate.md +224 -0
- package/opencode/skill/accessibility-design/SKILL.md +566 -0
- package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
- package/opencode/skill/agent-coordination/SKILL.md +224 -0
- package/opencode/skill/api-contract-design/SKILL.md +550 -0
- package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
- package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
- package/opencode/skill/architecture-design/SKILL.md +160 -0
- package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
- package/opencode/skill/architecture-design/template.md +749 -0
- package/opencode/skill/architecture-design/validation.md +99 -0
- package/opencode/skill/architecture-selection/SKILL.md +522 -0
- package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
- package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
- package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
- package/opencode/skill/code-quality-review/SKILL.md +337 -0
- package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
- package/opencode/skill/code-quality-review/reference.md +322 -0
- package/opencode/skill/code-review/SKILL.md +363 -0
- package/opencode/skill/code-review/reference.md +450 -0
- package/opencode/skill/codebase-analysis/SKILL.md +139 -0
- package/opencode/skill/codebase-navigation/SKILL.md +227 -0
- package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
- package/opencode/skill/coding-conventions/SKILL.md +178 -0
- package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
- package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
- package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
- package/opencode/skill/constitution-validation/SKILL.md +315 -0
- package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
- package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
- package/opencode/skill/constitution-validation/template.md +115 -0
- package/opencode/skill/context-preservation/SKILL.md +445 -0
- package/opencode/skill/data-modeling/SKILL.md +385 -0
- package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
- package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
- package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
- package/opencode/skill/documentation-extraction/SKILL.md +259 -0
- package/opencode/skill/documentation-sync/SKILL.md +431 -0
- package/opencode/skill/domain-driven-design/SKILL.md +509 -0
- package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
- package/opencode/skill/domain-driven-design/reference.md +465 -0
- package/opencode/skill/drift-detection/SKILL.md +383 -0
- package/opencode/skill/drift-detection/reference.md +340 -0
- package/opencode/skill/error-recovery/SKILL.md +162 -0
- package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
- package/opencode/skill/feature-prioritization/SKILL.md +419 -0
- package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
- package/opencode/skill/feature-prioritization/reference.md +256 -0
- package/opencode/skill/git-workflow/SKILL.md +453 -0
- package/opencode/skill/implementation-planning/SKILL.md +215 -0
- package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
- package/opencode/skill/implementation-planning/template.md +220 -0
- package/opencode/skill/implementation-planning/validation.md +88 -0
- package/opencode/skill/implementation-verification/SKILL.md +272 -0
- package/opencode/skill/knowledge-capture/SKILL.md +265 -0
- package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
- package/opencode/skill/knowledge-capture/reference.md +444 -0
- package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
- package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
- package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
- package/opencode/skill/observability-design/SKILL.md +291 -0
- package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
- package/opencode/skill/pattern-detection/SKILL.md +171 -0
- package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
- package/opencode/skill/performance-analysis/SKILL.md +266 -0
- package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
- package/opencode/skill/requirements-analysis/SKILL.md +139 -0
- package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
- package/opencode/skill/requirements-analysis/template.md +177 -0
- package/opencode/skill/requirements-analysis/validation.md +69 -0
- package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
- package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
- package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
- package/opencode/skill/safe-refactoring/SKILL.md +312 -0
- package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
- package/opencode/skill/security-assessment/SKILL.md +421 -0
- package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
- package/opencode/skill/specification-management/SKILL.md +143 -0
- package/opencode/skill/specification-management/readme-template.md +32 -0
- package/opencode/skill/specification-management/reference.md +115 -0
- package/opencode/skill/specification-management/spec.py +229 -0
- package/opencode/skill/specification-validation/SKILL.md +397 -0
- package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
- package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
- package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
- package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
- package/opencode/skill/task-delegation/SKILL.md +607 -0
- package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
- package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
- package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
- package/opencode/skill/task-delegation/reference.md +825 -0
- package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
- package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
- package/opencode/skill/technical-writing/SKILL.md +190 -0
- package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
- package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
- package/opencode/skill/test-design/SKILL.md +464 -0
- package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
- package/opencode/skill/testing/SKILL.md +213 -0
- package/opencode/skill/testing/examples/test-pyramid.md +724 -0
- package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
- package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
- package/opencode/skill/user-research/SKILL.md +508 -0
- package/opencode/skill/user-research/examples/interview-questions.md +265 -0
- package/opencode/skill/user-research/examples/personas.md +267 -0
- package/opencode/skill/vibe-security/SKILL.md +654 -0
- package/package.json +45 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-preservation
|
|
3
|
+
description: Preserve and restore session context across conversations. Use when completing significant work, switching contexts, or resuming previous work. Captures decisions, progress, blockers, and important discoveries. Enables seamless context handoff between sessions.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
category: development
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Context Preservation
|
|
12
|
+
|
|
13
|
+
Roleplay as a context preservation specialist that captures and restores important session information for continuity across conversations.
|
|
14
|
+
|
|
15
|
+
ContextPreservation {
|
|
16
|
+
Activation {
|
|
17
|
+
When completing significant work - Capture context before session ends
|
|
18
|
+
When switching contexts - Moving to different task/project
|
|
19
|
+
When hitting a blocker - Document state before pausing
|
|
20
|
+
When making important decisions - Record rationale for future reference
|
|
21
|
+
When resuming previous work - Restore context from prior session
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Constraints {
|
|
25
|
+
WhatToPreserve {
|
|
26
|
+
| Category | Examples | Priority |
|
|
27
|
+
| --------------- | -------------------------------------------------------- | -------- |
|
|
28
|
+
| **Decisions** | Architectural choices, trade-offs, rejected alternatives | HIGH |
|
|
29
|
+
| **Progress** | Completed tasks, current state, next steps | HIGH |
|
|
30
|
+
| **Blockers** | What's blocking, what was tried, potential solutions | HIGH |
|
|
31
|
+
| **Discoveries** | Patterns found, gotchas, undocumented behaviors | MEDIUM |
|
|
32
|
+
| **Context** | Files modified, dependencies, related specs | MEDIUM |
|
|
33
|
+
| **References** | Relevant docs, external resources, code locations | LOW |
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
WhatNOTToPreserve {
|
|
37
|
+
- Entire file contents (reference paths instead)
|
|
38
|
+
- Obvious/generic information
|
|
39
|
+
- Temporary debugging output
|
|
40
|
+
- Sensitive data (secrets, credentials)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ContextFileFormat {
|
|
45
|
+
Location {
|
|
46
|
+
Context files are stored in `.config/opencode/context/`:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
.config/opencode/
|
|
50
|
+
└── context/
|
|
51
|
+
├── session-2024-01-15-auth-implementation.md
|
|
52
|
+
├── session-2024-01-16-api-refactor.md
|
|
53
|
+
└── active-context.md # Current/most recent
|
|
54
|
+
```
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
FileStructure {
|
|
58
|
+
```markdown
|
|
59
|
+
# Session Context: [Brief Title]
|
|
60
|
+
|
|
61
|
+
**Date**: [YYYY-MM-DD HH:MM]
|
|
62
|
+
**Duration**: [Approximate session length]
|
|
63
|
+
**Task**: [What was being worked on]
|
|
64
|
+
|
|
65
|
+
## Summary
|
|
66
|
+
|
|
67
|
+
[2-3 sentence summary of what was accomplished and current state]
|
|
68
|
+
|
|
69
|
+
## Decisions Made
|
|
70
|
+
|
|
71
|
+
### [Decision 1 Title]
|
|
72
|
+
|
|
73
|
+
**Choice**: [What was decided]
|
|
74
|
+
**Alternatives Considered**: [Other options]
|
|
75
|
+
**Rationale**: [Why this choice]
|
|
76
|
+
**Impact**: [What this affects]
|
|
77
|
+
|
|
78
|
+
### [Decision 2 Title]
|
|
79
|
+
|
|
80
|
+
...
|
|
81
|
+
|
|
82
|
+
## Progress
|
|
83
|
+
|
|
84
|
+
### Completed
|
|
85
|
+
|
|
86
|
+
- [x] [Task 1]
|
|
87
|
+
- [x] [Task 2]
|
|
88
|
+
|
|
89
|
+
### In Progress
|
|
90
|
+
|
|
91
|
+
- [ ] [Current task] - [Current state]
|
|
92
|
+
|
|
93
|
+
### Next Steps
|
|
94
|
+
|
|
95
|
+
1. [Next action 1]
|
|
96
|
+
2. [Next action 2]
|
|
97
|
+
|
|
98
|
+
## Blockers
|
|
99
|
+
|
|
100
|
+
### [Blocker 1]
|
|
101
|
+
|
|
102
|
+
**Issue**: [What's blocking]
|
|
103
|
+
**Attempted**: [What was tried]
|
|
104
|
+
**Potential Solutions**: [Ideas to explore]
|
|
105
|
+
|
|
106
|
+
## Key Discoveries
|
|
107
|
+
|
|
108
|
+
### [Discovery 1]
|
|
109
|
+
|
|
110
|
+
**Finding**: [What was discovered]
|
|
111
|
+
**Location**: [File:line or general area]
|
|
112
|
+
**Implication**: [How this affects work]
|
|
113
|
+
|
|
114
|
+
## Files Modified
|
|
115
|
+
|
|
116
|
+
| File | Changes | Status |
|
|
117
|
+
| ------------ | ---------------------- | ----------- |
|
|
118
|
+
| src/auth.ts | Added login validation | Complete |
|
|
119
|
+
| src/users.ts | Started refactor | In progress |
|
|
120
|
+
|
|
121
|
+
## References
|
|
122
|
+
|
|
123
|
+
- [Relevant spec]: docs/specs/001-auth/
|
|
124
|
+
- [External doc]: https://...
|
|
125
|
+
- [Code pattern]: src/utils/validation.ts
|
|
126
|
+
|
|
127
|
+
## Resume Instructions
|
|
128
|
+
|
|
129
|
+
When resuming this work:
|
|
130
|
+
|
|
131
|
+
1. [Specific action to take first]
|
|
132
|
+
2. [Context to load]
|
|
133
|
+
3. [Things to verify]
|
|
134
|
+
```
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
CaptureProtocol {
|
|
139
|
+
EndOfSessionCapture {
|
|
140
|
+
When significant work is being completed or session is ending:
|
|
141
|
+
|
|
142
|
+
Step1_IdentifyKeyContext {
|
|
143
|
+
Ask yourself:
|
|
144
|
+
- What decisions were made that someone else (or future me) needs to know?
|
|
145
|
+
- What is the current state of the work?
|
|
146
|
+
- What are the next logical steps?
|
|
147
|
+
- What blockers or challenges were encountered?
|
|
148
|
+
- What non-obvious things were discovered?
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
Step2_GenerateContextFile {
|
|
152
|
+
```bash
|
|
153
|
+
# Create context directory if needed
|
|
154
|
+
mkdir -p .config/opencode/context
|
|
155
|
+
|
|
156
|
+
# Generate timestamped filename
|
|
157
|
+
filename=".config/opencode/context/session-$(date +%Y-%m-%d)-[task-slug].md"
|
|
158
|
+
```
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
Step3_WriteContext {
|
|
162
|
+
Use the file structure template above, focusing on:
|
|
163
|
+
- Be specific: Include file paths, line numbers, exact values
|
|
164
|
+
- Be concise: Bullet points over paragraphs
|
|
165
|
+
- Be actionable: Next steps should be clear enough to execute
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
DecisionCapture {
|
|
170
|
+
When an important decision is made during the session:
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
### [Decision Title]
|
|
174
|
+
|
|
175
|
+
**Context**: [Why this decision came up]
|
|
176
|
+
**Options Evaluated**:
|
|
177
|
+
|
|
178
|
+
1. [Option A] - [Pros/Cons]
|
|
179
|
+
2. [Option B] - [Pros/Cons]
|
|
180
|
+
3. [Option C] - [Pros/Cons]
|
|
181
|
+
|
|
182
|
+
**Chosen**: [Option X]
|
|
183
|
+
**Rationale**: [Why this option]
|
|
184
|
+
**Trade-offs**: [What we're giving up]
|
|
185
|
+
**Reversibility**: [How hard to change later]
|
|
186
|
+
```
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
BlockerCapture {
|
|
190
|
+
When encountering a blocker:
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
### [Blocker Title]
|
|
194
|
+
|
|
195
|
+
**Symptom**: [What's happening]
|
|
196
|
+
**Expected**: [What should happen]
|
|
197
|
+
**Root Cause**: [If known] / **Suspected**: [If unknown]
|
|
198
|
+
|
|
199
|
+
**Investigation Log**:
|
|
200
|
+
|
|
201
|
+
1. Tried [X] -> Result: [Y]
|
|
202
|
+
2. Tried [A] -> Result: [B]
|
|
203
|
+
|
|
204
|
+
**Blocked On**: [Specific thing needed]
|
|
205
|
+
**Workaround**: [If any exists]
|
|
206
|
+
**Escalation**: [Who/what could help]
|
|
207
|
+
```
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
RestoreProtocol {
|
|
212
|
+
SessionStartRestoration {
|
|
213
|
+
When resuming previous work:
|
|
214
|
+
|
|
215
|
+
Step1_CheckForContext {
|
|
216
|
+
```bash
|
|
217
|
+
# Find recent context files
|
|
218
|
+
ls -la .config/opencode/context/*.md
|
|
219
|
+
|
|
220
|
+
# Check for active context
|
|
221
|
+
cat .config/opencode/context/active-context.md
|
|
222
|
+
```
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
Step2_LoadContext {
|
|
226
|
+
Read the context file and present a summary:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
Previous Session Context Found
|
|
230
|
+
|
|
231
|
+
Session: [Title] ([Date])
|
|
232
|
+
Summary: [Brief summary]
|
|
233
|
+
|
|
234
|
+
Decisions Made: [N]
|
|
235
|
+
Current Progress: [Status]
|
|
236
|
+
Next Steps: [First 2-3 items]
|
|
237
|
+
Open Blockers: [N]
|
|
238
|
+
|
|
239
|
+
Resume from: [Suggested starting point]
|
|
240
|
+
|
|
241
|
+
Would you like to:
|
|
242
|
+
1. Continue from where we left off
|
|
243
|
+
2. Review full context first
|
|
244
|
+
3. Start fresh (archive this context)
|
|
245
|
+
```
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
Step3_ApplyContext {
|
|
249
|
+
When continuing:
|
|
250
|
+
- Load relevant files mentioned in context
|
|
251
|
+
- Verify assumptions still hold (code hasn't changed)
|
|
252
|
+
- Pick up from documented next steps
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
ContextCompression {
|
|
258
|
+
ForLongRunningWork {
|
|
259
|
+
When context accumulates over multiple sessions:
|
|
260
|
+
|
|
261
|
+
MergeStrategy {
|
|
262
|
+
```markdown
|
|
263
|
+
# Consolidated Context: [Project/Feature Name]
|
|
264
|
+
|
|
265
|
+
**Active Period**: [Start date] - [Current date]
|
|
266
|
+
**Total Sessions**: [N]
|
|
267
|
+
|
|
268
|
+
## Executive Summary
|
|
269
|
+
|
|
270
|
+
[High-level summary of entire effort]
|
|
271
|
+
|
|
272
|
+
## Key Decisions (All Sessions)
|
|
273
|
+
|
|
274
|
+
| Date | Decision | Rationale |
|
|
275
|
+
| ------ | ---------- | ----------------- |
|
|
276
|
+
| [Date] | [Decision] | [Brief rationale] |
|
|
277
|
+
|
|
278
|
+
## Current State
|
|
279
|
+
|
|
280
|
+
[As of most recent session]
|
|
281
|
+
|
|
282
|
+
## Complete History
|
|
283
|
+
|
|
284
|
+
<details>
|
|
285
|
+
<summary>Session 1: [Date] - [Title]</summary>
|
|
286
|
+
[Collapsed content from session 1]
|
|
287
|
+
</details>
|
|
288
|
+
|
|
289
|
+
<details>
|
|
290
|
+
<summary>Session 2: [Date] - [Title]</summary>
|
|
291
|
+
[Collapsed content from session 2]
|
|
292
|
+
</details>
|
|
293
|
+
```
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
Archival {
|
|
297
|
+
Old context files should be:
|
|
298
|
+
1. Merged into consolidated context
|
|
299
|
+
2. Moved to `.config/opencode/context/archive/`
|
|
300
|
+
3. Retained for reference but not auto-loaded
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
IntegrationWithOtherWorkflows {
|
|
306
|
+
WithSpecifications {
|
|
307
|
+
When working on a spec-based implementation:
|
|
308
|
+
|
|
309
|
+
```markdown
|
|
310
|
+
## Specification Context
|
|
311
|
+
|
|
312
|
+
Spec: [ID] - [Name]
|
|
313
|
+
Location: docs/specs/[ID]-[name]/
|
|
314
|
+
|
|
315
|
+
Progress vs Spec:
|
|
316
|
+
|
|
317
|
+
- PRD: [Status]
|
|
318
|
+
- SDD: [Status]
|
|
319
|
+
- PLAN: [Phase X of Y]
|
|
320
|
+
|
|
321
|
+
Deviations from Spec:
|
|
322
|
+
|
|
323
|
+
- [Any changes made from original plan]
|
|
324
|
+
```
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
WithImplementation {
|
|
328
|
+
When implementing features:
|
|
329
|
+
|
|
330
|
+
```markdown
|
|
331
|
+
## Implementation Context
|
|
332
|
+
|
|
333
|
+
Branch: feature/[name]
|
|
334
|
+
Base: main (at commit [sha])
|
|
335
|
+
|
|
336
|
+
Files in Progress:
|
|
337
|
+
| File | State | % Complete |
|
|
338
|
+
|------|-------|------------|
|
|
339
|
+
| [path] | [state] | [N]% |
|
|
340
|
+
|
|
341
|
+
Tests:
|
|
342
|
+
|
|
343
|
+
- [N] passing
|
|
344
|
+
- [N] failing
|
|
345
|
+
- [N] pending
|
|
346
|
+
```
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
WithReview {
|
|
350
|
+
When in the middle of code review:
|
|
351
|
+
|
|
352
|
+
```markdown
|
|
353
|
+
## Review Context
|
|
354
|
+
|
|
355
|
+
PR/Branch: [identifier]
|
|
356
|
+
Review State: [In progress / Feedback given / Awaiting response]
|
|
357
|
+
|
|
358
|
+
Findings So Far:
|
|
359
|
+
|
|
360
|
+
- Critical: [N]
|
|
361
|
+
- High: [N]
|
|
362
|
+
- Medium: [N]
|
|
363
|
+
|
|
364
|
+
Outstanding Questions:
|
|
365
|
+
|
|
366
|
+
- [Question 1]
|
|
367
|
+
- [Question 2]
|
|
368
|
+
```
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
AutomaticContextTriggers {
|
|
373
|
+
HighPriorityTriggers {
|
|
374
|
+
Always Capture:
|
|
375
|
+
- Session ending with uncommitted significant work
|
|
376
|
+
- Hitting a blocker that requires external input
|
|
377
|
+
- Making architectural decisions
|
|
378
|
+
- Discovering undocumented system behavior
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
MediumPriorityTriggers {
|
|
382
|
+
Suggest Capture:
|
|
383
|
+
- Completing a major phase of work
|
|
384
|
+
- Switching to a different task/context
|
|
385
|
+
- After 30+ minutes of focused work
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
ContextRestorationTriggers {
|
|
389
|
+
- Starting session in directory with `.config/opencode/context/`
|
|
390
|
+
- User mentions "continue", "resume", "where were we"
|
|
391
|
+
- Detecting in-progress work (uncommitted changes + context file)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
OutputFormats {
|
|
396
|
+
WhenCapturingContext {
|
|
397
|
+
```
|
|
398
|
+
Context Preserved
|
|
399
|
+
|
|
400
|
+
Session: [Title]
|
|
401
|
+
Saved to: .config/opencode/context/[filename].md
|
|
402
|
+
|
|
403
|
+
Captured:
|
|
404
|
+
- [N] decisions
|
|
405
|
+
- [N] progress items
|
|
406
|
+
- [N] blockers
|
|
407
|
+
- [N] discoveries
|
|
408
|
+
|
|
409
|
+
Resume command: "Continue from [session name]"
|
|
410
|
+
```
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
WhenRestoringContext {
|
|
414
|
+
```
|
|
415
|
+
Context Restored
|
|
416
|
+
|
|
417
|
+
Session: [Title] from [Date]
|
|
418
|
+
Status: [Current state summary]
|
|
419
|
+
|
|
420
|
+
Ready to continue with:
|
|
421
|
+
1. [First next step]
|
|
422
|
+
2. [Second next step]
|
|
423
|
+
|
|
424
|
+
[N] blockers still open
|
|
425
|
+
[N] decisions to consider
|
|
426
|
+
```
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
WhenNoContextFound {
|
|
430
|
+
```
|
|
431
|
+
No Previous Context Found
|
|
432
|
+
|
|
433
|
+
This appears to be a fresh start. As you work, I'll:
|
|
434
|
+
- Track significant decisions
|
|
435
|
+
- Note blockers and discoveries
|
|
436
|
+
- Preserve context when session ends
|
|
437
|
+
|
|
438
|
+
Would you like to:
|
|
439
|
+
1. Start fresh
|
|
440
|
+
2. Check for context in parent directory
|
|
441
|
+
3. Create initial context from current state
|
|
442
|
+
```
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|