@rasensio/aidlc-content 1.1.0 → 1.3.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,10 +41,11 @@ All state lives in `.aidlc/state/<instance-name>/`. Read and write state as foll
41
41
  ### Writing State
42
42
 
43
43
  1. **Before mutating state**, check for an existing Instance_Claim in `instance.yaml`. If another session holds the claim and it is not stale, warn and request override confirmation.
44
- 2. Record your session identifier in the claim fields when you begin work.
44
+ 2. Claim with `aidlc claim <instance>` (release with `aidlc release <instance>`) — it updates `instance.yaml` and appends the claim event to `sessions.ndjson` in one step. Without the CLI, do both writes yourself: set the claim fields in `instance.yaml`, 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>`.
45
45
  3. Update phase state files as you produce artifacts.
46
- 4. Append a transition record to `transitions.log` only on successful phase transitions.
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**).
48
+ 6. **Cost fallback (once per session):** run `aidlc cost providers status`. If no metered provider is ACTIVE for your platform, then at each phase transition record usage via `aidlc cost record --manual --instance <name> --session - --fidelity estimated --units '<json>'` when your platform surfaces usage numbers to you (e.g. a per-turn credit trailer), else `--fidelity unknown` (no `--units`). Never invent numbers — an `unknown` interval marker lets `aidlc cost sync` attribute usage later.
48
49
 
49
50
  ### Transition Records
50
51
 
@@ -109,6 +110,10 @@ When a phase needs substantial input from the user — open decisions, structure
109
110
  3. Tell the user the file path and wait for their edits — do not proceed on unanswered questions.
110
111
  4. When the user has answered, fold the outcomes into the phase artifact and state records. The inbox file is scratch input, not an artifact — offer to delete it once its content has landed.
111
112
 
113
+ ## Idea Capture
114
+
115
+ When the user shares an idea tangential to the current work, offer to record it in `.aidlc/ideas/` (see **aidlc-idea**) and continue the current phase — do not derail into ideation. Capture touches no instance state, so it is safe at any point in any phase.
116
+
112
117
  ## Context and Guidance
113
118
 
114
119
  - Project context lives in `.aidlc/context/` (style-guide.md, architecture.md)
@@ -23,6 +23,7 @@ If `.aidlc/context/` does not exist or contains no `.md` files, defer to the **a
23
23
  1. List the directories under `.aidlc/state/`. Each directory is a lifecycle instance.
24
24
  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).
25
25
  3. Read `.aidlc/config.yaml` for project defaults (scope, template) if present.
26
+ 4. Count ideas in `.aidlc/ideas/` by status — read only the frontmatter (and title line if needed), never idea bodies.
26
27
 
27
28
  Do not read artifact bodies or transition history to build the menu — the compact state files are enough.
28
29
 
@@ -32,13 +33,15 @@ Compose a short menu from the state. Include only the options that make sense:
32
33
 
33
34
  - **Continue `<instance>`** — one entry per incomplete instance, showing current phase and completion percentage. Most recently updated first.
34
35
  - **Start something new** — always.
36
+ - **Capture an idea** — always.
37
+ - **Browse / promote ideas** — when `.aidlc/ideas/` contains at least one non-dropped idea; show the raw count (e.g. "4 raw ideas").
35
38
  - **Show status** — when at least one instance exists.
36
39
  - **Review an artifact** — when at least one instance has a completed artifact.
37
40
  - **Help / getting started** — always.
38
41
 
39
42
  Present the options as a numbered list (or the platform's native selection prompt) and wait for a choice. If the user's message already states what they want (e.g. "continue my-feature"), skip the menu and route directly.
40
43
 
41
- If `.aidlc/state/` is empty or missing, offer just two options: start something new, or help.
44
+ If `.aidlc/state/` is empty or missing, offer just three options: start something new, capture an idea, or help.
42
45
 
43
46
  ## Step 3 — Route
44
47
 
@@ -46,7 +49,9 @@ If `.aidlc/state/` is empty or missing, offer just two options: start something
46
49
  |--------|--------|
47
50
  | Continue an instance | Follow the **aidlc-continue** skill |
48
51
  | Start something new | Ask what they are building, pick a template (see **aidlc-getting-started**), then create the instance per "Creating an Instance" in **aidlc-overview** |
49
- | Show status | Summarize each instance from its state files — name, template, current phase, completion %, and whether it looks stalled |
52
+ | Capture an idea | Follow the **aidlc-idea** skill (capture flow) |
53
+ | Browse / promote ideas | Follow the **aidlc-idea** skill (browse/promote flow) |
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") |
50
55
  | Review an artifact | Follow the **aidlc-review** skill |
51
56
  | Help / getting started | Follow the **aidlc-getting-started** skill |
52
57
 
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: aidlc-idea
3
+ description: Captures ideas into the .aidlc/ideas/ backlog at any moment — no instance, claim, or phase required — and browses or promotes backlog ideas into lifecycle instances
4
+ phase: ideation
5
+ priority: 90
6
+ trigger: When the user says "idea:", asks to capture/record an idea, wants to browse the idea backlog, or wants to promote an idea into an instance
7
+ native_mode_hint:
8
+ claude-code: >-
9
+ This skill is an interactive inbox, not a phase artifact. Do not enter
10
+ plan mode. Capture is a single write-and-confirm; never touch instance
11
+ state while capturing.
12
+ ---
13
+ # Idea Capture and Backlog
14
+
15
+ `.aidlc/ideas/` is a first-class inbox, independent of every lifecycle phase. Ideas are captured cheaply now and converted into instances later. Capture is legal at any moment: mid-implementation on another instance, from a second session, or with no instance at all.
16
+
17
+ ## Idea File Format
18
+
19
+ One file per idea: `.aidlc/ideas/YYYYMMDD-<slug>.md`, beginning with exactly this frontmatter:
20
+
21
+ ```yaml
22
+ ---
23
+ status: raw # raw | promoted | dropped
24
+ promoted_to: null # instance name once promoted, else null
25
+ depends_on: [] # optional — ideas this one builds on, by file name without .md
26
+ ---
27
+ ```
28
+
29
+ Ideas never silently vanish — they are `raw`, `promoted`, or explicitly `dropped` (the file stays in place). `status: promoted` always carries a non-null `promoted_to` naming an existing instance.
30
+
31
+ `depends_on` lists other backlog ideas whose outcome this one builds on (e.g. `20260815-traceability-ids`). It is optional and defaults to empty. Build order is derived from this graph when needed — there is no global `order` field to maintain, because concurrent capture from independent sessions cannot coordinate a sequence.
32
+
33
+ ## Capture
34
+
35
+ 1. **Resolve the backlog root.** Always write to the **primary checkout's** `.aidlc/ideas/`, never a worktree's copy: resolve via `git rev-parse --git-common-dir` (the directory containing that path is the primary checkout). Outside a git repo, use the current project root. Create `.aidlc/ideas/` if missing.
36
+ 2. **Name the file.** `YYYYMMDD-<slug>.md` — today's date plus a short (2–4 word) slug derived from the idea.
37
+ 3. **Handle collisions.** If the filename already exists, ask one question — extend `<existing>` or new idea? On extend, append a dated `## Update (YYYY-MM-DD)` section; on new, suffix the slug (`-2`). Never silently overwrite.
38
+ 4. **Write the file.** Frontmatter (`status: raw`, `promoted_to: null`), then `# Idea: <title>`, `**Date:**`, and the braindump organized lightly (a Use Case section plus whatever structure the content suggests). If the braindump itself references other backlog ideas, record them in `depends_on`; never ask for dependencies — the field is optional. Do not interrogate the user for structure — capture friction kills inboxes; one braindump in, one file out.
39
+ 5. **Confirm and return.** Report the file path and return to whatever was happening.
40
+
41
+ **Hard rule:** capture never reads or writes anything under `.aidlc/state/` — no claims, no phase files, no transitions log. Two sessions capturing simultaneously just produce two files; no locking exists or is needed. Do not auto-commit; staging is the user's.
42
+
43
+ If the user includes credentials, tokens, or secrets in a braindump, flag it and omit them from the file.
44
+
45
+ ## Browse
46
+
47
+ List `.aidlc/ideas/*.md` reading only frontmatter and the `# Idea:` title line — not the bodies. Show each idea's date, title, status, and dependencies (`depends_on`). Flag raw ideas whose dependencies are all promoted — those are the natural next candidates. Offer to open, promote, or drop.
48
+
49
+ ## Promote
50
+
51
+ Promotion is where the backlog meets the lifecycle:
52
+
53
+ 1. If the idea's `depends_on` names ideas that are still `raw`, say so and confirm before proceeding — promoting out of order is allowed but should be deliberate.
54
+ 2. Choose a template and scope as usual (defaults from `.aidlc/config.yaml`; see **aidlc-getting-started**).
55
+ 3. Create the instance per "Creating an Instance" in **aidlc-overview** — including firing `on-instance-start` lifecycle actions.
56
+ 4. Seed the instance with the idea file: Full scope → the idea is raw material the Ideation phase refines into `ideation.md`; Standard scope → the idea is input context for Requirements.
57
+ 5. Update the idea's frontmatter: `status: promoted`, `promoted_to: <instance-name>`.
58
+
59
+ ## Drop
60
+
61
+ Set `status: dropped` in the frontmatter and leave the file in place. Dropping is an explicit act — never delete or overwrite an idea to get rid of it.
@@ -21,7 +21,7 @@ Resume an in-progress lifecycle instance efficiently. Determine where work left
21
21
  - Check `renewed_at` against the staleness timeout (default: 60 minutes)
22
22
  - If stale: warn and request override confirmation before taking over
23
23
  - If active: warn and do NOT proceed without explicit override
24
- 3. **Claim the instance.** Record your session identifier and timestamp in the claim fields.
24
+ 3. **Claim the instance.** Prefer `aidlc claim <instance>` — it sets the claim fields and appends the claim event to `sessions.ndjson` (the durable session↔instance record cost attribution depends on). Without the CLI, do both: record your session identifier and timestamp in the claim fields, then append the claim event to `.aidlc/state/<instance>/sessions.ndjson` (append-only; see the state protocol in **aidlc-overview**). Release the same way when you stop (`aidlc release <instance>`).
25
25
  4. **Determine next step.** Apply this priority:
26
26
  - If current phase has incomplete required artifacts → produce the next artifact
27
27
  - If current phase is complete but not transitioned → evaluate transition (check gates)