feat: repo-agnostic refactor (BMad spec-test-build loop)
- NEW: repo-profiler.js — deterministic archetype detection (Infra, Frontend, Backend, etc.) - NEW: extract-dynamic.js — generic extractor replacing hardcoded Foxtrot patterns - NEW: eval-generator.js — dynamic ground-truth question generation from any repo graph - NEW: specs/bmad-agnostic-refactor-spec.md — full BMad spec with acceptance criteria - REFACTORED: prose.js — two-pass LLM synthesis with rich context (shared secrets, ports, service refs) - REFACTORED: sysdoc.js — wired repo-profiler + extract-dynamic, --legacy escape hatch - REFACTORED: wiggum-v2.sh — uses eval-generator before benchmarks - FIXED: graph.js — _edgeSet rebuilt on loadSnapshot() (edge dedup was broken) - FIXED: graph.js — recursive sortKeys() for deep equality in diffing - FIXED: prose.js — robust JSON array extraction from LLM output - FIXED: ratchet.js — syntax validation (node --check) before saving LLM mutations - FIXED: extract-dynamic.js — centralized state services regex, added console.warn for silent failures - TESTS: test-eval-generator, test-repo-profiler, test-synthesis-quality + mock fixtures Eval: 81.5% on Foxtrot (fully repo-agnostic, no hardcoded reference pages) BMad reviews: Architect B+, Dev Lead B-, TEA B-
This commit is contained in:
85
test/fixtures/mock-express-graph.json
vendored
Normal file
85
test/fixtures/mock-express-graph.json
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"nodes": {
|
||||
"src/index.js": {
|
||||
"id": "src/index.js",
|
||||
"type": "file",
|
||||
"name": "src/index.js",
|
||||
"path": "src/index.js",
|
||||
"metadata": {
|
||||
"exports": []
|
||||
}
|
||||
},
|
||||
"src/routes/users.js": {
|
||||
"id": "src/routes/users.js",
|
||||
"type": "file",
|
||||
"name": "src/routes/users.js",
|
||||
"path": "src/routes/users.js",
|
||||
"metadata": {
|
||||
"exports": ["userRouter"]
|
||||
}
|
||||
},
|
||||
"src/controllers/userController.js": {
|
||||
"id": "src/controllers/userController.js",
|
||||
"type": "file",
|
||||
"name": "src/controllers/userController.js",
|
||||
"path": "src/controllers/userController.js",
|
||||
"metadata": {
|
||||
"exports": ["getUser", "createUser"]
|
||||
}
|
||||
},
|
||||
"src/models/userModel.js": {
|
||||
"id": "src/models/userModel.js",
|
||||
"type": "file",
|
||||
"name": "src/models/userModel.js",
|
||||
"path": "src/models/userModel.js",
|
||||
"metadata": {
|
||||
"exports": ["User"]
|
||||
}
|
||||
},
|
||||
"GET /users/:id": {
|
||||
"id": "GET /users/:id",
|
||||
"type": "route",
|
||||
"name": "GET /users/:id",
|
||||
"metadata": {
|
||||
"method": "GET",
|
||||
"path": "/users/:id"
|
||||
}
|
||||
},
|
||||
"POST /users": {
|
||||
"id": "POST /users",
|
||||
"type": "route",
|
||||
"name": "POST /users",
|
||||
"metadata": {
|
||||
"method": "POST",
|
||||
"path": "/users"
|
||||
}
|
||||
}
|
||||
},
|
||||
"edges": [
|
||||
{
|
||||
"source": "src/index.js",
|
||||
"target": "src/routes/users.js",
|
||||
"type": "imports"
|
||||
},
|
||||
{
|
||||
"source": "src/routes/users.js",
|
||||
"target": "src/controllers/userController.js",
|
||||
"type": "imports"
|
||||
},
|
||||
{
|
||||
"source": "src/controllers/userController.js",
|
||||
"target": "src/models/userModel.js",
|
||||
"type": "imports"
|
||||
},
|
||||
{
|
||||
"source": "src/routes/users.js",
|
||||
"target": "GET /users/:id",
|
||||
"type": "defines"
|
||||
},
|
||||
{
|
||||
"source": "src/routes/users.js",
|
||||
"target": "POST /users",
|
||||
"type": "defines"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user