archidocs 1.4.0-beta.5 → 1.4.0-beta.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/cli/commands.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ export declare const commands: {
|
|
|
134
134
|
readonly type: "string";
|
|
135
135
|
readonly value: "<id>";
|
|
136
136
|
readonly default: "authoring";
|
|
137
|
-
readonly description: "The skill whose guide to print
|
|
137
|
+
readonly description: "The skill whose guide to print: `authoring`, or one that builds on it, such as `fill-gaps`. Only `authoring` has topics.";
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
140
|
readonly examples: readonly [{
|
|
@@ -146,6 +146,9 @@ export declare const commands: {
|
|
|
146
146
|
}, {
|
|
147
147
|
readonly command: "archidocs guide --skill authoring";
|
|
148
148
|
readonly description: "Name the skill, as a skill's stub does: the same as `archidocs guide`.";
|
|
149
|
+
}, {
|
|
150
|
+
readonly command: "archidocs guide --skill fill-gaps";
|
|
151
|
+
readonly description: "Print another skill's guide, here the interview that fills what the Model leaves empty.";
|
|
149
152
|
}];
|
|
150
153
|
readonly exitCodes: readonly [{
|
|
151
154
|
readonly code: 0;
|
package/dist/cli/commands.js
CHANGED
|
@@ -58,12 +58,13 @@ export const commands = {
|
|
|
58
58
|
description: "Print an agent skill's full guide, or one of its task topics. With no `--skill`, the authoring guide.",
|
|
59
59
|
arguments: [{ name: "[topic]", description: "A task topic of the skill; with none, the guide and its list of topics." }],
|
|
60
60
|
flags: {
|
|
61
|
-
skill: { type: "string", value: "<id>", default: "authoring", description: "The skill whose guide to print
|
|
61
|
+
skill: { type: "string", value: "<id>", default: "authoring", description: "The skill whose guide to print: `authoring`, or one that builds on it, such as `fill-gaps`. Only `authoring` has topics." },
|
|
62
62
|
},
|
|
63
63
|
examples: [
|
|
64
64
|
{ command: "archidocs guide", description: "Print the authoring guide: the Model in brief, the edit loop and the list of task topics." },
|
|
65
65
|
{ command: "archidocs guide add-service", description: "Print one task topic, here how to add a Service." },
|
|
66
66
|
{ command: "archidocs guide --skill authoring", description: "Name the skill, as a skill's stub does: the same as `archidocs guide`." },
|
|
67
|
+
{ command: "archidocs guide --skill fill-gaps", description: "Print another skill's guide, here the interview that fills what the Model leaves empty." },
|
|
67
68
|
],
|
|
68
69
|
exitCodes: [
|
|
69
70
|
{ code: EXIT.ok, meaning: "The guide or the topic was printed." },
|
package/dist/guide/index.d.ts
CHANGED
|
@@ -20,9 +20,6 @@ export declare const topics: readonly [{
|
|
|
20
20
|
}, {
|
|
21
21
|
readonly id: "propose-adr";
|
|
22
22
|
readonly summary: "Propose an ADR linked to the Elements and Views it affects.";
|
|
23
|
-
}, {
|
|
24
|
-
readonly id: "fill-gaps";
|
|
25
|
-
readonly summary: "Interview the user about the fields the Model leaves empty, proposing each value from evidence in the code and writing it as it is confirmed.";
|
|
26
23
|
}, {
|
|
27
24
|
readonly id: "change";
|
|
28
25
|
readonly summary: "Rename, move or remove, working through refused removals by their references.";
|
|
@@ -51,7 +48,7 @@ export interface Skill {
|
|
|
51
48
|
export declare const skills: readonly [{
|
|
52
49
|
readonly id: "authoring";
|
|
53
50
|
readonly name: "archidocs-authoring";
|
|
54
|
-
readonly description: "Edit the Archidocs architecture Model. Use when bootstrapping a Project from code, adding or changing Services, Relationships, Deployments or Views, proposing an ADR
|
|
51
|
+
readonly description: "Edit the Archidocs architecture Model. Use when bootstrapping a Project from code, adding or changing Services, Relationships, Deployments or Views, or proposing an ADR.";
|
|
55
52
|
readonly dir: "";
|
|
56
53
|
readonly topics: readonly [{
|
|
57
54
|
readonly id: "bootstrap";
|
|
@@ -74,9 +71,6 @@ export declare const skills: readonly [{
|
|
|
74
71
|
}, {
|
|
75
72
|
readonly id: "propose-adr";
|
|
76
73
|
readonly summary: "Propose an ADR linked to the Elements and Views it affects.";
|
|
77
|
-
}, {
|
|
78
|
-
readonly id: "fill-gaps";
|
|
79
|
-
readonly summary: "Interview the user about the fields the Model leaves empty, proposing each value from evidence in the code and writing it as it is confirmed.";
|
|
80
74
|
}, {
|
|
81
75
|
readonly id: "change";
|
|
82
76
|
readonly summary: "Rename, move or remove, working through refused removals by their references.";
|
|
@@ -84,6 +78,11 @@ export declare const skills: readonly [{
|
|
|
84
78
|
readonly id: "rules";
|
|
85
79
|
readonly summary: "Every `check` rule id: what it means, a failing example and the fix.";
|
|
86
80
|
}];
|
|
81
|
+
}, {
|
|
82
|
+
readonly id: "fill-gaps";
|
|
83
|
+
readonly name: "archidocs-fill-gaps";
|
|
84
|
+
readonly description: "Find and fill what the Archidocs Model leaves empty, by interviewing the user with values proposed from evidence in the code. Use when asked what's missing or undocumented in the architecture, to audit or complete the Model, or to prepare a Team's documentation backlog.";
|
|
85
|
+
readonly dir: "fill-gaps/";
|
|
87
86
|
}, {
|
|
88
87
|
readonly id: "describe";
|
|
89
88
|
readonly name: "archidocs-describe";
|
package/dist/guide/index.js
CHANGED
|
@@ -16,19 +16,31 @@ export const topics = [
|
|
|
16
16
|
{ id: "dynamic-view", summary: "Draft a scenario as Steps over existing Relationships, adding missing ones." },
|
|
17
17
|
{ id: "saved-view", summary: "Save a structural or Deployment View with selectors and a Lens." },
|
|
18
18
|
{ id: "propose-adr", summary: "Propose an ADR linked to the Elements and Views it affects." },
|
|
19
|
-
{ id: "fill-gaps", summary: "Interview the user about the fields the Model leaves empty, proposing each value from evidence in the code and writing it as it is confirmed." },
|
|
20
19
|
{ id: "change", summary: "Rename, move or remove, working through refused removals by their references." },
|
|
21
20
|
{ id: "rules", summary: "Every `check` rule id: what it means, a failing example and the fix." },
|
|
22
21
|
];
|
|
22
|
+
/**
|
|
23
|
+
* Authoring topics that became skills of their own, by the skill that took
|
|
24
|
+
* each over. Asking authoring for one returns a short note naming the skill,
|
|
25
|
+
* so 1.3.x stubs and agents still find it. Drop these at the next major version.
|
|
26
|
+
*/
|
|
27
|
+
const movedTopics = new Map([["fill-gaps", "fill-gaps"]]);
|
|
28
|
+
const movedNote = (topic, skill) => `# ${topic}\n\nThe \`${topic}\` topic moved to the \`archidocs-${skill}\` skill. Load it with \`get_guide("${skill}")\`, or \`archidocs guide --skill ${skill}\` without MCP, and follow it.\n`;
|
|
23
29
|
/** Every skill, authoring first. */
|
|
24
30
|
export const skills = [
|
|
25
31
|
{
|
|
26
32
|
id: "authoring",
|
|
27
33
|
name: "archidocs-authoring",
|
|
28
|
-
description: "Edit the Archidocs architecture Model. Use when bootstrapping a Project from code, adding or changing Services, Relationships, Deployments or Views, proposing an ADR
|
|
34
|
+
description: "Edit the Archidocs architecture Model. Use when bootstrapping a Project from code, adding or changing Services, Relationships, Deployments or Views, or proposing an ADR.",
|
|
29
35
|
dir: "",
|
|
30
36
|
topics,
|
|
31
37
|
},
|
|
38
|
+
{
|
|
39
|
+
id: "fill-gaps",
|
|
40
|
+
name: "archidocs-fill-gaps",
|
|
41
|
+
description: "Find and fill what the Archidocs Model leaves empty, by interviewing the user with values proposed from evidence in the code. Use when asked what's missing or undocumented in the architecture, to audit or complete the Model, or to prepare a Team's documentation backlog.",
|
|
42
|
+
dir: "fill-gaps/",
|
|
43
|
+
},
|
|
32
44
|
{
|
|
33
45
|
id: "describe",
|
|
34
46
|
name: "archidocs-describe",
|
|
@@ -63,6 +75,9 @@ export async function skillGuide(skill, topic) {
|
|
|
63
75
|
if (!own.length)
|
|
64
76
|
return { ok: false, message: `The skill "${skill.id}" has no topics; load it with no topic.` };
|
|
65
77
|
const found = own.find((t) => t.id === topic);
|
|
78
|
+
const movedTo = skill.id === "authoring" ? movedTopics.get(topic) : undefined;
|
|
79
|
+
if (!found && movedTo)
|
|
80
|
+
return { ok: true, skill: skill.id, topic, text: movedNote(topic, movedTo) };
|
|
66
81
|
if (!found) {
|
|
67
82
|
const suggestion = suggest(topic, own.map((t) => t.id));
|
|
68
83
|
return { ok: false, message: `Unknown topic "${topic}"${suggestion ? `; did you mean "${suggestion}"?` : ""} Topics: ${own.map((t) => t.id).join(", ")}.`, ...(suggestion ? { suggestion } : {}) };
|
package/guide/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archidocs-authoring
|
|
3
|
-
description: Edit the Archidocs architecture Model. Use when bootstrapping a Project from code, adding or changing Services, Relationships, Deployments or Views, proposing an ADR
|
|
3
|
+
description: Edit the Archidocs architecture Model. Use when bootstrapping a Project from code, adding or changing Services, Relationships, Deployments or Views, or proposing an ADR.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Archidocs authoring
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: archidocs-fill-gaps
|
|
3
|
+
description: Find and fill what the Archidocs Model leaves empty, by interviewing the user with values proposed from evidence in the code. Use when asked what's missing or undocumented in the architecture, to audit or complete the Model, or to prepare a Team's documentation backlog.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Archidocs fill gaps
|
|
7
|
+
|
|
8
|
+
Load `authoring` first: `get_guide("authoring")`, or `archidocs guide` without MCP. Its edit loop and its rules for the Model apply to every write here.
|
|
2
9
|
|
|
3
10
|
Interview the user about what the Model leaves empty, one Element at a time. You do the legwork before every question: dig the value out of the code the Workspace describes and put it forward with its source, so the user mostly confirms or corrects. Each confirmed answer is written straight away, so stopping halfway still leaves real progress.
|
|
4
11
|
|
|
5
12
|
## Steps
|
|
6
13
|
|
|
7
|
-
1. **Check.** Run `check` (or `archidocs check`) and fix its errors first: the gap scan
|
|
8
|
-
2. **Gap scan.**
|
|
14
|
+
1. **Check.** Run `check` (or `archidocs check`) and fix its errors first: the gap scan lists nothing while the Workspace has errors.
|
|
15
|
+
2. **Gap scan.** Call `list_gaps`, or run `archidocs gaps` without MCP. It lists every gap, grouped by Project and Owner Team; pass `project` or `owner` (`--project`, `--owner`) to narrow it. What it counts is under What counts as a gap. Show the scan and agree with the user which Projects or Teams to work through.
|
|
9
16
|
3. **Codebases.** For each Project, find the checkout behind each Service: an existing `repository`, a `links` entry, the Workspace's own repo, or a path the user names. Ask once for any you can't find.
|
|
10
17
|
4. **Interview**, one round per Element, Services that others call first, then the rest of the Services, then Components. Within a round, ask that Element's gaps in this order: `repository`, API docs, `technology` and version, `description`, Owner, then its Relationships and Deployments. For each round:
|
|
11
18
|
- **Legwork first.** Look where the table under Evidence points before you ask anything. Finding facts is your job; deciding them is the user's.
|
|
@@ -14,7 +21,7 @@ Interview the user about what the Model leaves empty, one Element at a time. You
|
|
|
14
21
|
- **Accept** `skip` and `unknown`: record the gap as open and move on.
|
|
15
22
|
- **Write** the round's confirmed answers at once (see Writing), then run `check`. The round is done when every gap of the Element is written, skipped or unknown, and `check` passes.
|
|
16
23
|
5. **Metadata.** Once per Project, ask whether its Teams record facts the Model has no field for (`tier`, `on-call`, `pci-scope`). If they do, fill them Element by Element in the same way.
|
|
17
|
-
6. **Decisions.** An answer that is a decision rather than a fact ("it's External because a vendor runs it", "we deploy only to prod on purpose") goes to the user as a proposed ADR, following
|
|
24
|
+
6. **Decisions.** An answer that is a decision rather than a fact ("it's External because a vendor runs it", "we deploy only to prod on purpose") goes to the user as a proposed ADR, following authoring's `propose-adr` topic.
|
|
18
25
|
7. **Summary.** End with two lists: what was filled, each with its source, and what is still open, grouped by Owner Team so each list can go to its Team. Then the edit loop's finish: `check`, a branch name, a PR title, and a PR body that carries both lists.
|
|
19
26
|
|
|
20
27
|
## Writing
|
|
@@ -25,6 +32,8 @@ Sources belong in the summary and the PR body, never in the Model: no evidence f
|
|
|
25
32
|
|
|
26
33
|
## What counts as a gap
|
|
27
34
|
|
|
35
|
+
What `list_gaps` and `archidocs gaps` report:
|
|
36
|
+
|
|
28
37
|
| Where | Field | A gap when |
|
|
29
38
|
| --- | --- | --- |
|
|
30
39
|
| Every Element | `description` | empty |
|
|
@@ -51,37 +60,3 @@ Fields such as `tags`, `links`, `metadata` and `instances` are left out on purpo
|
|
|
51
60
|
|
|
52
61
|
Versions finer than `technology` carries (a pinned patch version, a runtime image tag) go in `metadata`, keyed by what they are: `node: 22.11.0`. Other facts without a field, such as an API style or a spec version, go there too.
|
|
53
62
|
|
|
54
|
-
## Gap query
|
|
55
|
-
|
|
56
|
-
Needs `jq`. Prints Markdown: a `##` heading per Project, a `###` heading per Owner Team, and one line per Element, Relationship or Deployment naming its empty fields.
|
|
57
|
-
|
|
58
|
-
```jq
|
|
59
|
-
. as $b
|
|
60
|
-
| (reduce $b.elements[] as $e ({}; .[$e.id] = $e)) as $by
|
|
61
|
-
| def app: .kind == "service" and .external == false and .type == "app";
|
|
62
|
-
def runs($id): [$b.deployments[] | select(.service == $id)];
|
|
63
|
-
def called($id): [$b.relationships[] | select(.to == $id and $by[.from].kind != "person")] | length > 0;
|
|
64
|
-
def gap($p; $o; $item; $m): select($m | length > 0) | {project: $p, owner: $o, item: $item, missing: $m};
|
|
65
|
-
[ ( $b.elements[] as $e
|
|
66
|
-
| gap($e.id | split(":")[0]; $e.owner; "\($e.kind) \($e.id)";
|
|
67
|
-
[ if $e.description == null then "description" else empty end,
|
|
68
|
-
if ($e.kind == "service" or $e.kind == "component") and $e.technology == null then "technology" else empty end,
|
|
69
|
-
if ($e | app) and $e.repository == null then "repository" else empty end,
|
|
70
|
-
if $e.kind == "service" and $e.external == false and (runs($e.id) | length) == 0 then "deployments" else empty end,
|
|
71
|
-
if ($e | app) and called($e.id)
|
|
72
|
-
and ([$e.links[].label, runs($e.id)[].endpoints[].name] | map(select(test("api|openapi|swagger"; "i"))) | length) == 0
|
|
73
|
-
then "api-docs" else empty end ]) ),
|
|
74
|
-
( $b.relationships[] as $r
|
|
75
|
-
| gap($r.from | split(":")[0]; $by[$r.from].owner; "relationship \($r.from) -> \($r.to)";
|
|
76
|
-
[ if $r.description == null then "description" else empty end,
|
|
77
|
-
if $r.technology == null then "technology" else empty end,
|
|
78
|
-
if $r.interaction == "async" and $r.channel == null then "channel" else empty end ]) ),
|
|
79
|
-
( $b.deployments[] as $d
|
|
80
|
-
| select($by[$d.service] | app)
|
|
81
|
-
| gap($d.service | split(":")[0]; $d.owner; "deployment \($d.service) in \($d.environment) on \($d.target)";
|
|
82
|
-
[ if $d.url == null then "url" else empty end ]) ) ]
|
|
83
|
-
| group_by(.project)[]
|
|
84
|
-
| "## \(.[0].project)", (group_by(.owner)[] | "### \(.[0].owner)", (.[] | "- \(.item): \(.missing | join(", "))"))
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Save it as `gaps.jq` outside the Workspace and run `jq -r -f gaps.jq <tmp>/workspace.bundle.json`.
|