@rasensio/aidlc-content 0.6.0 → 0.7.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/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @rasensio/aidlc-content
2
+
3
+ Knowledge layer for the [AIDLC](https://github.com/rasensio/aidlc) framework. Contains skills, templates, guidance documents, capability maps, and phase definitions.
4
+
5
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rasensio/aidlc/blob/main/LICENSE)
6
+
7
+ ## What This Package Contains
8
+
9
+ This is the single source of truth for what AIDLC knows about lifecycle phases:
10
+
11
+ - **Skills** — Phase-specific markdown documents that activate inside AI coding tools during the appropriate lifecycle phase
12
+ - **Templates** — Define which phases apply to a given workflow (full feature, quick task, bug fix, spike)
13
+ - **Guidance** — Detailed guidance layers for quality, security, and best practices
14
+ - **Capabilities** — Capability maps for each supported AI platform
15
+ - **Phases** — Phase definitions with entry/exit criteria and gate requirements
16
+
17
+ ## Usage
18
+
19
+ This package is consumed by the [`@rasensio/aidlc`](https://www.npmjs.com/package/@rasensio/aidlc) CLI, which compiles these content assets into platform-native formats.
20
+
21
+ ```typescript
22
+ import { loadSkills, loadTemplates } from '@rasensio/aidlc-content';
23
+
24
+ const skills = await loadSkills();
25
+ const templates = await loadTemplates();
26
+ ```
27
+
28
+ ## How It Fits Together
29
+
30
+ ```
31
+ @rasensio/aidlc-content (this package)
32
+
33
+ ├──► CLI compiles ──► platform-specific output (.claude/, .cursor/, .kiro/, …)
34
+
35
+ └──► web consumes ──► documentation site
36
+ ```
37
+
38
+ The CLI reads content at compile time to produce installable artifacts. The web package reads it at build time to generate documentation pages.
39
+
40
+ ## Direct Usage
41
+
42
+ Most users should install `@rasensio/aidlc` (the CLI) rather than this package directly. This package is primarily a dependency of the CLI and is published separately for workspace resolution.
43
+
44
+ ## License
45
+
46
+ [MIT](https://github.com/rasensio/aidlc/blob/main/LICENSE)
package/dist/index.d.ts CHANGED
@@ -3,5 +3,6 @@ export { loadTemplates, getTemplate } from './templates.js';
3
3
  export { loadGuidance } from './guidance.js';
4
4
  export { loadCapabilities, getCapabilityMap } from './capabilities.js';
5
5
  export { loadPhases, getPhase } from './phases.js';
6
- export type { Skill, WorkflowTemplate, GuidanceLayer, CapabilityMap, PhaseDefinition } from './types.js';
6
+ export { loadTutorials, getTutorial, parseTutorialSource } from './tutorials.js';
7
+ export type { Skill, WorkflowTemplate, GuidanceLayer, CapabilityMap, PhaseDefinition, CodeSample, ContentReference, TutorialStep, Tutorial } from './types.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACjF,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -3,4 +3,5 @@ export { loadTemplates, getTemplate } from './templates.js';
3
3
  export { loadGuidance } from './guidance.js';
4
4
  export { loadCapabilities, getCapabilityMap } from './capabilities.js';
5
5
  export { loadPhases, getPhase } from './phases.js';
6
+ export { loadTutorials, getTutorial, parseTutorialSource } from './tutorials.js';
6
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Tutorial } from './types.js';
2
+ /**
3
+ * Parse a raw tutorial markdown string into a Tutorial object.
4
+ * Useful for testing without filesystem access.
5
+ */
6
+ export declare function parseTutorialSource(raw: string): Tutorial;
7
+ export declare function loadTutorials(): Tutorial[];
8
+ export declare function getTutorial(slug: string): Tutorial | undefined;
9
+ //# sourceMappingURL=tutorials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tutorials.d.ts","sourceRoot":"","sources":["../src/tutorials.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAA8C,MAAM,YAAY,CAAC;AAqHvF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAiBzD;AAED,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAgC1C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE9D"}
@@ -0,0 +1,141 @@
1
+ import { fileURLToPath } from 'node:url';
2
+ import { resolve, dirname } from 'node:path';
3
+ import { readdirSync, readFileSync, existsSync } from 'node:fs';
4
+ import { parse as parseYaml } from 'yaml';
5
+ const CONTENT_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
6
+ const TUTORIALS_DIR = resolve(CONTENT_ROOT, 'tutorials');
7
+ const SLUG_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
8
+ const STEP_HEADING_PATTERN = /^## Step (\d+): (.+)$/gm;
9
+ const CONTENT_REF_PATTERN = /\{\{ref:(skill|template|phase|guidance)\/([^}]+)\}\}/g;
10
+ const CODE_BLOCK_PATTERN = /```(\w+)(?:\s+source=(\S+))?\n([\s\S]*?)```/g;
11
+ function parseFrontmatter(raw) {
12
+ const match = raw.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
13
+ if (!match) {
14
+ throw new Error('Missing YAML frontmatter');
15
+ }
16
+ const parsed = parseYaml(match[1]);
17
+ const body = match[2];
18
+ const title = parsed['title'];
19
+ const description = parsed['description'];
20
+ const order = parsed['order'];
21
+ const slug = parsed['slug'];
22
+ if (typeof title !== 'string' || title.length === 0 || title.length > 100) {
23
+ throw new Error(`Invalid title: must be a string of 1-100 characters`);
24
+ }
25
+ if (typeof description !== 'string' || description.length === 0 || description.length > 300) {
26
+ throw new Error(`Invalid description: must be a string of 1-300 characters`);
27
+ }
28
+ if (typeof order !== 'number' || !Number.isInteger(order) || order < 1 || order > 999) {
29
+ throw new Error(`Invalid order: must be an integer between 1 and 999`);
30
+ }
31
+ if (typeof slug !== 'string' || slug.length === 0 || slug.length > 80 || !SLUG_PATTERN.test(slug)) {
32
+ throw new Error(`Invalid slug: must be lowercase alphanumeric with hyphens, max 80 characters`);
33
+ }
34
+ return {
35
+ frontmatter: { title, description, order, slug },
36
+ body,
37
+ };
38
+ }
39
+ function extractCodeSamples(body) {
40
+ const samples = [];
41
+ let match;
42
+ const pattern = new RegExp(CODE_BLOCK_PATTERN.source, CODE_BLOCK_PATTERN.flags);
43
+ while ((match = pattern.exec(body)) !== null) {
44
+ const sample = {
45
+ language: match[1],
46
+ code: match[3],
47
+ };
48
+ if (match[2]) {
49
+ sample.source = match[2];
50
+ }
51
+ samples.push(sample);
52
+ }
53
+ return samples;
54
+ }
55
+ function extractContentReferences(body) {
56
+ const refs = [];
57
+ let match;
58
+ const pattern = new RegExp(CONTENT_REF_PATTERN.source, CONTENT_REF_PATTERN.flags);
59
+ while ((match = pattern.exec(body)) !== null) {
60
+ refs.push({
61
+ entityType: match[1],
62
+ entityName: match[2],
63
+ raw: match[0],
64
+ });
65
+ }
66
+ return refs;
67
+ }
68
+ function parseSteps(body) {
69
+ const steps = [];
70
+ const headings = [];
71
+ let match;
72
+ const pattern = new RegExp(STEP_HEADING_PATTERN.source, STEP_HEADING_PATTERN.flags);
73
+ while ((match = pattern.exec(body)) !== null) {
74
+ headings.push({
75
+ index: parseInt(match[1], 10),
76
+ position: match.index,
77
+ title: match[2],
78
+ });
79
+ }
80
+ for (let i = 0; i < headings.length; i++) {
81
+ const heading = headings[i];
82
+ const start = heading.position + body.slice(heading.position).indexOf('\n') + 1;
83
+ const end = i + 1 < headings.length ? headings[i + 1].position : body.length;
84
+ const stepBody = body.slice(start, end).trim();
85
+ steps.push({
86
+ index: i,
87
+ title: heading.title,
88
+ body: stepBody,
89
+ codeSamples: extractCodeSamples(stepBody),
90
+ contentReferences: extractContentReferences(stepBody),
91
+ });
92
+ }
93
+ return steps;
94
+ }
95
+ /**
96
+ * Parse a raw tutorial markdown string into a Tutorial object.
97
+ * Useful for testing without filesystem access.
98
+ */
99
+ export function parseTutorialSource(raw) {
100
+ const { frontmatter, body } = parseFrontmatter(raw);
101
+ const steps = parseSteps(body);
102
+ if (steps.length < 1 || steps.length > 50) {
103
+ throw new Error(`Tutorial must have between 1 and 50 steps, found ${steps.length}`);
104
+ }
105
+ return {
106
+ title: frontmatter.title,
107
+ description: frontmatter.description,
108
+ order: frontmatter.order,
109
+ slug: frontmatter.slug,
110
+ steps,
111
+ };
112
+ }
113
+ export function loadTutorials() {
114
+ if (!existsSync(TUTORIALS_DIR)) {
115
+ return [];
116
+ }
117
+ const files = readdirSync(TUTORIALS_DIR).filter(f => f.endsWith('.md')).sort();
118
+ if (files.length === 0) {
119
+ return [];
120
+ }
121
+ const tutorials = files.map(filename => {
122
+ const raw = readFileSync(resolve(TUTORIALS_DIR, filename), 'utf8');
123
+ const { frontmatter, body } = parseFrontmatter(raw);
124
+ const steps = parseSteps(body);
125
+ if (steps.length < 1 || steps.length > 50) {
126
+ throw new Error(`Tutorial "${filename}": must have between 1 and 50 steps, found ${steps.length}`);
127
+ }
128
+ return {
129
+ title: frontmatter.title,
130
+ description: frontmatter.description,
131
+ order: frontmatter.order,
132
+ slug: frontmatter.slug,
133
+ steps,
134
+ };
135
+ });
136
+ return tutorials.sort((a, b) => a.order - b.order);
137
+ }
138
+ export function getTutorial(slug) {
139
+ return loadTutorials().find(t => t.slug === slug);
140
+ }
141
+ //# sourceMappingURL=tutorials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tutorials.js","sourceRoot":"","sources":["../src/tutorials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAG1C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AAC5E,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AAEzD,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAChD,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AACvD,MAAM,mBAAmB,GAAG,uDAAuD,CAAC;AACpF,MAAM,kBAAkB,GAAG,8CAA8C,CAAC;AAS1E,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAA4B,CAAC;IAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEtB,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,MAAM,WAAW,GAAG,MAAM,CAAC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AAa,QAAQ,8CAA8C,KAAK,CAAC,MAAM,EAAE,CAClF,CAAC;QACJ,CAAC;QAED,OAAO;YACL,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,KAAK;SACN,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACpD,CAAC"}
package/dist/types.d.ts CHANGED
@@ -28,4 +28,28 @@ export interface PhaseDefinition {
28
28
  purpose: string;
29
29
  exitCriteria: string[];
30
30
  }
