@rasensio/aidlc-content 2.27.0 → 2.29.0
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/templates.d.ts +7 -0
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +9 -0
- package/dist/templates.js.map +1 -1
- package/docs/cost-tracking.md +25 -3
- package/docs/hygiene-and-compliance.md +30 -3
- package/docs/index.yaml +6 -0
- package/docs/knowledge-graph.md +2 -2
- package/docs/lifecycle.md +14 -0
- package/docs/reviews-and-guidance.md +4 -2
- package/docs/roadmap.md +55 -14
- package/docs/skills-and-platforms.md +29 -11
- package/guidance/index.yaml +5 -0
- package/guidance/mermaid-diagrams.md +219 -0
- package/howto/make-a-custom-template.md +78 -0
- package/package.json +1 -1
- package/packs/gxp/controls.yaml +479 -0
- package/packs/gxp/guidance/gxp-constraints.md +159 -0
- package/packs/gxp/pack.yaml +35 -0
- package/packs/sox/controls.yaml +2 -1
- package/packs/sox/guidance/sox-constraints.md +2 -1
- package/resources/rules/decision-register.md +3 -3
- package/resources/rules/departures.md +3 -1
- package/resources/rules/fresh-main.md +25 -0
- package/resources/rules/unattended.md +1 -1
- package/skills/00-overview.md +3 -4
- package/skills/03-entry-point.md +1 -0
- package/skills/20-requirements.md +1 -0
- package/skills/30-design.md +16 -3
- package/skills/50-testing.md +15 -0
- package/skills/60-deployment.md +38 -4
- package/skills/81-continue.md +2 -1
- package/skills/84-autopilot.md +1 -1
- package/skills/90-retrospective.md +1 -1
- package/templates/quick-feature.yaml +3 -0
- package/templates/system.md +39 -0
|
@@ -71,7 +71,8 @@ Make sure each of these leaves a record, because the record is the evidence:
|
|
|
71
71
|
|
|
72
72
|
## What PC5 does not evidence
|
|
73
73
|
|
|
74
|
-
PC5 is judged from `sessions.ndjson
|
|
74
|
+
PC5 is judged from the instance's `sessions.ndjson` (under `<git-common-dir>/aidlc/records/`,
|
|
75
|
+
read through `aidlc cost <instance>`), `transitions.log`, each phase file's
|
|
75
76
|
`completed_by`, the autopilot approval record and `refusals.ndjson`. The identities in
|
|
76
77
|
the trail are as recorded, not authenticated: a session id and a git user name say who
|
|
77
78
|
the tool was told it was, not who it was. And one person who both directs the agent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The decision-register rule
|
|
2
2
|
|
|
3
|
-
Most design decisions are knowledge-graph entries. The few that bind the whole project go to one readable file,
|
|
3
|
+
Most design decisions are knowledge-graph entries. The few that bind the whole project go to one readable file, `.aidlc/decisions/decision-register.md`, where a person can see what was rejected, approve the choice, and know what would reopen it.
|
|
4
4
|
|
|
5
5
|
## Which decisions go to the register
|
|
6
6
|
|
|
@@ -15,10 +15,10 @@ Everything else is recorded as a `decision` entity exactly as before. When unsur
|
|
|
15
15
|
|
|
16
16
|
## Writing an entry
|
|
17
17
|
|
|
18
|
-
1. If
|
|
18
|
+
1. If `.aidlc/decisions/decision-register.md` does not exist, create it and its folder by copying `.aidlc/resources/templates/decision-register.md`, leaving out its `aidlc:generated` line: the register belongs to the project, and `aidlc update` never touches it. Only a project-wide decision creates the file.
|
|
19
19
|
2. Add the entry from the skeleton, numbered one past the highest in the file, with every option considered and "What would reopen it" filled in. Add its row to the status table in the same edit. If another branch merged the same number first, take the next free number before merging; a number is fixed once its entry is on the main branch.
|
|
20
20
|
3. Write it with status **Proposed**. Ask the person whether to accept it, through the **Question Protocol** (`.aidlc/resources/rules/question-protocol.md`) in `design-questions.md`. Their answer is the only thing that makes it **Accepted**; no gate or transition does. Record the answer by changing the entry's status-table row — to Accepted, or to Rejected with the design following their choice. The status table is the only place the current status lives.
|
|
21
|
-
4. Record a pointer in the knowledge graph, never a copy: `aidlc knowledge add --type decision --id adr-<nnnn>-<slug> --name "ADR-<nnnn>: <title>" --description "ADR-<nnnn> in
|
|
21
|
+
4. Record a pointer in the knowledge graph, never a copy: `aidlc knowledge add --type decision --id adr-<nnnn>-<slug> --name "ADR-<nnnn>: <title>" --description "ADR-<nnnn> in .aidlc/decisions/decision-register.md: <title>" --source .aidlc/decisions/decision-register.md`. The options, reason and reopen line live in the register only.
|
|
22
22
|
|
|
23
23
|
## Superseding
|
|
24
24
|
|
|
@@ -12,13 +12,15 @@ A change that narrows, widens or replaces what one of three sources says:
|
|
|
12
12
|
|
|
13
13
|
A choice those sources leave open is not a departure: internal names, file layout, the order of work, how something is tested. Decide it and record it as usual; do not ask.
|
|
14
14
|
|
|
15
|
+
Before a decision is recorded, read it against the SHALL text of each criterion it touches — what that criterion says must happen: a decision that does what that text rules out is a departure, and one that only chooses within it is not.
|
|
16
|
+
|
|
15
17
|
Example: the user picked the Cockpit layout, and building the one-column Stream instead, because Cockpit is harder, is a departure. Calling the module `cockpit.ts` or `dashboard.ts` is not.
|
|
16
18
|
|
|
17
19
|
## What to do
|
|
18
20
|
|
|
19
21
|
Stop before the change is written — in design, before it reaches `design.md`; in implementation, before the code. Ask through the **Question Protocol** (`.aidlc/resources/rules/question-protocol.md`) in that phase's question file. Quote the source and what it says, and make keeping what was agreed one of the options.
|
|
20
22
|
|
|
21
|
-
A change the person accepts that alters a completed `requirements.md` goes through an amendment (**Amending a Completed Phase**, in the requirements skill), never a silent edit.
|
|
23
|
+
A change the person accepts that alters a completed `requirements.md` goes through an amendment (**Amending a Completed Phase**, in the requirements skill), never a silent edit. A criterion changed to answer a review finding goes through an amendment too, never rewritten in place.
|
|
22
24
|
|
|
23
25
|
## Unattended
|
|
24
26
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# The fresh-main rule
|
|
2
|
+
|
|
3
|
+
A session that reads state from a stale `main` shows work as open that a merge already finished. So before the entry skill or `aidlc-continue` reads any state, bring the primary checkout's `main` up to date when that is safe.
|
|
4
|
+
|
|
5
|
+
## The step
|
|
6
|
+
|
|
7
|
+
Run these exactly, in order, from wherever the session is, in one shell. Each one either passes or ends the step:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
common="$(git rev-parse --path-format=absolute --git-common-dir)" # fails outside git
|
|
11
|
+
primary="$(dirname "$common")"
|
|
12
|
+
git -C "$primary" symbolic-ref --short HEAD # must print main
|
|
13
|
+
git -C "$primary" fetch --quiet origin main # must succeed
|
|
14
|
+
git -C "$primary" status --porcelain --untracked-files=no # must print nothing
|
|
15
|
+
git -C "$primary" rev-list --count main..main@{upstream} # 0 means up to date: stop here
|
|
16
|
+
git -C "$primary" merge --ff-only --quiet main@{upstream} # must succeed
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- Outside a git repository the first command fails: skip the step and say nothing.
|
|
20
|
+
- Any other check that fails, a failed fetch, or a refused fast-forward ends the step with one line naming which, for example `main not updated: the primary checkout has uncommitted changes`. Then read the local state as it is.
|
|
21
|
+
- A fast-forward that went through is one line too: `main fast-forwarded by <n> commit(s)`.
|
|
22
|
+
|
|
23
|
+
Untracked files do not block the step: `merge --ff-only` itself refuses when one would be overwritten, so it is never unsafe.
|
|
24
|
+
|
|
25
|
+
The step uses git only, so it needs no CLI. It never commits, stashes, resets, rebases or pushes, and it never switches the primary checkout's branch. Unattended, a failed check is the same one line and nothing more: it is information, not a stop.
|
|
@@ -69,7 +69,7 @@ Each bullet begins with its one outcome; a condition after it is part of the rul
|
|
|
69
69
|
- `open-question` — **default and log**: the recommended option, marked `(unattended default)`; if it is a hard-stop class, hard stop — never another option.
|
|
70
70
|
- `requirements-confirmation` — **hard stop** when the requirements exceed the roadmap item; inside it, nothing is confirmed or logged.
|
|
71
71
|
- `design-confirmation` — **hard stop** when the design exceeds the roadmap item; inside it, nothing is confirmed or logged.
|
|
72
|
-
- `phase-end-turn` — **default and log**: continue into the next phase, unless `AIDLC_PAUSE_AFTER` names the phase just completed, which is a review boundary.
|
|
72
|
+
- `phase-end-turn` — **default and log**: continue into the next phase, unless `AIDLC_PAUSE_AFTER` names the phase just completed, which is a review boundary, or the launch prompt names one phase: end when it completes, at the release boundary for testing and deployment.
|
|
73
73
|
- `review-boundary` — **review boundary**: `AIDLC_PAUSE_AFTER` names the phase just completed.
|
|
74
74
|
- `fresh-session` — **default and log**: continue; the runner decides where sessions start.
|
|
75
75
|
- `own-change-revert` — **default and log**: reverting this session's own change, after keeping a copy.
|
package/skills/00-overview.md
CHANGED
|
@@ -29,7 +29,7 @@ Seven ordered phases. Not all apply to every task:
|
|
|
29
29
|
|
|
30
30
|
1. **Ideation** — Problem exploration, goals, constraints
|
|
31
31
|
2. **Requirements** — Acceptance criteria, user stories, scope
|
|
32
|
-
3. **Design** — Architecture, interfaces, data flow; register: `.aidlc/resources/rules/decision-register.md`
|
|
32
|
+
3. **Design** — Architecture, interfaces, data flow; register: `.aidlc/resources/rules/decision-register.md`, kept in `.aidlc/decisions/decision-register.md`
|
|
33
33
|
4. **Implementation** — Code following the design; agent per task: `.aidlc/resources/rules/task-agents.md`
|
|
34
34
|
5. **Testing** — Verification against requirements
|
|
35
35
|
6. **Deployment** — Release preparation and execution
|
|
@@ -60,7 +60,7 @@ All state lives in `.aidlc/state/<instance-name>/`. Read and write state as foll
|
|
|
60
60
|
### Writing State
|
|
61
61
|
|
|
62
62
|
1. **Before mutating state**, check whether another session already holds a claim on the instance. Claims live in `<git-common-dir>/aidlc/claims/<instance>.yaml` (resolve via `git rev-parse --git-common-dir`) so every worktree of the repo sees the same claims; outside a git repo (or on instances not yet migrated) the claim is the `claim:` field in `instance.yaml`. If another session holds a non-stale claim, warn and request override confirmation.
|
|
63
|
-
2. Claim with `aidlc claim <instance>` (release with `aidlc release <instance>`) — it writes the claim file and appends the claim event
|
|
63
|
+
2. Claim with `aidlc claim <instance>` (release with `aidlc release <instance>`) — it writes the claim file and appends the claim event in one step. Without the CLI, do both: write the claim file (fields: `session`, `claimed_at`, `id_source`, optional `renewed_at`/`worktree_path`), then append `{"event":"claim|release","session_id":"...","id_source":"agent","agent":"<platform>","timestamp":"<ISO 8601 UTC>"}` to `<git-common-dir>/aidlc/records/<key>/state/<instance>/sessions.ndjson` (`<key>`: `@root`, or the project's URL-encoded path; outside git, `.aidlc/state/<instance>/`). Append only. Renew with `aidlc claim --renew <instance>` at every phase transition and before long operations; a claim older than `claim_timeout_minutes` is stale.
|
|
64
64
|
3. Update phase state files as you produce artifacts.
|
|
65
65
|
4. Append a transition record to `transitions.log` only on successful phase transitions. When completing a phase, set `metrics.elapsed_seconds` in its `phase-<name>.yaml` from `entered_at` → `completed_at` — cost and time reports read it.
|
|
66
66
|
5. After a successful phase transition, fire lifecycle actions: `on-phase-exit` for the phase you left, then `on-phase-enter` for the phase you entered (see **Lifecycle Actions**).
|
|
@@ -112,8 +112,7 @@ Safe for the instance is not the same as free for the person, so two rules bind
|
|
|
112
112
|
A completed phase's artifact is changed **only through an amendment**, never edited in
|
|
113
113
|
place. The gates check that artifacts exist, not that they still agree with each other, so a
|
|
114
114
|
direct edit leaves the phase `complete`, the downstream artifacts describing the old
|
|
115
|
-
requirement, and every gate passing.
|
|
116
|
-
amendments exist to prevent.
|
|
115
|
+
requirement, and every gate passing.
|
|
117
116
|
|
|
118
117
|
The protocol: retire the criterion in place (`- AC-<n> (retired YYYY-MM-DD, superseded by
|
|
119
118
|
AC-<m>): ...`), issue its replacement with a fresh ID, append an
|
package/skills/03-entry-point.md
CHANGED
|
@@ -26,6 +26,7 @@ If `.aidlc/context/` does not exist or contains no `.md` files, defer to the **a
|
|
|
26
26
|
> {{glossary:claim}}
|
|
27
27
|
> {{glossary:template}}
|
|
28
28
|
|
|
29
|
+
0. Before reading any state, run the step in **The fresh-main rule** (`.aidlc/resources/rules/fresh-main.md`).
|
|
29
30
|
1. List the directories under `.aidlc/state/`. Each directory is a lifecycle instance.
|
|
30
31
|
2. For each instance, read `instance.yaml` (current phase, template, scope, claim) and the `phase-<name>.yaml` files to compute completion (complete artifacts ÷ total required artifacts).
|
|
31
32
|
3. Read `.aidlc/config.yaml` for project defaults (scope, template) if present.
|
|
@@ -83,6 +83,7 @@ When the instance uses the `bugfix` template, this phase produces `reproduction.
|
|
|
83
83
|
- `requirements.md` exists with at least one user story and corresponding acceptance criteria
|
|
84
84
|
- Each acceptance criterion is testable (has an observable pass/fail condition)
|
|
85
85
|
- The phase ends by naming each open decision — asked through the **Question Protocol** (`.aidlc/resources/rules/question-protocol.md`) in `.aidlc/state/<instance>/requirements-questions.md` — or by saying "Nothing open", written into `requirements.md` as a line of its own: autopilot reads that line to skip a pause with nothing to decide. Do not ask the user to confirm the whole document. Unattended (`AIDLC_UNATTENDED=1`): nothing is confirmed or logged; hard-stop when the requirements reach beyond the roadmap item, per `.aidlc/resources/rules/unattended.md`.
|
|
86
|
+
- A risk or note in `requirements.md` whose check is a person's review is an open decision: the phase does not write "Nothing open" and asks that check through the Question Protocol in `.aidlc/state/<instance>/requirements-questions.md`. A risk whose mitigation is a test, a gate or code is not asked for that reason. Unattended (`AIDLC_UNATTENDED=1`), the check takes the recommended option marked `(unattended default)`, is logged in `.aidlc/state/<instance>/unattended-stops.md` with **Type:** `open-question`, not `default`, and the build carries on, so the pull request waits for a person (`.aidlc/resources/rules/unattended.md`, The log).
|
|
86
87
|
|
|
87
88
|
## Guidance
|
|
88
89
|
|
package/skills/30-design.md
CHANGED
|
@@ -32,8 +32,10 @@ Read only:
|
|
|
32
32
|
- the spec corpus files in `.aidlc/specs/` named by `requirements.md`'s `## Spec delta` section —
|
|
33
33
|
the current spec, which is what the design is built against. Not a past instance's
|
|
34
34
|
`requirements.md`: it describes a change, and later instances may have changed it again.
|
|
35
|
-
-
|
|
35
|
+
- `.aidlc/decisions/decision-register.md`, when it exists — head first: its status table, then only the
|
|
36
36
|
entries the work touches. Never the whole file.
|
|
37
|
+
- `.aidlc/architecture/system.md`, when it exists — head first: its section headings, then only the
|
|
38
|
+
diagrams the work touches. Never the whole file.
|
|
37
39
|
|
|
38
40
|
The seams the requirements touch are then read from the *source*, as step 3 of the
|
|
39
41
|
instructions says — a handful of files, not a survey, and not the previous phase's
|
|
@@ -43,6 +45,16 @@ transcript. See **The context rule** (`.aidlc/resources/rules/context.md`).
|
|
|
43
45
|
|
|
44
46
|
- `design.md` — Architecture overview, component design, interfaces, data flow, and design decisions with rationale
|
|
45
47
|
|
|
48
|
+
### The change diagram
|
|
49
|
+
|
|
50
|
+
`architecture-diagram.md` is optional. Draw it only when the change adds or removes a service or a
|
|
51
|
+
store, adds a data flow between components, or moves a boundary (account, network, tenant or
|
|
52
|
+
trust). Otherwise, or when unsure, draw none.
|
|
53
|
+
|
|
54
|
+
Before drawing or changing one, read `.aidlc/guidance/mermaid-diagrams.md`; no other step reads it.
|
|
55
|
+
Draw against the current diagrams in `.aidlc/architecture/system.md` where that file exists. The
|
|
56
|
+
deployment phase carries what was built into that file, in this instance's own branch.
|
|
57
|
+
|
|
46
58
|
## Instructions
|
|
47
59
|
|
|
48
60
|
> {{glossary:gate}}
|
|
@@ -50,10 +62,10 @@ transcript. See **The context rule** (`.aidlc/resources/rules/context.md`).
|
|
|
50
62
|
1. **Review requirements.** Read `requirements.md` (or its summary if one exists). Identify the key technical challenges. When requirements carry `AC-n` IDs, note in each design section which criteria it addresses — that linkage is what reviewers and the testing phase trace against.
|
|
51
63
|
2. **Consult the knowledge graph, then check it against the source.** If the project has a knowledge graph (`.aidlc/knowledge/` exists), run `aidlc knowledge context --scope phase --phase design` for existing architecture, decisions, and conventions. The graph is an index into the code, not an authority over it: an entry naming a component, table, column, function, or registry is a pointer to open, and an entry written by an earlier instance may name something a later one renamed or deleted. Confirm a named symbol exists in the source before designing against it — `aidlc knowledge verify <id>` records that you did, and `aidlc knowledge update <id>` corrects an entry that no longer matches. A design built on a symbol that is not there produces code against an API nobody has, and nothing downstream catches it until implementation. Also read the always-read guidance layers from `.aidlc/guidance/index.yaml` — see **The always-read rule** (`.aidlc/resources/rules/always-read.md`) for which layers those are and when to reach for the full `lessons.md`. Read `.aidlc/context/constitution.md` when it exists and apply the constitution rule in `.aidlc/resources/rules/constitution.md`.
|
|
52
64
|
3. **Find the seams before proposing structure.** A project is brownfield from its second instance onwards, so start from the assumption that something in the codebase already does part of what the requirements ask for. For each capability in `requirements.md`, locate and read the existing code that carries any of it — the scheduler that already fires, the settings shape that already persists, the registry that already dispatches — and name those files in `design.md` before describing a single new component. Keep it narrow: the seams the requirements actually touch, a handful of files, not a survey. When nothing exists, write that down — "no existing seam" is a finding, and stating it is what separates a genuinely new component from one designed alongside the code that should have absorbed it.
|
|
53
|
-
4. **Define architecture.** Describe the high-level structure: components, their responsibilities, and how they communicate. Say for each one whether it extends a seam found in step 3 or is new.
|
|
65
|
+
4. **Define architecture.** Describe the high-level structure: components, their responsibilities, and how they communicate. Say for each one whether it extends a seam found in step 3 or is new. When the change alters the system's shape, draw `architecture-diagram.md` as **The change diagram** says.
|
|
54
66
|
5. **Specify interfaces.** For each component boundary, define the contract (function signatures, API shapes, data types).
|
|
55
67
|
6. **Data flow.** Document how data moves through the system — inputs, transformations, storage, outputs.
|
|
56
|
-
7. **Design decisions.** Record each significant decision with rationale and alternatives considered. A project-wide decision — a one-way door, a new runtime or dev dependency, a new service, or a change to a stated constraint — goes to the decision register, and work that touches a register entry is checked against it first: both as **The decision-register rule** (`.aidlc/resources/rules/decision-register.md`) says. Persist every other accepted decision as a `decision` entity: `aidlc knowledge add --type decision --id <slug> --name "<title>" --description "<rationale>"`. A decision that would build other than what was agreed — in `requirements.md`, the roadmap item or a person's answer — is asked before it is recorded, as **The departure rule** (`.aidlc/resources/rules/departures.md`) says. A design question the roadmap item's `## Decisions` section answers is not asked: write the answer into `design.md`, citing `roadmap-item.md` `## Decisions`.
|
|
68
|
+
7. **Design decisions.** Record each significant decision with rationale and alternatives considered. A project-wide decision — a one-way door, a new runtime or dev dependency, a new service, or a change to a stated constraint — goes to the decision register, and work that touches a register entry is checked against it first: both as **The decision-register rule** (`.aidlc/resources/rules/decision-register.md`) says. Persist every other accepted decision as a `decision` entity: `aidlc knowledge add --type decision --id <slug> --name "<title>" --description "<rationale>"`. A decision that would build other than what was agreed — in `requirements.md`, the roadmap item or a person's answer — is asked before it is recorded, as **The departure rule** (`.aidlc/resources/rules/departures.md`) says. Before writing "Nothing open", read each decision against the criteria it touches, as that rule's **What a departure is** says. A design question the roadmap item's `## Decisions` section answers is not asked: write the answer into `design.md`, citing `roadmap-item.md` `## Decisions`.
|
|
57
69
|
8. **Address non-functional concerns.** Map performance, security, and accessibility requirements to design choices.
|
|
58
70
|
9. **Identify risks.** Note technical risks and mitigation strategies.
|
|
59
71
|
10. **Produce the task breakdown.** For templates that require it (full-feature, quick-feature), write `tasks.md` in the instance state directory as the final design step — the design is not done until it is actionable. Decompose the design into commit-sized tasks: each one reviewable in one sitting and independently verifiable. One task per line, in this exact grammar:
|
|
@@ -78,6 +90,7 @@ transcript. See **The context rule** (`.aidlc/resources/rules/context.md`).
|
|
|
78
90
|
- The design addresses all acceptance criteria from `requirements.md`
|
|
79
91
|
- For templates requiring it: `tasks.md` exists and every active acceptance criterion is claimed by at least one task, or the gap is deliberate
|
|
80
92
|
- The phase ends by naming each open design decision — asked through the **Question Protocol** (`.aidlc/resources/rules/question-protocol.md`) in `.aidlc/state/<instance>/design-questions.md` — or by saying "Nothing open", written into `design.md` as a line of its own: autopilot reads that line to skip a pause with nothing to decide. Do not ask the user to confirm the design as a whole. Unattended (`AIDLC_UNATTENDED=1`): nothing is confirmed or logged; hard-stop when the design reaches beyond the roadmap item, per `.aidlc/resources/rules/unattended.md`.
|
|
93
|
+
- A risk or note in `design.md` whose check is a person's review is an open decision: the phase does not write "Nothing open" and asks that check through the Question Protocol in `.aidlc/state/<instance>/design-questions.md`. A risk whose mitigation is a test, a gate or code is not asked for that reason. Unattended (`AIDLC_UNATTENDED=1`), the check takes the recommended option marked `(unattended default)`, is logged in `.aidlc/state/<instance>/unattended-stops.md` with **Type:** `open-question`, not `default`, and the build carries on, so the pull request waits for a person (`.aidlc/resources/rules/unattended.md`, The log).
|
|
81
94
|
|
|
82
95
|
## Guidance
|
|
83
96
|
|
package/skills/50-testing.md
CHANGED
|
@@ -63,6 +63,21 @@ See **The context rule** (`.aidlc/resources/rules/context.md`).
|
|
|
63
63
|
AC-7: verified manually — see results table above
|
|
64
64
|
```
|
|
65
65
|
5. **Address failures.** If tests reveal bugs, fix the implementation. Do not skip or weaken tests to force a pass.
|
|
66
|
+
6. **Update the living system diagram when there is no deployment phase.** When the instance's
|
|
67
|
+
template has a deployment phase, skip this step: deployment does it. Otherwise this is the last
|
|
68
|
+
phase before merge, so do it here, and only when this instance drew `architecture-diagram.md`:
|
|
69
|
+
- In this instance's own branch, make `.aidlc/architecture/system.md` match what was built, not
|
|
70
|
+
what design planned.
|
|
71
|
+
- When the file does not exist, create it and its folder by copying
|
|
72
|
+
`.aidlc/resources/templates/system.md`, leaving out the `<!-- aidlc:generated … -->` comment under its title. When
|
|
73
|
+
`.aidlc/context/architecture.md` exists and has no line naming `.aidlc/architecture/system.md`,
|
|
74
|
+
add a `## System Diagram` section with the line "The system as it stands is drawn in
|
|
75
|
+
`.aidlc/architecture/system.md`. Read its section headings first, then only the diagrams the
|
|
76
|
+
work touches." — never a diagram.
|
|
77
|
+
- Edit only the diagrams the work touched and leave the rest as written. Never regenerate the
|
|
78
|
+
whole file.
|
|
79
|
+
- Read `.aidlc/guidance/mermaid-diagrams.md` before editing.
|
|
80
|
+
- Name the diagrams changed in the testing artifact, or say none applied. No gate checks it.
|
|
66
81
|
|
|
67
82
|
## Exit Criteria
|
|
68
83
|
|
package/skills/60-deployment.md
CHANGED
|
@@ -48,6 +48,21 @@ The artifacts your template's deployment phase declares in `required_artifacts`
|
|
|
48
48
|
dir if unsure. Whatever the filename, the content is the release plan, rollback strategy, and
|
|
49
49
|
deployment checklist.
|
|
50
50
|
|
|
51
|
+
### The outcome section
|
|
52
|
+
|
|
53
|
+
`## Outcome` in `deployment-record.md` is the one section that holds the outcome: what
|
|
54
|
+
happened after the merge. It is written after the merge. The sections written before it,
|
|
55
|
+
`## Post-deployment verification` among them, are the plan and do not count.
|
|
56
|
+
|
|
57
|
+
- Before the merge, leave `## Outcome` followed by the placeholder line
|
|
58
|
+
`Pending — written after the merge.`
|
|
59
|
+
- A change that deploys nothing writes `Nothing deployed — <reason>` there instead.
|
|
60
|
+
- Under autopilot the close-out writes `## Outcome` itself, from the merge commit, CI, the
|
|
61
|
+
release step and the deploy workflow it checked. So the phase leaves the placeholder —
|
|
62
|
+
unless the change deploys nothing, when it writes the nothing-deployed line.
|
|
63
|
+
- `aidlc transition` out of deployment refuses while the section is missing, empty, or the
|
|
64
|
+
placeholder.
|
|
65
|
+
|
|
51
66
|
## Instructions
|
|
52
67
|
|
|
53
68
|
> {{glossary:gate}}
|
|
@@ -69,18 +84,37 @@ deployment checklist.
|
|
|
69
84
|
section: the knowledge graph records what the code looks like and cannot afford to record why, so
|
|
70
85
|
a reason that lives nowhere else is one the next agent will simplify away. This is a checklist
|
|
71
86
|
step, not a gate — no phase is blocked on it.
|
|
72
|
-
5. **
|
|
87
|
+
5. **Update the living system diagram.** Only when this instance drew `architecture-diagram.md`;
|
|
88
|
+
otherwise skip this step. In this instance's own branch, before release:
|
|
89
|
+
- Make `.aidlc/architecture/system.md` match what was built, not what design planned.
|
|
90
|
+
- When the file does not exist, create it and its folder by copying
|
|
91
|
+
`.aidlc/resources/templates/system.md`, leaving out the `<!-- aidlc:generated … -->` comment under its title. Then, when
|
|
92
|
+
`.aidlc/context/architecture.md` exists and has no line naming `.aidlc/architecture/system.md`,
|
|
93
|
+
add this section to it, and never a diagram:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
## System Diagram
|
|
97
|
+
|
|
98
|
+
The system as it stands is drawn in `.aidlc/architecture/system.md`. Read its section headings first, then only the diagrams the work touches.
|
|
99
|
+
```
|
|
100
|
+
- Edit only the diagrams the work touched and leave the rest as written. Never regenerate the
|
|
101
|
+
whole file.
|
|
102
|
+
- Read `.aidlc/guidance/mermaid-diagrams.md` before editing.
|
|
103
|
+
- Name the diagrams changed in the deployment artifact, or say none applied. No gate checks it.
|
|
104
|
+
6. **Pre-deployment checks.** Verify:
|
|
73
105
|
- CI pipeline passes
|
|
74
106
|
- No critical findings open from adversarial reviews
|
|
75
107
|
- Dependencies are pinned and audited
|
|
76
|
-
|
|
77
|
-
|
|
108
|
+
7. **Execute deployment.** Follow the release plan step by step.
|
|
109
|
+
8. **Verify.** Confirm the deployment succeeded using the monitoring steps.
|
|
110
|
+
9. **Write the outcome.** After the merge, replace the placeholder under `## Outcome` with
|
|
111
|
+
what happened — or `Nothing deployed — <reason>` — as **The outcome section** above says.
|
|
78
112
|
|
|
79
113
|
## Exit Criteria
|
|
80
114
|
|
|
81
115
|
- Every artifact the template's deployment phase requires exists, with release plan and rollback strategy
|
|
82
116
|
- Deployment executed successfully (or plan approved for manual execution)
|
|
83
|
-
-
|
|
117
|
+
- `## Outcome` says what happened after the merge, or why nothing deployed
|
|
84
118
|
|
|
85
119
|
## Security Confirmation
|
|
86
120
|
|
package/skills/81-continue.md
CHANGED
|
@@ -18,6 +18,7 @@ Resume an in-progress lifecycle instance efficiently. Determine where work left
|
|
|
18
18
|
|
|
19
19
|
> {{glossary:claim}}
|
|
20
20
|
|
|
21
|
+
0. **Bring main up to date.** Before reading any state, run the step in **The fresh-main rule** (`.aidlc/resources/rules/fresh-main.md`).
|
|
21
22
|
1. **Load state.** Read `.aidlc/state/<instance>/instance.yaml` to get:
|
|
22
23
|
- Current phase
|
|
23
24
|
- Template name
|
|
@@ -28,7 +29,7 @@ Resume an in-progress lifecycle instance efficiently. Determine where work left
|
|
|
28
29
|
- Check `renewed_at` against the staleness timeout (default: 60 minutes)
|
|
29
30
|
- If stale: warn and request override confirmation before taking over
|
|
30
31
|
- If active: warn and do NOT proceed without explicit override
|
|
31
|
-
3. **Claim the instance.** Prefer `aidlc claim <instance>` — it writes the claim and appends the claim event to `sessions.ndjson` (the durable session↔instance record cost attribution depends on). Without the CLI, do both: write the claim file (or `claim:` field in the fallback case), then append the claim event to
|
|
32
|
+
3. **Claim the instance.** Prefer `aidlc claim <instance>` — it writes the claim and appends the claim event to `sessions.ndjson` (the durable session↔instance record cost attribution depends on). Without the CLI, do both: write the claim file (or `claim:` field in the fallback case), then append the claim event to the instance's `sessions.ndjson` in `<git-common-dir>/aidlc/records/` (append-only; the state protocol in **aidlc-overview** gives the path). Renew (`aidlc claim --renew`) at every phase transition. Release the same way when you stop (`aidlc release <instance>`).
|
|
32
33
|
4. **Determine next step.** Apply this priority:
|
|
33
34
|
- If current phase has incomplete required artifacts → produce the next artifact
|
|
34
35
|
- If the current phase is implementation and a task-bearing `tasks.md` exists → resume at the lowest-numbered open (`[ ]`) task; do NOT re-derive the plan from design.md
|
package/skills/84-autopilot.md
CHANGED
|
@@ -78,7 +78,7 @@ The CLI does the work. This skill starts it and says how to watch and stop it. D
|
|
|
78
78
|
- Parks an item (moves it to `hold/` with a reason) when its agent stops short of a stop it was told to reach, when CI fails twice, or when it passes the cost cap. An item waiting for a person is never parked, and holds no build slot, so the run goes on starting others.
|
|
79
79
|
- An agent that loses the network exits, and is parked. Sleep cuts the network, so a run on a laptop needs `aidlc autopilot pause` first: it freezes the run and its agents where they are, and `aidlc autopilot resume` carries on.
|
|
80
80
|
- Before each merge, brings the item's branch up to date with main and waits for CI on the new head. A conflict with main goes back to the item's agent, twice at most, then the item is parked. A pull request someone merged by hand is dropped from tracking.
|
|
81
|
-
- After each close-out, after its own merge or a person's, runs the item's retrospective: one agent, unattended, in the primary checkout, one at a time in the merge lane — nothing else merges or closes out while it runs, though builds carry on. Autopilot commits and pushes only its files: the instance's `retrospective.md`, up to three lessons appended to `.aidlc/guidance/lessons.md`, up to two new files in `.aidlc/roadmap/inbox
|
|
81
|
+
- After each close-out, after its own merge or a person's, runs the item's retrospective: one agent, unattended, in the primary checkout, one at a time in the merge lane — nothing else merges or closes out while it runs, though builds carry on. Autopilot commits and pushes only its files: the instance's `retrospective.md`, up to three lessons appended to `.aidlc/guidance/lessons.md`, and up to two new files in `.aidlc/roadmap/inbox/`; its cost goes to the instance's ledger in the git common directory, which nothing commits. Any other path that changed is left as it is and named. A retrospective that fails, breaks a limit, runs past 30 minutes or past the cost cap commits nothing, undoes its changes and leaves its marker for `aidlc autopilot pending`; it never parks the item. Consolidating `lessons.md` and rewriting `.aidlc/guidance/lessons-digest.md` stay a person's step.
|
|
82
82
|
- Halts the merge queue when a step fails. Running `aidlc autopilot run` again retries a failure that came before the merge; a failed release is for a person — `aidlc autopilot status` shows the error. `aidlc autopilot forget <instance>` stops tracking an item finished by hand.
|
|
83
83
|
- Sends a desktop notification, once each, when an item is parked, fails, waits for the user, or is done, and when the run ends. `notify: false` under `autopilot:` in `.aidlc/config.yaml` turns them off.
|
|
84
84
|
- Ends when the asked-for items are each released or parked, or, with `--all`, when nothing is ready and nothing is in flight. An item waiting for a person keeps its run alive, so the run is still there to carry the item on after an approval or a merge.
|
|
@@ -28,7 +28,7 @@ Run the retro **before** any completion cleanup (worktree removal, claim release
|
|
|
28
28
|
> {{glossary:retrospective}}
|
|
29
29
|
|
|
30
30
|
1. **Idempotency check.** If `retrospective.md` already exists in the instance state dir, offer to update or skip — never duplicate. A skip still removes the retro-pending marker.
|
|
31
|
-
2. **Gather state.** Read `instance.yaml`, `phase-*.yaml`, and `transitions.log`. For the cost summary, prefer `aidlc cost <instance>` (it applies fidelity precedence); only read `costs.ndjson` raw when the CLI is unavailable, and mark that summary approximate. No cost data → omit the cost section entirely, never write zeros.
|
|
31
|
+
2. **Gather state.** Read `instance.yaml`, `phase-*.yaml`, and `transitions.log`. For the cost summary, prefer `aidlc cost <instance>` (it applies fidelity precedence); only read the instance's `costs.ndjson` raw (under `<git-common-dir>/aidlc/records/`) when the CLI is unavailable, and mark that summary approximate. No cost data → omit the cost section entirely, never write zeros.
|
|
32
32
|
3. **Draft, then ask — one round-trip.** Draft your own answers to the three questions — what surprised us? what would we do differently? what took longer than expected? — from the record: `transitions.log`, the question files, `.aidlc/state/<instance>/unattended-stops.md`, `test-results.md` and the cost summary. Cite what each answer rests on. Show the three drafts in a single message and ask the user to correct them; a reply that changes nothing keeps them. For **Micro scope**, compress to one drafted answer covering all three. Unattended (`AIDLC_UNATTENDED=1`), write the drafts into `retrospective.md` under the line "Drafted by the agent from the record; not reviewed by a person." Declining the retro is fine: remove the marker, write nothing.
|
|
33
33
|
|
|
34
34
|
**Challenge the entries the work ran into.** Only when the instance has a `constitution-crossings.md`, or its `design.md` or `design-questions.md` cites an `ADR-<n>`: in the same message, ask one question — should any of these entries change? — naming each one. For a `NOT-<n>`, count its `exception` lines across `.aidlc/state/*/constitution-crossings.md`; at two or more, give the count and the instances, so a rule that keeps being waived is visible. A yes goes to the **aidlc-constitution** skill's "Amending from work" section for a `NOT-<n>`, or to a superseding entry per **The decision-register rule** (`.aidlc/resources/rules/decision-register.md`) for an `ADR-<n>`; the retro edits neither document. With neither signal, ask nothing. Unattended, list the entries and counts and mark the question not asked.
|
|
@@ -10,6 +10,9 @@ phases:
|
|
|
10
10
|
required_artifacts:
|
|
11
11
|
- name: design.md
|
|
12
12
|
- name: tasks.md
|
|
13
|
+
# Drawn only when the change alters the system's shape (living-system-diagram/AC-2).
|
|
14
|
+
optional_artifacts:
|
|
15
|
+
- name: architecture-diagram.md
|
|
13
16
|
- name: implementation
|
|
14
17
|
required_artifacts:
|
|
15
18
|
- name: code-complete.md
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# System diagram
|
|
2
|
+
|
|
3
|
+
The system as it stands: its components, its stores, the systems outside it, and how data moves
|
|
4
|
+
between them. One `##` section per diagram, each a single Mermaid diagram.
|
|
5
|
+
|
|
6
|
+
- An instance that drew `architecture-diagram.md` updates this file in its own branch, before
|
|
7
|
+
merge, to match what was built, not what design planned. An instance that drew none leaves it
|
|
8
|
+
alone.
|
|
9
|
+
- Edit only the diagrams the work touched and leave the rest as written. Never regenerate the
|
|
10
|
+
whole file.
|
|
11
|
+
- Read it head first: the section headings, then only the diagrams the work touches.
|
|
12
|
+
- Mermaid only. Before drawing or changing a diagram, read `.aidlc/guidance/mermaid-diagrams.md`.
|
|
13
|
+
- Replace the placeholder section below with the first real diagram, and name each section after
|
|
14
|
+
what its diagram shows.
|
|
15
|
+
|
|
16
|
+
## Legend
|
|
17
|
+
|
|
18
|
+
Shape carries the meaning, never colour alone.
|
|
19
|
+
|
|
20
|
+
```mermaid
|
|
21
|
+
flowchart LR
|
|
22
|
+
component[Component: a service, process or package]
|
|
23
|
+
store[(Store: a database, queue or bucket)]
|
|
24
|
+
external([External system: something this project does not run])
|
|
25
|
+
subgraph boundary [Boundary: an account, network, tenant or trust zone]
|
|
26
|
+
inside[Component inside the boundary]
|
|
27
|
+
end
|
|
28
|
+
component -->|synchronous call| store
|
|
29
|
+
component -.->|asynchronous message or event| external
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## <Diagram name>
|
|
33
|
+
|
|
34
|
+
<One sentence: what this diagram shows and where it stops.>
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
flowchart LR
|
|
38
|
+
component[Component name] -->|what it sends| store[(Store name)]
|
|
39
|
+
```
|