This page has two parts:
- ADR index: the Architecture Decision Records, one file per decision.
- Decision register: every architecture point that needs a decision, with its status. A decided point links to its ADR.
- Add the point. Add it to the register with status ⬜ (open) or 🟡 (proposed default).
- Write the ADR. When the point is ready to decide, copy template.md to
NNNN-short-title.md. Use the next free number. - Accept. On acceptance, set the ADR to
Accepted, set the register entry to ✅, and update the affected documents. - Change a decision. Never rewrite an accepted ADR's decision. Write a new ADR that supersedes it, and mark the old one
Superseded by ADR-XXXX.
Status: ✅ Decided · 🟡 Proposed (default, awaiting confirmation) · ⬜ Open. Priority: 🔴 blocks M0 · 🟠 needed before M1–M2 · 🟢 can wait (safe default exists).
| ADR | Title | Status |
|---|---|---|
| 0001 | pi is the Kintsugi Runtime; members implement with their own harnesses | Accepted |
| 0002 | TypeScript monorepo (pnpm + Turborepo) | Proposed |
| 0003 | pg-boss (Postgres-backed job queue) for orchestration | Accepted (state persistence amended by 0012) |
| 0004 | One Docker container per runtime job, with a pi SDK runner inside | Accepted (isolation amended by 0029) |
| 0005 | Canonical asset format = Agent Skills + AGENTS.md | Superseded by 0015 |
| 0006 | Kintsugi is distributed as a self-hosted package | Accepted |
| 0007 | Git is the source of truth for code, documents and assets | Accepted |
| 0008 | Local username/password first, Azure AD (Entra ID) later | Accepted |
| 0009 | LLM provider configuration for the pi runtime | Accepted |
| 0010 | PostgreSQL is the only datastore | Accepted (graph tables removed by 0014) |
| 0011 | Every project builds its own rulebook before running the pipeline | Superseded by 0028 |
| 0012 | Work items are files in the workspace repo; Postgres indexes them | Accepted (amended by 0028) |
| 0013 | Composable, open rulebook | Superseded by 0028 |
| 0014 | No code graph or parsing, no unit-discovery config, built-in runtime agents fixed in code | Accepted (decision 3 superseded by 0023) |
| 0015 | Member-harness assets are agent plugins (Claude Code plugin format) | Accepted (amended by 0028) |
| 0016 | NestJS is the API framework for apps/api |
Accepted |
| 0017 | Portal is a Vite + React SPA with shadcn/ui | Accepted |
| 0018 | Pin pi to an exact version; track the latest release | Accepted |
| 0019 | One workspace repo per project; the worker writes as kintsugi-bot |
Accepted (amended by 0028, 0033) |
| 0020 | The worker reaches Docker only through a socket proxy, with an image allowlist | Superseded by 0029 |
| 0021 | Sandboxed child processes with pi-sandbox instead of per-job containers | Superseded by 0029 |
| 0022 | Agents are installation data — built-in and custom, managed in the portal | Superseded by 0023 |
| 0023 | The runtime is a generic agent kernel; agents are data supplied per job | Accepted (write tool amended by 0037, result tool by 0073) |
| 0024 | Distinguish access roles from project roles | Accepted |
| 0025 | Git core package and Kintsugi-managed checkout storage | Accepted |
| 0026 | Built-in and custom runtime agents, packaged and managed in an Agent Builder | Accepted |
| 0027 | Built-in modernization content in packages/agents: agents, commands, workflows, scripts, hooks and tests | Accepted (amended by 0028, 0029, 0033) |
| 0028 | Remove the rulebook; one document repo per project | Accepted |
| 0029 | Job workspaces instead of OS sandboxes | Accepted (layout and lifetime amended by 0055) |
| 0030 | Worker heartbeat in Postgres | Accepted |
| 0031 | understand stage: per-unit AS-IS specification closes the Understand phase | Accepted (diagrams amended by 0032; §1, §3, §6 superseded by 0033) |
| 0032 | Mermaid for every diagram, drawn by a built-in skill and checked by a lint | Accepted (§2 skill content superseded by 0036) |
| 0033 | Two runtime stages: assess builds the item catalog; understand runs on a selection | Accepted (layout statements amended by 0038) |
| 0034 | One understand command; map, extract-rules and harden are parts of it | Accepted |
| 0035 | Kintsugi plugins: one marketplace of plugins in the Claude plugin format replaces the agent catalog | Accepted (amended by 0061) |
| 0036 | The mermaid-diagrams skill is the WH-2099 mermaid skill |
Accepted (amends 0032) |
| 0037 | The kernel writes with pi's write and edit, not a custom outputs_write |
Accepted (amends 0023) |
| 0038 | Document repository layout by subject and SDLC phase | Accepted (tree superseded by 0042 and 0051; task context and evidence-bound continuation amended by 0062, 0063) |
| 0039 | Build and deploy the self-hosted package with GitHub Actions | Accepted |
| 0040 | The kernel gets shell and git tools and an ls tree mode |
Accepted (supersedes 0037 D4 and 0029's no-shell statements) |
| 0041 | An AI plan for what to understand next, from the relationships between catalog items | Accepted (paths amended by 0042) |
| 0042 | A Markdown-only document repo, organized by bounded context | Accepted (supersedes the tree of 0038; amends 0031, 0033, 0041; Modernization context refined by 0044, 0045; tree superseded by 0051) |
| 0043 | Kintsugi rebuilds; it offers no choice of transformation strategy | Accepted |
| 0044 | The design phase: common, basic and detail design before implementation | Accepted |
| 0045 | Design templates are project data, kept in the document repo | Accepted (kinds by profile folders since 0053) |
| 0046 | One file per business rule, indexed by rules.md and BUSINESS_RULES.md |
Accepted (amends 0038, 0042) |
| 0047 | The kernel gets codemode and HTTP MCP servers, read-only by default | Accepted (amends 0023 decision 5) |
| 0048 | Runtime telemetry, compaction and prompt-cache policy | Accepted |
| 0049 | Design sets are generated by the runtime design stage |
Accepted |
| 0050 | Design sets have a scope, reads and instructions | Accepted (application folder moved by 0051; appliesTo replaced by profiles in 0053) |
| 0051 | A numbered document repo layout, each application split into legacy and modern | Accepted (supersedes the tree of 0042; amends 0038, 0044, 0045, 0050) |
| 0052 | A run reads every legacy repository of an application, each in its own folder | Accepted (amends 0033, 0051; mount point moved by 0055) |
| 0053 | A design set has a profile per unit kind | Accepted (amends 0045, 0050) |
| 0054 | A design run is reviewed by an independent reviewer and arrives with a review as its description | Accepted (amends 0049) |
| 0055 | One durable workspace per job, with the repositories as they are and as they will be | Accepted (amends 0029, 0052; replaces the retry-by-copy of 0033) |
| 0056 | A debug MCP server for development installations | Accepted |
| 0057 | Evidence marks and gaps in reverse engineering and design | Accepted |
| 0058 | The job workspaces are listed in Monitoring and an admin can remove one | Accepted |
| 0059 | The portal follows changes over one SSE stream instead of polling | Accepted |
| 0060 | Catalog items have a kind from a shared vocabulary, and understanding follows the kind | Accepted |
| 0061 | Coding Agent Workflow through the CLI and stdio MCP | Accepted (amended by 0067 and 0069: the CLI and the MCP bridge are the common member base) |
| 0062 | Scope Coding Agent Workflow context with Project Access and immutable snapshots | Partly superseded by 0067 (Project Access kept) |
| 0063 | Continue workflows from evidence-bound pull requests and gates | Superseded by 0067 |
| 0064 | Generate portable Agent Plugins packages for Codex and Copilot | Accepted (amended by 0067) |
| 0065 | Use project-scoped browser authorization for the local Coding Agent Workflow | Accepted (kept by 0067) |
| 0066 | Stage the Coding Agent Workflow plugin and install it through Codex Desktop | Accepted (kept by 0067) |
| 0067 | Remove the Coding Agent Workflow, keep the common member base | Accepted (supersedes 0063 and the task part of 0062; amends 0015, 0035, 0061 and 0064) |
| 0068 | Generate the design in the modernize plugin | Accepted (amends 0035 and 0049) |
| 0069 | Common member base and plugin distribution | Accepted (amends 0015, 0035 and 0061) |
| 0070 | The CLI is distributed by the installation | Accepted (amends 0069) |
| 0071 | Members build, the runtime reviews | Accepted (amends 0068, 0069) |
| 0072 | One way in — login, init, install — and plugins as plugins of their own | Accepted (amends 0069, 0070, 0071) |
| 0073 | A job reports its structured result through a kernel tool, not a file it writes by hand | Accepted (amends 0023) |
| 0074 | Job spans can be exported over OTLP by the worker, off by default | Accepted (builds on 0048) |
| 0075 | Compact stable RULE, SEC and GAP IDs with catalog scopes and Markdown ledgers | Accepted (amends 0038, 0057) |
| 0076 | Project memory supplies reviewed source navigation hints to Understand | Accepted (amended by 0077, 0078) |
| 0077 | Agents access current project memory through tools | Accepted (learning lifecycle amended by 0078) |
| 0078 | Give project agents an immediate memory learning lifecycle | Accepted |
| 0079 | Opt-in DuckDuckGo search through a worker-bound tool | Accepted |
| 0080 | Add guarded public-page retrieval and expand web research | Accepted |
| 0081 | Regenerate an existing design | Accepted (amended by 0082) |
| 0082 | Check design readiness, distinguish drafts and resolve questions in place | Accepted (amends 0057, 0081) |
| 0083 | Design in dependency order and verify until a round finds nothing open | Accepted (amends 0054) |
| 0084 | Known-answer evaluation of the built-in plugins | Accepted |
| 0085 | Check every citation against the source, and bound every claim of absence | Accepted (amends 0057) |
| 0086 | Record what of the source a job was shown, and check citations against it | Accepted |
| 0087 | Say who settles a gap, and tell which cited lines moved | Accepted (amends 0057) |
| 0088 | Show the parity of a built unit with its rules, each claim at its own level of evidence | Accepted (amends 0071) |
| 0089 | Name the built-in commands without a plugin prefix | Accepted |
| 0090 | Retry cancelled runs, and pin project memory to a revision | Accepted (amends 0055) |
| 0091 | The Brain, a vectorless tree index of the document repository that agents reason over | Accepted (supersedes the KB of 0014 decision 1; amends 0069) |
| 0092 | Built-in agents list their tools, and none gets shell or codemode |
Accepted (amends 0040) |
| 0093 | Job processes run as an OS user of their own, and provider credentials stay out of spawn environments | Accepted (amends 0029) |
| 0094 | One open correction per specification, shown on its gaps | Accepted (amends 0019, 0087) |
| 0095 | Remove the API modules that kept their writes in memory | Accepted |
| 0096 | Wiki spaces and pages are Markdown in the document repository; collaboration state is in Postgres | Accepted (amends 0042, extends 0051) |
| 0097 | The Brain indexes and serves wiki pages, builds incrementally and keeps a full-text index | Accepted (amends 0091) |
| 0098 | Wiki pages are edited as Markdown in the portal, kept as drafts in Postgres and published through the document writer | Accepted |
| 0099 | Wiki comments, watches and notifications live in Postgres; wiki access is edit rules on paths, with Project Access as the view boundary | Accepted |
| ID | Point | Priority | Decision / proposal | Due | Status |
|---|---|---|---|---|---|
| D01 | Deployment model | 🔴 | Self-hosted package per project (Docker Compose); one installation = one organization | M0 | ✅ 0006 |
| D02 | Where code & documents live | 🔴 | Git is the source of truth; Postgres keeps state + rebuildable indexes | M0 | ✅ 0007 |
| D03 | Cloud / hosting | — | Not applicable: each project chooses its host; one Docker host is enough | — | ✅ 0006 |
| D04 | LLMs for the pi runtime | 🔴 | Provider registry covering every pi provider + custom providers; credentials encrypted in the DB | M0 | ✅ 0009 |
| D05 | Data isolation | 🔴 | No multi-tenancy; installation access-role permissions and project scope are separate; project-role assignment follows M0 project persistence | M0 | ✅ 0006 |
| D06 | How pi is embedded | 🔴 | The pi SDK runs agent jobs in the worker, in a job workspace (was: a runner container per job) | M0 | ✅ 0004, 0029 |
| D07 | Sandbox | 🔴 | Job workspace per job, the same on every OS: read-only source and inputs, writable output and scratch, cleared environment, limits, JobOutput hook; no OS-level isolation (was: one Docker container per job) | M0 | ✅ 0029 |
| D08 | Orchestration | 🔴 | pg-boss + state machine in the DB; no Temporal | M0 | ✅ 0003 |
| D09 | Sign-in | 🔴 | Username/password + PATs; Entra ID later behind AuthProvider |
M0 | ✅ 0008 |
| D10 | API | 🟠 | REST + OpenAPI; NestJS 12 (ESM, Standard Schema validation) | M0 | ✅ 0016 |
| D11 | Portal | 🟢 | React SPA (Vite) + shadcn/ui, static build served by kintsugi-app |
M0 | ✅ 0017 |
| D12 | Vector store | — | pgvector; unused: the Brain has no embeddings (0091) | — | ✅ 0010, superseded by 0091 |
| D13 | Graph store | — | None: no code / KB graph | — | ✅ 0014 |
| D14 | Source-code analysis | — | None: agents read source files directly; the project knowledge is the Brain, a vectorless tree index, not text chunks + embeddings (0091) | — | ✅ 0014, amended by 0091 |
| D15 | Document conversion (xlsx/docx → md, multilingual) | 🟠 | Python sidecar (docling / markitdown + Excel → Markdown); adds one container | M1 | ⬜ |
| D16 | Embedding model | 🟠 | Not needed: the Brain uses no embedding model (0091) | M1 | ✅ superseded by 0091 |
| D17 | MCP transport + auth | 🟠 | Remote Streamable HTTP on kintsugi-app, PAT auth; OAuth with Entra ID |
M2 | 🟡 |
| D18 | Priority member harness + license tier | 🟠 | Copilot first, Claude Code second | M2 | ⬜ |
| D19 | Asset distribution to harnesses | 🟠 | Canonical Claude Code plugin assets are rendered into tested target packages; marketplaces are generated in the document repo and fallback rendering serves harnesses without plugin support | M2 | ✅ 0015, 0064 |
| D20 | Source of truth for units | 🟠 | One file per unit in the document repo (units/**), state in frontmatter; Postgres is a rebuildable index; single write path through the Kintsugi API (bot commits with actor trailer); Jira / Azure DevOps are mirrors |
M2 | ✅ 0012 |
| D21 | Measuring "AI-generated" | 🟠 | Mandatory declaration (commit trailer + PR template); telemetry for cross-checking | M3 | 🟡 |
| D22 | Git servers & repositories | 🔴 | Many Git servers and many repos; plain git everywhere; API adapters GitHub → Azure DevOps → GitLab → Bitbucket → Gitea | M0 | ✅ 0007 |
| D23 | Events | — | Postgres outbox + LISTEN/NOTIFY → SSE |
— | ✅ 0010 |
| D24 | Observability | 🟢 | Usage/cost/events in Postgres, shown in the portal; optional OTel export | M0 | 🟡 |
| D25 | Policy engine | 🟢 | TypeScript rules + policy in kintsugi.yaml; consider OPA/Cedar in M4 |
M4 | 🟡 |
| D26 | Audit log | 🟢 | Append-only table in Postgres (done: governance.audit_event, one AuditTrail port, coverage in the security concept); hash-chaining still proposed |
M4 | 🟡 |
| D27 | pi versioning | 🟢 | Track latest pi, pin exact versions of @earendil-works/* in the runner image; deliberate upgrades |
M0 | ✅ 0018 |
| D28 | Runtime agent definitions | 🟢 | The runtime is a generic kernel; an agent definition (instructions, skills, tools, policy) is data supplied with each job; none is configured in any repo; built-in and custom agents are installation data (D46) | M1 | ✅ 0023, 0026 |
| D29 | Document repo layout + how the runtime writes to Git | 🔴 | One document repo per project (renamed from workspace repo by 0028); worker commits on kintsugi/* branches + PR as kintsugi-bot; autoCommitPaths (units/**, tasks/**, knowledge/**/generated/**, assessment/**/generated/**) commit directly to the default branch (reference) |
M0 | ✅ 0019, 0028 |
| D30 | Webhooks vs. polling | 🟠 | Polling by default (1–5 min); webhooks when reachable | M2 | 🟡 |
| D31 | Large binaries (recordings, video, scanned PDFs) | 🟠 | Git LFS where supported; otherwise the kintsugi-data volume + a link file in Git |
M1 | ⬜ |
| D32 | Worker's Docker API access | 🔴 | None: jobs run in job workspaces of the worker, no Docker socket (supersedes the socket proxy of 0020 and the pi-sandbox proposal of 0021) | M0 | ✅ 0029 |
| D34 | Project-specific knowledge | 🔴 | Superseded: the rulebook is removed (0028) | M0 | ✅ 0028 |
| D35 | Capability maturity & readiness gating | 🔴 | Superseded: the rulebook is removed (0028) | M0 | ✅ 0028 |
| D36 | Rulebook structure | 🔴 | Superseded: the rulebook is removed (0028) | M0 | ✅ 0028 |
| D37 | Reuse across projects | 🟢 | Superseded: the rulebook is removed (0028) | M4 | ✅ 0028 |
| D38 | Runner images | 🔴 | Superseded: the rulebook is removed (0028) | M0 | ✅ 0028 |
| D39 | Project runtime agents & runtime MCP | — | Not supported (removed) | — | ✅ 0014 |
| D43 | Member asset packaging | 🟠 | Claude Code plugin format (skills, agents, commands, hooks, MCP, userConfig); built-in kintsugi plugin with MCP + guardrail/telemetry hooks; project plugins in the document repo's plugins/ |
M2 | ✅ 0015, 0028 |
| D42 | Unit discovery | — | No discovery config; unit files declared by people or proposed by assessment via PR; dependsOn written, not computed |
— | ✅ 0014 |
| D40 | Member harness registry | 🟠 | Open harness ids; plugin support per harness (native / converted / none); declarative fallback renderers (built-in / installation / project); transformer plugins installed by admins | M2 | ✅ 0015 |
| D41 | Stale units on rule change | 🟠 | Superseded: the rulebook is removed (0028) | M3 | ✅ 0028 |
| D44 | Access roles vs. project roles | 🔴 | Keep installation-wide permission-bundle access roles separate from project RACI roles; assign project roles per membership after M0 project persistence | M0 | ✅ 0024 |
| D45 | Git access and checkout storage | 🔴 | Kintsugi clones from registered URLs into one admin-chosen data directory (KINTSUGI_DATA_DIR): bare mirror per repository, per-job worktree at a fixed commit; packages/git over the system git CLI with per-call credentials; provider REST adapters, no provider CLIs |
M0 | ✅ 0025 |
| D46 | Runtime agents and the Agent Builder | 🔴 | Five built-in read-only agents for understanding (legacy-analyst, business-rules-extractor, version-delta-analyst, architecture-critic, security-auditor) plus admin-created agents; agent files + Agent Skills (format per ADR-0027); draft and immutable published versions; implementation stays with members | M0 | ✅ 0026 |
| D47 | Built-in modernization content | 🔴 | Upstream code-modernization content copied into packages/agents/builtin/ (pinned, Apache-2.0, no assets) and adapted: runtime and member agents (metadata.audience), stage commands, workflows, scripts in the job workspace, server-side hooks, tests |
M0 | ✅ 0027, 0029 |
| D48 | Project knowledge and repository model | 🔴 | No rulebook; one document repo per project holds everything except code; project knowledge as plain documents in standards/ and member plugins in plugins/; pipelines in kintsugi.yaml or built-in; repo roles legacy / legacy-data (AS-IS, read-only) and target with component (TO-BE, members only) |
M0 | ✅ 0028 |
| D51 | Diagrams | 🟢 | Mermaid only; built-in mermaid-diagrams skill (the WH-2099 mermaid skill, ADR-0036) loaded by the drawing agents; stdlib mermaid_lint.py, run by members and by the JobOutput hook as non-blocking warnings |
M1 | ✅ 0032 |
| D50 | Reverse engineering of the AS-IS system | 🔴 | Current plans: assess builds application inventory, topology and the item catalog; understand runs on selected units and writes per-unit topology, rules, findings, AS-IS specifications, trace/meta and unit state in a pull request; aggregates are rebuilt after merge under generated/. This supersedes the original separate-stage layout |
M1 | ✅ 0031, amended by 0033 |
| D52 | Selective understanding | 🔴 | Two runtime stages: assess builds the item catalog (assessment/<app>/catalog.json, module → item, from the topology without parsers, curated, reconciled across re-assess); understand runs topology, rule extraction and security review as steps on selected catalog items, one pull request per run, per-unit outputs, aggregates rebuilt under generated/ after merge, unit-namespaced ids, item status derived, units in an open PR blocked, failed runs resumable |
M1 | ✅ 0033, layout amended by 0038 |
| D53 | Understand command | 🟢 | One understand command specifies the phase; map, extract-rules and harden commands and stage plans are removed (their method is its "Method reference") |
M1 | ✅ 0034 |
| D54 | Kintsugi plugins | 🟢 | Built-in reverse_engineering and modernize plugins, both runtime; project plugins in the document repo; generated marketplace | M1 | ✅ 0035, amended by 0061, 0068 and 0069 |
| D55 | Document repository layout | 🔴 | One repo per project; root for project-wide material, applications/<app>/ for application content and one full-id unit directory for P1–P4 evidence; generated aggregates, rule-review separation, stable citation-derived rule ids, requirement/rule/PR/test traceability and merged gate records |
M1 | ✅ 0038 |
| D57 | Order of understanding | 🟢 | A plan-understand stage: a script computes the item graph from topology and catalog, a legacy-analyst job proposes batches with reasons, a script checks and measures them; plan.md is auto-committed advice, read by the portal with a staleness flag |
M1 | ✅ 0041 |
| D58 | Document repository format and contexts | 🟢 | The document repo holds Markdown only (front matter, tables, cards); the JSON a run passes between steps is scratch outside the layout; summaries instead of per-file and per-edge detail; bounded contexts (Assessment, Understanding, Modernization, Verification, Governance) around the Unit aggregate whose root is unit.md; verification evidence stays JSON until its own decision |
M1 | ✅ 0042 |
| D59 | Rebuild only | 🟢 | Every application is rebuilt: no per-application strategy (disposition), one pipeline (a project may declare its own), the scorecard maps to a rebuild priority and the assessment states a rebuild outlook |
M1 | ✅ 0043 |
| D60 | Design phase | 🟢 | After understanding: common design and skeleton (foundation team), basic design per unit (all units, P2), detail design per unit (in its wave), then implementation with unit tests; members write, the runtime plans and reviews; traceability runs rule → requirement → design item → code → test; modernize is reorganized around it |
M1 | ✅ 0044 |
| D61 | Design templates | 🟢 | A project defines design sets under standards/design/ (a set.md plus template files whose front matter declares sections and declarative checks); the same definition scaffolds, instructs the agent, validates, serves as review rubric and drives the portal; versioned, staleness derived |
M1 | ✅ 0045 |
| D62 | Business rules as files | 🟢 | A unit's rules.md and the application's BUSINESS_RULES.md are indexes (id, name, category, priority, confidence, version, status, source, link); each rule is a file understanding/rules/<id>.md with its specification, evidence and version history; versions follow a content digest, a vanished rule becomes a retired file |
M1 | ✅ 0046 |
| D63 | Kernel extensions | 🟢 | codemode is a kernel tool (on for agents without a tool list; scripts call only read tools and read-only MCP tools, with a deadline and output cap); MCP servers are administrator-registered, HTTP only, opt-in per agent by name in tools; only tools the server marks read-only or the administrator allowed by name run; the job child may start processes and workers (OS account is the boundary) |
M1 | ✅ 0047 |
| D64 | Runtime telemetry and prompt cache | 🟢 | Spans on the pi-telemetry contract built by the kernel from session events, stored in monitoring.telemetry_span and shown in Governance → Telemetry; usage includes cache tokens and compaction cost; compaction thresholds scale with the context window; cache-friendly prompt order and stable session id; cache lifetime is a provider setting |
M1 | ✅ 0048 |
| D65 | Design generation | 🟢 | Basic and detail design (every design set the project defines) are generated by the runtime design stage from the Design page: one set × many units per run, one pull request, designer job per unit, the template's checks and one fix pass, never overwriting an existing design; common design, scaffold and implementation stay with members; the design runtime plugin carries the command, the designer agent and the design-set scripts |
M1 | ✅ 0049 |
| D66 | Dynamic design sets | 🟢 | A set has a scope (unit, the default, or application: one design for the whole application under applications/<app>/design/<set>/, generated for the pseudo-unit @app), reads (extra documents for the designer) and a ## Instructions section; a unit set may need an application set, whose items resolve for it; the portal shows what a set is for, writes, needs and reads before generating |
M1 | ✅ 0050 |
| D67 | Readable document repo layout | 🟢 | Numbered roots (00-project, 01-standards, 02-architecture, 03-transition, 10-applications, plugins); each application split into 01-legacy/ (assessment and per-unit understanding) and 02-modern/ (requirements, design, per-unit card README.md and task pack) on the same <module>/<unit> paths; _-prefixed application-level folders; no gate records in the repo (the governance module holds them); 00-project/glossary.md; no old path kept |
M1 | ✅ 0051 |
| D68 | Several legacy repositories | 🟢 | A run reads every legacy repository of its application (job_run.sources, each pinned at a commit), each mounted read-only in its own folder src/<repository id>/; files are cited <repository id>/<path> for one repository as for several; provenance is <repository id>@<commit> ({sources}, --sources); legacy-data is not mounted |
M1 | ✅ 0052 |
| D69 | Design template profiles | 🟢 | A design set holds a folder per unit kind (<set>/<kind>/: profile.md with its own version, files added or removed, instructions; whole-file template overrides; _examples/ for the designer); replaces appliesTo and the When column; documents name set@n or set/kind@n and go stale per template |
M1 | ✅ 0053 |
| D70 | Design run review | 🟢 | A design run has a design-reviewer agent per unit between the check and the fix round (findings: blocker, major, minor by fidelity, coverage, consistency, clarity, convention, id); the fix round takes check problems plus blockers and majors; a unit ends ready, ready-with-findings or incomplete; the review is the description of the pull request |
M1 | ✅ 0054 |
| D71 | Durable job workspace | 🟢 | One workspace per job id that outlives its attempts: as-is/ and to-be/ (read-only worktrees at pinned commits, target repositories added), docs/, out/, work/, steps/<step>/, .state/, tmp/, a generated WORKSPACE.md guide and a workspace.json manifest; the sandbox settings (timeouts, limits, retention, checkout hours, read-only marking) are an installation setting edited in Settings → Sandbox, replacing the KINTSUGI_JOB_* limit variables; cwd is the root and paths are relative; an idempotent provisioner; a retry is the next attempt of the same job, and a step is reused only when its fingerprint matches and its outputs are intact; checkouts are a cache dropped by the sweep, results are kept; zone policy in the kernel's path guard |
M1 | ✅ 0055 |
| D72 | Debug MCP | 🟢 | KINTSUGI_DEBUG_MCP=1 mounts POST /api/debug/mcp (Streamable HTTP, Basic auth of an account with debug.access, audited): read-only tools over runs, the job workspaces on disk, the API and worker logs (captured into monitoring.debug_log), the queues, the workers and the database; absent without the flag |
M1 | ✅ 0056 |
| D73 | Evidence marks and gaps | 🟢 | Every statement about the legacy system is confirmed (cited), inferred or a gap; a specification ends with a Gaps and questions table (GAP-<module>.<unit>-NN, kind missing-source/unresolved/ambiguous/unverified, impact blocking/risk/note); finish_items.py derives openQuestions from its rows; the designer carries blocking gaps as open questions with an assumption and the reviewer checks it; rebuild_aggregates.py joins the tables into _generated/GAPS.md and the portal's Understand results have a Gaps view; the designer prompt is split into the skills design-template-contract, design-writing and evidence-marks |
M1 | ✅ 0057 |
| D74 | Sandbox workspaces in Monitoring | 🟢 | Monitoring → Runtime lists the job workspaces on the data volume (run, lifecycle, checkouts, size of what a retry cannot make again, when the sweep removes it); DELETE /api/monitoring/sandbox/workspaces/:jobId (sandbox.manage, audited) asks the worker through the queue workspace-cleanup, and neither side removes a workspace whose run is active or whose output write is pending |
M1 | ✅ 0058 |
| D75 | Live updates over one SSE stream | 🟢 | Triggers send NOTIFY kintsugi_change (topic + scope, no content); the API listens once (ChangeFeed) and serves GET /api/events and wakes run streams; the portal keeps one EventSource and useLoader({ live }) reads again on a change. Timers remain for worker status and sandbox folders only. |
M1 | ✅ 0059 |
| D76 | Item kinds and kind-aware understanding | 🟢 | Seven core kinds by role, not technology (screen, api, batch-job, report, event, integration, module), covering new stacks and mainframe; unitKinds stays the project's list and may add kinds; data stays in the DTO catalog; an unknown leaf kind falls back to module with a catalog ambiguity instead of the first kind; a specification profile per kind (built-in, replaced as a whole by 01-standards/specifications/<kind>.md) adds sections to the AS-IS spec; the understand page counts, filters and selects by kind and can add the items a selection depends on. ✅ 0060 |
||
| D77 | Member client connection | 🟠 | The Kintsugi CLI prepares local client assets or a Codex personal marketplace package; clients use a local stdio MCP bridge (kintsugi mcp serve) against the read-only HTTPS member contract (projects, documents) with current Project Access; the generated connector plugin carries no skill |
M2 | ✅ 0061, 0066, amended by 0067 |
| D78 | Task context and Project Access | 🟠 | Read validated Git task sources with activity-specific readiness; pin each contextual response to an authorized immutable multi-repository snapshot with citations | M2 | Superseded by 0067 (was 0062; Project Access kept) |
| D79 | PR continuation and effective gates | 🟠 | Reconcile current GitHub PR state; review fixed revisions; publish authenticated, evidence-bound gate decisions as reviewed Git records; continue exactly once after merged proof is validated | M2 | Superseded by 0067 (was 0063) |
| D80 | Portable plugin package layout | 🟠 | Claude uses its native plugin manifest; Codex and Copilot use portable plugin.json and mcp.json; add client-specific compatibility metadata only when required and tested | M2 | ✅ 0064, amended by 0067 |
| D81 | Member authentication | 🟠 | Local stdio clients use project-scoped browser auth-code plus PKCE; five-minute access, rotating refresh, 15/30-day admin age cap and admin revocation; Kintsugi issues no GitHub credentials | M2 | ✅ 0065, kept by 0067 |
| D82 | Codex Desktop plugin installation | 🟠 | Stage an installable personal Codex marketplace package and let Codex Desktop complete installation; retain CLI setup for other harnesses | M2 | ✅ 0066, kept by 0067 |
| D83 | Common member base | 🟠 | The CLI and the local MCP bridge are the common base for member harnesses (sign-in, identity, reading resources, one bounded activity record); flows are member plugins that Kintsugi distributes as text bundles, permits per project and member, and monitors per member | M2 | ✅ 0069 |
| D84 | CLI distribution | 🟠 | The installation builds and serves the CLI packages, hash-checked one-line installers and a Guideline page in the portal; short commands (connect, login, add) |
M2 | ✅ 0070 |
| D85 | Members build, the runtime reviews | 🟠 | The runtime of modernize designs and reviews; a member implements and tests a unit on their machine with the member command build, and Kintsugi collects which unit was built in which merge request so that the runtime can review it; verify later |
M2 | ✅ 0071 |
| D86 | One way in — login, init, install — and plugins as plugins of their own | 🟠 | login, then init (finds the clients, asks which and global or workspace), then install plugin <name> --all; one profile per project; other client versions are used with a note; each member plugin is its own client plugin (/modernize:build); the only distributed hook is kintsugi activity hook, which reports tokens, turns and time; context is removed |
M2 | ✅ 0072 |
| D87 | A job reports its structured result through a kernel tool | 🟠 | A job with a result schema gets the tool submit_result whose parameters are the schema; pi validates the arguments so a wrong result is corrected in the same turn; the valid result is written as result.json and read as before; no schema text in the task |
M2 | ✅ 0073 |
| D88 | Optional OTLP export of job spans | 🟠 | The spans of ADR-0048 are exported as they are over OTLP/HTTP JSON by the worker (not the job process), after they are stored; off by default; endpoint, service name and encrypted headers set in Settings → Telemetry export (telemetry.manage); one trace per run; no prompt or output content; no SDK dependency; a failing backend never fails a job |
M2 | ✅ 0074 |
| D89 | Compact stable document reference IDs | 🟠 | Assess persists module/unit scopes; per-unit Markdown ledgers allocate RULE/SEC/GAP sequences without reusing retired numbers; canonical and database keys keep their meaning | M2 | ✅ 0075 |
| D90 | Project memory for runtime jobs | 🟠 | Opt-in Understand navigation hints, verified source evidence, human review and epoch invalidation; live access since ADR-0077 | M2 | ✅ 0076 |
| D91 | Agent-directed live memory | 🟠 | Explicit memory tools query current scoped data through worker-bound IPC; no snapshots or context injection; validated proposals retain human review | M2 | ✅ 0077 |
| D92 | Agent memory learning lifecycle | 🟠 | Immediate learned notes, long-term/daily memory, run scratchpads and reversible deletion across project jobs; reviewed trust is separate | M2 | ✅ 0078 |
| D93 | Agent-directed public web search | 🟠 | Optional project-selected agents use a worker-bound DuckDuckGo tool, fixed endpoint, persistent shared budgets, no key or automatic context loading | M2 | ✅ 0079 |
| D94 | Guarded public-page retrieval | 🟠 | Separately opt-in web_fetch, pinned public DNS per redirect, readable chunks without snapshots, independent expanded search/fetch budgets and live project policy | M2 | ✅ 0080 |
| D95 | Regenerate an existing design | 🟠 | A design run with regenerate writes a set again over a design the units have, in a pull request people review; the stale designs of a changed template are selected and regenerated from the Design page |
M2 | ✅ 0081 |
| D96 | Design readiness, drafts and in-place gap answers | 🟠 | Final runs require merged evidence; explicit drafts cannot unlock later stages; answers correct their original specification rows through reviewed writes | M2 | ✅ 0082 |
| D97 | Design verify loop and contracts | 🟠 | A design run writes callees before callers, then reviews and fixes in rounds until a round finds nothing open (no round limit; it stops when stalled or at the agent cap); a contract reviewer reads units that share interfaces together; the pull request reports how the loop ended and which requirements no design refers to | M2 | ✅ 0083 |
| D98 | Measuring what the built-in plugins write | 🟢 | A COBOL fixture with planted rules, gaps, a secret and a prompt injection, an answer key and a deterministic scorer of the document repository a run wrote; runs are manual on a development installation and recorded per commit and model | M2 | ✅ 0084 |
| D99 | Checked citations and bounded absence | 🟠 | The understand stage checks every source citation of a unit's documents against the checkout and lists those that do not resolve in the understanding record (reported, never corrected); a claim that something is not there carries its search, and confirmed never means observed running |
M2 | ✅ 0085 |
| D100 | Record of the source a job was shown | 🟠 | The kernel emits source.read (path and lines, no content) for what read and grep showed; an agent step with readsTo saves the job's record (partial when shell or git ran); the understand stage reports the specification's citations of lines its job was not shown and the share of the unit's code it was shown |
M2 | ✅ 0086 |
| D101 | Who settles a gap; evidence that moved | 🟢 | Optional Settled by (source-owner, expert, data, check; the kind's default when empty) and Probe columns in the gaps table, carried to GAPS.md, the API and the portal's filter; the understanding record keeps a digest per cited range and the plan lists the cited lines of understood units that changed, with the rules and gaps citing them |
M2 | ✅ 0087 |
| D102 | Parity of a built unit with its rules | 🟠 | The member records per-rule test results and a comparison with the legacy system (counts and rule ids); the review's deterministic parity step shows, per rule, the changed code and tests that name it, the member's reported result and the reviewer's disputes, with levels failed, disputed, reported, static, untested, missing, and reported as the highest Kintsugi can give |
M2 | ✅ 0088 |
| D103 | Built-in command names | 🟢 | A built-in command is named for what it does, without a plugin prefix (assess, plan-understand, understand, design, review, build); its stage id is its name, and the portal shows a member command as /<plugin>:<command> |
M2 | ✅ 0089 |
| D104 | Retrying cancelled runs; memory revision | 🟠 | A cancelled stage run keeps its finished steps and workspace like a failed one and can be retried; a step that reads project memory is fingerprinted with a digest of the memory it can see (without its own run's changes) instead of the attempt; steps with web lookups still run again and the retry says which; a failed or stopped agent attempt keeps its last 20 tool calls with redacted result previews in the run's events; known raw failures are said plainly and a dropped provider connection gets one more try | M2 | ✅ 0090 |
| D105 | Project knowledge for members: the Brain | 🟠 | A tree of one document-repo branch (folders, documents, sections, cards with ids) with a summary per node from the documents themselves, built by the worker without a model or embeddings; members' agents reason over it with brain_tree, brain_read, brain_lookup and brain_grep and cite path, lines and commit; accuracy is measured before it is claimed |
M2 | ✅ 0091 |
| D106 | Tools of the built-in agents | 🟠 | Every built-in agent lists its tools: the file tools (read, ls, grep, find, write, edit) and git for the code review only; none gets shell or codemode; agents of the Agent Builder keep the tools an administrator chooses |
M2 | ✅ 0092 |
| D107 | Secrets out of reach of job processes | 🔴 | With KINTSUGI_JOB_UID/KINTSUGI_JOB_GID set, script steps, hooks and agent jobs run as a user of their own that cannot read the worker's environment; their output and scratch are handed to it per job; provider credentials reach the agent child on stdin only; unset, the worker warns; the Compose default and a non-superuser database role are follow-ups |
M2 | ✅ 0093 |
| D108 | Several answers on one specification | 🟢 | A gap answer records the specification and gap it answers; while one correction of a specification is open, the next answer is refused naming its pull request; the Gaps view shows Answer proposed · PR #n and View pull request; the pull request body carries the answer and its evidence | M2 | ✅ 0094 |
| D109 | API modules without a store | 🟢 | The fifteen skeleton modules that kept writes in memory and that nothing called are removed with the two permissions only they checked (setup.manage, governance.manage); a module stores its data in Postgres from its first commit |
M2 | ✅ 0095 |
| D110 | Wiki spaces and pages | 🟠 | The wiki is a view over the one document repository: numbered roots are system spaces, team spaces under 20-spaces/<space>/, a folder's README.md is its page; front matter carries id: PAGE-<KEY>-0001, labels, status and a folder's order: list; attachments in _attachments/ beside the page (amends the Markdown-only rule); history is Git history; drafts, comments, watches and per-person state in knowledge.wiki_* |
M3 | ✅ 0096 |
| D111 | The Brain and wiki pages | 🟠 | Page attributes (labels, status, owner, space) on Brain nodes, a folder's manual order, archived pages and templates left out by default; a wiki project indexes its default branch; incremental builds with knowledge.brain_ref for links and the broken-link report; a tsvector full-text index and brain_search beside lookup and grep |
M3 | ✅ 0097 |
| D112 | Editing and publishing wiki pages | 🟠 | Markdown source editor with preview; drafts per person and page in Postgres (autosave never commits); publish = one page document-write with expectedHash after a three-way merge, by pull request unless the path is in directPublishPaths and the person holds wiki.publish; deletes, renames and binaries in the write contract; macros as GitHub alerts and kintsugi-* fenced blocks |
M3 | ✅ 0098 |
| D113 | Wiki collaboration and access | 🟠 | Comments (anchored by node and quote), watches and the notification inbox in Postgres, announced on the change feed; mail deferred; viewing bounded by Project Access to the whole repository, no per-page view restriction on content in Git; wiki.comment, wiki.write, wiki.publish, wiki.manage and edit restrictions on path prefixes; the pull request is the approval |
M3 | ✅ 0099 |
| D56 | Container build and deployment | 🔴 | GitHub Actions builds SHA-tagged app/worker images, publishes them to configurable GHCR by default, and deploys the Compose stack over pinned-host-key SSH | M0 | ✅ 0039 |
| D49 | Worker liveness | 🟠 | Each worker upserts workflow.worker_heartbeat every 15 s and marks itself stopped on shutdown; up = seen < 45 s ago (database clock); no HTTP probe, no pg-boss internals |
M0 | ✅ 0030 |
| D33 | Minimum host requirements | 🟢 | Linux, Docker 24+ (26+ for volume subpaths), Compose v2, 4 vCPU / 16 GB / 100 GB | M0 | 🟡 |
| Question | Proposal |
|---|---|
Dedicated document repo, or a kintsugi/ folder in an existing repo? |
A dedicated repo (access and history separate from code) |
| Do runtime results reach Git through PRs or direct commits? | PRs by default; direct commits for auto-commit paths. Current defaults: applications/*/units/**/unit.md, applications/*/units/**/task.md, applications/*/generated/**, applications/*/understanding/plan.md (ADR-0038, ADR-0042) |
| Who authors Kintsugi's commits? | kintsugi-bot + trailers Kintsugi-Job, Kintsugi-Agent |
Mounting /var/run/docker.sock directly amounts to root on the host. Proposal:
- Expose only container create / start / wait / logs / delete (plus images, to pull the runner) through
docker-socket-proxy. - The worker rejects any image other than
kintsugi-runner:<version>and any mount outside the job directory.
A list of priority stacks is needed to choose parsers. Common candidates:
- .NET / VB.NET
- React and other legacy JavaScript frameworks
- PHP
- Java
- Flex
- COBOL / DB2
- stored procedures
- spreadsheet-based design documents, often non-English