Summary
`context` is a supported memory type (has a TTL-168h branch in `harvest.py:753`) but the harvester's LLM classifier rejects it. All 13 context memories in the current vault are hand-written via `vault_remember`. This partially explains the skewed type distribution: 38% observation vs 2% context.
Root cause
`src/neurostack/harvest.py:647` — `_llm_classify` valid set:
```python
{"bug", "decision", "convention", "learning", "observation"}
```
`context` is missing. The LLM prompt at `harvest.py:600-604` also omits it. So even if the LLM tried to emit `context`, the classifier would reject it.
Downstream: the TTL-168h branch at `harvest.py:753` is unreachable from harvest — dead code until this is fixed.
Proposed fix
- Add `"context"` to the valid set at `harvest.py:647`.
- Extend the prompt at `harvest.py:600-604` to define context: ephemeral state, credentials, URLs, or session-scoped facts with a short TTL.
- While there: the observation prefilter at `harvest.py:488-492` over-captures (matches generic terms: credential, api-key, endpoint, host, port, url, stored at). Consider routing `credential`-pattern matches to `context` (short TTL) rather than permanent `observation`.
Expected effect
Unblocks the TTL-168h path. Starts populating the context bucket from sessions. Reduces observation noise by routing ephemeral facts to their intended bucket.
Key files
- `src/neurostack/harvest.py:488-493, 600-605, 647, 753`
Summary
`context` is a supported memory type (has a TTL-168h branch in `harvest.py:753`) but the harvester's LLM classifier rejects it. All 13 context memories in the current vault are hand-written via `vault_remember`. This partially explains the skewed type distribution: 38% observation vs 2% context.
Root cause
`src/neurostack/harvest.py:647` — `_llm_classify` valid set:
```python
{"bug", "decision", "convention", "learning", "observation"}
```
`context` is missing. The LLM prompt at `harvest.py:600-604` also omits it. So even if the LLM tried to emit `context`, the classifier would reject it.
Downstream: the TTL-168h branch at `harvest.py:753` is unreachable from harvest — dead code until this is fixed.
Proposed fix
Expected effect
Unblocks the TTL-168h path. Starts populating the context bucket from sessions. Reduces observation noise by routing ephemeral facts to their intended bucket.
Key files