Context
Review of PrimeIntellect-ai/prime-agent — an open-source coding/research agent built around a Recursive Language Model (RLM) runtime (persistent IPython kernel as the only built-in tool) and a Continual Harness (supplemental prompts/memories/skill descriptions refined via small, evidence-backed updates).
Much of it is host-level runtime engineering a Claude Code plugin can't replicate (persistent kernel, programmatic rlm(...) subagent spawning, daemon-backed detachable sessions, agent-to-agent messaging, heartbeats). Claude Code already covers the practical ends of those via background agents, Routines/send_later, and the Monitor tool, which ArcKit's docs already point at. But several patterns transfer directly.
Adoptable patterns, ranked
1. Quality gates with bounded retry for arckit-build (highest value)
Prime-agent's autonomous mode runs configured gate commands before a run may finish; a failed gate feeds its bounded output back to the agent for another attempt, and it skips re-running a gate when the workspace hasn't changed.
The build harness currently halts on failure and asks the user to --resume. Proposal:
- On validation failure, feed the failure output back to the writer subagent for 1–2 bounded retries before halting the wave.
- Skip re-running an unchanged gate — composes naturally with the existing SHA-256 input-hash staleness detection in
skills/arckit-build/SKILL.md.
- Adopt their honesty doctrine verbatim in build summaries: "a passed gate checks only what that gate verifies; reaching a limit does not imply task success."
2. Incomplete-build nudge (persistent-goal analog) — cheapest win
Prime-agent's /goal keeps an objective alive across turns until explicitly completed, with token-budget accounting. ArcKit already has the pieces: state.json records build progress and the Stop-hook nudge engine (session-nudge.mjs) already fires traceability suggestions.
Proposal: a new nudge rule — "build for project 001 is incomplete at wave 3 of 6 — suggest --resume" — replicating goal persistence entirely within the existing hook model.
3. Refinement snapshots + rollback for the self-harness loop
ArcKit's autoresearch self-harness (weakness-miner.mjs → harness-proposer.mjs → held-in/held-out harness-validator.mjs) is more rigorous than prime-agent's /refine on acceptance criteria. What prime-agent adds:
- every refinement event records before/after snapshots supporting rollback;
- the base prompt is immutable, refinements are supplemental layered state;
- refinements are session-local by default, promoted to global deliberately.
If the autoresearch flow doesn't already snapshot-and-rollback accepted harness edits, that's the gap — it turns "the optimizer made things worse" from archaeology into a one-command revert.
4. Structured resume-brief format
Prime-agent's compaction summary has a fixed contract: Goal / Constraints & Preferences / Progress (Done · In Progress · Blocked) / Key Decisions / Next Steps / Critical Context.
postcompact-rehydrate.mjs re-injects filesystem state; additionally the build harness could emit a resume brief in this shape from state.json — useful post-compaction and for --resume in a fresh session.
5. Issue-numbered regression tests
Their convention: regressions live in test/suite/regressions/ named <issue-number>-<short-slug>.test.ts. ArcKit's CLAUDE.md already narrates fixes by issue number (#715, #723); mirroring that as tests/regressions/ would make the drift-guard tests self-documenting.
6. Supply-chain hardening
- 7-day dependency cooldown:
.npmrc min-release-age=7 + matching dependabot cooldown (with documented --min-release-age=0 override for urgent security patches). Cheap and on-brand for a UK-public-sector governance toolkit; applies to the paperclip extension's npm dependencies.
- Checksum-verified installer (their
install.sh verifies SHA-256 of the versioned release).
Interop finding: prime-agent as a near-free tenth distribution format
Prime-agent implements the Agent Skills standard and discovers skills from .agents/skills/ in the project directory and ancestors — exactly where arckit init --ai codex already scaffolds ArcKit's Codex skills. An ArcKit project initialised for Codex should be usable from prime-agent today with zero converter work (it also reads ~/.claude/skills and ~/.codex/skills via its skills settings array). Needs a quick manual test before claiming support.
Suggested starting order
1 (build gates) and 2 (incomplete-build nudge) first; 3 (rollback snapshots) after auditing what autoresearch already records.
Context
Review of PrimeIntellect-ai/prime-agent — an open-source coding/research agent built around a Recursive Language Model (RLM) runtime (persistent IPython kernel as the only built-in tool) and a Continual Harness (supplemental prompts/memories/skill descriptions refined via small, evidence-backed updates).
Much of it is host-level runtime engineering a Claude Code plugin can't replicate (persistent kernel, programmatic
rlm(...)subagent spawning, daemon-backed detachable sessions, agent-to-agent messaging, heartbeats). Claude Code already covers the practical ends of those via background agents, Routines/send_later, and the Monitor tool, which ArcKit's docs already point at. But several patterns transfer directly.Adoptable patterns, ranked
1. Quality gates with bounded retry for
arckit-build(highest value)Prime-agent's autonomous mode runs configured gate commands before a run may finish; a failed gate feeds its bounded output back to the agent for another attempt, and it skips re-running a gate when the workspace hasn't changed.
The build harness currently halts on failure and asks the user to
--resume. Proposal:skills/arckit-build/SKILL.md.2. Incomplete-build nudge (persistent-goal analog) — cheapest win
Prime-agent's
/goalkeeps an objective alive across turns until explicitly completed, with token-budget accounting. ArcKit already has the pieces:state.jsonrecords build progress and the Stop-hook nudge engine (session-nudge.mjs) already fires traceability suggestions.Proposal: a new nudge rule — "build for project 001 is incomplete at wave 3 of 6 — suggest
--resume" — replicating goal persistence entirely within the existing hook model.3. Refinement snapshots + rollback for the self-harness loop
ArcKit's autoresearch self-harness (
weakness-miner.mjs→harness-proposer.mjs→ held-in/held-outharness-validator.mjs) is more rigorous than prime-agent's/refineon acceptance criteria. What prime-agent adds:If the autoresearch flow doesn't already snapshot-and-rollback accepted harness edits, that's the gap — it turns "the optimizer made things worse" from archaeology into a one-command revert.
4. Structured resume-brief format
Prime-agent's compaction summary has a fixed contract: Goal / Constraints & Preferences / Progress (Done · In Progress · Blocked) / Key Decisions / Next Steps / Critical Context.
postcompact-rehydrate.mjsre-injects filesystem state; additionally the build harness could emit a resume brief in this shape fromstate.json— useful post-compaction and for--resumein a fresh session.5. Issue-numbered regression tests
Their convention: regressions live in
test/suite/regressions/named<issue-number>-<short-slug>.test.ts. ArcKit's CLAUDE.md already narrates fixes by issue number (#715, #723); mirroring that astests/regressions/would make the drift-guard tests self-documenting.6. Supply-chain hardening
.npmrcmin-release-age=7+ matching dependabotcooldown(with documented--min-release-age=0override for urgent security patches). Cheap and on-brand for a UK-public-sector governance toolkit; applies to the paperclip extension's npm dependencies.install.shverifies SHA-256 of the versioned release).Interop finding: prime-agent as a near-free tenth distribution format
Prime-agent implements the Agent Skills standard and discovers skills from
.agents/skills/in the project directory and ancestors — exactly wherearckit init --ai codexalready scaffolds ArcKit's Codex skills. An ArcKit project initialised for Codex should be usable from prime-agent today with zero converter work (it also reads~/.claude/skillsand~/.codex/skillsvia itsskillssettings array). Needs a quick manual test before claiming support.Suggested starting order
1 (build gates) and 2 (incomplete-build nudge) first; 3 (rollback snapshots) after auditing what autoresearch already records.