Bootstrap a Project from code
Topic bootstrap: archidocs guide bootstrap or get_authoring_guide("bootstrap").
Declare an existing codebase’s Services, Components, Relationships, Deployment Targets and Deployments in one pass. Bootstrap runs once; later changes go through the other topics.
- Project. Confirm the Project id, name and Owner Team with the user. If the Project is new, call
create_project(id, name, owner, folder?)(folder defaults to<id>/under the Workspace root). Add a missing Team withupsert_teamfirst. - Inventory. Read the code and build a table of candidates, each with its evidence (file:line) and a confidence (high, medium, low):
- Services and datastores: Dockerfiles, compose files, Kubernetes manifests and Helm charts, Terraform, CI deploy steps.
- Components: the modules inside one Service that the team talks about by name.
- Outbound Relationships: HTTP clients and base URLs, gRPC stubs, OpenAPI clients, database connection strings, broker topics and queues (published and subscribed).
- Deployment Targets (regions, clusters, namespaces, platforms) and Deployments with their URLs: env and config files per Environment, ingress hosts, CI deploy jobs. The inventory is complete when every deployable unit you found is a row or is listed as skipped with a reason.
- Questions. Ask only what code can’t tell: the System grouping, External flags, business descriptions, Owners other than the Project’s.
- Approval. Show the inventory; the user confirms or edits it. This one approval covers the writes, so write without
dry_runfrom here. - Write, in dependency order: Systems, Services, Components (
upsert_elementwithparent), Deployment Targets (upsert_target), Deployments (upsert_deployment), then Relationships (upsert_relationship). Environments must already exist inworkspace.yaml; add one withupsert_environmentafter asking. - Report. Run
check. Report what was written and what was skipped, each with its evidence, ready for the PR description.
Cross-Project Relationships
Section titled “Cross-Project Relationships”- Declare only this Project’s outbound Relationships; each provider declares its own.
- Resolve each provider with
search_elementsby name, URL or host to itsproject:id. - No match: leave the Relationship out and list it in the report as a gap. Create Elements only in this Project.
- A provider clearly outside the organisation (a payment provider, an email API) may be declared in this Project as an External Service owned by this Project’s Team.
Evidence
Section titled “Evidence”Evidence belongs in the report and the PR description. The Model holds only the architecture: no evidence fields, no inferred tags.