run-delivery-chain
Skill0 starsChanged 5 months agoMITView on GitHub
Build, run, test, and drive the delivery-chain Claude Code plugin. Use when asked to run delivery-chain, run its tests, exercise the agent-memory hook sidecar, or verify the plugin's runtime works on this machine.
- Reads credentials
In this repository63 other files it gives its agents.
- .claude/skills/nestjs-best-practices/AGENTS.mdAGENTS.md
- accessibility-a11ySkill
- architecture-blueprint-generatorSkill
- backend-delivery-loopSkill
- backend-designSkill
- backend-dev-guidelinesSkill
- backend-testingSkill
- backend-to-frontend-handoff-docsSkill
- building-componentsSkill
- bullmq-specialistSkill
- canvas-designSkill
- code-patternsSkill
- components-composition-patternsSkill
- conventional-commitSkill
- core-web-vitalsSkill
- create-svgSkill
- css-architectureSkill
- cypress-authorSkill
- cypress-docsSkill
- cypress-explainSkill
- delivery-loop-retroSkill
- diagnoseSkill
- fastify-best-practicesSkill
- figma-code-connectSkill
- frontend-delivery-loopSkill
- frontend-fundamentalsSkill
- fullstack-delivery-loopSkill
- grill-meSkill
- hunt-race-conditionSkill
- impeccableSkill
- mermaid-diagramsSkill
- nestjs-best-practicesSkill
- nextjs-best-practicesSkill
- nextjs-performanceSkill
- nodejs-backend-patternsSkill
- owasp-security-reviewSkill
- performance-hunterSkill
- playwright-best-practicesSkill
- postgresql-code-reviewSkill
- postgresql-optimizationSkill
- postmanSkill
- prisma-postgresSkill
- pro-state-machineSkill
- race-conditionSkill
- react-best-practicesSkill
- react-performanceSkill
- react-querySkill
- redis-coreSkill
- redis-query-engineSkill
- redis-securitySkill
- refactorSkill
- review-panelSkill
- spec-drivenSkill
- sql-optimizationSkill
- system-designSkill
- testing-strategySkill
- tune-skills-and-agentsSkill
- ui-ux-pro-maxSkill
- vercel-react-view-transitionsSkill
- viteSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
All paths below are relative to the repo root (<unit>/).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
delivery-chain is a Claude Code plugin, not an app — no GUI, no server, no
CLI binary. The deliverable is prose (skills + agent personas under .claude/).
The one executable component is the stdlib-only Python agent-memory hook
sidecar (scripts/agent_memory_hook.py), invoked by the harness at
SubagentStart (inject per-role memory) and SubagentStop/Stop (persist an
episode). "Running" this plugin means driving that sidecar the way
hooks/hooks.json does, and keeping the Python test suite green.
Drive it via .claude/skills/run-delivery-chain/driver.sh — it feeds the
shipped hook command a live-harness event on stdin and asserts the full
persist → inject round-trip. There is nothing to screenshot.
All paths below are relative to the repo root (<unit>/).
Prerequisites
python3 (stdlib only — no pip, no venv, no network). Verified on 3.14, the
sidecar targets 3.x broadly.
python3 --version # → Python 3.14.3 hereNo apt-get line: the sidecar imports only the standard library, and the rest
of the plugin is Markdown.
Setup
None. No install, no build step. Clone and run.
Optional env (the driver and tests work without it):
# Only Phases 2-3 (OpenAI lesson extraction + embedding retrieval) read this.
# Absent → those phases skip silently; persist + curation + patterns still run.
export OPENAI_API_KEY=... # optional; NEVER commit it into hooks/hooks.jsonRun (agent path)
Drive the runtime end to end — persist an episode from a transcript, inject it back, plus a prose-only negative case and a malformed-stdin robustness check:
.claude/skills/run-delivery-chain/driver.sh
# → === ALL CHECKS PASSED — the agent-memory runtime round-trips end to end ===Runs from any cwd (it resolves the plugin root from its own location, like
the real ${CLAUDE_PLUGIN_ROOT}), uses a throwaway mktemp -d host repo as
CLAUDE_PROJECT_DIR, and unsets OPENAI_API_KEY so it stays keyless/offline.
The store it writes/reads lives under $CLAUDE_PROJECT_DIR/.claude/agent-memory/
in that temp dir and is deleted on exit. The driver is the harness — it's how
you confirm the runtime works without spinning up a real claude session.
What each step asserts:
| step | drives | asserts |
| 1 | subagent-stop with a transcript_path JSONL | exactly 1 episode written, carrying taskId |
| 2 | subagent-start (episode + a seeded lesson) | output wrapped in one === AGENT MEMORY === envelope; episode under its prior-experience label, lesson under its relevant-lessons label |
| 3 | subagent-stop with a prose-only message | episode count unchanged (prose carries no taskId/status) |
| 4 | subagent-stop with garbage stdin | exits 0 (exit 2 would block a Stop hook) |
Drive a single phase by hand
The shipped command reads the hook event JSON on stdin and writes the
hook-output JSON on stdout. Subcommand is subagent-start or subagent-stop:
echo '{"agent_type":"frontend-engineer"}' | python3 scripts/agent_memory_hook.py subagent-start
# → {"hookSpecificOutput": {"hookEventName": "SubagentStart", "additionalContext": ""}}
# (empty context + exit 0 when no store exists — the keyless degradation path)Test
The full suite — stdlib unittest, no pytest, no deps:
(cd scripts/tests && python3 -m unittest discover)
# → Ran 695 tests ... OK (a few seconds)One file (must cd in first — see Gotchas):
(cd scripts/tests && python3 test_memory_store.py)
# → Ran 86 tests ... OKStatic secret-scan gate (CI's static job also runs this):
bash scripts/secret_scan.sh; echo "exit $?" # → exit 0 (clean)Gotchas
- Single-file tests fail from the repo root.
python3 scripts/tests/test_memory_store.py(run from<unit>/) fails one assertion:test_no_getcwd_scatter...checks that no.claude/dir exists under cwd — but the repo root has one (the plugin's own), so it false-positives. Run from insidescripts/tests/(cd scripts/tests && python3 test_memory_store.py) and it's 86 OK. The whole-suitediscovercommand alreadycds in, so it's unaffected. - The memory envelope only appears when enrichment adds a block. By the
byte-identity contract in
agent_memory_hook._enrich_context, a bare episode injects without the=== AGENT MEMORY ===wrapper when keyless retrieval finds nothing and no lesson exists. The driver seeds one lesson (lessons load keyless) so the envelope path is exercised — don't expect the envelope around an episode-only, no-lesson, no-key store. - The hook never exits non-zero. Malformed stdin, missing
agent_type, I/O errors — all degrade to exit 0. Exit 2 from aStophook would block the stop and risk a recursion loop, so the sidecar is wrapped to always exit 0. Don't rely on exit codes to detect failure; inspect the store or stdout instead. - A
Stop/main-thread event with noagent_typepersists nothing. Persist is per dispatched persona only; anagent_typeof""/unknownis skipped so the orchestrator's own turn never becomes a spuriousunknown/episode.
Troubleshooting
subagent-startprints"additionalContext": "": expected when the per-role store is empty orCLAUDE_PROJECT_DIRis unset/points at a dir with no.claude/agent-memory/<agent>/. Runsubagent-stopwith a real status block first (the driver does this in step 1), then start again.FAIL: AGENT MEMORY envelope must wrap output exactly once (found 0)if you adapt the driver and drop the lesson seed — see the envelope gotcha above.sidecar not found at .../scripts/agent_memory_hook.py: the driver is being run from a copy detached from the repo. It resolves the plugin root three levels up from itself (.claude/skills/run-delivery-chain/), so keep it in place or run the shipped command directly withpython3 scripts/....
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

