@mimir-labs/cli 0.2.0 → 0.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/README.md +30 -31
- package/dist/commands/generate.js +2 -4
- package/dist/commands/generate.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -75,22 +75,19 @@ APS gives software a single, structured, machine-readable representation of that
|
|
|
75
75
|
## Conceptual Model
|
|
76
76
|
|
|
77
77
|
```text
|
|
78
|
-
Source Code
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| |
|
|
92
|
-
v v
|
|
93
|
-
mimir sync Validation
|
|
78
|
+
Source Code --mimir author--> Author Knowledge (aps/knowledge)
|
|
79
|
+
| |
|
|
80
|
+
+-------------------+------------------+
|
|
81
|
+
|
|
|
82
|
+
v
|
|
83
|
+
mimir generate
|
|
84
|
+
|
|
|
85
|
+
v
|
|
86
|
+
APS Knowledge Base (APS Manifest + Resources)
|
|
87
|
+
| |
|
|
88
|
+
| +--> mimir validate / governance / doctor
|
|
89
|
+
|
|
|
90
|
+
+--> mimir discover -> mimir sync -> AGENTS / Copilot / Cursor adapters
|
|
94
91
|
```
|
|
95
92
|
|
|
96
93
|
## Core Concepts
|
|
@@ -99,7 +96,8 @@ mimir sync Validation
|
|
|
99
96
|
| --- | --- | --- |
|
|
100
97
|
| Knowledge Provider | Library or platform package | Publishes structured software knowledge. |
|
|
101
98
|
| Consumer | Application or platform toolchain | Consumes knowledge published by providers. |
|
|
102
|
-
|
|
|
99
|
+
| Author Knowledge | Knowledge Provider | Provider-authored source knowledge under `aps/knowledge` for intent that cannot be inferred automatically. |
|
|
100
|
+
| APS Manifest | Knowledge Provider | Entry point of a provider package. |
|
|
103
101
|
| Resource | Knowledge Provider | Knowledge unit such as a component, API, service, rule, or example. |
|
|
104
102
|
| Governance | Knowledge Provider | Trust metadata covering provenance, evidence, lifecycle, applicability, and policy consistency. |
|
|
105
103
|
| Adapter | Consumer environment | Converts APS knowledge into consumer-specific formats. |
|
|
@@ -190,8 +188,8 @@ mimir doctor
|
|
|
190
188
|
Step summary:
|
|
191
189
|
|
|
192
190
|
- `mimir init`: prepares APS configuration in package metadata.
|
|
193
|
-
- `mimir author`: creates missing
|
|
194
|
-
- `mimir generate`:
|
|
191
|
+
- `mimir author`: creates missing Author Knowledge YAML templates under `aps/knowledge` without modifying existing files.
|
|
192
|
+
- `mimir generate`: composes observable evidence (TypeScript exports, Storybook metadata, package information) with Author Knowledge from `aps/knowledge` into the APS Manifest and related resources.
|
|
195
193
|
- `mimir validate`: verifies APS structural compliance.
|
|
196
194
|
- `mimir governance`: validates governance metadata and policy consistency.
|
|
197
195
|
- `mimir doctor`: evaluates maturity level before release.
|
|
@@ -199,8 +197,9 @@ Step summary:
|
|
|
199
197
|
|
|
200
198
|
Complete the generated authoring templates manually or with an AI agent before generation when human intent is required. Mimir does not write that content.
|
|
201
199
|
|
|
202
|
-
|
|
203
|
-
`
|
|
200
|
+
`mimir generate` composes completed `description`, `whenToUse`, and
|
|
201
|
+
`whenNotToUse` fields into the APS Manifest. `mimir sync` projects those fields
|
|
202
|
+
from the APS Manifest into the shared context used by all configured adapters.
|
|
204
203
|
|
|
205
204
|
## Example
|
|
206
205
|
|
|
@@ -215,7 +214,7 @@ dist/
|
|
|
215
214
|
examples.json
|
|
216
215
|
```
|
|
217
216
|
|
|
218
|
-
Minimal APS
|
|
217
|
+
Minimal APS Manifest example:
|
|
219
218
|
|
|
220
219
|
```json
|
|
221
220
|
{
|
|
@@ -280,8 +279,8 @@ mimir init
|
|
|
280
279
|
|
|
281
280
|
Why each step exists:
|
|
282
281
|
|
|
283
|
-
- Author -> creates missing, version-controlled templates for
|
|
284
|
-
- Generate ->
|
|
282
|
+
- Author -> creates missing, version-controlled Author Knowledge templates for intent that cannot be inferred automatically.
|
|
283
|
+
- Generate -> composes observable evidence and Author Knowledge into machine-readable APS artifacts.
|
|
285
284
|
- Validate -> ensures protocol compliance.
|
|
286
285
|
- Governance -> ensures trust, provenance, and policy consistency.
|
|
287
286
|
- Doctor -> evaluates provider maturity and release readiness.
|
|
@@ -314,7 +313,7 @@ Install provider
|
|
|
314
313
|
Important:
|
|
315
314
|
|
|
316
315
|
- `mimir sync` is not part of provider publication.
|
|
317
|
-
- `mimir sync` belongs to the consumer side and synchronizes knowledge to adapters such as AGENTS.md, Copilot Instructions, Cursor Rules, and future integrations.
|
|
316
|
+
- `mimir sync` belongs to the consumer side and synchronizes knowledge from the APS Manifest to adapters such as AGENTS.md, Copilot Instructions, Cursor Rules, and future integrations.
|
|
318
317
|
|
|
319
318
|
Example:
|
|
320
319
|
|
|
@@ -349,7 +348,7 @@ Found providers
|
|
|
349
348
|
|
|
350
349
|
Typical checks include:
|
|
351
350
|
|
|
352
|
-
-
|
|
351
|
+
- APS Manifest shape
|
|
353
352
|
- JSON validity
|
|
354
353
|
- resource declarations
|
|
355
354
|
- reference integrity
|
|
@@ -377,14 +376,14 @@ mimir governance --json
|
|
|
377
376
|
| Command | Role | Description | Example |
|
|
378
377
|
| --- | --- | --- | --- |
|
|
379
378
|
| `mimir init` | Provider | Initialize APS support in package metadata. | `mimir init` |
|
|
380
|
-
| `mimir author` | Provider | Create missing
|
|
381
|
-
| `mimir generate` | Provider |
|
|
379
|
+
| `mimir author` | Provider | Create missing Author Knowledge templates without overwriting existing files. | `mimir author --dry-run` |
|
|
380
|
+
| `mimir generate` | Provider | Compose APS resources from observable evidence and Author Knowledge. | `mimir generate --force` |
|
|
382
381
|
| `mimir discover` | Consumer | Discover APS-enabled dependencies/providers. | `mimir discover` |
|
|
383
|
-
| `mimir validate` | Both | Validate APS
|
|
382
|
+
| `mimir validate` | Both | Validate APS Manifest and declared resources. | `mimir validate` |
|
|
384
383
|
| `mimir governance` | Provider | Validate provenance, evidence, lifecycle, applicability and policy consistency metadata. | `mimir governance --json` |
|
|
385
384
|
| `mimir doctor` | Provider | Evaluate provider maturity (L0-L3). | `mimir doctor --json` |
|
|
386
385
|
| `mimir context` | Consumer | Generate local AI-agent context from discovered providers. | `mimir context --dry-run` |
|
|
387
|
-
| `mimir sync` | Consumer | Synchronize discovered APS knowledge to configured consumer adapters. | `mimir sync` |
|
|
386
|
+
| `mimir sync` | Consumer | Synchronize discovered APS Manifest knowledge to configured consumer adapters. | `mimir sync` |
|
|
388
387
|
| `mimir about` | Both | Show APS Protocol overview, workflows, and references. | `mimir about --json` |
|
|
389
388
|
| `mimir help` | Both | Show command help and usage. | `mimir help governance` |
|
|
390
389
|
| `mimir completion` | Utility | Print shell completion scripts. | `mimir completion zsh` |
|
|
@@ -454,7 +453,7 @@ Documentation provides context and intent, while APS provides interoperable, mac
|
|
|
454
453
|
- [x] Validation
|
|
455
454
|
- [x] Governance
|
|
456
455
|
- [x] Generate v1
|
|
457
|
-
- [x]
|
|
456
|
+
- [x] Author Knowledge authoring
|
|
458
457
|
- [x] Context generation
|
|
459
458
|
- [x] Adapter sync
|
|
460
459
|
|
|
@@ -52,10 +52,8 @@ function registerGenerateCommand(program) {
|
|
|
52
52
|
if (report.missingHumanMetadata.length > 0) {
|
|
53
53
|
(0, cli_output_1.warn)("human metadata is incomplete for some components");
|
|
54
54
|
console.log("Expected human metadata fields: description, whenToUse, whenNotToUse.");
|
|
55
|
-
console.log("
|
|
56
|
-
console.log("
|
|
57
|
-
console.log("- whenToUse/whenNotToUse: not auto-extracted in v1 (manual enrichment required)");
|
|
58
|
-
console.log(`Update generated resource file: ${node_path_1.default.join(report.outputDir, "components.json")}`);
|
|
55
|
+
console.log("Run 'mimir author' and complete the YAML files in aps/knowledge/components.");
|
|
56
|
+
console.log("A README description remains the fallback when authored description is empty.");
|
|
59
57
|
console.log("Missing human metadata for components:");
|
|
60
58
|
for (const name of report.missingHumanMetadata) {
|
|
61
59
|
console.log(`- ${name}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":";;;;;AAcA,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":";;;;;AAcA,0DAmFC;AAhGD,2CAAiD;AACjD,wEAAmE;AACnE,0DAA6B;AAC7B,wDAOiC;AACjC,mDAAiE;AAEjE,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,8CAA8C,CAAC;SAC3D,MAAM,CAAC,QAAQ,EAAE,8BAA8B,CAAC;SAChD,MAAM,CAAC,SAAS,EAAE,kDAAkD,CAAC;SACrE,MAAM,CAAC,KAAK,EAAE,OAA4C,EAAE,EAAE;QAC7D,IAAI,CAAC;YACH,IAAI,IAAA,kBAAQ,GAAE,EAAE,CAAC;gBACf,MAAM,OAAO,GAAG;oBACd,OAAO,EAAE,UAAU;oBACnB,MAAM,EAAE,IAAI;oBACZ,EAAE,EAAE,IAAI;oBACR,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;oBAC7B,SAAS,EAAE,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC;iBACnD,CAAC;gBACF,IAAI,IAAA,wBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;oBACjC,IAAA,sBAAS,EAAC,OAAO,CAAC,CAAC;gBACrB,CAAC;qBAAM,CAAC;oBACN,IAAA,oBAAO,EAAC,4CAA4C,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;gBAC3E,CAAC;gBACD,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAa,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE;gBAChD,KAAK,EAAE,OAAO,CAAC,KAA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,EAAE,OAAO,EAAE,CAAC,CAAC;YAChE,CAAC;iBAAM,CAAC;gBACN,IAAA,yBAAY,EAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YAC9C,CAAC;YACD,IAAA,wBAAW,EAAC,uBAAU,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,IAAA,uCAAiB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimir-labs/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Mimir CLI, the reference implementation for the APS Protocol",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"commander": "^12.1.0",
|
|
37
|
-
"@mimir-labs/core": "0.
|
|
37
|
+
"@mimir-labs/core": "0.3.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.1",
|