31
+ export interface CodeSample {
32
+ language: string;
33
+ code: string;
34
+ source?: string;
35
+ }
36
+ export interface ContentReference {
37
+ entityType: 'skill' | 'template' | 'phase' | 'guidance';
38
+ entityName: string;
39
+ raw: string;
40
+ }
41
+ export interface TutorialStep {
42
+ index: number;
43
+ title: string;
44
+ body: string;
45
+ codeSamples: CodeSample[];
46
+ contentReferences: ContentReference[];
47
+ }
48
+ export interface Tutorial {
49
+ title: string;
50
+ description: string;
51
+ order: number;
52
+ slug: string;
53
+ steps: TutorialStep[];
54
+ }
31
55
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE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AAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,6 +52,39 @@ Each line in `transitions.log` is a JSON object:
52
52
  {"timestamp":"<ISO 8601 UTC>","author":"<session-id>","from":"<phase>","to":"<phase>","type":"normal|skip|upgrade","criteria":["..."]}
53
53
  ```
54
54
 
55
+ ### Creating an Instance
56
+
57
+ The `aidlc start` CLI automates this; when it is not available, create the instance directly:
58
+
59
+ 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.
60
+ 2. Choose a URL-safe instance name and create `.aidlc/state/<name>/`. If the directory already exists, stop and ask for a different name.
61
+ 3. Write `instance.yaml`:
62
+ ```yaml
63
+ name: <instance-name>
64
+ template: <template-name>
65
+ scope: <full|standard|micro>
66
+ created_at: <ISO 8601 UTC>
67
+ created_by: <session-id or username>
68
+ current_phase: <initial-phase>
69
+ claim: null
70
+ scope_history: []
71
+ ```
72
+ 4. For each phase the template defines within the scope, write `phase-<name>.yaml`:
73
+ ```yaml
74
+ phase: <phase-name>
75
+ status: pending
76
+ owner: null
77
+ entered_at: null
78
+ completed_at: null
79
+ completed_by: null
80
+ skip_reason: null
81
+ artifacts:
82
+ - name: <artifact>.md
83
+ status: not-started
84
+ metrics: { elapsed_seconds: 0, artifact_count: 0 }
85
+ ```
86
+ 5. Report the instance name, phases, and state path, then begin the initial phase with its skill.
87
+
55
88
  ## Context and Guidance
56
89
 
57
90
  - Project context lives in `.aidlc/context/` (style-guide.md, architecture.md)
@@ -22,56 +22,36 @@ Respond using this skill when the user asks any of the following:
22
22
  - "What template should I use?"
23
23
  - "Help me start working on X"
24
24
 
25
+ ## How Work Begins
26
+
27
+ All lifecycle work runs on instances — YAML state under `.aidlc/state/<name>/`. You (the agent) create and manage them directly by following the state protocol in **aidlc-overview**; no terminal command is needed. The `aidlc` CLI remains an equivalent shortcut for users who prefer it (`aidlc start <template> --name <name>`).
28
+
25
29
  ## Quick Answers
26
30
 
27
31
  ### "How do I fix a bug?"
28
32
 
29
- 1. Start a bugfix lifecycle instance:
30
- ```
31
- aidlc start bugfix --name <short-description>
32
- ```
33
- 2. This creates a focused workflow: reproduce the bug → fix it → test it → deploy.
34
- 3. Run `aidlc continue <name>` to see what step to do next.
35
- 4. The bugfix template skips the design phase and requires a `reproduction.md` artifact first.
33
+ 1. Create a lifecycle instance from the `bugfix` template (see "Creating an Instance" in **aidlc-overview**).
34
+ 2. This gives a focused workflow: reproduce the bug → fix it → test it → deploy. The bugfix template skips the design phase and requires a `reproduction.md` artifact first.
35
+ 3. Follow **aidlc-continue** at any point to pick up the next step.
36
36
 
37
37
  ### "How do I add a feature?"
38
38
 
39
- For a small, well-defined feature:
40
- ```
41
- aidlc start quick-feature --name <feature-name>
42
- ```
43
-
44
- For a larger feature needing design and review:
45
- ```
46
- aidlc start full-feature --name <feature-name>
47
- ```
48
-
49
- For something tiny (just code + test):
50
- ```
51
- aidlc start micro-task --name <task-name>
52
- ```
39
+ Create an instance from the template that fits:
40
+ - Small, well-defined feature → `quick-feature`
41
+ - Larger feature needing design and review → `full-feature`
42
+ - Something tiny (just code + test) → `micro-task`
53
43
 
54
44
  ### "How do I explore an idea or do research?"
55
45
 
56
- ```
57
- aidlc start spike --name <research-topic>
58
- ```
59
- This gives you Ideation + Requirements phases only — no implementation pressure.
46
+ Create an instance from the `spike` template. This gives you Ideation + Requirements phases only — no implementation pressure.
60
47
 
61
48
  ### "What should I do next?"
62
49
 
63
- Run:
64
- ```
65
- aidlc continue
66
- ```
67
- This tells you exactly which artifact to produce or which phase to enter next.
50
+ Follow the **aidlc-continue** skill: it reads the instance state and identifies exactly which artifact to produce or which phase to enter next. (CLI shortcut: `aidlc continue`.)
68
51
 
69
52
  ### "How do I check progress?"
70
53
 
71
- ```
72
- aidlc status
73
- ```
74
- Shows all active lifecycle instances with completion %, current phase, and stall detection.
54
+ Read each instance's `instance.yaml` and `phase-<name>.yaml` files and summarize: current phase, completion percentage (complete artifacts ÷ required artifacts), and stalled instances. (CLI shortcut: `aidlc status`.)
75
55
 
76
56
  ### "How does the lifecycle work?"
77
57
 
@@ -94,16 +74,9 @@ Not every task needs all phases. The templates handle this:
94
74
 
95
75
  ### "How do I set up AIDLC in this project?"
96
76
 
97
- If AIDLC is already installed (you can see `.aidlc/skills/` in the project), just start using it:
98
- ```
99
- aidlc start <template>
100
- ```
77
+ If AIDLC is already installed (you can see `.aidlc/skills/` in the project), just start using it: create an instance and begin.
101
78
 
102
- If not installed yet:
103
- ```
104
- aidlc setup
105
- ```
106
- This runs an interactive wizard that configures the framework for your project.
79
+ If not installed yet, run `npx @rasensio/aidlc init` in a terminal. Installation is the one step that genuinely needs the CLI — it compiles the skills into your platform's native format and configures the project.
107
80
 
108
81
  ## Choosing the Right Template
109
82
 
@@ -115,13 +88,15 @@ This runs an interactive wizard that configures the framework for your project.
115
88
  | Just write code + test | `micro-task` | Micro |
116
89
  | Research / explore | `spike` | Ideation + Requirements |
117
90
 
91
+ Template definitions (phases and required artifacts) live in the content package and can be overridden per-project under `.aidlc/templates/`.
92
+
118
93
  ## After Starting
119
94
 
120
- Once you've started an instance, the framework tracks your progress. At any point:
121
- - `aidlc continue`what to do next
122
- - `aidlc status` — overall progress
123
- - `aidlc gate <instance> <phase>` check if a phase is complete
124
- - `aidlc transition <instance>` — advance to the next phase
95
+ Once an instance exists, the state files track your progress. At any point:
96
+ - **aidlc-continue** skill determine and execute the next step
97
+ - Read state files — overall progress (see "How do I check progress?")
98
+ - Gate check — a phase is complete when all its required artifacts are complete; `aidlc gate <phase>` provides the same check for CI
99
+ - Transition — advance `current_phase` and append to `transitions.log` per the state protocol
125
100
 
126
101
  ## State Location
127
102
 
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: aidlc
3
+ description: Entry point for AIDLC — reads lifecycle state and offers the next actions (continue an instance, start new work, check status, review an artifact)
4
+ phase: ideation
5
+ priority: 99
6
+ trigger: When the user invokes the aidlc skill directly or asks what lifecycle actions are available
7
+ native_mode_hint:
8
+ claude-code: >-
9
+ This skill is an interactive entry point, not a phase artifact. Do not
10
+ enter plan mode. Read lifecycle state, present the menu, and wait for
11
+ the user's choice before doing any work.
12
+ ---
13
+ # AIDLC Entry Point
14
+
15
+ This skill is the front door to the AIDLC framework. When invoked, show the user where their lifecycle work stands and let them choose what to do next. Everything needed is in `.aidlc/` — the CLI is not required at runtime.
16
+
17
+ ## Pre-condition: First Activation
18
+
19
+ If `.aidlc/context/` does not exist or contains no `.md` files, defer to the **aidlc-first-activation** skill first, then return to the user's original request.
20
+
21
+ ## Step 1 — Read State
22
+
23
+ 1. List the directories under `.aidlc/state/`. Each directory is a lifecycle instance.
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
+ 3. Read `.aidlc/config.yaml` for project defaults (scope, template) if present.
26
+
27
+ Do not read artifact bodies or transition history to build the menu — the compact state files are enough.
28
+
29
+ ## Step 2 — Present the Menu
30
+
31
+ Compose a short menu from the state. Include only the options that make sense:
32
+
33
+ - **Continue `<instance>`** — one entry per incomplete instance, showing current phase and completion percentage. Most recently updated first.
34
+ - **Start something new** — always.
35
+ - **Show status** — when at least one instance exists.
36
+ - **Review an artifact** — when at least one instance has a completed artifact.
37
+ - **Help / getting started** — always.
38
+
39
+ 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
+
41
+ If `.aidlc/state/` is empty or missing, offer just two options: start something new, or help.
42
+
43
+ ## Step 3 — Route
44
+
45
+ | Choice | Action |
46
+ |--------|--------|
47
+ | Continue an instance | Follow the **aidlc-continue** skill |
48
+ | 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 |
50
+ | Review an artifact | Follow the **aidlc-review** skill |
51
+ | Help / getting started | Follow the **aidlc-getting-started** skill |
52
+
53
+ ## Rules
54
+
55
+ - Building the menu is read-only — never mutate state while composing it. Claims are taken by the routed skill (see aidlc-continue).
56
+ - Keep the menu short; do not explain the whole framework unless the user asks for help.
@@ -23,7 +23,7 @@ Prepare and execute the release. Ensure all preceding phases are complete, all g
23
23
 
24
24
  ## Instructions
25
25
 
26
- 1. **Validate readiness.** Run `aidlc gate deployment` (or check state manually): every preceding required phase must be complete. If any gate fails, address the gap before proceeding.
26
+ 1. **Validate readiness.** Check the phase state files: every preceding required phase must be complete (all required artifacts `complete`). If any gate fails, address the gap before proceeding. (CLI shortcut: `aidlc gate deployment`.)
27
27
  2. **Write release plan.** Document in `deployment.md`:
28
28
  - What is being deployed (version, changes summary)
29
29
  - Target environment(s)