ClosedLoop.ai
Mechanisms

Artifacts

The durable, reviewable objects every loop reads from and writes back to.

Every loop in ClosedLoop.ai produces artifacts. They are the durable record of what the system did, why, and with what quality. This page is a reference for the artifacts the platform creates, where they live, and what schema they follow.

Session work directory

Most per-run artifacts live in the session work directory ($CLOSEDLOOP_WORKDIR, usually .closedloop-ai/work/):

ArtifactProducerFormat
prd.mdyouMarkdown
plan.jsonplan-draft-writer, plan-writerJSON per plan-schema.json
plan.mdextract-plan-md skillMarkdown synced from plan.json content
plan-evaluation.jsonplan-evaluatorJSON (cached by eval-cache)
investigation-log.mdpre-explorer, judges fallbackMarkdown
requirements-extract.jsonpre-explorerJSON
code-map.jsonpre-explorerJSON per code-map.schema.json
code-context.json / plan-context.jsoncontext-manager-for-judgesCompressed JSON
judge-input.jsonrun-judgesJSON per judge-input.schema.json
plan-judges.jsonrun-judges plan modeAggregated CaseScores
code-judges.jsonrun-judges code modeAggregated CaseScores
prd-judges.jsonrun-judges prd modeAggregated CaseScores
state.jsonorchestratorJSON (polled by UIs)
log.mdorchestrator (Phase 7)Markdown changelog
perf.jsonlsubagent-stop-hook.shJSONL timing events
visual-requirements.mdimplementation-subagentMarkdown
visual-qa-memory.mdvisual-qa-subagentMarkdown
api-requirements.mdapi-spec-writerMarkdown
reviews/*.review.jsoncritics (Phase 2.5)JSON per review-delta.schema.json
agents-snapshot/ensure_agents_snapshot.shsnapshot of judge agent files
.cross-repo-needs.jsoncross-repo-coordinatorJSON
.workspace-repos.jsondev-environmentJSON
.dev-environment.jsondev-environmentJSON
.discovery-cache/{peer}.jsongeneric-discoveryJSON
cross-repo-prd-{peer}.mdcross-repo-prd-writerMarkdown

State and configuration

FilePurpose
.closedloop-ai/config.envAll env vars for the session.
.closedloop-ai/closedloop-loop.local.mdLoop state (iteration, run_id, start_sha).
.closedloop-ai/pid-{PPID}.sessionPID → session mapping.
.closedloop-ai/.repo-identity.jsonMulti-repo identification.
.closedloop-ai/settings/critic-gates.jsonCritic wiring produced by bootstrap.
.agent-types/{agent_id}Agent start timestamps.

Learnings

Per-project:

PathPurpose
.learnings/pending/*.jsonPending learnings written by agents during a run.
.learnings/pending/archived/Processed learnings.
.learnings/sessions/run-{ID}/iter-{N}.jsonPer-iteration snapshots.
.learnings/org-patterns.toonLocal copy of the TOON pattern store (typically symlinked to the user-level store).
.learnings/goal.yamlActive goal plus goal definitions.
.learnings/retention.yamlPruning thresholds.
.learnings/outcomes.logPipe-delimited outcomes.
.learnings/runs.logRun-level log.
.learnings/acknowledgments.logLearning acknowledgment log.
.learnings/goal-outcome.jsonOutput of evaluate_goal.py.
.learnings/pending-closedloop.jsonClosedLoop-specific learnings queue.
.learnings/changed-files.jsonChanged files since start SHA.
.learnings/relevance-scores.jsonOutput of pattern_relevance.py.
.learnings/build-result.jsonBuild outcome.
.learnings/merge-result.jsonMerge outcome.

Per-user (organization-level):

PathPurpose
~/.closedloop-ai/learnings/org-patterns.toonOrganization pattern store (TOON).
~/.closedloop-ai/learnings/closedloop-learnings.jsonFramework learnings (SL-{N} IDs).

Code review

/code-review:start writes to .closedloop-ai/code-review/cr-<random>/:

FilePurpose
code-review-findings.jsonValidated inline findings.
code-review-threads.jsonOutdated thread IDs to resolve.
code-review-summary.mdPR summary comment.
verdict.json{"verdict": "approve | needs_attention | changes_requested"}.

Bootstrap outputs

.closedloop-ai/bootstrap/<timestamp>/:

  • discovery/project-context.md, languages.json, domains.json
  • synthesis/expert-agents.json, decomposed-agents.json, generation-validation.json, agent-validation.json
  • validation-report.json, bootstrap-report.md, open-questions.md

Durable bootstrap outputs:

  • .claude/agents/<agent-name>.md
  • .closedloop-ai/bootstrap-metadata.json
  • .closedloop-ai/settings/critic-gates.json

Desktop client storage

Under app.getPath("userData"):

  • desktop-settings.json
  • desktop-secrets.json (API key, encrypted via safeStorage)
  • desktop-approvals.json
  • desktop-activity-log.json
  • desktop-job-store.json
  • desktop-loop-tokens.json
  • gateway-identity.json

Plus ~/.closedloop-ai/electron-port (plaintext active port).

Why artifacts are the point

If the loop is what turns intent into output, artifacts are how that output becomes reviewable, learnable, and shippable. Every artifact in this list exists because some part of the system needs to read, write, grade, or learn from it. Delete the artifacts and the system reverts to chat-driven delivery.

Keep them and the system compounds.

On this page