Copilot: Build a Complete, End‑to‑End Understanding of webgrip/infrastructure #5
Labels
No labels
pull-request
released
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
webgrip/infrastructure#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ryangr0 on GitHub.
Originally assigned to: @Copilot on GitHub.
Title
Copilot: Build a Complete, End‑to‑End Understanding of This Repository — TechDocs (MkDocs) Structure
Summary
We want to use GitHub Copilot to construct a complete, accurate, and navigable mental model of this project. The goal is to give every contributor—new or seasoned—a single place to learn how the repo is structured, how data flows, what standards we follow, how we deploy, where the dangerous edges are, and how to extend the system safely.
This issue outlines a repeatable, prompt‑driven workflow that asks Copilot to crawl the repository, synthesize what it finds, and generate a curated set of docs and assets. It includes prompts, acceptance criteria, file outputs, success metrics, and guardrails (e.g., no secrets).
Why (Background & Motivation)
Copilot can already read code and produce summaries, but we want to turn that capability into a repeatable process that results in a cohesive, browsable repository knowledge base we can maintain over time.
User Story
Goals
Non‑Goals
TechDocs Setup (Backstage/MkDocs)
We use Backstage TechDocs (MkDocs). Place TechDocs under
docs/techdocs/withmkdocs.ymlatdocs/techdocs/mkdocs.yml. Ensure our Catalog entity points here (e.g. incatalog-info.yaml):metadata.annotations.backstage.io/techdocs-ref: dir:./docs/techdocsnav:based on what it discovers in the repo.ADRs: Keep Architectural Decision Records under
docs/adrs/(e.g., MADR format). TechDocs should surface an ADRs entry that links to this directory in‑repo, unless Copilot proposes rendering ADRs inside the site as part of the IA.Deliverables
Copilot should produce the following outcomes without us prescribing exact filenames or folders. It must infer structure from the repository and propose a sensible, seam‑based IA:
mkdocs.ymlnavigation — After IA approval, generate anav:that mirrors the IA. Copilot decides names and paths. Keep depth ≤ 3 levels unless strongly justified.> Assumption:and suggests a validation.docs/adrs/or renders ADRs inside the site, per the selected IA.Guardrails (Important)
.env, vaults, or CI secrets. Document names/locations, not contents.> Assumption:and propose validation steps.Phase 0 — Kickoff & Indexing
Goal: Prime Copilot with expectations, constraints, and an initial file inventory.
Prompt A — Kickoff
Prompt B — Inventory
Acceptance Check
Phase 1 — Propose the Information Architecture (IA)
Goal: Let Copilot propose how TechDocs should be organized for this repo.
Prompt — IA options
Acceptance Check
Phase 2 — Approve IA & Generate Navigation
Goal: Turn the approved IA into
mkdocs.ymlnavigation (without prescribing file names upfront in this issue).Prompt — Generate nav
Acceptance Check
nav:is readable, consistent, and aligns with seams; page names reflect domain/layer/runtime/ops semantics.Phase 3 — Create Content Seam by Seam
Goal: Populate the IA iteratively, focusing on one seam at a time (e.g., Architecture → Runtime → Interfaces → Data → Operations → Onboarding), but allowing Copilot to pick the best order for this repo.
Prompt — Generate content for a chosen seam
Acceptance Check
Repeat this phase across seams until the IA is fully populated.
Phase 4 — Integrate ADRs
Goal: Surface architectural decisions in the site without prescribing their storage beyond
docs/adrs/.Prompt — ADR integration
Acceptance Check
Phase 5 — Quality & Consistency Passes
Goal: Ensure navigability, correctness, and consistency across the site.
Prompts
Acceptance Check
Phase 6 — Publish & Hand‑Off
Goal: Ensure TechDocs publishes cleanly in Backstage and that contributors know how to keep it fresh.
Prompt
Acceptance Check
Cross‑Phase Refinement Prompts
Use these prompts between phases to raise quality:
Refine Links & Citations
Mark Assumptions
Tighten Summaries
Consistency Pass
Acceptance Criteria (Definition of Done)
docs/techdocs/mkdocs.ymlexists withplugins: [techdocs-core]and a Copilot‑generatednav:that reflects the approved IA.Success Metrics
Risks & Mitigations
Context window limits: Copilot may miss distant files.
Staleness: Docs can drift after changes.
Overconfidence: AI may state guesses as facts.
> Assumption:tags; reviewers validate claims alongside code.Secrets exposure: Accidentally echoing env values.
Illustrative IA Patterns (Non‑Binding Examples)
These are examples to inspire Copilot’s IA proposals; they are not directives.
Domain‑first (typical business app)
Layer‑first (hex/clean architecture)
Service‑first (polyrepo or microservices)
Concrete Prompt Library (Copy/Paste)
00. Role & Safety
01. Inventory
02. IA Alternatives
03. Generate nav
04. Populate a seam
05. Link & terminology audit
06. ADR integration
07. Maintenance page
Review Checklist (for Humans)
Maintenance Plan
docs/techdocs/docs/as first‑class code: review, test links, and keep diagrams text‑based.Frequently Asked Questions (FAQ)
Q: How does Copilot know where to start?
A: We prime it with the repo inventory and clear goals. We also point it to entry points (main files, app modules, service folders) and CI configs.
Q: What if parts of the system live in other repos?
A: Document cross‑repo boundaries and link to those repos by name and purpose. Do not pull their content; note integrations and contracts.
Q: Can we trust the diagrams?
A: Treat them as drafts. Require links and code citations; reviewers confirm. Keep diagrams in Mermaid/ASCII for easy fixes.
Q: Will this slow us down?
A: The intent is speed: faster onboarding, clearer change impact, and fewer regressions. We’ll measure time‑to‑first‑PR and defect rate.
Q: What about monorepos or polyglot stacks?
A: Run the phases per package/workspace. Produce per‑package docs plus a monorepo‑level overview that stitches them together.
Q: Can Copilot run tests or commands?
A: It can suggest them; we execute locally and feed results back as context (e.g., paste coverage summaries).
Example Snippets (to Seed the Output)
TechDocs landing page (
docs/techdocs/docs/index.md) skeleton:Mermaid component diagram skeleton:
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
@webgrip-ci[bot] commented on GitHub:
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