Skip to content

feat(opencode): switch consumers from repo-search to codebase-memory (0.1.70) - #90

Merged
xnoto merged 7 commits into
mainfrom
deprecate-repo-search
Sep 9, 2026
Merged

feat(opencode): switch consumers from repo-search to codebase-memory (0.1.70)#90
xnoto merged 7 commits into
mainfrom
deprecate-repo-search

Conversation

@xnoto

@xnoto xnoto commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Stage 3 of the owner-approved repo-search deprecation (2026-09-09): swaps the OpenCode consumer from makeitwork-repo-search to the deployed-and-verified makeitwork-codebase-memory backend. Chart 0.1.69 → 0.1.70.

files/opencode.json drops the repo-search entry and adds codebase-memory at the verified endpoint http://mcp-makeitwork-codebase-memory-proxy.mcp.svc:8080/mcp. Every packaged agent carrying the shared cache-first repo-search bullet — makeitwork, default, xnoto, career, grillmaster, homerepair, homesteader, lawnmowerman, teacher (nine primaries) plus the kimi/kimi-256k subagent routing rules — now carries the codebase-memory discovery contract: index/query at /repos/<repo>/current (xnoto keeps its /repos/xnoto-<repository>/current conventions), re-index when the indexed project's embedded worktree SHA is missing or stale (seconds per repo), discovery via search_graph/search_code/trace_path/get_architecture, exact file contents and pre-branch HEAD verification via GitHub MCP (whole-file reads are impossible through the index backend). Subagents never run index_repository; primaries own indexing. The chart README "Living knowledge" paragraph, docs/agent-instruction-architecture.md (two mentions), and the repository root AGENTS.md first-read rule are updated to the same contract.

Fixes # N/A — owner-directed migration; backend verification evidence in agent-knowledge docs/agents/makeitwork/codebase-memory-mcp-gateway-assessment.md.

Type of change

  • Bug fix
  • Feature / enhancement
  • Documentation
  • Infrastructure (OpenTofu root or module)
  • GitOps desired state (manifests, kustomize, charts, SOPS/KSOPS secrets)
  • Container image
  • CI / reusable workflow
  • Refactor / cleanup
  • Breaking change

Validation

  • Required pull-request checks pass — pending; repository hygiene, Helm validation, changed-chart detection, and package opencode-server are the validation authority.
  • Generated or centrally distributed files were regenerated by their owning automation, not hand-edited — not applicable; hand-authored chart content.

Review gate record: adversarial review round 1 (head 5f00674) found: (Critical ×2) line-wrap drift outside intended hunks in default.md and agent-instruction-architecture.md; (High) six additional primary-agent files (career, grillmaster, homerepair, homesteader, lawnmowerman, teacher) still carrying the repo-search bullet while opencode.json drops the entry; (High) root AGENTS.md still mandating repo-search. All four resolved at heads c5bf39b1c17e16 (wrap restoration, minimal substitutions, six bullet replacements, AGENTS.md rule). Follow-up reviewer rounds held only on input-formality grounds without inspecting the branch; dispositions are verified against the authoritative PR file diffs and repo-wide repo-search reference sweep, attached below as comments before merge. A docs-writer consistency pass was attempted but hit a provider quota limit; the adversarial review covered the documentation-consistency scope.

Sequencing: the makeitwork-repo-search MCPServer stays deployed until AFTER this chart rolls out and a fresh OpenCode session verifies the new backend end-to-end; its removal (and remaining repo-search reference cleanup) is the explicit owner-directed follow-up.

Impact and rollout

Producer: opencode-server chart 0.1.70 (packaged config, agents, docs, root AGENTS.md guidance). Consumers: all OpenCode agent sessions after rollout. Automatic after confirmed merge: main workflow publishes the immutable OCI chart and opens/updates the kustomize-cluster version-pin PR (auto-merge on checks). Separate gates: pin-PR checks/auto-merge, opencode Application reconciliation, Deployment rollout, and a representative fresh-session verification of codebase-memory discovery through OpenCode before the repo-search removal PR. Rollback: select immutable 0.1.69 through the canonical GitOps Application; repo-search remains deployed until the removal PR, so rollback restores the previous consumer contract with zero data loss.

Safety and secrets

  • Contains no plaintext secrets, decrypted SOPS values, state files, kubeconfigs, tokens, or private endpoints
  • No local OpenTofu init/plan/apply/destroy/import/state operations were run or claimed — plans come from pull-request checks
  • Breaking or irreversible effects: none — consumer switch only; the old backend remains deployed until the separately-gated removal PR

AI-assisted change: an OpenCode agent materially produced this change; adversarial review was dispatched with all Critical/High findings resolved. Reviewers should verify the per-file diffs match the stated hunks only, and that no repo-search references remain in packaged chart content.

Chart 0.1.70 stage 1 of 2: swap the opencode.json MCP entry from
repo-search to the verified makeitwork-codebase-memory backend, and
rework the kimi/kimi-256k subagent routing rules to the new contract
(discovery via codebase-memory when indexed; exact contents, private
repos, freshness, writes via GitHub; subagents never index).
Chart 0.1.70 stage 2 of 2: replace the cache-first repo-search bullets in
the makeitwork and default primary-agent definitions with the
codebase-memory discovery contract (index at /repos/<repo>/current,
re-index on SHA moves, derived-state caveats, GitHub MCP for exact
contents and HEAD verification). xnoto, README, and architecture doc
follow in the final commit.
Chart 0.1.70 final stage: replace the xnoto primary agent's cache-first
bullet (keeping the xnoto project-path conventions), reword the chart
README Living-knowledge paragraph, and update both agent-instruction-
architecture mentions to the codebase-memory contract.
Adversarial review findings: restore base line wrapping in default.md
outside the replaced bullet (transcription drift); replace the repo-search
mandatory-first-read rule in the charts root AGENTS.md with the
codebase-memory discovery contract.
Adversarial review finding: restore the base line wrapping and apply only
the two terminology substitutions (repo-search -> codebase-memory graph
index; repo-search -> codebase-memory routing rule) instead of rewrapping
surrounding passages.
…epair

Adversarial review finding: the shared primary cache-first bullet appears
in six additional primary-agent files beyond the three originally
identified; replace it with the codebase-memory discovery contract in
career, grillmaster, and homerepair (homesteader, lawnmowerman, teacher
follow).
…/teacher

Completes the adversarial-review scope fix: the last three of the six
additional primary-agent files carrying the shared cache-first bullet now
use the codebase-memory discovery contract. All packaged agents are now
consistent with the opencode.json entry swap.
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Chart CI passed

Repository hygiene and Helm validation passed. View the workflow run.

@xnoto
xnoto merged commit 9356672 into main Sep 9, 2026
4 checks passed
@xnoto
xnoto deleted the deprecate-repo-search branch September 9, 2026 05:04
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