@rasensio/aidlc-content 1.3.0 → 1.5.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/package.json
CHANGED
package/skills/00-overview.md
CHANGED
|
@@ -40,8 +40,8 @@ All state lives in `.aidlc/state/<instance-name>/`. Read and write state as foll
|
|
|
40
40
|
|
|
41
41
|
### Writing State
|
|
42
42
|
|
|
43
|
-
1. **Before mutating state**, check for an existing Instance_Claim in `instance.yaml`. If another session holds
|
|
44
|
-
2. Claim with `aidlc claim <instance>` (release with `aidlc release <instance>`) — it
|
|
43
|
+
1. **Before mutating state**, check for an existing Instance_Claim. 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.
|
|
44
|
+
2. Claim with `aidlc claim <instance>` (release with `aidlc release <instance>`) — it writes the claim file and appends the claim event to `sessions.ndjson` in one step. Without the CLI, do both writes yourself: 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 `.aidlc/state/<instance>/sessions.ndjson`. Never rewrite that file — append only. If the CLI warns your claim is near timeout, run `aidlc claim --renew <instance>`. Renew at every phase transition and before long-running operations — a claim older than `claim_timeout_minutes` counts as stale.
|
|
45
45
|
3. Update phase state files as you produce artifacts.
|
|
46
46
|
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.
|
|
47
47
|
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**).
|
|
@@ -58,8 +58,9 @@ Each line in `transitions.log` is a JSON object:
|
|
|
58
58
|
|
|
59
59
|
The `aidlc start` CLI automates this; when it is not available, create the instance directly:
|
|
60
60
|
|
|
61
|
+
0. **Concurrency gate first** (see the entry-point skill): when another live session holds a claim in this checkout, offer worktree / stop / no-code before creating anything.
|
|
61
62
|
1. Pick a template and scope (see **aidlc-getting-started** for template selection and per-template artifacts). The initial phase follows the scope: full → ideation, standard → requirements, micro → implementation.
|
|
62
|
-
2. Choose a URL-safe instance name and create `.aidlc/state/<name>/`. If the directory already exists, stop and ask for a different name.
|
|
63
|
+
2. Choose a URL-safe instance name and create `.aidlc/state/<name>/`. If the directory already exists, stop and ask for a different name. In a git repo, also register the instance in `<git-common-dir>/aidlc/registry/<name>.yaml` (fields: `name`, `branch`, `worktree_path`, `created_at`) — create-exclusively, never overwrite; if the file exists, another session owns the name.
|
|
63
64
|
3. Write `instance.yaml`:
|
|
64
65
|
```yaml
|
|
65
66
|
name: <instance-name>
|
|
@@ -71,6 +72,7 @@ The `aidlc start` CLI automates this; when it is not available, create the insta
|
|
|
71
72
|
claim: null
|
|
72
73
|
scope_history: []
|
|
73
74
|
```
|
|
75
|
+
For a worktree instance add `branch: <its-branch>`; for a no-code instance add `branch: null` (blocks Implementation entry until a branch exists). Omit the field entirely otherwise.
|
|
74
76
|
4. For each phase the template defines within the scope, write `phase-<name>.yaml`:
|
|
75
77
|
```yaml
|
|
76
78
|
phase: <phase-name>
|
|
@@ -85,7 +87,7 @@ The `aidlc start` CLI automates this; when it is not available, create the insta
|
|
|
85
87
|
status: not-started
|
|
86
88
|
metrics: { elapsed_seconds: 0, artifact_count: 0 }
|
|
87
89
|
```
|
|
88
|
-
5. Fire the `on-instance-start` lifecycle actions (see **Lifecycle Actions**). Do not skip this — automation the user configured (branch creation, issue tracking, notifications) depends on it.
|
|
90
|
+
5. Fire the `on-instance-start` lifecycle actions (see **Lifecycle Actions**). Do not skip this — automation the user configured (branch creation, issue tracking, notifications) depends on it. When the instance was created via the worktree flow or as no-code, set `AIDLC_WORKTREE=1` in the action environment so the branch-creation action no-ops (the worktree flow already made its branch; a no-code instance must not get one).
|
|
89
91
|
6. Report the instance name, phases, state path, and any actions that fired, then begin the initial phase with its skill.
|
|
90
92
|
|
|
91
93
|
## Lifecycle Actions
|
package/skills/03-entry-point.md
CHANGED
|
@@ -48,13 +48,25 @@ If `.aidlc/state/` is empty or missing, offer just three options: start somethin
|
|
|
48
48
|
| Choice | Action |
|
|
49
49
|
|--------|--------|
|
|
50
50
|
| Continue an instance | Follow the **aidlc-continue** skill |
|
|
51
|
-
| Start something new |
|
|
51
|
+
| Start something new | Run the **concurrency gate** (below), then ask what they are building, pick a template (see **aidlc-getting-started**), and create the instance per "Creating an Instance" in **aidlc-overview** |
|
|
52
52
|
| Capture an idea | Follow the **aidlc-idea** skill (capture flow) |
|
|
53
53
|
| Browse / promote ideas | Follow the **aidlc-idea** skill (browse/promote flow) |
|
|
54
54
|
| Show status | Summarize each instance from its state files — name, template, current phase, completion %, and whether it looks stalled. When the backlog is non-empty, append the idea count (e.g. "4 ideas in backlog, 3 raw") |
|
|
55
55
|
| Review an artifact | Follow the **aidlc-review** skill |
|
|
56
56
|
| Help / getting started | Follow the **aidlc-getting-started** skill |
|
|
57
57
|
|
|
58
|
+
## Concurrency Gate (before "Start something new")
|
|
59
|
+
|
|
60
|
+
Two sessions sharing one checkout collide on **git**, not on state: creating a branch in-place yanks the other session off its branch. Before creating anything, check whether another live session holds a claim:
|
|
61
|
+
|
|
62
|
+
1. Read the claim files under `<git-common-dir>/aidlc/claims/` (resolve via `git rev-parse --git-common-dir`; legacy fallback: `claim:` in each `instance.yaml`). A claim is live when `renewed_at`/`claimed_at` is within `claim_timeout_minutes` (config, default 60) and it is not this session's own claim.
|
|
63
|
+
2. Not a git repo, or no live claim from another session → proceed normally, no gate.
|
|
64
|
+
3. Another live session found → present exactly three options and proceed with none until one is chosen:
|
|
65
|
+
1. **Start in a separate worktree (recommended)** — `git worktree add -b <prefix>/<YYYYMMDD>-<name> <worktree_dir>/<repo>-<name> main` (prefix per template: bugfix→fix, micro-task/spike→chore, else feat; `worktree_dir` from the `concurrency:` config block, default `../`). Do all further work for the new instance inside that worktree; set `AIDLC_WORKTREE=1` before firing `on-instance-start` actions so the branch action no-ops. CLI shortcut: `aidlc start <template> --name <name> --worktree`.
|
|
66
|
+
2. **Stop** — come back when the other instance is done.
|
|
67
|
+
3. **Continue in this checkout, no code changes** — record `branch: null` in the new `instance.yaml`; entering Implementation stays blocked until a branch exists. CLI shortcut: `aidlc start <template> --name <name> --no-code`.
|
|
68
|
+
4. `concurrency.mode: forbid` in config replaces the menu with a hard stop while another session is live.
|
|
69
|
+
|
|
58
70
|
## Rules
|
|
59
71
|
|
|
60
72
|
- Building the menu is read-only — never mutate state while composing it. Claims are taken by the routed skill (see aidlc-continue).
|
|
@@ -27,6 +27,7 @@ Translate the ideation output (or the user's direct request) into precise, testa
|
|
|
27
27
|
- Specific and unambiguous
|
|
28
28
|
- Testable (an observable outcome)
|
|
29
29
|
- Independent (not relying on unstated assumptions)
|
|
30
|
+
- **Identified**: write every criterion as a list item `- AC-<n>: <text>` (bold variants `- **AC-<n>**: ...` and `- **AC-<n>:** ...` are also valid). Assign `AC-1`, `AC-2`, ... sequentially. IDs are never renumbered or reused — an amended criterion keeps its meaning or is retired: mark it `- AC-<n> (retired YYYY-MM-DD, superseded by AC-<m>): <text>` and issue a new ID. The testing-phase gate parses these IDs and fails on any active criterion without a referencing test.
|
|
30
31
|
4. **Set scope boundaries.** Explicitly state what is NOT included.
|
|
31
32
|
5. **Non-functional requirements.** Address performance, security, accessibility, and compatibility where relevant.
|
|
32
33
|
6. **For complex input or open decisions**: If requirements are extensive, or unresolved decisions block the draft, create an Input_File in `.aidlc/inbox/` following the User Input Protocol in **aidlc-overview**, rather than asking many sequential questions. Prefer drafting `requirements.md` early with unresolved points marked as explicit decision blocks — users decide better reacting to a concrete draft than answering abstract questions.
|
package/skills/30-design.md
CHANGED
|
@@ -21,7 +21,7 @@ Produce a technical design that satisfies the requirements. Define architecture,
|
|
|
21
21
|
|
|
22
22
|
## Instructions
|
|
23
23
|
|
|
24
|
-
1. **Review requirements.** Read `requirements.md` (or its summary if one exists). Identify the key technical challenges.
|
|
24
|
+
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.
|
|
25
25
|
2. **Consult the knowledge graph.** If the project has a knowledge graph (`.aidlc/knowledge/` exists), run `aidlc knowledge context --scope phase --phase design` for existing architecture, decisions, and conventions before re-deriving them from code.
|
|
26
26
|
3. **Define architecture.** Describe the high-level structure: components, their responsibilities, and how they communicate.
|
|
27
27
|
4. **Specify interfaces.** For each component boundary, define the contract (function signatures, API shapes, data types).
|
package/skills/50-testing.md
CHANGED
|
@@ -27,11 +27,17 @@ Verify that the implementation satisfies all acceptance criteria. Produce eviden
|
|
|
27
27
|
- Unit tests for pure logic and edge cases
|
|
28
28
|
- Integration tests for component interactions
|
|
29
29
|
- Property-based tests where inputs have broad domains
|
|
30
|
+
- **Reference AC IDs.** When `requirements.md` defines `AC-n` criteria, each test names the criteria it verifies — in the test name or a comment (e.g. `// AC-3`). The testing-phase gate scans test files for these references and fails on any active criterion with none. If two instances define the same ID, qualify the reference as `<instance>/AC-n`.
|
|
30
31
|
3. **Run tests.** Execute the project's test suite. All new tests must pass.
|
|
31
32
|
4. **Document results.** Write `testing.md` with:
|
|
32
33
|
- Test plan (what was tested and why)
|
|
33
34
|
- Results (pass/fail counts, any notable findings)
|
|
34
35
|
- Coverage notes (which criteria are covered, any gaps)
|
|
36
|
+
- **`ac-coverage` block for indirect coverage.** A criterion verified manually or outside scannable test files is claimed in a fenced code block whose info string is `ac-coverage`, one `AC-<n>: <evidence>` line per entry — the gate unions these with scanned references:
|
|
37
|
+
|
|
38
|
+
```ac-coverage
|
|
39
|
+
AC-7: verified manually — see results table above
|
|
40
|
+
```
|
|
35
41
|
5. **Address failures.** If tests reveal bugs, fix the implementation. Do not skip or weaken tests to force a pass.
|
|
36
42
|
|
|
37
43
|
## Exit Criteria
|
package/skills/81-continue.md
CHANGED
|
@@ -16,12 +16,11 @@ Resume an in-progress lifecycle instance efficiently. Determine where work left
|
|
|
16
16
|
- Current phase
|
|
17
17
|
- Template name
|
|
18
18
|
- Scope
|
|
19
|
-
|
|
20
|
-
2. **Check claim.** If another session holds the claim:
|
|
19
|
+
2. **Check claim.** Claims live in `<git-common-dir>/aidlc/claims/<instance>.yaml` (resolve via `git rev-parse --git-common-dir`); fall back to the `claim:` field in `instance.yaml` outside a git repo or for unmigrated instances. If another session holds the claim:
|
|
21
20
|
- Check `renewed_at` against the staleness timeout (default: 60 minutes)
|
|
22
21
|
- If stale: warn and request override confirmation before taking over
|
|
23
22
|
- If active: warn and do NOT proceed without explicit override
|
|
24
|
-
3. **Claim the instance.** Prefer `aidlc claim <instance>` — it
|
|
23
|
+
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 `.aidlc/state/<instance>/sessions.ndjson` (append-only; see the state protocol in **aidlc-overview**). Renew (`aidlc claim --renew`) at every phase transition. Release the same way when you stop (`aidlc release <instance>`).
|
|
25
24
|
4. **Determine next step.** Apply this priority:
|
|
26
25
|
- If current phase has incomplete required artifacts → produce the next artifact
|
|
27
26
|
- If current phase is complete but not transitioned → evaluate transition (check gates)
|