@felixdotgo/aidlc-kit 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/DEVELOPMENT.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +59 -0
  4. package/dist/assets/.agents/aidlc/conventions.md +68 -0
  5. package/dist/assets/.agents/aidlc/orchestrator.md +73 -0
  6. package/dist/assets/.agents/aidlc/phase-build.md +23 -0
  7. package/dist/assets/.agents/aidlc/phase-clarify.md +22 -0
  8. package/dist/assets/.agents/aidlc/phase-index.md +14 -0
  9. package/dist/assets/.agents/aidlc/phase-plan.md +21 -0
  10. package/dist/assets/.agents/aidlc/phase-wrap.md +16 -0
  11. package/dist/assets/.agents/aidlc/profiles/generic/profile.json +9 -0
  12. package/dist/assets/.agents/aidlc/profiles/git-submodules/profile.json +9 -0
  13. package/dist/assets/.agents/aidlc/profiles/single/profile.json +9 -0
  14. package/dist/assets/.agents/aidlc/profiles/workspace/profile.json +12 -0
  15. package/dist/assets/.agents/aidlc/rules/gate-check.md +16 -0
  16. package/dist/assets/.agents/aidlc/rules/stack-runtime.md +3 -0
  17. package/dist/assets/.agents/aidlc/schemas/adapter.schema.json +13 -0
  18. package/dist/assets/.agents/aidlc/schemas/config.schema.json +26 -0
  19. package/dist/assets/.agents/aidlc/schemas/manifest.schema.json +12 -0
  20. package/dist/assets/.agents/aidlc/schemas/profile.schema.json +12 -0
  21. package/dist/assets/.agents/aidlc/schemas/state.schema.json +108 -0
  22. package/dist/assets/.agents/aidlc/scripts/context.mjs +15 -0
  23. package/dist/assets/.agents/aidlc/scripts/gate-check.mjs +16 -0
  24. package/dist/assets/.agents/aidlc/scripts/gate-view.mjs +16 -0
  25. package/dist/assets/.agents/aidlc/scripts/lib/context-runtime.mjs +238 -0
  26. package/dist/assets/.agents/aidlc/scripts/lib/runtime.mjs +2 -0
  27. package/dist/assets/.agents/aidlc/scripts/lib/store.mjs +341 -0
  28. package/dist/assets/.agents/aidlc/scripts/render.mjs +24 -0
  29. package/dist/assets/.agents/aidlc/scripts/state.mjs +222 -0
  30. package/dist/assets/.agents/aidlc/scripts/task-next.mjs +27 -0
  31. package/dist/assets/.agents/aidlc/templates/design.md +15 -0
  32. package/dist/assets/.agents/aidlc/templates/intent.md +17 -0
  33. package/dist/assets/.agents/aidlc/templates/lesson.md +28 -0
  34. package/dist/assets/.agents/aidlc/templates/model-contract.md +41 -0
  35. package/dist/assets/.agents/aidlc/templates/workplan.md +9 -0
  36. package/dist/assets/.agents/skills/aidlc-build/SKILL.md +19 -0
  37. package/dist/assets/.agents/skills/aidlc-clarify/SKILL.md +17 -0
  38. package/dist/assets/.agents/skills/aidlc-index/SKILL.md +17 -0
  39. package/dist/assets/.agents/skills/aidlc-plan/SKILL.md +17 -0
  40. package/dist/assets/.agents/skills/aidlc-wrap/SKILL.md +17 -0
  41. package/dist/services/aidlc-coordination/Dockerfile +10 -0
  42. package/dist/services/aidlc-coordination/compose.yaml +25 -0
  43. package/dist/services/aidlc-coordination/package-lock.json +1154 -0
  44. package/dist/services/aidlc-coordination/package.json +20 -0
  45. package/dist/services/aidlc-coordination/src/coordination.mjs +68 -0
  46. package/dist/services/aidlc-coordination/src/lifecycle-core.mjs +341 -0
  47. package/dist/services/aidlc-coordination/src/providers.mjs +23 -0
  48. package/dist/services/aidlc-coordination/src/repository.mjs +203 -0
  49. package/dist/services/aidlc-coordination/src/server.mjs +49 -0
  50. package/dist/services/aidlc-coordination/test/repository.test.mjs +211 -0
  51. package/dist/src/adapters.d.ts +7 -0
  52. package/dist/src/adapters.js +86 -0
  53. package/dist/src/cli.d.ts +2 -0
  54. package/dist/src/cli.js +192 -0
  55. package/dist/src/context.d.ts +14 -0
  56. package/dist/src/context.js +90 -0
  57. package/dist/src/gate.d.ts +40 -0
  58. package/dist/src/gate.js +176 -0
  59. package/dist/src/installer.d.ts +11 -0
  60. package/dist/src/installer.js +173 -0
  61. package/dist/src/ledger.d.ts +22 -0
  62. package/dist/src/ledger.js +119 -0
  63. package/dist/src/legacy.d.ts +2 -0
  64. package/dist/src/legacy.js +37 -0
  65. package/dist/src/managed-content.d.ts +3 -0
  66. package/dist/src/managed-content.js +16 -0
  67. package/dist/src/mcp-setup.d.ts +20 -0
  68. package/dist/src/mcp-setup.js +31 -0
  69. package/dist/src/model.d.ts +249 -0
  70. package/dist/src/model.js +1 -0
  71. package/dist/src/profiles.d.ts +28 -0
  72. package/dist/src/profiles.js +216 -0
  73. package/dist/src/project-migration.d.ts +2 -0
  74. package/dist/src/project-migration.js +144 -0
  75. package/dist/src/project-path.d.ts +2 -0
  76. package/dist/src/project-path.js +20 -0
  77. package/dist/src/state.d.ts +110 -0
  78. package/dist/src/state.js +764 -0
  79. package/dist/src/tracker.d.ts +29 -0
  80. package/dist/src/tracker.js +41 -0
  81. package/dist/src/upgrade.d.ts +11 -0
  82. package/dist/src/upgrade.js +270 -0
  83. package/dist/src/workflow.d.ts +7 -0
  84. package/dist/src/workflow.js +46 -0
  85. package/docs/README.md +31 -0
  86. package/docs/architecture.md +72 -0
  87. package/docs/command-reference.md +110 -0
  88. package/docs/configuration.md +72 -0
  89. package/docs/coordination-service.md +42 -0
  90. package/docs/development.md +106 -0
  91. package/docs/operating-workflow.md +87 -0
  92. package/docs/testing-and-release.md +113 -0
  93. package/package.json +53 -0
