Skip to content

feat: add full-convo-memory plugin for jq-based transcript search#393

Open
nhorton wants to merge 3 commits intomainfrom
add-full-convo-memory-plugin
Open

feat: add full-convo-memory plugin for jq-based transcript search#393
nhorton wants to merge 3 commits intomainfrom
add-full-convo-memory-plugin

Conversation

@nhorton
Copy link
Copy Markdown
Contributor

@nhorton nhorton commented Apr 21, 2026

Summary

  • New Claude Code plugin full-convo-memory (registered in the deepwork-plugins marketplace) that ships a /search_conversation skill and a scripts/search_conversation.sh helper. The script runs jq against the current session's jsonl transcript, auto-detecting the log file for both top-level sessions (CLAUDE_CODE_SESSION_ID) and sub-agents (CLAUDE_CODE_SESSION_ID + CLAUDE_CODE_AGENT_ID), filtering out compaction-summary messages, and appending a pointer line naming the resolved log file for fallback semantic search via an Explore sub-agent.
  • Formal spec at doc/specs/deepwork/cli_plugins/PLUG-REQ-004-full-convo-memory-plugin.md with 17 numbered sections, each verified by a mapped pytest in tests/unit/plugins/test_full_convo_memory_plugin.py (29 tests, all green).
  • Judgment-based SKILL.md content requirements covered by an anonymous DeepSchema at plugins/full-convo-memory/skills/search_conversation/.deepschema.SKILL.md.yml.
  • Minor repo-wide touches: moved existing THIS TEST VALIDATES comments above the def line in test_claude_plugin.py to match the .deepreview rule's placement requirement, and relaxed the test_file_quality REQ-ID pattern in .deepreview to allow three-level IDs (e.g. PLUG-REQ-004.1.2).

Test plan

  • uv run pytest tests/unit/plugins/ — 73 passed, 1 xfailed (pre-existing).
  • Manually exercised the script against the current session jsonl:
    • Happy path: top-level session (via CLAUDE_CODE_SESSION_ID).
    • Sub-agent path: both env vars set → resolves to …/<session>/subagents/agent-<agent_id>.jsonl.
    • Fallback: no env vars set → picks most-recently-modified jsonl in the project dir.
    • --log-file <path> override.
    • Zero-arg guard: prints usage on stderr, exits 2.
    • Compaction filter: verified against a session known to have isCompactSummary: true — raw file has 1 match, script output drops it.
  • DeepWork reviews (/review) run on the full diff twice — all rule categories pass after this commit.
  • JSON validity confirmed for plugin.json and marketplace.json.

🤖 Generated with Claude Code

nhorton and others added 3 commits April 17, 2026 14:38
New Claude Code plugin with a `search_conversation` skill that runs jq
against the current session's jsonl transcript. Auto-detects the log
file for both top-level sessions and sub-agents via CLAUDE_CODE_SESSION_ID
and CLAUDE_CODE_AGENT_ID, filters out compaction-summary messages, and
passes all other arguments to jq verbatim. Registered in the
deepwork-plugins marketplace alongside `deepwork` and `learning-agents`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The editable uv tool install is unnecessary now that plugin hooks
invoke deepwork via uvx directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds PLUG-REQ-004 with 17 numbered requirement sections covering the
plugin manifest, marketplace entry, directory layout, and each observable
behavior of search_conversation.sh (log-file resolution for top-level and
sub-agent contexts, compaction-summary filter, jq pass-through, exit-code
propagation, zero-arg guard, jq-missing handling, and trailing pointer
line).

Adds tests/unit/plugins/test_full_convo_memory_plugin.py (29 tests)
mapping each requirement clause to a pytest case, plus an anonymous
DeepSchema at plugins/full-convo-memory/skills/search_conversation/.deepschema.SKILL.md.yml
for the judgment-based SKILL.md content clauses.

Review fixes:
- Switch search_conversation.sh to `set -euo pipefail`, with `|| true`
  guards on the `find | xargs ls | head` fallback pipeline so a SIGPIPE
  from head doesn't abort the script. Explicitly `set +e` around the
  user's jq pipeline so the captured $? isn't masked by a later command.
- Change `# ---` section markers to `# ====`, matching the project
  convention in the shell_code_review rule.
- Guard against pipefail masking user jq success when the transcript
  contains malformed JSON lines.

Traceability-comment convention update:
- Move the two-line `THIS TEST VALIDATES` comment above the `def` line
  (matching the `.deepreview` rule's stated placement) in both the new
  test file and tests/unit/plugins/test_claude_plugin.py. No behavioral
  changes to tests/unit/plugins/test_claude_plugin.py.
- Update the `test_file_quality` rule in `.deepreview` to explicitly
  allow three-level REQ IDs (e.g. `PLUG-REQ-004.1.2`) alongside
  two-level IDs, matching how sub-clauses are numbered in REQ specs.

Update CHANGELOG Unreleased section and doc/architecture.md plugin tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant