Zeus Discover - Brownfield Codebase Mapper
Use this skill to analyze an existing project and generate reusable codebase context before planning and execution.
Preconditions
.zeus/{version}/ exists (default main).
- You can write to
.zeus/{version}/.
- The target project root is readable.
Inputs
--project-root <path> (optional, default current workspace root)
--depth quick|auto|full (optional, default auto)
--version vN (optional, default main)
Security rules
- Never read or print secret values from
.env*, *secret*, *credential*, key/cert files.
- For sensitive files, only record existence and path.
- Output must contain no credentials or token-like strings.
Deterministic workflow
1) Resolve scope
Resolve version folder and project root:
- output base:
.zeus/{version}/
- map target:
{project-root}
2) Collect structural inventory
Collect and summarize:
- top-level directories and key entry points,
- package/runtime manifests,
- test config and test file patterns,
- major module directories and size hotspots,
- TODO/FIXME/HACK markers.
3) Collect dependency and integration signals
Extract from manifests and imports:
- language/runtime/framework set,
- critical dependencies and tooling,
- external integration candidates (SDK/API clients),
- datastore/auth/observability hints when present.
4) Build module map
Generate module-level records with:
- path,
- role classification (
api, frontend, infra, data, shared, test, unknown),
- approximate LOC,
- key dependency links,
- risk markers (
large-file, todo-density, high-fan-in).
5) Write brownfield artifacts
Write these files to .zeus/{version}/:
codebase-map.json
existing-modules.json
tech-inventory.md
architecture.md
6) Validate and summarize
- Validate JSON structure against schemas when available.
- If schema file is missing, continue and note validation skipped.
- Return concise summary with artifact paths and record counts.
Artifact contracts
codebase-map.json
Must include:
schema_version
generated_at
project_root
scan_depth
summary
languages
runtimes
frameworks
dependencies
entry_points
module_hotspots
concerns
existing-modules.json
Must include:
schema_version
generated_at
version
modules (array of module descriptors used by brainstorm/plan)
Output contract
- four artifacts written to
.zeus/{version}/,
- no secret leakage,
- clear recommendation for next step:
/zeus:init --import-existing --version {version} if config is not aligned,
- otherwise
/zeus:brainstorm --feature <name> --version {version}.
Agent collaboration
Use zeus-researcher for large repositories where deeper read-only exploration is required before writing final artifacts.
1---2name: zeus-discover3description: Zeus Discover - Brownfield Codebase Mapper4---56# Zeus Discover - Brownfield Codebase Mapper78Use this skill to analyze an existing project and generate reusable codebase context before planning and execution.910## Preconditions1112- `.zeus/{version}/` exists (default `main`).13- You can write to `.zeus/{version}/`.14- The target project root is readable.1516## Inputs1718- `--project-root <path>` (optional, default current workspace root)19- `--depth quick|auto|full` (optional, default `auto`)20- `--version vN` (optional, default `main`)2122## Security rules2324- Never read or print secret values from `.env*`, `*secret*`, `*credential*`, key/cert files.25- For sensitive files, only record existence and path.26- Output must contain no credentials or token-like strings.2728## Deterministic workflow2930### 1) Resolve scope3132Resolve version folder and project root:3334- output base: `.zeus/{version}/`35- map target: `{project-root}`3637### 2) Collect structural inventory3839Collect and summarize:4041- top-level directories and key entry points,42- package/runtime manifests,43- test config and test file patterns,44- major module directories and size hotspots,45- TODO/FIXME/HACK markers.4647### 3) Collect dependency and integration signals4849Extract from manifests and imports:5051- language/runtime/framework set,52- critical dependencies and tooling,53- external integration candidates (SDK/API clients),54- datastore/auth/observability hints when present.5556### 4) Build module map5758Generate module-level records with:5960- path,61- role classification (`api`, `frontend`, `infra`, `data`, `shared`, `test`, `unknown`),62- approximate LOC,63- key dependency links,64- risk markers (`large-file`, `todo-density`, `high-fan-in`).6566### 5) Write brownfield artifacts6768Write these files to `.zeus/{version}/`:69701. `codebase-map.json`712. `existing-modules.json`723. `tech-inventory.md`734. `architecture.md`7475### 6) Validate and summarize7677- Validate JSON structure against schemas when available.78- If schema file is missing, continue and note validation skipped.79- Return concise summary with artifact paths and record counts.8081## Artifact contracts8283### codebase-map.json8485Must include:8687- `schema_version`88- `generated_at`89- `project_root`90- `scan_depth`91- `summary`92- `languages`93- `runtimes`94- `frameworks`95- `dependencies`96- `entry_points`97- `module_hotspots`98- `concerns`99100### existing-modules.json101102Must include:103104- `schema_version`105- `generated_at`106- `version`107- `modules` (array of module descriptors used by brainstorm/plan)108109## Output contract110111- four artifacts written to `.zeus/{version}/`,112- no secret leakage,113- clear recommendation for next step:114 - `/zeus:init --import-existing --version {version}` if config is not aligned,115 - otherwise `/zeus:brainstorm --feature <name> --version {version}`.116117## Agent collaboration118119Use `zeus-researcher` for large repositories where deeper read-only exploration is required before writing final artifacts.