Persistent memory layer for Claude Code, backed by your Obsidian vault. Three zones (sessions, projects, learnings), one master index, one append-only log.
  • Shell 98%
  • Python 2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
MillasAgent c34b34065b Merge pull request #13 from fix/installer-git-clone-prereqs: fix(installer): git_clone_bundle + prereq check (closes #11)
Closes Forgejo issue #11. The original 0.3.4 fix (PR #12) only patched the jsonc_require_python3 symbol-resolution symptom but did not address the underlying fetch bug at install.sh:97 where the URL duplicated the owner/repo segment. This PR replaces the broken API-REST listing with a single git clone --depth 1 against the public repo, and expands require_prereqs to check bash 4+/python3/git up front with distro-specific install instructions. Adds the byte-level URL regression test that would have caught the original bug at PR #12 review time. Closes #11.
2026-09-06 12:15:55 +00:00
workspace/opencode fix(installer): replace fetch_bundle_to_tmpdir with git_clone_bundle + prereq check 2026-09-06 14:05:02 +02:00
.gitignore fix(installer): replace fetch_bundle_to_tmpdir with git_clone_bundle + prereq check 2026-09-06 14:05:02 +02:00
AGENTS.md fix(installer): replace fetch_bundle_to_tmpdir with git_clone_bundle + prereq check 2026-09-06 14:05:02 +02:00
CHANGELOG.md fix(installer): replace fetch_bundle_to_tmpdir with git_clone_bundle + prereq check 2026-09-06 14:05:02 +02:00
README.md fix(installer): replace fetch_bundle_to_tmpdir with git_clone_bundle + prereq check 2026-09-06 14:05:02 +02:00

memory

Versioned archive of opencode configuration: agents, skills, and commands designed for a double-blind review and TDD-driven implementation workflow.

What this repo is

A single source of truth for an opencode setup that:

  • Orchestrates code review (security + architecture + analysis) with a double-blind guarantee between the two reviewers.
  • Provides conservative, plan-driven code implementation using TDD discipline.
  • Ships three end-to-end workflows (/init, /feature, /bugfix) plus four standalone commands.

The repository is the development space. Production lives at ~/.config/opencode/ and is populated by ./workspace/opencode/deploy.sh --install.

Repository structure

memory/
├── README.md                this file
├── CHANGELOG.md             Keep a Changelog
├── AGENTS.md                operational guide for AI agents (root-level; a copy is also deployed)
├── .gitignore               excludes .DS_Store, swap files, node_modules/, .codegraph/, logs
└── workspace/
    └── opencode/            versioned opencode configuration
        ├── deploy.sh        --check / --install
        ├── opencode.jsonc   default_agent + permission + mcp.codegraph (disabled)
        ├── install.sh       interactive Unix installer (delegates to upstream tools)
        ├── openmillas       Unix CLI shim: install / update / doctor / uninstall / version
        ├── lib/             shared shell helpers
        │   ├── jsonc.sh     JSONC strip + merge helpers (bash + python heredocs)
        │   └── _jsonc_strip.py  single-source JSONC-strip algorithm
        ├── tui.json         TUI plugin list (opencode-subagent-statusline)
        ├── AGENTS.md        deployed Context7 instructions (system-wide)
        ├── .gitignore       node_modules
        ├── agents/          8 agents (2 primaries: orchestrator + journalist, 6 subagents)
        ├── skills/          13 skills (5 workflow + 8 journalist)
        ├── command/         15 commands
        ├── editorial/       3 plain-Markdown policy docs (NOT auto-deployed; copy manually)
        ├── tests/           bash integration tests for installer + deploy
        └── codegraph/       project-scoped templates (NOT deployed)
            ├── README.md
            └── examples/    opencode.jsonc, opencode-mcp-only.jsonc,
                             AGENTS.md, SCENARIO_PLAYBOOK

Unix only. The PowerShell port (install.ps1, openmillas.ps1) is planned for a follow-up release — see TD-24 in AGENTS.md.

Quick start

# 1. Validate the configuration locally
./workspace/opencode/deploy.sh --check

# 2. Install into ~/.config/opencode/
./workspace/opencode/deploy.sh --install

# 3. Restart opencode (config is not hot-reloaded)

The bundle ships no MCP servers enabled and no third-party services by default. Run the interactive installer for an opt-in flow, or add Context7 / codegraph / subagent-statusline manually via the §Optional integrations section below.

The bundle ships with the codegraph MCP server declared but disabled (mcp.codegraph.enabled: false). To activate, install codegraph via the installer or follow the manual steps in §Optional integrations.

