Archidocs consult
Skill archidocs-consult: archidocs guide --skill consult or get_guide("consult").
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.
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.
Before the change
Section titled “Before the change”Run these read tools, in order:
- Resolve the Service:
search_elementswith its name, repo name, or a URL or host from its config. Take theproject:idof the Element the code implements. If nothing matches, see Not in the Model. - 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. Callget_impact(id, direction: "upstream")once more withoutmax_depthand subtract, for the count of indirect consumers. - Owners: the Element’s own
ownerfrom 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. - 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. - ADRs:
list_adrs(element: id), thenget_adrfor any whose title touches what you are changing. Note each one’s status; onlyacceptedones bind.
Report
Section titled “Report”Before editing, tell the user what you found in four lines:
Consumers: web (storefront), checkout (payments) +4 indirectTeams to tell: storefront, paymentsDeployments: prod on eks-main (https://cart.example.com), staging on eks-stagingADRs: shop:0003 Cart is the only writer of cart state (accepted)Write “none” on a line with nothing to report. Then carry on with the change.
When to stop and ask
Section titled “When to stop and ask”Stop and ask the user before editing in only two cases:
- 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-adrtopic). - 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.
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.
After the change
Section titled “After the change”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.
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.
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.
Not in the Model
Section titled “Not in the Model”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.
Answering questions
Section titled “Answering questions”| Question | Tool |
|---|---|
| Who calls it? | get_impact(id, direction: "upstream") |
| What does it call? | get_impact(id, direction: "downstream") |
| How does A reach B? | find_paths(from, to) |
| Who owns it? | the Element’s owner (from search_elements or get_element); a Team’s Elements with list_owned |
| Where does it run? | get_deployments(service, environment?) |
| What changed? | get_changes(scope), list_history(scope) |
| Why is it like this? | list_adrs(element), then get_adr(id) |
Give max_depth: 1 for only the Elements one hop away. Answer from the tool’s result, and name the project:ids.
Without MCP
Section titled “Without MCP”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/.
-
The Element: search the Project’s YAML for its id or name, or its URL among the
deployments. -
Consumers: Relationships sit under the consumer and point
tothe provider. For an Elementcartin Projectshop, search the Workspace for:to: cartin files undershop/(a bare id within the Project);to: shop:cartanywhere (another Project’s reference);via: cartundershop/andvia: shop:cartanywhere, when it is a broker: each such Relationship’s consumer and itstoboth depend on it.
For example:
grep -rnE "(to|via): (shop:)?cart\b" archidocs/and then drop bare-id matches outsideshop/. The consumer is the Element the matching Relationship sits under; its Owner is itsowner, else the Project’s. -
Deployments: the
deploymentsentries withservice: cart. -
ADRs: the files in
<project>/adr/whoseelementslist names the Element;statusis in the frontmatter.
Count only direct consumers this way; write “indirect not counted” in the report.
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.