archidocs 1.4.0-beta.4 → 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 +4 -1
- package/dist/cli/commands.js +2 -1
- package/dist/guide/index.d.ts +11 -7
- package/dist/guide/index.js +23 -2
- package/guide/SKILL.md +1 -1
- package/guide/describe/SKILL.md +111 -0
- package/guide/{topics/fill-gaps.md → fill-gaps/SKILL.md} +13 -38
- package/package.json +1 -1
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,16 @@ 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/";
|
|
86
|
+
}, {
|
|
87
|
+
readonly id: "describe";
|
|
88
|
+
readonly name: "archidocs-describe";
|
|
89
|
+
readonly description: "Build the Archidocs Model from the user's own explanation of their architecture, iteratively, with no code needed. Use when the user describes how their systems fit together in prose, wants to talk through or sketch an architecture, or is documenting something whose code isn't available.";
|
|
90
|
+
readonly dir: "describe/";
|
|
87
91
|
}];
|
|
88
92
|
export type SkillId = (typeof skills)[number]["id"];
|
|
89
93
|
/** The authoring skill's name, as its stub and the full SKILL.md both declare it. */
|
package/dist/guide/index.js
CHANGED
|
@@ -16,19 +16,37 @@ 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
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "describe",
|
|
46
|
+
name: "archidocs-describe",
|
|
47
|
+
description: "Build the Archidocs Model from the user's own explanation of their architecture, iteratively, with no code needed. Use when the user describes how their systems fit together in prose, wants to talk through or sketch an architecture, or is documenting something whose code isn't available.",
|
|
48
|
+
dir: "describe/",
|
|
49
|
+
},
|
|
32
50
|
];
|
|
33
51
|
/** The authoring skill's name, as its stub and the full SKILL.md both declare it. */
|
|
34
52
|
export const SKILL_NAME = skills[0].name;
|
|
@@ -57,6 +75,9 @@ export async function skillGuide(skill, topic) {
|
|
|
57
75
|
if (!own.length)
|
|
58
76
|
return { ok: false, message: `The skill "${skill.id}" has no topics; load it with no topic.` };
|
|
59
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) };
|
|
60
81
|
if (!found) {
|
|
61
82
|
const suggestion = suggest(topic, own.map((t) => t.id));
|
|
62
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
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archidocs-describe
|
|
3
|
+
description: Build the Archidocs Model from the user's own explanation of their architecture, iteratively, with no code needed. Use when the user describes how their systems fit together in prose, wants to talk through or sketch an architecture, or is documenting something whose code isn't available.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Archidocs describe
|
|
7
|
+
|
|
8
|
+
Turn the user's explanation of their architecture into a Model, round by round. The user talks; you map what they said to Elements, Relationships, Deployment Targets and Deployments, play the whole draft back, and ask only what is ambiguous.
|
|
9
|
+
|
|
10
|
+
This skill writes the Model, so load `authoring` first: `get_guide("authoring")`, or `archidocs guide --skill authoring` without MCP. It holds the Model's rules and the edit loop this guide follows.
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
Use only what the user says. Never read code, even when it is in reach: the user is describing the architecture as they understand it, and that is what this skill records. Code is for `fill-gaps`, offered at the end.
|
|
15
|
+
|
|
16
|
+
Read the Model before the first round (`search_elements`, `list_teams`, `list_environments`), so a name the user mentions resolves to an Element that already exists instead of a duplicate.
|
|
17
|
+
|
|
18
|
+
## First round
|
|
19
|
+
|
|
20
|
+
Besides the round's own questions, ask once, in the first round only:
|
|
21
|
+
|
|
22
|
+
- **Project**: which Project this goes in. Propose one new Project, with an id and name drawn from the prose, unless an existing Project plainly fits.
|
|
23
|
+
- **Owner Team**: which Team owns it. Propose an existing Team if one fits; otherwise ask for the Team's name. Never make one up.
|
|
24
|
+
|
|
25
|
+
## Each round
|
|
26
|
+
|
|
27
|
+
1. **Map** the prose to the Model: Systems, Services, Components, Relationships (consumer `to` provider), Deployment Targets and Deployments. Keep every earlier answer; a round adds to the draft and corrects it, it never starts over.
|
|
28
|
+
2. **Play back the whole draft**, not only what changed, in two parts:
|
|
29
|
+
- an **outline**: each Element on one line with its id, kind and the fields the user gave (`technology`, `type`, `external`, parent), nested as it will be in YAML; then the Deployment Targets and Deployments;
|
|
30
|
+
- a **flow**: one line per path through the draft, arrows pointing from consumer to provider as Relationships do, such as `web → apigee → api → bigquery`. A provider with several consumers can be drawn with a reverse arrow on the same line: `api → bigquery ← etl`.
|
|
31
|
+
3. **Ask only the ambiguities**, as numbered questions, each with a proposed answer worded so "yes" accepts it. Don't ask what the user already said, and don't ask about fields they didn't mention: those stay gaps for `fill-gaps`. Keep a round to the questions that change the draft's shape, about five or fewer.
|
|
32
|
+
|
|
33
|
+
The user answers by number ("1 yes, 2 its own Service, 3 skip"), or keeps explaining. Fold both into the next round's draft.
|
|
34
|
+
|
|
35
|
+
## Mapping cues
|
|
36
|
+
|
|
37
|
+
| The user says | Map it to |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| A web app, an API, a worker | A Service, `technology` as named (`Next.js`). |
|
|
40
|
+
| A BFF (backend for frontend) | A Component of the web Service, or a Service of its own when it is deployed apart. Ask, proposing a Component. |
|
|
41
|
+
| A managed datastore (BigQuery, Cloud SQL, DynamoDB, S3) | A Service with `type: datastore` and `technology` as named. Ask whether it is `external`: propose not, when the organization owns the data in its own cloud account. |
|
|
42
|
+
| A broker or queue (Kafka, Pub/Sub, SQS) | A Service with `type: broker`; the Relationships through it follow authoring's `relationships` topic (`via`, `channel`). |
|
|
43
|
+
| A platform it runs on (Anthos, GKE, EKS, Cloud Run, a VM) | A Deployment Target with that `kind` (`kind: anthos`), and a Deployment of the Service on it once an Environment is known. |
|
|
44
|
+
| An ETL, a batch job, a cron job | A Service, with Relationships to what it reads and what it writes. |
|
|
45
|
+
| A black box | Always ask: run by a vendor, a System with `external: true`; or run inside the organization, a System with no Components, owned by the Team that runs it (asked, or left as a gap). The user's words about it go in `description`. |
|
|
46
|
+
| An API gateway or reverse proxy (Apigee, Kong, nginx) | A Service in the path, `technology` naming the product: `web → apigee → api`, owned by the Team that runs it. Mention the lighter option once: leave it out and write `HTTPS via Apigee` on the Relationship's `technology`. See authoring's `relationships` topic, "Gateways and proxies". |
|
|
47
|
+
|
|
48
|
+
## Never invent
|
|
49
|
+
|
|
50
|
+
- **Environments, URLs and Owners** come only from the user. A Deployment needs an Environment, so a named platform triggers one question: "Which Environments does this run in?". Until it is answered, draft the Deployment Target and leave the Deployments out.
|
|
51
|
+
- An Owner other than the Project's is set only when the user names the Team.
|
|
52
|
+
- Write what was said: `technology`, `type`, `external`, the platform's `kind`, and a `description` in the user's own words. Anything unsaid stays a gap.
|
|
53
|
+
|
|
54
|
+
## Writing
|
|
55
|
+
|
|
56
|
+
1. **Nothing is written until the user approves the first draft.** Approval covers the whole draft as played back; open questions they skipped stay out of it.
|
|
57
|
+
2. **First write**: follow authoring's `bootstrap` topic from step 5: `create_project` if the Project is new (`upsert_team` and `upsert_environment` first only for Teams and Environments the user named), then Systems, Services, Components (`upsert_element`), Deployment Targets (`upsert_target`), Deployments (`upsert_deployment`), then Relationships (`upsert_relationship`). Resolve refusals through the tools, as the edit loop says.
|
|
58
|
+
3. **Start the viewer**: after the first write, start `archidocs dev` in the background if you can, and give the user its URL. Otherwise print the command for them to run. Never wait on it.
|
|
59
|
+
4. **Each later round** writes its changes as soon as the user approves the round's draft, and shows the diffs.
|
|
60
|
+
|
|
61
|
+
## Cross-Project
|
|
62
|
+
|
|
63
|
+
When the prose clearly describes another Team's System ("the platform team runs Apigee for everyone"), propose it as its own Project owned by that Team, linked with `project:id` Relationships. If the user says to keep it all in one Project, do so, with `owner` set on those Elements when the Team was named.
|
|
64
|
+
|
|
65
|
+
## Finish
|
|
66
|
+
|
|
67
|
+
Finish as authoring's edit loop does: run `check`, then suggest a branch name, a PR title and a PR body listing what was written and the open gaps (fields left unsaid, Owners and Environments not given). Then offer `fill-gaps` (`get_guide("fill-gaps")`), which reads the code to propose the `technology`, `repository`, URLs and descriptions this conversation left open.
|
|
68
|
+
|
|
69
|
+
## Worked example
|
|
70
|
+
|
|
71
|
+
The user says:
|
|
72
|
+
|
|
73
|
+
> I have a next.js app that uses BFF to call an api that's running on anthos and is proxied through an apigee gateway. That API gets its data from BigQuery. The bigquery table is populated by an ETL from a black-boxed service
|
|
74
|
+
|
|
75
|
+
The Model has no Project for this yet. The first round plays back:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
Draft, Project `orders` (new)
|
|
79
|
+
|
|
80
|
+
Services
|
|
81
|
+
web Service technology: Next.js
|
|
82
|
+
bff Component (the BFF)
|
|
83
|
+
apigee Service technology: Apigee (API gateway)
|
|
84
|
+
api Service (the API)
|
|
85
|
+
bigquery Service, datastore technology: BigQuery
|
|
86
|
+
etl Service (the ETL)
|
|
87
|
+
source System (the black-boxed service)
|
|
88
|
+
|
|
89
|
+
Deployment Targets
|
|
90
|
+
anthos kind: anthos api runs here; no Deployments until Environments are known
|
|
91
|
+
|
|
92
|
+
Flow
|
|
93
|
+
web.bff → apigee → api → bigquery
|
|
94
|
+
bigquery ← etl → source
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
1. Project: put all of this in one new Project, `orders` ("Orders")?
|
|
99
|
+
2. Owner Team: which Team owns it? There is no Team in the Workspace that fits.
|
|
100
|
+
3. BFF: a Component of `web`, deployed with it? (Or its own Service, if it is deployed apart.)
|
|
101
|
+
4. Apigee: a Service in the path, `web → apigee → api`, owned by the Team that runs it?
|
|
102
|
+
(The lighter option leaves it out and writes `HTTPS via Apigee` on the Relationship.)
|
|
103
|
+
Who runs it: the same Team, or another (a platform Team, in its own Project)?
|
|
104
|
+
5. BigQuery: your own dataset in your Google Cloud project, so not `external`?
|
|
105
|
+
6. The black box: run by a vendor (`external: true`), or by a Team in the organization?
|
|
106
|
+
What does it hold or do, in a sentence?
|
|
107
|
+
7. ETL: does it pull from the black box (`etl → source`), as drawn?
|
|
108
|
+
8. Anthos: which Environments does the API run in (for example `dev` and `prod`)?
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Nothing is written yet. Say the user answers "1 yes, 2 checkout-team, 3 yes, 4 yes, platform-team runs it, 5 yes, 6 a vendor's CRM, 7 yes, 8 prod only". The second round plays back the full draft again: `apigee` proposed as a Service in a `platform` Project owned by `platform-team`, as Cross-Project above proposes, `source` as an External System described "A vendor's CRM", and a Deployment of `api` in `prod` on `anthos` with no `url`. Its only question is whether the `platform` Project is right, or to keep `apigee` in `orders` owned by `platform-team`. Once the user approves, write it, start `archidocs dev`, and carry on with whatever they explain next.
|
|
@@ -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`.
|