The install script:

  • Backs up the previous ~/.config/opencode/{agents,skills,command} to ~/.config/opencode/backups/<timestamp>/.
  • Copies the versioned files into place.
  • Patches ~/.config/opencode/opencode.json minimally: only adds default_agent: orchestrator and permission.skill: { "*": "allow" } if those keys are not already present. Every other key is preserved.

Prerequisites

The installer checks for these on the host up front and exits with a distro-specific install hint if any is missing:

  • bash 4.0+
  • python3 (3.6+ recommended; stdlib only — no PyYAML needed for the install path)
  • git (any 2.x release)

For the full per-distro list (apt / dnf / brew / apk), run the installer on a host that's missing one and read its heredoc output, or read install.shrequire_prereqs.

Install

curl -fsSL https://git.millaredos.com/MillasDev/memory/raw/branch/main/workspace/opencode/install.sh | bash

Or clone the repo and run bash workspace/opencode/install.sh. The installer is interactive; it offers to delegate to upstream installers (npx ctx7 setup, codegraph install, npm i -g opencode-subagent-statusline) — none are required.

After install, the openmillas CLI is available on PATH:

Subcommand Effect
openmillas install Re-run the install flow (idempotent).
openmillas update Compare against the latest version; prompt to update.
openmillas doctor Verify environment, file counts, JSONC validity, PATH.
openmillas uninstall Remove bundle + CLI; preserve user's opencode.jsonc.
openmillas version Print version (add --remote to compare against latest).

The legacy deploy.sh --check / --install flow continues to work for users who prefer it.

Third-party services

This bundle does not enable any third-party service by default. The installer offers three optional integrations; you opt in explicitly and the installer delegates to each upstream installer.

Context7 (context7.com, github.com/upstash/context7) — hosted MCP server for up-to-date documentation. MIT-licensed. Free tier + paid plans for higher rate limits. Installer delegates to npx ctx7 setup.

codegraph (github.com/colbymchenry/codegraph) — MIT-licensed Rust-based code intelligence tool. Pre-wired in the bundle (the codegraph agent and eight /codegraph* commands). Installer delegates to codegraph install after the upstream curl | sh install.

subagent-statusline (github.com/Joaquinvesapa/sub-agent-statusline) — MIT-licensed TUI sidebar plugin. Already referenced in the bundle's tui.json. Installer delegates to npm i -g opencode-subagent-statusline.

The bundle does not redistribute any third-party code; it only references upstream installers and config keys.

Optional integrations

To manually add a service after running its upstream installer, edit ~/.config/opencode/opencode.jsonc and add the corresponding mcp.<name> block:

"mcp": {
  "context7": {
    "type": "remote",
    "url": "https://mcp.context7.com/mcp",
    "enabled": true
  },
  "codegraph": {
    "type": "local",
    "command": ["codegraph", "serve", "--mcp"],
    "enabled": true
  }
}

Agents (8)

Agent Mode Role
orchestrator primary Directs the seven flows; never executes reviews itself.
code-analyzer subagent Static analysis: complexity, smells, duplication, dependencies.
architect subagent Architecture analysis and implementation plans.
code-implementer subagent Conservative TDD implementation of an approved plan.
security-auditor subagent OWASP Top 10 + ASVS audit. Double-blind.
arch-quality-reviewer subagent SOLID, DDD, patterns. Double-blind.
codegraph subagent CPG-focused analysis (callers, taint, hotspots). Routes the eight /review, /audit, /explain, /onboard, /update, /status, /next, /continue commands.
journalist primary Spanish-language research and editorial workflow for millaredos.com; produces dossiers, scripts, articles, packaging. Reachable only via TUI Tab selection.

The two reviewers have permission.task: deny so they cannot see each other's context. The orchestrator launches them in parallel and consolidates the result.

Skills (13)

Skill When to load
owasp-checklist Security audits and vulnerability scans.
arch-patterns Architecture review and pattern checks.
review-formats Producing code review reports.
diff-context At the start of any review or implementation.
implementation-guide TDD micro-cycles and edit discipline.
research Background research and source triangulation for editorial pieces.
fact-check Claim-by-claim verification against cited sources.
editorial-review Editorial pass: structure, clarity, tone, headline craft.
seo-wordpress WordPress SEO (slug, meta, focus keyword, JSON-LD schema).
wordpress-publish WordPress MCP publication (two-stage approval).
youtube-script Long-form YouTube script structure (Hook → Acts → CTA).
fliki Fliki.ai text-to-video workflow (stock + AI prompt mapping).
youtube-packaging YouTube packaging: title, description, thumbnail concept.

Commands (15)