package/DEVELOPMENT.md ADDED
@@ -0,0 +1,31 @@
1
+ # Contributing to aidlc-kit
2
+
3
+ This file is the short entry point for maintainers and contributors. Detailed guidance lives in [`docs/`](./docs/README.md) so that user setup, system operation, and repository development can evolve independently.
4
+
5
+ ## Local bootstrap
6
+
7
+ Requirements: Node.js 20 or newer and npm.
8
+
9
+ ```sh
10
+ npm install
11
+ npm test
12
+ npm run lint
13
+ ```
14
+
15
+ ## Contributor documentation
16
+
17
+ - [Development guide](./docs/development.md) — dependencies, repository layout, implementation boundaries, and local commands.
18
+ - [Testing and release](./docs/testing-and-release.md) — focused tests, package smoke test, evaluator, and release readiness.
19
+ - [Architecture](./docs/architecture.md) — module ownership, data flow, and installed-runtime parity.
20
+ - [Configuration reference](./docs/configuration.md) — profiles, rules, Codex/Claude permissions, and project-owned configuration.
21
+
22
+ ## Documentation policy
23
+
24
+ - Keep `README.md` focused on package requirements and setup.
25
+ - Add operational and system guidance to the relevant page in `docs/`.
26
+ - Update command/configuration examples and their tests in the same change as a public contract.
27
+ - Do not duplicate canonical agent instructions from `assets/aidlc/` in overview documentation.
28
+
29
+ ## Delivery boundary
30
+
31
+ Running verification does not authorise publishing, tagging, committing, or pushing. Those actions require separate human approval.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # aidlc-kit
2
+
3
+ `@felixdotgo/aidlc-kit` installs a local AI-DLC workflow into an existing project. The workflow gives coding agents a shared task lifecycle, explicit human review gates, and project-owned state and rules.
4
+
5
+ It is deliberately local-only: workflow assets are bundled with the package, `remoteUpdates` is `false`, and normal status checks never contact a registry.
6
+
7
+ ## Requirements
8
+
9
+ - Node.js 20.17 or newer.
10
+ - An existing project directory.
11
+ - Codex or Claude Code.
12
+
13
+ ## Quick start
14
+
15
+ Run these commands from your existing project's directory to preview the installation, then apply it:
16
+
17
+ ```sh
18
+ npx --package @felixdotgo/aidlc-kit@0.0.1 aidlc-workflow init . --agent codex --dry-run
19
+ npx --package @felixdotgo/aidlc-kit@0.0.1 aidlc-workflow init . --agent codex --yes
20
+ ```
21
+
22
+ `npx` may ask permission to download the package on first use. These examples pin version `0.0.1`. After installation, the project's lifecycle scripts run locally without `npx` or a registry connection.
23
+
24
+ Use the adapter that matches the coding tool:
25
+
26
+ | Tool | `--agent` value | Installed entry point |
27
+ | --- | --- | --- |
28
+ | Codex | `codex` | `AGENTS.md` |
29
+ | Claude Code | `claude` | `CLAUDE.md` and phase skills |
30
+
31
+ Use `--all` to install both supported adapters. Codex installs workspace-write sandboxing with on-request approvals and a project execpolicy that permits only AI-DLC lifecycle scripts; trust the project before starting Codex so that it loads the project configuration. Claude Code installs a local permission allowlist for the same lifecycle-script command prefix without granting general Bash access. Use `--force --yes` only for an initial installation when replacing an unmanaged conflicting file is intentional.
32
+
33
+ Confirm the installed project locally:
34
+
35
+ ```sh
36
+ npx --package @felixdotgo/aidlc-kit@0.0.1 aidlc-workflow status .
37
+ npx --package @felixdotgo/aidlc-kit@0.0.1 aidlc-workflow doctor . --strict
38
+ ```
39
+
40
+ ## Documentation
41
+
42
+ The detailed documentation is organised by task and audience:
43
+
44
+ - [Documentation index](./docs/README.md) — choose the right guide.
45
+ - [Operating the workflow](./docs/operating-workflow.md) — lifecycle, state, gates, and blocked work.
46
+ - [Configuration](./docs/configuration.md) — project configuration, profiles, rules, and adapters.
47
+ - [Command reference](./docs/command-reference.md) — every package CLI command and safety constraint.
48
+ - [Development](./docs/development.md) — local contributor setup, source layout, and implementation rules.
49
+ - [Testing and release](./docs/testing-and-release.md) — verification, evaluator, package smoke test, and release readiness.
50
+ - [Architecture](./docs/architecture.md) — package boundaries and the source-to-installed flow.
51
+ - [AI-DLC Coordination service](./docs/coordination-service.md) — opt-in Docker/remote coordination, security, and polling contract.
52
+
53
+ ## Safety note
54
+
55
+ Only a human may initiate or apply a workflow upgrade. `upgrade` rejects `--yes` and `--force`, requires an interactive terminal, and asks the human to type the target package version. See the [command reference](./docs/command-reference.md#upgrade) before changing an existing installation.
56
+
57
+ ## License
58
+
59
+ MIT
@@ -0,0 +1,68 @@
1
+ # AI-DLC v1 Conventions
2
+
3
+ ## Canonical data
4
+
5
+ Schema v4 is one authoritative store with multiple records: `.agents/data/state/aidlc-state.json` keeps active task state plus a compact archive catalog; immutable terminal records live under `.agents/data/state/archive/` and are verified by digest. `.agents/data/lessons/index.json` is a rebuildable cache, never a source of truth. `.agents/data/memory/agentic-memory.json` is a separate project-owned advisory registry, with explicit promotion/retirement audit data; it is never lifecycle state or a substitute for project rules. Use bounded `task list`, `task find`, and `task show <task-id>` commands; do not persist `BOARD.md` or another editable state projection. Intent, design, and workplan prose remain Markdown review artifacts under a stable task directory keyed by `task_id`.
6
+
7
+ Never edit review artifacts to change state. Use `node .agents/aidlc/scripts/state.mjs`, then run `node .agents/aidlc/scripts/render.mjs <task-id>` when a refreshed workplan is needed.
8
+
9
+ ## Task lifecycle
10
+
11
+ ```text
12
+ clarify/G0_confirm → plan/G1_review → build/G2_codereview → wrap/none → done/none
13
+ ↘ paused/handoff → reopened plan, closed, or superseded → fresh successor G0
14
+ ```
15
+
16
+ Each transition requires the preceding approval evidence. Build additionally requires every decision to be `approved`, `changed`, or `dropped`. The latest passing G1 approval starts the current build boundary. Wrap requires current-build verification, current-build review, and current-build G2 approval; evidence from an older build boundary cannot advance a reopened task.
17
+
18
+ Verification is evaluated independently for each affected area and each `test` or `lint` kind recorded after the current build boundary. At least one verification kind must exist per area, and the latest record of every kind present must pass. A lint pass cannot hide a test failure, or vice versa.
19
+
20
+ `blocked_on_user` is reserved for a gate that is structurally ready and waiting for explicit human approval; wrap has no human gate, so it is rejected there. Every route that leaves a human gate wait, including `paused`, requires the audited form `task status <id> --status <active|paused> --mode audited --reason <reason> --source <source>`, which records a gate-bound diagnostic evidence entry, or a sourced closure/handoff command that leaves its own terminal trail. Entering `paused` from `active` requires the same audited form and records a `Paused while active` diagnostic; resuming `paused → active` needs no audit metadata. `task archive <id> --reason <reason> --source <source>` is the sourced completion alias of `task transition --to done`: it applies the same transition checks and records an `Archive to done` diagnostic. Exactly two compatibility paths exist and neither is a human approval: a migration-stamped legacy G2 wait (the `legacyG2Wait` marker is written only by schema migration and only exempts a still-ready wait from the repair bound; runtime commands consume and clear it) and the command-driven recovery of an invalid `wrap`/`none` wait back to `active`. A real blocker or exhausted repair bound uses `task handoff` with `--kind` exactly one of `repair_exhausted`, `review_exhausted`, `g2_failed`, `release_failed`, `structural_change`, or `other`. Every durable handoff exposes `create_successor`, `supersede`, and `close`; build-phase handoffs additionally expose `reopen_g1`. Reopening G1 resets every non-deferred build item to `todo`. `closed` and `superseded` are terminal non-success outcomes that preserve the phase where work stopped; only `done` is successful completion. A successor is created as a fresh G0 task, then linked atomically with `task supersede`; it never inherits approvals or evidence.
21
+
22
+ Lifecycle commands that end or redirect work require an explicit reason and source:
23
+
24
+ ```sh
25
+ node .agents/aidlc/scripts/state.mjs task handoff <id> --kind <kind> --reason <reason> --source <source>
26
+ node .agents/aidlc/scripts/state.mjs task reopen <id> --to plan --reason <reason> --source <source>
27
+ node .agents/aidlc/scripts/state.mjs task close <id> --reason <reason> --source <source>
28
+ node .agents/aidlc/scripts/state.mjs task supersede <id> --successor <fresh-id> --reason <reason> --source <source>
29
+ ```
30
+
31
+ Decision states:
32
+
33
+ - `unresolved`: build is blocked.
34
+ - `approved`: implement the proposed choice.
35
+ - `changed`: implement the recorded resolution.
36
+ - `dropped`: explicitly out of scope.
37
+
38
+ ## Evidence
39
+
40
+ Evidence kinds are `approval`, `spec`, `test`, `lint`, `review`, and `diagnostic`; results are `pass`, `fail`, or `skip`. Approval evidence is created only by atomic `gate approve`; the generic `evidence add` command rejects `approval`. A skipped verification must state residual risk. Evidence is append-only during a task; corrections add a new record rather than rewriting history, and current-build boundaries use that append order rather than wall-clock ordering.
41
+
42
+ ## Command output contract
43
+
44
+ Every `state.mjs` and `task-next.mjs` command prints one JSON envelope: `{ok: true, result, nextAction?}` on success (with `nextAction` present whenever the command is task-scoped) and a one-line `{ok: false, error: {message, hint?}}` on stderr for failures. A success envelope may additionally carry `warnings: [{code, message, hint?}]` when the mutation persisted but a derived step failed afterwards — `LESSON_INDEX_STALE` (lesson-index rebuild) or `RENDER_FAILED` (workplan render); the mutation is committed, exit stays `0`, and the caller follows the hint instead of treating the command as failed. The explicit repair commands (`lesson rebuild`, `render.mjs`) and `state migrate` still fail loudly. With `--require-stop`, `task-next.mjs` adds a machine-readable `continuation` object to the envelope (`{required, code: CONTINUATION_REQUIRED|STOP_ALLOWED, taskId, classification}` plus `command`, `reason`, `itemId`, and `remainingItems` while work remains) and prints `CONTINUATION_REQUIRED: {json}` as the first stderr line; execute `continuation.command` instead of replying. Exit codes are typed: `0` success, `1` an expected validation or gate error, `2` the `--require-stop` continuation guard (an expected pause, not a failure), `3` an unexpected crash. Commands embedded in `nextAction` carry an explicit `--root` so they run correctly from any working directory.
45
+
46
+ ## Human gate forms
47
+
48
+ Gate presentation is executable, not model-authored. After a passing gate check, set `blocked_on_user`, render the phase artifact when required, then run `node .agents/aidlc/scripts/gate-view.mjs <task-id>` and relay its output verbatim. The default Markdown uses a portable `[!IMPORTANT]` blockquote with explicit task state, artifact links, decision/execution counts, evidence, and exactly one `ACTION REQUIRED` line. Use `--format plain` when the tool does not render Markdown and `--format json` for integrations. Renderer-specific color is enhancement only; approval semantics live in canonical state.
49
+
50
+ G0, G1, and G2 never auto-pass. Gate approval and phase transition are atomic; after a non-terminal transition or item/evidence mutation, continue until the next human gate, real blocker, or completion. Item completion is never a turn-level handoff. The local CLI validates gate readiness and records `--source` as provenance, but without a host-attested channel it cannot prove who authored free-form text; adapters must invoke approval only in a later turn containing explicit user assent.
51
+
52
+ ## Context budget
53
+
54
+ The default phase packet budget is 16,000 characters. Optional rules and diagnostics are omitted first. The next-action contract, full phase contract, approved decisions, safety/spec anchors, task state, and applicable latest evidence are mandatory; if they do not fit, packet generation fails instead of truncating them. Packet output reports characters, estimated tokens, and omitted rule files.
55
+
56
+ ## Repair bounds
57
+
58
+ Repair bounds are machine-enforced from current-build evidence; the model does not have to count.
59
+
60
+ - Verification: at most three failed verify records (`test`/`lint`) per affected area. The third failure flips `nextAction` to `blocked` and adds a `REPAIR_BOUND` error to the G2 gate check.
61
+ - Review: at most two failed review records; the second failure does the same with `--kind review_exhausted`.
62
+ - Security, migration, contract, or where-logic-lives changes reopen G1 immediately.
63
+ - A bound hit produces a diagnosis and human escalation; it never silently passes. Follow the handoff command returned by `nextAction` instead of retrying.
64
+ - Reopening G1 moves the build boundary, which resets both counters for the new cycle.
65
+
66
+ ## Language and scaffold
67
+
68
+ Technical tokens, paths, commands, enum values, and structural headings remain English. Prose follows the task language. Stable emoji headings are: `📋 Problem`, `🗺️ Affected areas`, `💭 Assumptions`, `❓ Open questions`, `🎯 Scope` (with an inline `**🚫 Out:**` list inside it), `🧩 Solution per affected area`, `📌 Spec traceability`, `🔗 Cross-service contracts`, `⚠️ Risks / edge cases`, `🧩 Decisions`, and `🧩 Tasks`. The intent headings and the design headings are enforced verbatim by `gate-check.mjs` at G0 and G1.
@@ -0,0 +1,73 @@
1
+ # AI-DLC v1 Orchestrator
2
+
3
+ This file is the compact kernel contract. Project customization lives under `.agents/project/` (optional — create it when needed; the installer does not scaffold it); discovery indexes live under `.agents/data/index/`; the authoritative lifecycle store uses a compact `.agents/data/state/aidlc-state.json` catalog plus digest-validated terminal records under `.agents/data/state/archive/`; task prose and workplans are review artifacts, not mutable state.
4
+
5
+ ## Turn routing
6
+
7
+ 1. Use `node .agents/aidlc/scripts/state.mjs task list` (or `task find --query <text>`) for bounded routing. Never read or dump the canonical store directly. Use `task show <task-id>` only after selecting one task.
8
+ 2. Resolve `node .agents/aidlc/scripts/state.mjs task next <task-id>` for an existing task; do not infer the next action from prose alone.
9
+ 3. Classify the request as `NEW`, `RESUME`, `SWITCH`, or `OFF-WORKFLOW`.
10
+ - A requested feature, bug fix, or project change is `NEW` unless canonical state already contains the matching unfinished task; a read-only explanation or inspection is `OFF-WORKFLOW`.
11
+ - Bootstrap `NEW` with the exact user-supplied canonical ID when present: run `state.mjs task create`, then execute the clarify phase. `task next` applies only after canonical state exists. When the user supplies no ID, derive a short kebab-case slug from the title (lowercase letters, digits, hyphens; it must match `^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$`, e.g. `fix-login-retry`) and reuse that exact ID for the whole lifecycle.
12
+ - For `SWITCH`, preserve the current task. If it has a durable handoff, ask the user to reopen G1, close it, or create a fresh G0 successor and then supersede it; never mark failed work `done` or inherit approvals into the successor.
13
+ - `task create` fails while another task is actionable (`nextAction` `run_phase`) and returns the actionable task(s) plus the exact `--switch-from <task-id>` acknowledgement. Pass that flag only with explicit user direction to switch; it records a resume-marker diagnostic on each acknowledged task and never pauses or mutates its lifecycle — the acknowledged task remains the authoritative resume target. This guard is local-CLI enforcement; the optional MCP state service does not enforce it.
14
+ 4. For a task, request only its current phase packet with `node .agents/aidlc/scripts/context.mjs <task-id> --phase <phase>`. Do not load every workflow file.
15
+ 5. Use `node .agents/aidlc/scripts/state.mjs` for lifecycle mutations when the active adapter policy is `scripted`. Gate approval always uses the atomic `gate approve` command when scripts are available. Native fallback must apply approval and transition as one logical transaction after the same checks.
16
+ 6. A non-terminal transition is not a stopping point. Continue in the same turn until the next human gate, a real blocker, or completion; do not emit a final handoff between phases.
17
+ After every lifecycle mutation, including item and evidence updates, parse the returned `nextAction`: execute `run_phase`, stop for `await_user`, `blocked`, or `terminal`, and treat only `complete` as successful completion. Completing an item or affected area is progress, not a stopping point; progress belongs in commentary, never a final response. `terminal` means closed/superseded without a success claim. Never convert this loop into automatic human approval.
18
+ Immediately before any final response for a task, run `node .agents/aidlc/scripts/task-next.mjs <task-id> --require-stop` and parse its `continuation` object. Exit code 2 (`continuation.code = CONTINUATION_REQUIRED`) is a hard local guard: execute `continuation.command` instead of replying, and never convert the guard output into a final response or summary. This cannot technically intercept a message already emitted by a model host; if a premature final response slipped out, recover in the very next turn by running `state.mjs task next <task-id>` and executing its returned command — never re-approve a gate to catch up.
19
+ 7. Use `node .agents/aidlc/scripts/render.mjs <task-id>` for the selected task review artifact. `--all` is explicit maintenance only. Never persist a second lifecycle-state projection such as `BOARD.md`.
20
+
21
+ Read-only questions remain off-workflow and do not create state. Multiple tasks may exist, but a session builds one task at a time.
22
+
23
+ ## Gates
24
+
25
+ - `G0_confirm`: the user confirms intent and scope.
26
+ - `G1_review`: the user resolves every design decision and approves the plan.
27
+ - `G2_codereview`: verification and adversarial review have run; the user reviews the code.
28
+
29
+ Before presenting a gate, run `node .agents/aidlc/scripts/gate-check.mjs <task-id> --gate <gate>`, set the validated wait with `node .agents/aidlc/scripts/state.mjs task status <task-id> --status blocked_on_user`, render the task artifact when the phase requires it, then run `node .agents/aidlc/scripts/gate-view.mjs <task-id>` and relay that output verbatim. Structural errors must be fixed. If G2 cannot pass or a repair bound is exhausted, record diagnostic evidence and use `task handoff`; do not set `blocked_on_user` or suggest gate approval. Semantic fidelity remains an LLM/human responsibility. Never mark work complete without executable evidence.
30
+
31
+ Transitions are enforced by the state machine. A gate may not be skipped, and unresolved decisions block build. G2 always requires human approval.
32
+
33
+ ## Quality contract
34
+
35
+ - Inspect relevant files and specs before editing.
36
+ - Make the smallest approved change and preserve unrelated user work.
37
+ - Trace quantified rules, enumerations, and contracts to an exact source.
38
+ - Run the narrowest meaningful verification for every affected area.
39
+ - Review only the task diff against its approved decisions and spec anchors.
40
+ - Repair bounds (three verify cycles per area, two review passes) are machine-enforced from evidence: the bound hit flips `nextAction` to `blocked` and closes G2 with a `REPAIR_BOUND` error. Follow the returned handoff command and escalate with evidence.
41
+ - Structural changes discovered during build reopen G1.
42
+
43
+ Economy models use the same bounded packet contract, gates, executable checks, and quality rules. Escalate to a stronger model or human for security, migrations, cross-service contracts, ambiguous specs, or exhausted repair bounds.
44
+
45
+ ## Delegation contract
46
+
47
+ - At every phase entry and dependency boundary, the lead must triage whether independent, valuable work can proceed in parallel. Fan out only such work, and use at most the available collaboration slots minus the lead; keep dependent or low-value work local.
48
+ - The lead is the single writer for lifecycle state, gate actions, and task review artifacts. Workers never approve or present gates, mutate lifecycle records, or make canonical artifact decisions; every human-gate and state-machine invariant remains in force.
49
+ - Each worker assignment must name a bounded objective, owned paths or read-only scope, dependencies, expected verification, and required return output (summary, changed paths, evidence, and concerns). The lead integrates and verifies worker results before recording evidence or advancing the task.
50
+ - Assign one writer per path. Partition work so concurrent changes cannot overlap; workers may inspect shared files, but must report a needed cross-owner change to the lead rather than edit it. The lead resolves conflicts and performs final integration.
51
+
52
+ ## Customization layers
53
+
54
+ Precedence is deterministic:
55
+
56
+ ```text
57
+ kernel → built-in topology profile → local profile → project config/rules → approved task decisions
58
+ ```
59
+
60
+ Built-in profiles are `topology/generic`, `topology/single`, `topology/workspace`, and `topology/git-submodules`. Stack, delivery, issue-tracker, runtime, and domain rules belong in `.agents/config.json`, `.agents/project/profiles/`, or `.agents/project/rules/` (create these optional directories when first needed), not in this kernel.
61
+
62
+ Configured commands use executable + argument arrays. Never turn configuration into an unreviewed shell string.
63
+
64
+ ## Upgrade boundary — mandatory
65
+
66
+ Workflow upgrades are initiated and applied only by a human through documented `npm` or `npx` commands.
67
+
68
+ - Never query npm or another registry for newer workflow versions.
69
+ - Never run an `npm`/`npx` command whose purpose is installing, detecting, previewing, or upgrading this workflow. Project-configured build, test, and lint commands remain allowed.
70
+ - Never suggest an upgrade merely because an installed version is old.
71
+ - You may explain the command and review a dry-run report the user supplies.
72
+
73
+ `status` and `doctor` inspect only local state. The workflow has no background check, postinstall update, remote profile lookup, or runtime asset download.
@@ -0,0 +1,23 @@
1
+ # AI-DLC · Build (G2)
2
+
3
+ Precondition: G1 approval evidence exists and every decision is resolved.
4
+
5
+ Use the shared orchestration contract in `orchestrator.md`. The lead may assign a batch of independent canonical items to workers only after giving each one exclusive file/area ownership; shared/public surfaces, overlapping paths, lifecycle actions, gates, final integration, and task-wide review remain lead-owned. The lead integrates and inspects each result before marking items or recording any lifecycle evidence/state mutation.
6
+
7
+ 1. Read the build phase packet; re-open cited spec lines immediately before implementing dependent behavior.
8
+ 2. Read `templates/model-contract.md` and apply its COSTARS build emphasis to the implementation context.
9
+ 3. Loop over canonical task items, one item and one affected area at a time, or a safe batch of such independent items under the shared orchestration contract. Prefer an `in_progress` item, otherwise select the next `todo` item; inspect callers before shared/public changes and preserve unrelated work. For a batch, wait for all assigned results, integrate and narrowly verify each owned area, then have the lead record progress and mark each item `done` or explicitly `deferred` with `node .agents/aidlc/scripts/state.mjs task item <task-id> <item-id> --status done|deferred`. Parse every returned `nextAction` immediately and stop for a `blocked` or `terminal` action; otherwise, after the batch use only the final/current authoritative `nextAction` to continue. An item or area completion may be reported only as commentary/progress, never as a final response. Continue the loop while `nextAction.classification` is `run_phase`; when no actionable item remains, continue directly into aggregate verification, adversarial review, and G2 preparation.
10
+ 4. A new structural or spec conflict requires `node .agents/aidlc/scripts/state.mjs task handoff <task-id> --kind structural_change --reason <reason> --source <source>`; after explicit user direction, `task reopen <task-id> --to plan --reason <reason> --source <user-message>` invalidates the prior G1 approval. Do not spend repair cycles on an unapproved workaround.
11
+ 5. Run the narrowest configured test/lint per area. Record every result with `node .agents/aidlc/scripts/state.mjs evidence add <task-id> --kind test|lint --area <area> --result pass|fail|skip --source <command-or-tool> --detail <summary>`; a skip must state residual risk in `--detail`. The repair bound is machine-enforced: after three failed verify records in one area (current build), `nextAction` turns `blocked` and G2 is structurally closed — record the failed diagnostic and follow the returned handoff action instead of retrying.
12
+ 6. Perform an adversarial review of only the task diff against decisions and spec anchors, using every CRITICS section from `templates/model-contract.md`. Record findings and the outcome with `evidence add <task-id> --kind review --result pass|fail --source <reviewer> --detail <findings>`. The review bound is machine-enforced after two failed review records; the returned handoff action uses `--kind review_exhausted`.
13
+ 7. Handoff kinds are exactly: `repair_exhausted`, `review_exhausted`, `g2_failed`, `release_failed`, `structural_change`, `other`.
14
+ 8. Mark items and record per-area verify evidence, render the workplan, and run `node .agents/aidlc/scripts/gate-check.mjs <task-id> --gate G2_codereview`. Only after the check passes, set task status to `blocked_on_user` with `node .agents/aidlc/scripts/state.mjs task status <task-id> --status blocked_on_user`.
15
+ 9. Run `node .agents/aidlc/scripts/gate-view.mjs <task-id>`, relay it verbatim, and stop for human review. Presenting the gate ends this turn.
16
+
17
+ ## ONLY in a later turn, after the user explicitly approves G2
18
+
19
+ Explicit approval is a user message that says yes to this gate. Then — and only then — run `node .agents/aidlc/scripts/state.mjs gate approve <task-id> --gate G2_codereview --source <the-user-approval-message>`, parse the returned `nextAction`, and execute its `run_phase` command before emitting any final response. Continue through `wrap` to `complete` unless delivery authority or a real blocker is missing; never invent approval. If the user instead requests fixes, record the rejection as review evidence (`--kind review --result fail`), cancel the wait with `task status <task-id> --status active --mode audited --reason <requested-changes> --source <the-user-message>`, and continue the build loop.
20
+
21
+ Before any final response, execute `task-next.mjs <task-id> --require-stop`; a continuation-required result prohibits a final response.
22
+
23
+ Post-condition: every task is done or explicitly deferred, verification/review evidence is honest, the diff matches approved decisions, and residual risks are visible.
@@ -0,0 +1,22 @@
1
+ # AI-DLC · Clarify (G0)
2
+
3
+ Goal: confirm intent before discovery cost.
4
+
5
+ When independent, read-only index or ambiguity checks exist, use the shared orchestration contract in `orchestrator.md` to delegate bounded workstreams. The lead agent alone reconciles their findings, writes the intent brief, and performs every lifecycle or gate action.
6
+
7
+ 1. Read the compact repository/spec indexes if available; do not scan implementation code.
8
+ 2. Read `templates/model-contract.md` and apply its COSTARS clarify emphasis to the intent brief. Use CRITICS only for elevated risk, ambiguity, or model disagreement.
9
+ 3. Canonical task state already exists from turn routing (`task create` runs there, before this packet). Never create it a second time; a repeated create fails with `Task already exists`.
10
+ 4. Fill the intent template: problem, affected areas, assumptions, open questions with safe defaults, and decidable in/out scope.
11
+ 5. Run `node .agents/aidlc/scripts/gate-check.mjs <task-id> --gate G0_confirm` and fix every structural error. Only after it passes, set the gate wait with `node .agents/aidlc/scripts/state.mjs task status <task-id> --status blocked_on_user`, then render only this task with `node .agents/aidlc/scripts/render.mjs <task-id>`.
12
+ 6. Run `node .agents/aidlc/scripts/gate-view.mjs <task-id>`, relay the output verbatim, and stop. Presenting the gate ends this turn.
13
+
14
+ ## ONLY in a later turn, after the user explicitly approves G0
15
+
16
+ Explicit approval is a user message that says yes to this gate (for example "ok", "approve", "duyệt"). Resolving questions or requesting changes is NOT approval. Then — and only then — run `node .agents/aidlc/scripts/state.mjs gate approve <task-id> --gate G0_confirm --source <the-user-approval-message>`, parse the returned `nextAction`, and execute its `run_phase` command before emitting any final response. Continue into `plan` until G1 or a real blocker; never invent approval. If the user instead requests changes, revise the intent while the task waits, or cancel the wait explicitly with `task status <task-id> --status active --mode audited --reason <what-changed> --source <the-user-message>`.
17
+
18
+ Read-only questions remain off-workflow. The task language is set here and retained throughout the lifecycle.
19
+
20
+ Post-condition: a teammate with no chat context can understand the problem and scope; every affected area has an indexed source or explicitly says `none indexed`.
21
+
22
+ Before any final response, execute `task-next.mjs <task-id> --require-stop`; a continuation-required result prohibits a final response.
@@ -0,0 +1,14 @@
1
+ # AI-DLC · Index
2
+
3
+ Generate compact repository and specification manifests at `.agents/data/index/repo-map.md` and `.agents/data/index/specs-index.md` without assuming a particular stack or repository layout.
4
+
5
+ Use the shared orchestration contract in `orchestrator.md` for independent discovery roots. Workers return bounded findings only; the lead reconciles them and is the sole writer of both canonical manifests.
6
+
7
+ 1. Resolve configured topology profiles and discovery roots.
8
+ 2. Detect areas from project markers and local profile rules. Built-in topologies are generic, single repository, workspace/monorepo, and git submodules.
9
+ 3. Index configured spec roots plus relevant README, docs, and API descriptions. Read only titles and short leading sections.
10
+ 4. Record each area, stack marker, narrow verification command, spec document, keywords, and one-line summary.
11
+ 5. Write only the two canonical manifests under `.agents/data/index/`; never create `.aidlc/index/` or write discovery indexes into `.agents/data/state/`.
12
+ 6. Keep manifests small and deterministic; report unknown stacks rather than guessing.
13
+
14
+ Indexing is maintenance and never creates a task. Stack, Docker, screen-code, runtime, and domain discovery belong in local profiles/rules, not this phase contract.
@@ -0,0 +1,21 @@
1
+ # AI-DLC · Plan (G1)
2
+
3
+ Precondition: canonical state contains passing G0 approval evidence.
4
+
5
+ Use the shared orchestration contract in `orchestrator.md` to fan out only independent, bounded discovery streams. Workers return summaries and exact anchors; the lead reconciles conflicts, writes design/workplan content, and is the sole lifecycle and gate writer.
6
+
7
+ 1. Retrieve only matched specs and impacted symbols. Parallelize bounded discovery when available; return summaries and exact spec anchors, not file dumps.
8
+ 2. Read `templates/model-contract.md` and apply its COSTARS plan emphasis. Use CRITICS only for elevated risk, ambiguity, or model disagreement.
9
+ 3. Fill the design template with the solution per affected area, exact sources for quantified rules, contracts, risks, and reuse candidates.
10
+ 4. Add every real judgement call with `node .agents/aidlc/scripts/state.mjs decision set <task-id> <decision-id> --status unresolved --label <label> --resolution <proposed-default>`. Code/spec conflicts and ambiguous enumerations are always decisions.
11
+ 5. Add implementation items with `node .agents/aidlc/scripts/state.mjs task item <task-id> <item-id> --status todo --label <label>` and configure narrow verification commands; render the workplan review artifact with `node .agents/aidlc/scripts/render.mjs <task-id>`.
12
+ 6. Unresolved decisions block the G1 gate structurally. Present them to the user and apply each answer with `decision set <task-id> <decision-id> --status approved|changed|dropped --resolution <user-resolution>`. Do not treat a decision answer as gate approval.
13
+ 7. When every decision is resolved, run `node .agents/aidlc/scripts/gate-check.mjs <task-id> --gate G1_review` and fix every structural error. Only after it passes, set the gate wait with `node .agents/aidlc/scripts/state.mjs task status <task-id> --status blocked_on_user`, run `node .agents/aidlc/scripts/gate-view.mjs <task-id>`, relay it verbatim, and stop. G1 always requires explicit human approval.
14
+
15
+ ## ONLY in a later turn, after the user explicitly approves G1
16
+
17
+ Explicit approval is a user message that says yes to this gate (for example "approve", "ok", "duyệt"). Resolving decisions is NOT approval — never run gate approve just because no decision remains unresolved. Then — and only then — run `node .agents/aidlc/scripts/state.mjs gate approve <task-id> --gate G1_review --source <the-user-approval-message>`, parse the returned `nextAction`, and execute its `run_phase` command before emitting any final response. Continue into `build` until G2 or a real blocker; never invent approval. If the user instead requests plan changes, revise the design/workplan, or cancel the wait explicitly with `task status <task-id> --status active --mode audited --reason <what-changed> --source <the-user-message>`.
18
+
19
+ Post-condition: the plan names concrete affected areas/paths, traces every relied-upon value to a source, exposes conflicts, and needs no implementation judgement beyond mechanical details.
20
+
21
+ Before any final response, execute `task-next.mjs <task-id> --require-stop`; a continuation-required result prohibits a final response.
@@ -0,0 +1,16 @@
1
+ # AI-DLC · Wrap
2
+
3
+ Precondition: the user approved G2 and canonical state contains passing G2 approval evidence.
4
+
5
+ Wrap is success-only and has NO human gate (`gate: none`): never set `blocked_on_user` here — the CLI rejects it. `closed` and `superseded` tasks are terminal at the phase where they stopped and never enter wrap or imply release success.
6
+
7
+ Use the shared orchestration contract in `orchestrator.md` for independent read-only delivery-policy, lesson, or residual-risk checks. The lead reconciles outputs and is the only agent that records lessons/delivery evidence, performs delivery actions, or transitions the task.
8
+
9
+ 1. Commit only when the user requested it. Follow the project's configured delivery policy; kernel does not assume submodules, branches, PR provider, or issue tracker.
10
+ 2. Review durable corrections. Record each with `node .agents/aidlc/scripts/state.mjs lesson record <task-id> <lesson-id> --summary <s> --prevention <p> --example <e> --source <source>`, including provenance; if none exist, run `node .agents/aidlc/scripts/state.mjs lesson none <task-id> --reason <reason> --source <source>`. Promote advisory project memory only with explicit user approval via `state.mjs memory promote`; retirement also requires an explicit audited approval. Prefer executable enforcement over prose. Memory and lesson-index commands are not task-scoped, so their output has no `nextAction` — continue the wrap steps in order.
11
+ 3. Record delivery evidence and residual risk. Rebuild/search lessons and manage advisory memory only through the installed lifecycle script; never hand-edit the derived index or memory registry.
12
+ 4. Complete the task with `node .agents/aidlc/scripts/state.mjs task transition <task-id> --mode audited --to done --reason <completion-summary> --source <source>` (or `task archive <task-id> --reason <completion-summary> --source <source>`); the lesson disposition from step 2 is required first. Schema v3 writes a digest-validated terminal record and compacts the active catalog. Refresh only this task's review artifact.
13
+
14
+ Post-condition: reported commits/integrations match reality, the terminal task and lesson disposition are durable, and no local rule was silently admitted.
15
+
16
+ Before any final response, execute `task-next.mjs <task-id> --require-stop`; a continuation-required result prohibits a final response.
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "topology/generic",
4
+ "topology": "generic",
5
+ "discovery": { "roots": ["."], "workspaceMarkers": [] },
6
+ "specs": { "roots": [] },
7
+ "commands": {},
8
+ "rules": { "include": [] }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "topology/git-submodules",
4
+ "topology": "git-submodules",
5
+ "discovery": { "roots": ["."], "workspaceMarkers": [".gitmodules"] },
6
+ "specs": { "roots": [] },
7
+ "commands": {},
8
+ "rules": { "include": [] }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "topology/single",
4
+ "topology": "single",
5
+ "discovery": { "roots": ["."], "workspaceMarkers": [] },
6
+ "specs": { "roots": [] },
7
+ "commands": {},
8
+ "rules": { "include": [] }
9
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "topology/workspace",
4
+ "topology": "workspace",
5
+ "discovery": {
6
+ "roots": ["."],
7
+ "workspaceMarkers": ["package.json", "pnpm-workspace.yaml", "lerna.json"]
8
+ },
9
+ "specs": { "roots": [] },
10
+ "commands": {},
11
+ "rules": { "include": [] }
12
+ }
@@ -0,0 +1,16 @@
1
+ # Gate-check command (AI-DLC · project rule)
2
+
3
+ > Project-specific executable for the gate self-check. The generic contract lives in `conventions.md`, section "Human gate forms".
4
+
5
+ ## Command
6
+
7
+ ```sh
8
+ node .agents/aidlc/scripts/gate-check.mjs <task-id> --gate <gate>
9
+ ```
10
+
11
+ The command is offline and dependency-free. Exit `0` means no structural error; exit `1` means at least one `ERROR`.
12
+
13
+ ## Caveats
14
+
15
+ - Semantic correctness, prose language, spec interpretation and code quality remain LLM/human-reviewed.
16
+ - AI agents may run this gate checker. It is unrelated to workflow upgrade, which agents must never run.
@@ -0,0 +1,3 @@
1
+ # Stack runtime — concrete commands (AI-DLC · project rule)
2
+
3
+ > Optional project-specific stack lifecycle/exec commands. Keep them idempotent and check-first, never tear down a shared running stack, and configure narrow test/lint commands in `.agents/config.json` or local profiles.
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "AI-DLC local declarative adapter",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["schemaVersion", "id", "displayName", "detect", "files"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 },
8
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
9
+ "displayName": { "type": "string", "minLength": 1 },
10
+ "detect": { "type": "array", "items": { "type": "string" } },
11
+ "files": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["path", "content"], "properties": { "path": { "type": "string" }, "content": { "type": "string" }, "strategy": { "enum": ["replace", "managed-block"] } } } }
12
+ }
13
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "title": "AI-DLC project configuration",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["schemaVersion", "extends", "specs", "commands", "rules", "risk", "context"],
6
+ "properties": {
7
+ "schemaVersion": { "enum": [1, 2, 3] },
8
+ "extends": { "type": "array", "items": { "type": "string", "minLength": 1 } },
9
+ "specs": { "type": "object", "required": ["roots"], "properties": { "roots": { "type": "array", "items": { "type": "string" } } } },
10
+ "commands": { "type": "object", "additionalProperties": { "$ref": "#/$defs/command" } },
11
+ "rules": { "type": "object", "required": ["include"], "properties": { "include": { "type": "array", "items": { "type": "string" } } } },
12
+ "risk": { "type": "object", "required": ["default"], "properties": { "default": { "enum": ["low", "normal", "high", "regulated"] } } },
13
+ "context": { "type": "object", "required": ["maxChars"], "properties": { "maxChars": { "type": "integer", "minimum": 4000, "maximum": 128000 } } },
14
+ "agentState": { "type": "object", "additionalProperties": { "enum": ["native", "scripted"] } },
15
+ "tracker": { "type": "object", "additionalProperties": false, "required": ["enabled"], "properties": { "enabled": { "type": "boolean" }, "provider": { "enum": ["backlog"] }, "spaceUrl": { "type": "string", "format": "uri" }, "project": { "type": "string", "minLength": 1 }, "tokenEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }, "workflow": { "enum": ["waterfall", "scrum"] }, "mapping": { "type": "object", "properties": { "statuses": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 1 } }, "gateFieldId": { "type": "integer", "minimum": 1 } } } } },
16
+ "mcp": { "type": "object", "additionalProperties": false, "required": ["enabled"], "properties": { "enabled": { "type": "boolean" }, "endpoint": { "type": "string", "format": "uri" }, "workspace": { "type": "string", "minLength": 1 }, "tokenEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }, "pollMs": { "type": "integer", "minimum": 1000, "maximum": 3600000 }, "providers": { "type": "array", "items": { "enum": ["jira", "trello", "github-issues"] }, "uniqueItems": true } } }
17
+ },
18
+ "$defs": {
19
+ "command": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["command", "args"],
23
+ "properties": { "command": { "type": "string", "minLength": 1 }, "args": { "type": "array", "items": { "type": "string" } } }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "title": "AI-DLC managed installation manifest",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["schemaVersion", "packageVersion", "workflow", "source", "remoteUpdates", "managedBy", "adapters", "files"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 2 }, "packageVersion": { "type": "string" }, "workflow": { "const": "AI-DLC" },
8
+ "source": { "const": "local-package-assets" }, "remoteUpdates": { "const": false }, "managedBy": { "const": "aidlc-workflow" },
9
+ "adapters": { "type": "array", "items": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" } },
10
+ "files": { "type": "object", "additionalProperties": { "type": "object", "required": ["hash", "owner", "strategy"], "properties": { "hash": { "type": "string" }, "owner": { "type": "string" }, "strategy": { "enum": ["replace", "managed-block"] } } } }
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "title": "AI-DLC declarative profile",
3
+ "type": "object",
4
+ "required": ["schemaVersion", "id", "topology"],
5
+ "properties": {
6
+ "schemaVersion": { "const": 1 },
7
+ "id": { "type": "string" },
8
+ "extends": { "type": "array", "items": { "type": "string" } },
9
+ "topology": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,127}$" },
10
+ "discovery": { "type": "object" }, "specs": { "type": "object" }, "commands": { "type": "object" }, "rules": { "type": "object" }
11
+ }
12
+ }