Reverse-engineer a legacy codebase into ATDD-ready, traceable specifications
69
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
.doc-this/context/surface.jsonGenerated by Scout. Consumed by every downstream agent (Code Analyst, Detective, Architect, Writer, Reviewer, Data Master, Visor, Design System) for structured project context.
{
"generated_at": "2026-05-04T14:00:00Z",
"project_root": "/path/to/legacy-app",
"languages": [
{ "name": "TypeScript", "extensions": [".ts", ".tsx"], "file_count": 142 },
{ "name": "JavaScript", "extensions": [".js", ".mjs"], "file_count": 23 }
],
"primary_language": "TypeScript",
"frameworks": [
{ "name": "Next.js", "version": "14.2.0", "source": "package.json" },
{ "name": "Prisma", "version": "5.10.0", "source": "package.json" }
],
"package_manager": "pnpm",
"entry_points": [
{ "path": "src/app/layout.tsx", "type": "app_entry" },
{ "path": "src/server.ts", "type": "server_entry" }
],
"config_files": [
"next.config.js", ".env.example", "tsconfig.json"
],
"ci_cd": [
".github/workflows/deploy.yml",
".github/workflows/ci.yml"
],
"containers": {
"dockerfile": "Dockerfile",
"compose": "docker-compose.yml",
"kubernetes": null
},
"database_hints": [
{ "path": "prisma/schema.prisma", "type": "prisma_schema" },
{ "path": "prisma/migrations/", "type": "migrations_dir" }
],
"test_framework": "Vitest",
"test_file_count": 47,
"e2e_framework": "Playwright",
"modules": [
"auth", "orders", "payments", "users", "notifications"
],
"total_files": 312,
"organization_suggestion": {
"granularity": "module",
"rationale": "Top-level folders are organized by domain: auth/, orders/, payments/, users/, notifications/.",
"signals": [
{ "type": "top_level_domain_folders", "evidence": ["src/auth/", "src/orders/", "src/payments/"] }
],
"features": []
}
}generated_at, languages, primary_language, frameworks, entry_points, modules, organization_suggestion
Everything else — include only what's actually found.
organization_suggestionSuggestion for how to organize generated specs. Read by Doc-This to pre-mark the default option in the specs-organization menu.
| Field | Type | Required | Description |
|---|---|---|---|
granularity | string | yes | One of: module, use-case, endpoint, hybrid, feature, custom. Scout never suggests custom — that comes only from user choice. |
rationale | string | yes | Short sentence explaining the suggestion. Shown in the menu as "Reason:". |
signals | array | yes | Detected signals leading to the suggestion. Each item has type and evidence (list of relative paths). May be empty when fallback feature is used. |
features | array | yes when granularity = "feature" | Discovered feature names. Each becomes a first-level folder. |
granularity| Detected signal | Suggested granularity |
|---|---|
Centralized routing (routes.*, urls.py, *Controller.cs, @RestController, OpenAPI) | endpoint |
Top-level domain folders (auth/, orders/, payments/) | module |
BDD/E2E specs (features/*.feature, BDD-style *.spec.*) | use-case |
| Multiple signals coexisting with similar weight | hybrid |
| No clear signal | feature (fallback; populate features with what you can extract) |
After the first run, Doc-This persists the suggested granularity to .doc-this/config.toml as scout_suggestion. On re-runs, Scout may regenerate surface.json (the legacy may have changed), but Doc-This does NOT update scout_suggestion in config.toml.
structural_extraction (optional)Added by Scout when LSP or UA was used during surface scanning. Consumed by downstream agents to know which structural extraction source is active.
{
"structural_extraction": {
"source": "lsp",
"lsp_cache_path": ".doc-this/context/lsp-cache/workspace-symbols.json"
}
}| Field | Type | Description |
|---|---|---|
source | string | "lsp", "ua", or "llm" — which extraction source Scout used |
lsp_cache_path | string | null | Path to cached workspace symbols (present only when source = "lsp") |
Use this schema as a guide. If a field doesn't apply to the project, omit it — except for the required fields listed above.
.tessl-plugin
hooks
skills
doc-this
references
scripts
doc-this-architect
references
doc-this-code-analyst
references
doc-this-data-master
doc-this-design-system
doc-this-detective
references
doc-this-help
doc-this-promote
doc-this-reviewer
doc-this-scout
doc-this-tracer
doc-this-viewer
doc-this-visor
doc-this-writer