The bundle ships no journalist command — the journalist agent is selected manually via the opencode TUI (Tab key). This is intentional: the orchestrator's task: allowlist is a strict double-blind discipline; adding the journalist to it would let orchestrator flows dispatch the journalist, bypassing the user-driven approval gates in editorial/publication-policy.md.

Workflow commands (orchestrator)

Command What it does
/init Initialize the workspace. If empty, interviews the user and scaffolds project files. Otherwise, summarizes structure and writes AGENTS.md.
/feature <description> [<scope>] Full feature workflow: branch, analyze, architect, implement, double-blind review, docs, push, draft PR, ready-for-review.
/bugfix <description> [<scope>] Full bugfix workflow: reproduce, root-cause, failing test, fix, double-blind review, push, draft PR.
/code-review [<scope>] Double-blind code review of an existing diff.
/deep-analyze [<scope>] Technical analysis without reviewers.
/security-scan [<scope>] Standalone OWASP/ASVS scan.
/implement <plan> Apply an already-approved implementation plan.

CodeGraph-powered commands (CPG agent)

These route to the codegraph agent and require the CodeGraph MCP server — see §Third-party services.

Command What it does
/review CPG-powered diff review (callers, taint, impact).
/audit Full codebase audit via the compose tool.
/explain <name> Deep function analysis with call graph and metrics.
/onboard <topic> Focused onboarding around a question or topic.
/update CPG freshness check and incremental update.
/status Unified status across freshness and review trace.
/next Suggest the next best command.
/continue Safely execute the next workflow step.

Journalist workflow

The journalist agent is a second mode: primary agent (the first is orchestrator). It produces Spanish-language content for the millaredos.com YouTube channel and blog (history of technology, 15-30 min videos).

Workflow:

  1. Research — The research skill produces projects/<n>-<slug>/research.md, a dossier with a claims table at the end. Every claim has a [C-NNN] ID, a tier (T1-T4), a source URL, an accessed date, and a confidence.
  2. Fact-check — The fact-check skill audits the dossier against editorial/source-policy.md. Flags T4-standalone, missing fields, vague disputed framing. Never invents new claims.
  3. Script — The youtube-script skill produces guion.md in Spanish from Spain, with structure Hook → Promise → Act I → Act II → Act III → Closing → CTA. Every claim cites [C-NNN]. Visual cues default to [STOCK].
  4. Iterate — The user reviews guion.md; the agent applies changes and appends a new iteration block. editorial-review --annotate can pre-mark [REVISAR:] / [PELIGRO:] notes.
  5. SEO + packagingseo-wordpress produces articulo.md SEO metadata; youtube-packaging produces packaging.md (3 title candidates, thumbnail concept, description with timestamps).
  6. Optional publicationwordpress-publish creates a draft in WordPress via MCP (stage 1); the user reviews and explicitly approves "publish now" for stage 2.

Editorial policy lives at ~/.config/opencode/editorial/{style-guide,source-policy,publication-policy}.md and is read at the start of every project. These files are NOT auto-deployed — copy them manually once: cp -a workspace/opencode/editorial ~/.config/opencode/.

CodeGraph integration (optional)

The bundle's codegraph agent is pre-wired with the mcp.codegraph MCP server (see workspace/opencode/opencode.jsonc). To activate:

  1. Install the upstream Rust binary: curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
  2. Run codegraph install to wire up the MCP server.
  3. In ~/.config/opencode/opencode.jsonc, set mcp.codegraph.enabled to true.
  4. Restart opencode.

Without CodeGraph installed, the codegraph agent and the eight /codegraph* commands fall back to plain text search (grep/glob/Read).

Conventions

All configuration files follow the opencode conventions:

  • Agents: markdown with YAML frontmatter (description required, mode, permission, optional temperature, steps). Model is not pinned in the agent file — each agent inherits the model configured by the provider at runtime, so you can switch providers or models without editing every agent.
  • Skills: skills/<name>/SKILL.md with name matching the folder and matching the regex ^[a-z0-9]+(-[a-z0-9]+)*$. description between 1 and 1024 chars.
  • Commands: command/<name>.md with non-empty description and non-empty body. agent: (when present) is one of orchestrator (workflow commands) or codegraph (CPG commands).
  • Branches: feat/<slug> for new work, fix/<slug> for bugfixes. Slug = kebab-case, lowercase. Draft PRs are opened automatically when a remote + gh CLI are available (this repo's remote is Gitea, so gh is not used).

All configuration files are written in English.

Contributing

  1. Add or modify a file under workspace/opencode/.
  2. Run ./workspace/opencode/deploy.sh --check to validate frontmatter, naming, and structure.
  3. Update CHANGELOG.md under the appropriate section.
  4. Open a pull request.