archidocs 1.4.0-beta.5 → 1.4.0-beta.7
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/consult/SKILL.md +84 -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: "consult";
|
|
83
|
+
readonly name: "archidocs-consult";
|
|
84
|
+
readonly description: "Check the Archidocs architecture Model before and after changing code. Use when changing a public API, event or schema, adding or removing a dependency on another Service, datastore or broker, renaming or retiring a Service, changing deployment config, or answering who calls, owns or deploys something.";
|
|
85
|
+
readonly dir: "consult/";
|
|
86
|
+
}, {
|
|
87
|
+
readonly id: "fill-gaps";
|
|
88
|
+
readonly name: "archidocs-fill-gaps";
|
|
89
|
+
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.";
|
|
90
|
+
readonly dir: "fill-gaps/";
|
|
87
91
|
}, {
|
|
88
92
|
readonly id: "describe";
|
|
89
93
|
readonly name: "archidocs-describe";
|
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: "consult",
|
|
40
|
+
name: "archidocs-consult",
|
|
41
|
+
description: "Check the Archidocs architecture Model before and after changing code. Use when changing a public API, event or schema, adding or removing a dependency on another Service, datastore or broker, renaming or retiring a Service, changing deployment config, or answering who calls, owns or deploys something.",
|
|
42
|
+
dir: "consult/",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "fill-gaps",
|
|
46
|
+
name: "archidocs-fill-gaps",
|
|
47
|
+
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.",
|
|
48
|
+
dir: "fill-gaps/",
|
|
49
|
+
},
|
|
32
50
|
{
|
|
33
51
|
id: "describe",
|
|
34
52
|
name: "archidocs-describe",
|
|
@@ -63,6 +81,9 @@ export async function skillGuide(skill, topic) {
|
|
|
63
81
|
if (!own.length)
|
|
64
82
|
return { ok: false, message: `The skill "${skill.id}" has no topics; load it with no topic.` };
|
|
65
83
|
const found = own.find((t) => t.id === topic);
|
|
84
|
+
const movedTo = skill.id === "authoring" ? movedTopics.get(topic) : undefined;
|
|
85
|
+
if (!found && movedTo)
|
|
86
|
+
return { ok: true, skill: skill.id, topic, text: movedNote(topic, movedTo) };
|
|
66
87
|
if (!found) {
|
|
67
88
|
const suggestion = suggest(topic, own.map((t) => t.id));
|
|
68
89
|
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,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archidocs-consult
|
|
3
|
+
description: Check the Archidocs architecture Model before and after changing code. Use when changing a public API, event or schema, adding or removing a dependency on another Service, datastore or broker, renaming or retiring a Service, changing deployment config, or answering who calls, owns or deploys something.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Archidocs consult
|
|
7
|
+
|
|
8
|
+
You are changing code in a Service's repo. The Model says who depends on that Service, who owns them, where it runs and what was decided about it. Read it before you edit, report what matters in four lines, and check afterwards that the Model still matches the code.
|
|
9
|
+
|
|
10
|
+
This skill only reads. It never writes the Model: when the Model needs a change, hand off to the authoring skill (load it first with `get_guide("authoring")`, or `archidocs guide --skill authoring` without MCP) and follow its topic.
|
|
11
|
+
|
|
12
|
+
## Before the change
|
|
13
|
+
|
|
14
|
+
Run these read tools, in order:
|
|
15
|
+
|
|
16
|
+
1. **Resolve** the Service: `search_elements` with its name, repo name, or a URL or host from its config. Take the `project:id` of the Element the code implements. If nothing matches, see [Not in the Model](#not-in-the-model).
|
|
17
|
+
2. **Consumers**: `get_impact(id, direction: "upstream", max_depth: 1)` for the Elements that call it directly, each with its Owner and the Relationships that connect them. Call `get_impact(id, direction: "upstream")` once more without `max_depth` and subtract, for the count of indirect consumers.
|
|
18
|
+
3. **Owners**: the Element's own `owner` from step 1, and each direct consumer's Owner from step 2. The Teams to tell are the consumers' Owners other than the Element's own.
|
|
19
|
+
4. **Deployments**: `get_deployments(service: id)` for each Environment, Deployment Target and URL it runs at. Do this when the change touches deployment config, and to name what a change reaches.
|
|
20
|
+
5. **ADRs**: `list_adrs(element: id)`, then `get_adr` for any whose title touches what you are changing. Note each one's status; only `accepted` ones bind.
|
|
21
|
+
|
|
22
|
+
### Report
|
|
23
|
+
|
|
24
|
+
Before editing, tell the user what you found in four lines:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
Consumers: web (storefront), checkout (payments) +4 indirect
|
|
28
|
+
Teams to tell: storefront, payments
|
|
29
|
+
Deployments: prod on eks-main (https://cart.example.com), staging on eks-staging
|
|
30
|
+
ADRs: shop:0003 Cart is the only writer of cart state (accepted)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Write "none" on a line with nothing to report. Then carry on with the change.
|
|
34
|
+
|
|
35
|
+
## When to stop and ask
|
|
36
|
+
|
|
37
|
+
Stop and ask the user before editing in only two cases:
|
|
38
|
+
|
|
39
|
+
- **An Accepted ADR contradicts the change.** Quote the ADR's id, title and the sentence the change goes against. The user decides whether to change course or supersede the ADR (authoring's `propose-adr` topic).
|
|
40
|
+
- **The change breaks a contract another Team's consumer uses.** A removed or renamed endpoint, field, event or channel that a consumer owned by another Team relies on. Name the consumer and its Owner.
|
|
41
|
+
|
|
42
|
+
Otherwise carry on. A consumer on your own Team, a Proposed ADR, or a judgement that the change is risky is something to report, not a reason to stop.
|
|
43
|
+
|
|
44
|
+
## After the change
|
|
45
|
+
|
|
46
|
+
Compare only the dependencies this change touched (a client, SDK call, queue or topic, datastore connection added, removed or pointed elsewhere) with the Element's Relationships, from `get_impact(id, direction: "downstream", max_depth: 1)`. Also check a renamed or retired Service, and a changed URL or Environment against `get_deployments`.
|
|
47
|
+
|
|
48
|
+
When they differ, say so in one line per difference and offer to update the Model. On a yes, load authoring and follow its `relationships` topic for a Relationship, or `add-service` for a new or renamed Service and its Deployments.
|
|
49
|
+
|
|
50
|
+
Drift you notice beyond this change (a Relationship the code no longer has, an empty description) gets one line suggesting the `fill-gaps` skill. Don't fix it here.
|
|
51
|
+
|
|
52
|
+
## Not in the Model
|
|
53
|
+
|
|
54
|
+
When `search_elements` finds nothing, say so in one line ("cart isn't in the Archidocs Model") and carry on with the code change. Afterwards, offer to add it with authoring's `add-service` topic, or `bootstrap` if its Project is missing too.
|
|
55
|
+
|
|
56
|
+
## Answering questions
|
|
57
|
+
|
|
58
|
+
| Question | Tool |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| Who calls it? | `get_impact(id, direction: "upstream")` |
|
|
61
|
+
| What does it call? | `get_impact(id, direction: "downstream")` |
|
|
62
|
+
| How does A reach B? | `find_paths(from, to)` |
|
|
63
|
+
| Who owns it? | the Element's `owner` (from `search_elements` or `get_element`); a Team's Elements with `list_owned` |
|
|
64
|
+
| Where does it run? | `get_deployments(service, environment?)` |
|
|
65
|
+
| What changed? | `get_changes(scope)`, `list_history(scope)` |
|
|
66
|
+
| Why is it like this? | `list_adrs(element)`, then `get_adr(id)` |
|
|
67
|
+
|
|
68
|
+
Give `max_depth: 1` for only the Elements one hop away. Answer from the tool's result, and name the `project:id`s.
|
|
69
|
+
|
|
70
|
+
## Without MCP
|
|
71
|
+
|
|
72
|
+
With no Archidocs MCP server, read the Workspace YAML directly. Each Project folder holds `project.yaml` and the files that declare its Elements, Relationships and Deployments; ADRs are in `<project>/adr/`.
|
|
73
|
+
|
|
74
|
+
- **The Element**: search the Project's YAML for its id or name, or its URL among the `deployments`.
|
|
75
|
+
- **Consumers**: Relationships sit under the consumer and point `to` the provider. For an Element `cart` in Project `shop`, search the Workspace for:
|
|
76
|
+
- `to: cart` in files under `shop/` (a bare id within the Project);
|
|
77
|
+
- `to: shop:cart` anywhere (another Project's reference);
|
|
78
|
+
- `via: cart` under `shop/` and `via: shop:cart` anywhere, when it is a broker: each such Relationship's consumer and its `to` both depend on it.
|
|
79
|
+
|
|
80
|
+
For example: `grep -rnE "(to|via): (shop:)?cart\b" archidocs/` and then drop bare-id matches outside `shop/`. The consumer is the Element the matching Relationship sits under; its Owner is its `owner`, else the Project's.
|
|
81
|
+
- **Deployments**: the `deployments` entries with `service: cart`.
|
|
82
|
+
- **ADRs**: the files in `<project>/adr/` whose `elements` list names the Element; `status` is in the frontmatter.
|
|
83
|
+
|
|
84
|
+
Count only direct consumers this way; write "indirect not counted" in the report.
|
|
@@ -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`.
|