{"slug":"characterize-brownfield","title":"characterize-brownfield","summary":"Use to reverse-engineer an existing/brownfield codebase into structured, confidence-scored characterization artifacts (tech stack, feature inventory, dependency & integration map, existing API contracts, test-coverage traceability, tech debt & risks). Use before composing a PRD, ","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-29T00:42:28.591668Z","repo":{"url":"https://github.com/SebastienDegodez/skraft-plugin","stars":17,"forks":3,"license":"GPL-3.0","updatedAt":"2026-11-29T00:18:21Z"},"bodyHtml":"<hr>\n<h2>name: characterize-brownfield\ndescription: \"Use to reverse-engineer an existing/brownfield codebase into structured, confidence-scored characterization artifacts (tech stack, feature inventory, dependency &amp; integration map, existing API contracts, test-coverage traceability, tech debt &amp; risks). Use before composing a PRD, or standalone to understand a legacy system with no docs. Activate on 'characterize this codebase', 'what does this system do', 'map the architecture', 'find existing contracts', 'assess tech debt', 'reverse-engineer this legacy system'.\"</h2>\n<h1>Characterize Brownfield</h1>\n<p>Reverse-engineers an existing codebase into structured, confidence-scored artifacts. Every\nclaim is either a FACT (from a tool call — S7) or an INFERENCE (LLM interpretation), and every\ninference carries a confidence: <strong>High</strong> (directly observed, e.g. a parsed OpenAPI file) /\n<strong>Medium</strong> (inferred from strong signals, e.g. route patterns + naming conventions) / <strong>Low</strong>\n(guessed from weak or absent evidence). Honesty about confidence is the point — a brownfield\nPRD built on fabricated certainty is worse than one that says \"unknown.\"</p>\n<p><strong>Boundary.</strong> Read-only. Never edits code. Does not write a PRD (see <code>compose-brownfield-prd</code>).\nDoes not create issues or stories.</p>\n<h2>Inputs</h2>\n<ul>\n<li>Repository path (required).</li>\n<li>Depth: <code>quick</code> (2-5 min, pattern-based, no source reads) / <code>deep</code> (10-30 min, critical dirs —\n<strong>default</strong>) / <code>exhaustive</code> (30-120 min, all source, opt-in only — warn the user of cost first).</li>\n<li>Focus directories (optional) — narrows deep/exhaustive scans.</li>\n</ul>\n<h2>Procedure</h2>\n<h3>1. Structure &amp; stack (FACT, via tool calls — S7 only, never recall)</h3>\n<ul>\n<li><code>find . -maxdepth 3 -type d</code> (or workspace tools) for top-level layout.</li>\n<li>Read manifest files present: <code>package.json</code>, <code>*.csproj</code>/<code>*.sln</code>, <code>requirements.txt</code>/<code>pyproject.toml</code>,\n<code>pom.xml</code>/<code>build.gradle</code>, <code>go.mod</code>, <code>Cargo.toml</code>. Extract exact framework + versions — never guess.</li>\n<li>Read config files present: <code>tsconfig.json</code>, <code>.editorconfig</code>, lint configs, CI workflow files.</li>\n<li><code>git log --since=\"90 days ago\" --name-only --pretty=format:</code> to find active areas (recent\nchurn correlates with what still matters).</li>\n</ul>\n<h3>2. Feature inventory (INFERENCE, confidence-scored)</h3>\n<p>For deep/exhaustive: read entry points (controllers, route files, CLI commands, message\nhandlers). Group into a feature table:</p>\n<table name=\"\" pattern=\"\">\n<thead>\n<tr>\n<th>Feature</th>\n<th>Evidence</th>\n<th>Confidence</th>\n<th>Category</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td></td>\n<td></td>\n<td>High/Med/Low</td>\n<td>Core / Secondary / Legacy-unused</td>\n</tr>\n</tbody>\n</table>\n<p>\"Legacy-unused\" = present in code but no recent git activity and no inbound references found —\nflag, do not delete, do not assume dead.</p>\n<h3>3. Integration &amp; dependency map (FACT where possible)</h3>\n<p>List outbound calls (HTTP clients, DB connections, message queues, third-party SDKs) found via\ngrep for client instantiation patterns, connection strings, <code>appsettings*</code>/<code>.env*</code> keys (names\nonly — never read secret values). Each entry: target system, protocol, confidence.</p>\n<h3>4. Existing API contracts (opt-in facet, graceful degradation)</h3>\n<p>Search for OpenAPI/Swagger/AsyncAPI/Pact files (<code>*.yaml</code>/<code>*.json</code> matching <code>openapi:</code>/<code>swagger:</code>/\n<code>asyncapi:</code>, <code>pacts/*.json</code>) and framework-generated specs (Swashbuckle/NSwag output routes,\n<code>springdoc</code>, FastAPI <code>/openapi.json</code> route). Light-weight v1: <strong>discover + summarize</strong> (endpoint\nlist, methods, request/response schema names) — not full schema validation. If none found,\nrecord <code>contracts: none-found</code> and move on; this is optional, never a blocker.</p>\n<h3>5. Coverage traceability (opt-in facet)</h3>\n<p>For each feature in the inventory, check test coverage: search for test files referencing the\nfeature (by name, route, or class). Classify <strong>FULL</strong> (direct test asserting the behavior) /\n<strong>PARTIAL</strong> (indirect coverage, e.g. integration test exercises the path but doesn't assert the\nspecific behavior) / <strong>NONE</strong>. When zero tests exist for a feature, use a <strong>synthetic oracle</strong>:\ninfer expected behavior from the code itself (read the implementation, describe what it\ncurrently does) and mark confidence Low — this still gives downstream steps something concrete\ninstead of a blank. Never claim FULL coverage without reading an actual assertion.</p>\n<h3>6. Risk scoring (3x3 model)</h3>\n<p>For each tech-debt item or gap found (missing tests, undocumented integration, outdated\ndependency, <code>NONE</code> coverage on a Core feature): score <strong>probability x impact = 1-9</strong>\n(1-3 each axis). Map: <strong>9 -&gt; P0</strong> (auto-flag BLOCK), <strong>6-8 -&gt; P1</strong>, <strong>4-5 -&gt; P2</strong>, <strong>1-3 -&gt; P3</strong>.\nAction per band: P0 = BLOCK (escalate), P1 = MITIGATE, P2 = MONITOR, P3 = DOCUMENT.</p>\n<h3>7. Confidence gate (S4 — before writing artifacts)</h3>\n<p>Compute an overall confidence distribution (% High / Med / Low across all inferences) and a\ncoverage summary (% features with FULL/PARTIAL/NONE traceability). Verdict:</p>\n<ul>\n<li><strong>PASS</strong> — majority High confidence, no Core feature at NONE coverage with P0/P1 risk.</li>\n<li><strong>CONCERNS</strong> — meaningful Medium/Low share, or NONE coverage on a P1+ risk item.</li>\n<li><strong>FAIL</strong> — majority Low confidence or critical structure (stack/entry points) unresolved.</li>\n</ul>\n<p>CONCERNS or FAIL: surface an explicit validation checklist to the human (list every Low-confidence\nclaim and every NONE-coverage Core feature) before proceeding. This is a quality checkpoint, not a\nsecurity gate — the human confirms or corrects, then work continues.</p>\n<h2>Outputs</h2>\n<p>Written under <code>.copilot-tracking/skraft-plans/{projectSlug}/characterization/{YYYY-MM-DD}/</code>\n(use the exact output path declared by the calling agent; this workflow is\nstandalone and does not claim a pipeline phase row):</p>\n<ul>\n<li><code>index.md</code> — summary, confidence distribution, coverage summary, gate verdict.</li>\n<li><code>structure.md</code> — stack, versions, layout (FACT).</li>\n<li><code>features.md</code> — feature inventory table.</li>\n<li><code>integration.md</code> — dependency/integration map.</li>\n<li><code>contracts.md</code> — discovered API contracts (or <code>none-found</code>).</li>\n<li><code>coverage.md</code> — traceability table (FULL/PARTIAL/NONE per feature).</li>\n<li><code>tech-debt.md</code> — risk-scored gaps (3x3 table).</li>\n</ul>\n<p>Every file starts with <code>&lt;!-- markdownlint-disable-file --&gt;</code>. Every claim in every file carries\nits confidence tag inline, e.g. <code>(confidence: Medium — inferred from route naming)</code>.</p>\n","files":[{"path":"SKILL.md","sizeBytes":6211,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":2,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-29T00:43:38.414126Z","sha256":"3C8F6E0F174E0543C1454DE7DC70B1A78244559A60ECFF8A4D7BE3398CA8DA15","sizeBytes":3179},"review":null,"source":{"repositoryUrl":"https://github.com/SebastienDegodez/skraft-plugin","path":"plugins/skraft-framework/skills/characterize-brownfield","license":"GPL-3.0","commit":"c6117c6236a25490bf1916b131866069740c9b22","subtreeSha":"95F8FE2DFD882945FD2A6B1EE88390AA7E58C8BF7F73428619E6C17F8E27C555","lastSyncedAt":"2026-11-29T00:42:27.348488Z"},"reviewedAt":"2026-11-29T00:46:35.906616Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/SebastienDegodez/skraft-plugin/tree/main/plugins/skraft-framework/skills/characterize-brownfield"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install sebastiendegodez-skraft-plugin@llmmart"},{"target":"git","command":"git clone https://github.com/SebastienDegodez/skraft-plugin.git"}]}