@yourtechtribe-labs/koncept-cli 0.1.0-alpha.5 → 0.1.0-alpha.6
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/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +83 -4
- package/dist/commands/init.js.map +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/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAwGjD,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBlE"}
|
package/dist/commands/init.js
CHANGED
|
@@ -11,25 +11,101 @@ making changes.
|
|
|
11
11
|
|
|
12
12
|
\`\`\`
|
|
13
13
|
.koncept/
|
|
14
|
-
├── concepts/
|
|
15
|
-
├──
|
|
16
|
-
|
|
14
|
+
├── concepts/ YAML files — one concept per file (indexed)
|
|
15
|
+
├── EXAMPLE.yaml Reference concept showing every field. NOT indexed.
|
|
16
|
+
├── index.json Generated by \`koncepto verify\`. Do not hand-edit.
|
|
17
|
+
└── README.md This file.
|
|
17
18
|
\`\`\`
|
|
18
19
|
|
|
20
|
+
## Concept schema (v0.1)
|
|
21
|
+
|
|
22
|
+
Each \`concepts/<id>.yaml\` MUST validate against this shape:
|
|
23
|
+
|
|
24
|
+
| Field | Type | Required | Notes |
|
|
25
|
+
| ------------------ | ------------------------------- | -------- | ------------------------------------------------------------------------- |
|
|
26
|
+
| \`id\` | kebab-case string | yes | Must match \`^[a-z][a-z0-9-]+$\` and be unique across the registry. |
|
|
27
|
+
| \`name\` | string | yes | Human-readable title. |
|
|
28
|
+
| \`type\` | enum | yes | \`behavioral-invariant\` \\| \`architectural-decision\` \\| \`data-flow\` \\| \`ui-pattern\` \\| \`naming-convention\`. |
|
|
29
|
+
| \`status\` | enum | no | \`active\` (default) \\| \`deprecated\` \\| \`superseded\`. |
|
|
30
|
+
| \`description\` | string | yes | Why this concept exists; what changing it would break. |
|
|
31
|
+
| \`source_of_truth\` | { file, symbol? } | yes | The single file (and optionally symbol) that defines the concept. |
|
|
32
|
+
| \`participants\` | [{ file, role, purpose }] | no | Files that participate. \`role\` ∈ \`writer\` \\| \`reader\` \\| \`tester\` \\| \`docs\`. |
|
|
33
|
+
| \`invariants\` | [{ id, description, severity, automated_check }] | no | Properties that MUST hold. \`severity\` ∈ \`high\` \\| \`medium\` \\| \`low\`. |
|
|
34
|
+
| \`risks_if_broken\` | [string] | no | What goes wrong when an invariant is violated. |
|
|
35
|
+
| \`related_concepts\` | [kebab-id] | no | Cross-references to other concept ids in this registry. |
|
|
36
|
+
| \`tags\` | [string] | no | Free-form tags for search/filter. |
|
|
37
|
+
| \`created\` | ISO date string | yes | When the concept was first authored. |
|
|
38
|
+
| \`last_updated\` | ISO date string | yes | When it was last revised. |
|
|
39
|
+
| \`captured_by\` | string | no | Who/what authored it (e.g. \`@alice\`, \`koncepto-trial\`). |
|
|
40
|
+
| \`references\` | [string] | no | External links / file paths providing context. |
|
|
41
|
+
|
|
42
|
+
See \`EXAMPLE.yaml\` (sibling of this README) for a fully-populated reference.
|
|
43
|
+
Full Zod schema: \`@yourtechtribe-labs/koncept-core\` → \`ConceptSchema\`.
|
|
44
|
+
|
|
19
45
|
## Workflow
|
|
20
46
|
|
|
21
|
-
1.
|
|
47
|
+
1. Copy \`EXAMPLE.yaml\` into \`concepts/<your-id>.yaml\` and edit.
|
|
22
48
|
2. Run \`koncepto verify\` to validate parse + cross-refs + paths.
|
|
23
49
|
3. Commit \`.koncept/\` so AI agents and teammates see the graph.
|
|
24
50
|
|
|
25
51
|
Concepts MUST be version-controlled. The index is regenerated, but commit it
|
|
26
52
|
so CI / agents have a fast lookup without re-indexing.
|
|
27
53
|
`;
|
|
54
|
+
const EXAMPLE_TEMPLATE = `# Reference concept — sits OUTSIDE concepts/ so it is not indexed.
|
|
55
|
+
# Copy this file into concepts/<your-id>.yaml and edit.
|
|
56
|
+
#
|
|
57
|
+
# Every required field is filled in; optional fields are commented to show
|
|
58
|
+
# their shape. See ../README.md for field-by-field documentation.
|
|
59
|
+
|
|
60
|
+
id: example-concept
|
|
61
|
+
name: Example concept (rename me)
|
|
62
|
+
type: behavioral-invariant # behavioral-invariant | architectural-decision | data-flow | ui-pattern | naming-convention
|
|
63
|
+
status: active # active (default) | deprecated | superseded
|
|
64
|
+
description: >
|
|
65
|
+
One paragraph explaining the concept. Why does it exist? What invariants
|
|
66
|
+
does it enforce? What would break if a future change violated it?
|
|
67
|
+
|
|
68
|
+
source_of_truth:
|
|
69
|
+
file: src/path/to/canonical.ts
|
|
70
|
+
# symbol: someExportedFunction # optional — narrow to a symbol within the file
|
|
71
|
+
|
|
72
|
+
participants:
|
|
73
|
+
- file: src/path/to/canonical.ts
|
|
74
|
+
role: writer # writer | reader | tester | docs
|
|
75
|
+
purpose: Defines the behavior protected by this concept.
|
|
76
|
+
- file: tests/canonical.test.ts
|
|
77
|
+
role: tester
|
|
78
|
+
purpose: Locks in the invariants below.
|
|
79
|
+
|
|
80
|
+
invariants:
|
|
81
|
+
- id: example-invariant
|
|
82
|
+
description: A property that MUST hold across the participants above.
|
|
83
|
+
severity: high # high | medium | low
|
|
84
|
+
automated_check: false # true if a test/CI rule already enforces this
|
|
85
|
+
|
|
86
|
+
risks_if_broken:
|
|
87
|
+
- What goes wrong if a future change silently violates the invariant.
|
|
88
|
+
|
|
89
|
+
related_concepts: [] # list of kebab-case ids of sibling concepts
|
|
90
|
+
# related_concepts:
|
|
91
|
+
# - some-other-concept
|
|
92
|
+
|
|
93
|
+
tags:
|
|
94
|
+
- example
|
|
95
|
+
- documentation
|
|
96
|
+
|
|
97
|
+
created: '2026-01-01'
|
|
98
|
+
last_updated: '2026-01-01'
|
|
99
|
+
captured_by: koncepto-init
|
|
100
|
+
references:
|
|
101
|
+
- https://example.com/spec
|
|
102
|
+
`;
|
|
28
103
|
export async function runInit(ctx) {
|
|
29
104
|
const root = join(ctx.rootDir, '.koncept');
|
|
30
105
|
const concepts = join(root, 'concepts');
|
|
31
106
|
const indexFile = join(root, 'index.json');
|
|
32
107
|
const readme = join(root, 'README.md');
|
|
108
|
+
const example = join(root, 'EXAMPLE.yaml');
|
|
33
109
|
await mkdir(concepts, { recursive: true });
|
|
34
110
|
if (!(await fileExists(indexFile))) {
|
|
35
111
|
await writeFile(indexFile, '[]\n', 'utf-8');
|
|
@@ -37,6 +113,9 @@ export async function runInit(ctx) {
|
|
|
37
113
|
if (!(await fileExists(readme))) {
|
|
38
114
|
await writeFile(readme, README_TEMPLATE, 'utf-8');
|
|
39
115
|
}
|
|
116
|
+
if (!(await fileExists(example))) {
|
|
117
|
+
await writeFile(example, EXAMPLE_TEMPLATE, 'utf-8');
|
|
118
|
+
}
|
|
40
119
|
process.stdout.write(`koncepto: initialized ${root}\n`);
|
|
41
120
|
return 0;
|
|
42
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,MAAM,eAAe,GAAG
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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ED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,IAAI,IAAI,CAAC,CAAA;IACvD,OAAO,CAAC,CAAA;AACV,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAwBA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAA;CACxC;AAWD,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBtF"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { runInit } from './commands/init.js';
|
|
|
6
6
|
import { runVerify } from './commands/verify.js';
|
|
7
7
|
import { runList } from './commands/list.js';
|
|
8
8
|
import { runLink } from './commands/link.js';
|
|
9
|
-
|
|
9
|
+
import { VERSION } from './version.js';
|
|
10
10
|
const HELP = `koncepto ${VERSION}
|
|
11
11
|
|
|
12
12
|
Usage:
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAA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AAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,OAAO,EAAE,MAAoB,CAAA"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
const pkgUrl = new URL('../package.json', import.meta.url);
|
|
4
|
+
const pkg = JSON.parse(readFileSync(fileURLToPath(pkgUrl), 'utf-8'));
|
|
5
|
+
export const VERSION = pkg.version;
|
|
6
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAElE,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yourtechtribe-labs/koncept-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "CLI for koncepto — init, verify, list, link operations on .koncept/ concept graphs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"node": ">=18.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@yourtechtribe-labs/koncept-core": "^0.1.0-alpha.
|
|
33
|
+
"@yourtechtribe-labs/koncept-core": "^0.1.0-alpha.6",
|
|
34
34
|
"glob": "13.0.6",
|
|
35
35
|
"yaml": "2.8.4"
|
|
36
36
|
},
|