Skip to content

ci: add deep reverse-engineering documentation workflow with Stage 8 agent-native context#1

Merged
nayyarsan merged 3 commits into
mainfrom
copilot/create-deep-reverse-engineering-workflow
Mar 20, 2026
Merged

ci: add deep reverse-engineering documentation workflow with Stage 8 agent-native context#1
nayyarsan merged 3 commits into
mainfrom
copilot/create-deep-reverse-engineering-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Adds an automated workflow that performs structural reverse engineering of the Flutter/Dart codebase on every functional lib/ change, generates comprehensive documentation through 8 stages, and opens a PR with the results.

Workflow (.github/workflows/reverse_engineering_docs.yml)

  • Triggers on push to main for non-generated lib/**/*.dart changes; short-circuits if no functional Dart file actually changed
  • Supports workflow_dispatch for manual runs
  • Opens/updates a docs/reverse-engineering-auto branch PR via peter-evans/create-pull-request@v7

Generator script (.github/scripts/generate_docs.py)

Single self-contained Python script (stdlib only). Stages write output incrementally:

Stage Output
0 — Discovery _manifest.json
1 — Inventory _inventory.json — 52 files, role-tagged (screen, provider, dao, etc.)
2 — Signatures intermediate/signatures/{cluster}.json — classes, methods, providers, imports
3 — Dependencies intermediate/dependency_graph.json — provider chains, cross-feature imports, sync boundary
4 — Data model intermediate/data_model.json — Drift schemas, DAO queries, Firestore collection map
5 — Logic summaries intermediate/logic_summaries/{cluster}.json
6 — Business intent intermediate/business_intent.json
7 — Human docs files.md, features/*.md (×10), data_model.md, flows/*.md (×6), README.md
8 — Agent-native context See below

Stage 8 — Agent-native context files

Produces files consumed directly by coding agents rather than humans:

  • AGENTS.md (repo root) — auto-read by Copilot coding agent and Claude Code before every task; includes feature map, data model quick-ref, naming conventions, and codebase rules
  • .github/copilot-instructions.md — injected into every Copilot Chat session; kept ≤500 tokens (data flow, key files, critical rules)
  • .github/docs/symbol_index.md — grep-friendly flat tables: 26 providers, 41 DAO methods, 8 tables, 15 screens, 6 calculators/services — each with file location and key metadata
  • .github/docs/brownfield_context.md — copy-into-context pack for new feature work: existing features, step-by-step add-feature pattern, all table/provider names in use, extension gaps, test coverage gaps

Initial baseline

All generated outputs for the current 52-file codebase are committed alongside the workflow and script.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…r script and initial docs

Co-authored-by: nayyarsan <29976473+nayyarsan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nayyarsan/MyBudgetApp/sessions/404ce691-d4c5-46c1-97f1-ce43baafb1ca
Copilot AI changed the title [WIP] Create new workflow for deep reverse engineering ci: add deep reverse-engineering documentation workflow Mar 20, 2026
Copilot AI requested a review from nayyarsan March 20, 2026 17:48
…ctions.md, symbol_index.md, brownfield_context.md)

Co-authored-by: nayyarsan <29976473+nayyarsan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nayyarsan/MyBudgetApp/sessions/8b8b67ac-4c1d-42e0-983a-6b32059ed19f
Copilot AI changed the title ci: add deep reverse-engineering documentation workflow ci: add deep reverse-engineering documentation workflow with Stage 8 agent-native context Mar 20, 2026
@nayyarsan nayyarsan marked this pull request as ready for review March 20, 2026 18:23
@nayyarsan nayyarsan merged commit dbebd3f into main Mar 20, 2026
2 checks passed
@nayyarsan nayyarsan deleted the copilot/create-deep-reverse-engineering-workflow branch March 20, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants