Repository navigation
Description
Priority / sequencing
P0 / priority: high
Suggested labels
- ux
Roadmap fields
Status: Backlog; Priority: P0; Size: L; Order: first implementation slice under #154; Depends on: #154
Problem
sumo-qa currently relies on each workflow to inspect the repo ad hoc. That works for one conversation, but it prevents product-grade repo understanding, incremental updates, diff impact analysis, report output, and reusable QA evidence.
Generic code graphs are not enough. sumo-qa needs a QA-native map that captures code structure plus tests, CI evidence, risk surfaces, fixtures, migrations, routes, commands, and known coverage links.
Expected outcome
Add a deterministic, validated .sumo-qa/repo-map.json artifact and first-slice generator that maps a repository well enough for QA workflows to answer:
- what exists;
- what can break;
- what tests or checks appear to exercise it;
- what evidence is stale, missing, or unmapped.
Scope
- Add a versioned schema and Pydantic or dataclass models for repo-map data.
- Add a deterministic local generator, exposed by MCP and reusable by CLI work in [Task]: Add product-grade CLI commands for analyze, review, report, and status #160.
- Write
.sumo-qa/repo-map.jsononly when explicitly requested by the tool/command. - Capture first-slice entities:
- project metadata: root, git hash when available, generated timestamp, generator version;
- files: path, category, language, size, hash/fingerprint;
- test files and likely test target links by path/name conventions;
- package manifests and likely test commands;
- CI/workflow configs and jobs;
- app/config/infrastructure/schema/migration/fixture files;
- route/endpoint hints where cheaply detectable;
- coarse dependency edges from imports or manifest relationships where available.
- Include skipped-file and unsupported-language summaries.
- Add validation and actionable error envelopes for malformed or stale artifacts.
- Preserve all current workflows when the artifact is absent.
Proposed artifact shape
Minimum useful shape:
{
"schema_version": "1.0",
"project": {
"root": "/repo",
"name": "repo-name",
"git_commit": "abc123",
"generated_at": "2026-05-25T00:00:00Z",
"generator_version": "sumo-qa x.y.z"
},
"nodes": [
{
"id": "file:src/app.py",
"type": "source_file",
"path": "src/app.py",
"language": "python",
"category": "app",
"tags": ["api"],
"fingerprint": "sha256:..."
}
],
"edges": [
{
"source": "file:tests/test_app.py",
"target": "file:src/app.py",
"type": "likely_tests",
"confidence": "medium",
"reason": "path/name convention"
}
],
"commands": [],
"warnings": []
}Node and edge vocabulary should stay small in the first slice. Expand only when downstream workflows need it.
Acceptance criteria
-
.sumo-qa/repo-map.jsonis versioned and schema-validated. - Generator is deterministic on the same repo state.
- Artifact includes source/freshness metadata: generated timestamp, git commit/hash when available, root path, generator version, and skipped-file summary.
- First-slice node types cover source files, test files, docs, config, CI, manifests, fixtures, migrations/schema, and infrastructure.
- First-slice edge types cover likely test links, imports/dependencies where available, configured-by, and command/CI relationships.
- Tool output is compact and does not dump the full artifact by default.
- Existing token-budget tests are not materially worsened.
- Docs explain whether the artifact should be committed, ignored, or treated as local cache.
- No mandatory graph DB, vector DB, embedding, external LLM, or network dependency is introduced.
Test plan
- Unit tests for schema validation, malformed artifact handling, and stale artifact detection.
- Fixture repo tests for deterministic generation across at least Python and Node-style layouts.
- Snapshot or golden-file test for a small generated repo map.
pytest tests/test_tools_list_contract.py tests/test_token_weight_regression.py tests/test_skill_conformance.py- Add a small worked example once [Task]: Add repo-map query and diff-impact analysis tools #156 connects review/planning flows to the artifact.
Context
- Parent epic: [Epic]: Product-grade QA-native repo understanding and packaging polish #154.
- Enables [Task]: Add repo-map query and diff-impact analysis tools #156, [Task]: Add a polished local QA report or dashboard #157, and [Task]: Add product-grade CLI commands for analyze, review, report, and status #160.
- Related issues: Reduce session-cumulative token cost with progressive skill/context loading #137 for progressive context loading, [Task]: Add a host-neutral issue and PR context bundle for QA workflows #149 for context bundle shape, [Task]: Add a risk-to-test traceability ledger for QA workflows #144 for risk-to-test traceability.
- Inspiration: Understand-Anything's persisted graph pattern, adapted to QA evidence rather than generic code navigation.
Activity
sumithr commentedon May 25, 2026
Iteration notes:
Suggested PR slices:
.sumo-qa/repo-map.json, freshness, and commit/cache guidance.Keep the first schema intentionally conservative. It is easier to add node/edge types after #156 consumes them than to support an over-broad graph forever.
feat: add repo-map schema models + validation envelope (#222)
feat: add deterministic repo-map scanner (#155 slice 2)
fix: don't leak outer git repo's tracked files into nested scans (#155)
test: harden tmp_path git helpers against parent-env leakage (#155)
fix: make repo-map scanner CI-portable on py3.10 + Windows (#155 slic…
feat: add deterministic repo-map scanner (#155 slice 2) (#229)
feat: add sumo_qa_scan_repo MCP tool (#155 slice 3)
feat: add sumo_qa_scan_repo MCP tool (#155 slice 3) (#230)
chore(main): release 0.18.0 (#235)
feat(cli): add sumo-qa analyze and status product commands (#160)
feat: add product-grade CLI analyze and status commands (#311)
feat(report): add local QA report (CLI report command + MCP generate …
feat(report): add polished local QA report (CLI + MCP) (#381)
docs: rework README and demo around outcome-led QA workflows (#417)
feat(analysis): add semantic code analysis adapters for QA recommenda…