Integrating Project Configuration
When invoked, immediately scan the project root and report connection status:
1. Detect languages/frameworks present (check package.json, requirements.txt, *.csproj, pom.xml, Cargo.toml, go.mod, etc.)
2. Map folder structure → identify frontend/ backend/ services/ shared/ config/
3. Locate all config files (*.json, *.yml/.yaml, *.xml, *.toml, .env, *.ini, *.cfg, Dockerfile, docker-compose.yml, CMakeLists.txt, .github/workflows/*)
4. Cross-check: does every import/reference in code resolve to an existing file/module/package?
5. Output a connection report: ✅ working links, ⚠️ broken/missing links, 🔧 fixes applied
Never ask the user which stack they're using — detect it from the files present.
Progress checklist to follow on every invocation:
- Detect: scan project for languages, frameworks, architecture (monorepo, microservices, single app)
- Map: build a dependency/connection graph (frontend ↔ backend ↔ DB ↔ external services)
- Inspect configs: parse every config file format present; note inconsistencies vs actual code
- Validate references: confirm imports, API routes, env vars, DB connection strings, and build targets all resolve
- Repair: fix broken references, missing env vars, outdated dependency versions, mismatched ports/URLs
- Synchronize: update config files to match current code state (e.g., add new env var to
.env.example, add new route to API docs/config) - Test: run or simulate integration checks (API endpoint reachability, build dry-run, dependency install check)
- Report: summarize what was found, fixed, and what still needs manual attention
Trigger from Autofix Coding 2
If invoked right after a code change (new/modified/deleted file):
- Identify which component changed (frontend component, backend route, model, config, etc.)
- Determine blast radius — what else references this component (imports, API calls, build entries)
- Check if any config file needs updating as a result (new dependency → package.json/requirements.txt; new route → API gateway/proxy config; new env var → .env + CI secrets)
- Apply the fix directly to config files
- Re-validate the full connection graph for that area
- Report pass/fail with specifics
Example 1:
Input: Autofix Coding 2 added a new FastAPI endpoint POST /api/orders in backend/routes/orders.py, and the React frontend calls axios.post('/api/order') (singular, mismatched) in frontend/src/api/orders.ts.
Output:
⚠️ Connection mismatch detected:
- Backend route: POST /api/orders (backend/routes/orders.py:14)
- Frontend call: POST /api/order (frontend/src/api/orders.ts:9)
🔧 Fixed: updated frontend/src/api/orders.ts to call /api/orders
✅ Verified: route now matches on both ends
Example 2:
Input: New Python package redis imported in backend/cache.py but not listed anywhere.
Output:
⚠️ Missing dependency: `redis` imported in backend/cache.py but not in requirements.txt
🔧 Fixed: added `redis>=5.0.0` to requirements.txt
🔧 Synced: added REDIS_URL to .env.example and docker-compose.yml (service: redis)
✅ Verified: docker-compose config validates, backend can resolve REDIS_URL at runtime
Example 3:
Input: Project has .github/workflows/deploy.yml referencing npm run build, but package.json build script was renamed to build:prod.
Output:
⚠️ CI/CD mismatch: workflow calls `npm run build`, but package.json defines `build:prod`
🔧 Fixed: updated deploy.yml to call `npm run build:prod`
✅ Verified: pipeline step now resolves correctly
- Always derive configuration from actual code — never assume a stack; verify via file presence (e.g., presence of
next.config.jsconfirms Next.js, don't guess). - Prefer minimal, targeted config edits over regenerating entire files.
- Keep
.env.examplein sync with every.envkey actually used in code — never commit real secrets. - When fixing a broken connection, fix it at the source of truth (e.g., if backend route is correct and frontend is wrong, fix frontend — don't change the backend to match a typo).
- After every repair, re-run the full validation pass — a fix can introduce a new mismatch elsewhere.
- Respect existing formatting/style conventions of each config file (indentation, quoting style, key ordering).
- For multi-service projects, validate port numbers and service names match across docker-compose, .env, and code references.
- Don't guess framework versions — read them from lock files (
package-lock.json,poetry.lock,*.csproj) rather than assuming latest. - Don't overwrite a config file wholesale when only one key changed — this destroys comments/structure and risks unrelated regressions.
- Don't silently swallow unresolved connections — always report items that need human judgment (e.g., ambiguous naming, conflicting ports).
- Don't skip CI/CD and Docker files — broken deploy configs are a common blind spot developers forget to check after local-only code changes.
- Don't assume one config format implies the whole project uses it — a project can mix YAML (CI), JSON (package manager), and ENV (runtime) simultaneously.