i dont like commits

This commit is contained in:
Tomas Dvorak
2026-02-24 12:10:13 +01:00
parent 898a3c303f
commit 1d72a1cc01
109 changed files with 43586 additions and 8484 deletions
@@ -0,0 +1,467 @@
{
"assessments": {
"abstraction_fitness": {
"score": 45.8,
"components": [
"Abstraction Leverage",
"Indirection Cost",
"Interface Honesty"
],
"component_scores": {
"Abstraction Leverage": 65.5,
"Indirection Cost": 62.1,
"Interface Honesty": 71.5
}
},
"cross_module_architecture": 56.0,
"design_coherence": 49.3,
"error_consistency": 44.4,
"test_strategy": 46.3
},
"dimension_notes": {
"cross_module_architecture": {
"evidence": [
"`internal/quality/enhanced_types.go` centralizes many unrelated boundary contracts (scoring metrics, detector transparency, narrative strategy/tools, debt tracking, config) in one package-level type hub.",
"`internal/quality/types.go` also acts as a second broad contract hub (findings, scan result, scorecard, language/config, extraction structs), overlapping the same ownership area as `enhanced_types.go` instead of separating by subdomain.",
"`internal/quality/scoring_test.go` consumes these shared package-level contracts directly, which reinforces coupling to a wide internal surface rather than narrower scorer-specific interfaces/types."
],
"impact_scope": "module",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
},
"abstraction_fitness": {
"evidence": [
"Four external scrapers (Astro, Docker, Cloudflare, Nuxt) each reimplement the same transport/change-detection skeleton (`fetchPage`, `DetectChanges`, `generateHash`, per-page `Document` assembly) with only parser/model differences.",
"`cmd/serve.go` RPC path for `devour_scrape` mutates CLI globals (`scrapeFormat`, `scrapeOutput`, `scrapeAllowEmpty`) to call `scrapeOne` from `cmd/scrape.go`, showing a leaky abstraction where server flow depends on CLI stateful wiring.",
"`vector.Store` advertises interchangeable backends, but `NewStore` can return `ChromemStore` whose methods are all unimplemented runtime errors, so the abstraction surface overstates usable implementations."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": "",
"sub_axes": {
"abstraction_leverage": 68.0,
"indirection_cost": 73.0,
"interface_honesty": 70.0
}
},
"test_strategy": {
"evidence": [
"internal/quality/scoring_test.go is heavily unit-focused and validates scorer internals, but does not validate public contract stability between quality types and README-documented behavior.",
"README.md publishes CLI and JSON-RPC command contracts, but assigned tests do not exercise those published interfaces as compatibility gates.",
"pkg/rustdocs/parser_test.go and internal/quality/scoring_test.go include brittle assertions (fixed positional result indexing and strict output text matching) that couple tests to implementation/presentation details."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
},
"design_coherence": {
"evidence": [
"Command passthrough wrappers add non-functional indirection in language command modules: `languages/dart/commands.py` defines `_cmd_*_impl` plus thin `cmd_*` forwarders for each command (`cmd_large`, `cmd_complexity`, `cmd_deps`, `cmd_cycles`, `cmd_orphaned`, `cmd_dupes`).",
"C# deps module mixes parsing, graph construction, CLI arg resolution, and terminal rendering in one file (`languages/csharp/detectors/deps.py` contains core graph builders and also `cmd_deps`/`cmd_cycles` UI handlers).",
"Status rendering duplicates score-bar construction logic in two loops in `app/commands/status_parts/render.py` (same threshold/color/filled computation blocks around lines ~191-199 and ~223-231), increasing drift risk."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
},
"error_consistency": {
"evidence": [
"RPC paths mix strict and lax decode behavior: `cmd/serve.go` returns decode errors for `devour_scrape`/`devour_ask` but ignores decode errors for `devour_query` and `devour_sync` (`_ = json.Unmarshal(...)`).",
"`cmd/serve.go` `devour_status` ignores errors from `LoadSourceState` and `EnsureIndexed` then dereferences `idxStats.Documents`, which can panic on nil when indexing fails.",
"`internal/server/server.go` exposes raw internal errors to clients (`Message: err.Error()`), while parse/invalid-request errors are normalized strings; HTTP transport always emits 400 for any RPC error, collapsing error classes.",
"`internal/ai/openai.go` does not check HTTP status before JSON decode, unlike scraper fetchers in `internal/scraper/external/*.go` and `internal/scraper/openapi.go` that explicitly gate on status codes.",
"`internal/search/engine.go` and `internal/scraper/openapi.go` mix wrapped and passthrough errors in adjacent paths, producing uneven context for operators."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "cross_module_architecture",
"identifier": "quality_package_contract_hub_coupling",
"summary": "Quality contracts are concentrated in broad type hubs, creating a coupling hotspot.",
"related_files": [
"internal/quality/enhanced_types.go",
"internal/quality/types.go",
"internal/quality/scoring_test.go"
],
"evidence": [
"`enhanced_types.go` and `types.go` both define large cross-cutting models for multiple concerns (analysis narrative, scoring, detector stats, config, extraction metadata) under one package boundary.",
"The two files blur subdomain ownership, so edits to one concern can force unrelated consumers in the same package to track evolving shared structs.",
"Scoring tests rely on shared package contracts rather than a tighter scorer-local contract, indicating broad internal API exposure."
],
"suggestion": "Split `internal/quality` contracts by bounded concern (for example: `qualitycore` findings/scan types, `qualityscore` scorecard/metrics, `qualitynarrative` narrative/report DTOs) and keep scorer-facing types in a narrow subpackage/API. Migrate tests to import only scorer-relevant types to reduce transitive coupling.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "abstraction_fitness",
"identifier": "duplicated_external_scraper_skeleton",
"summary": "External docs scrapers duplicate the same orchestration instead of sharing one adapter base",
"related_files": [
"internal/scraper/external/astrodocs.go",
"internal/scraper/external/cloudflaredocs.go",
"internal/scraper/external/dockerdocs.go",
"internal/scraper/external/nuxtdocs.go"
],
"evidence": [
"Each scraper defines near-identical `fetchPage`, `DetectChanges`, and `generateHash` logic.",
"Each `Scrape` method repeats the same flow: validate URL -> fetch HTML -> parser call -> append main doc + sub-doc loop(s).",
"Differences are mostly parser/model-specific mapping, but transport/error/hash logic is copy-pasted."
],
"suggestion": "Introduce a shared docs-scraper base (or helper pipeline) for HTTP fetch + hashing + standard error handling, and keep only parser-specific mapping in per-provider adapters.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "abstraction_fitness",
"identifier": "scrape_api_leaks_cli_state",
"summary": "Server scrape RPC depends on mutable CLI globals to reuse scrape pipeline",
"related_files": [
"cmd/serve.go",
"cmd/scrape.go",
"cmd/get.go"
],
"evidence": [
"`handleServeMethod` temporarily rewrites `scrapeFormat`, `scrapeOutput`, and `scrapeAllowEmpty` before calling `scrapeOne`, then restores them.",
"`scrapeOne` is not a pure service API; it is coupled to CLI-level shared state and output behavior.",
"`cmd/get.go` also routes through `runScrape`, reinforcing that scraping orchestration is command-centric rather than a reusable application service."
],
"suggestion": "Extract a stateless scrape service function (explicit request struct + options) used by both CLI commands and RPC handlers; keep CLI flags as translation-only at command boundary.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "abstraction_fitness",
"identifier": "vector_store_interface_overpromises",
"summary": "Vector store abstraction exposes backends that are selectable but not actually implemented",
"related_files": [
"internal/vector/store.go",
"internal/indexer/indexer.go"
],
"evidence": [
"`NewStore` can return `ChromemStore` when config type is `chromem`.",
"All `ChromemStore` interface methods currently return `not implemented` errors.",
"`Indexer` depends only on `vector.Store`, so backend failure appears at runtime after abstraction selection instead of at wiring/validation time."
],
"suggestion": "Make backend capabilities explicit: either remove/guard `chromem` selection until complete, or return an initialization error type from store construction and enforce backend readiness before indexing starts.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "cross_module_architecture",
"identifier": "docs_runtime_quality_contract_drift",
"summary": "Quality dimensions/statuses drift between public docs and runtime model contracts.",
"related_files": [
"README.md",
"internal/quality/enhanced_types.go",
"internal/quality/types.go"
],
"evidence": [
"README.md frames score interpretation around a specific dimension set and user workflow.",
"internal/quality/enhanced_types.go includes extra dimension constants not represented in README contract text.",
"internal/quality/types.go includes StatusIgnored while README resolution examples only expose fixed/wontfix/false_positive paths."
],
"suggestion": "Define a single versioned public quality contract (dimensions + statuses) as source-of-truth, generate README contract tables from it, and add a CI check that fails when exported enums and published docs diverge.",
"confidence": "medium",
"impact_scope": "codebase",
"fix_scope": "architectural_change"
},
{
"dimension": "test_strategy",
"identifier": "missing_public_contract_compat_tests",
"summary": "Published CLI/RPC governance contracts are not protected by compatibility tests.",
"related_files": [
"README.md",
"internal/quality/scoring_test.go",
"internal/quality/types.go"
],
"evidence": [
"README.md documents stable command and RPC method surfaces for users.",
"internal/quality/scoring_test.go covers scoring behavior but not end-to-end contract assertions tied to documented surfaces.",
"No assigned test verifies that externally documented score/status semantics remain compatible with exported model types."
],
"suggestion": "Add contract tests that parse/validate documented command and RPC surface claims against runtime registration/types, and add schema-level golden tests for serialized quality/status payloads.",
"confidence": "high",
"impact_scope": "codebase",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "test_strategy",
"identifier": "brittle_assertions_on_order_and_formatting",
"summary": "Tests are fragile due to strict ordering and presentation-string coupling.",
"related_files": [
"internal/quality/scoring_test.go",
"pkg/rustdocs/parser_test.go"
],
"evidence": [
"pkg/rustdocs/parser_test.go asserts semantic expectations through fixed indexes (results[0], results[1], results[2]) rather than identity-based matching.",
"internal/quality/scoring_test.go asserts many exact output substrings in FormatScorecard, coupling tests to formatting text that can change without behavioral regressions."
],
"suggestion": "Refactor tests to assert semantic invariants (presence by key/kind, normalized structured fields) and reserve strict golden-output checks for explicitly versioned presentation contracts.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "design_coherence",
"identifier": "passthrough_command_wrappers_add_low_leverage_layers",
"summary": "Language command modules include thin forwarding wrappers with no behavioral value.",
"related_files": [
"desloppify/desloppify/desloppify/languages/dart/commands.py",
"desloppify/desloppify/desloppify/languages/csharp/commands.py",
"desloppify/desloppify/desloppify/languages/framework/commands_base.py"
],
"evidence": [
"`languages/dart/commands.py` creates `_cmd_*_impl` callables and then defines six `cmd_*` functions that only call the corresponding impl.",
"`languages/csharp/commands.py` also keeps thin wrappers (`cmd_large`, `cmd_complexity`, `cmd_deps`, `cmd_cycles`) that forward directly to other callables.",
"The framework already provides factory-returned callables; wrapper layers increase symbol count and call depth without adding policy."
],
"suggestion": "Assign factory outputs directly to exported command names (or build the registry directly from generated callables) and keep wrappers only where they add language-specific behavior, validation, or formatting.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "design_coherence",
"identifier": "csharp_deps_module_blends_core_and_cli_responsibilities",
"summary": "C# dependency detector file combines analysis engine logic with CLI presentation.",
"related_files": [
"desloppify/desloppify/desloppify/languages/csharp/detectors/deps.py",
"desloppify/desloppify/desloppify/languages/csharp/commands.py",
"desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py"
],
"evidence": [
"`languages/csharp/detectors/deps.py` includes internal graph/parsing functions (`_parse_project_assets_references`, `_build_dep_graph_roslyn`, `build_dep_graph`) and command handlers (`cmd_deps`, `cmd_cycles`) in the same module.",
"`languages/csharp/commands.py` forwards to `cmd_deps_direct`/`cmd_cycles_deps`, meaning command routing depends on detector-module UI functions instead of a clean detector API.",
"Other language paths use shared command scaffolding (`languages/_shared/scaffold_detect_commands.py`) that separates command shell concerns from graph/detection logic."
],
"suggestion": "Split C# deps into `detectors/deps_core.py` (graph/parsing only) and command-facing adapters in `commands.py` (or scaffold factories), so detectors expose data and command modules own JSON/table rendering.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "design_coherence",
"identifier": "status_bar_render_logic_duplicated_in_two_paths",
"summary": "Status renderer repeats identical score-bar construction for mechanical and subjective rows.",
"related_files": [
"desloppify/desloppify/desloppify/app/commands/status_parts/render.py",
"desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py"
],
"evidence": [
"`show_dimension_table` in `status_parts/render.py` computes `filled`, score thresholds, and colored bar in one loop for mechanical dimensions and repeats the same logic in a second loop for subjective entries.",
"Duplicated threshold constants (`>=98`, `>=93`) and color composition appear in both blocks, creating a two-site maintenance point for one rendering policy."
],
"suggestion": "Extract a shared `render_score_bar(score_val, bar_len)` helper (or move the row formatting policy into scorecard projection/output helpers) and reuse it for both loops to keep display semantics consistent.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "rpc_decode_and_response_contract_drift",
"summary": "RPC methods use inconsistent decode and error-response contracts",
"related_files": [
"cmd/serve.go",
"internal/server/server.go"
],
"evidence": [
"`cmd/serve.go` ignores JSON decode errors in `devour_query`/`devour_sync` but returns decode errors in `devour_scrape`/`devour_ask`.",
"`internal/server/server.go` returns raw `err.Error()` in RPC payloads and maps all RPC errors to HTTP 400 in `writeRPC`."
],
"suggestion": "Define one RPC error policy: always validate/decode params the same way, map known classes to stable RPC codes/messages, and map transport HTTP statuses by error class (client input vs internal failure).",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "serve_status_swallows_errors_then_dereferences_nil",
"summary": "Status handler ignores errors and can panic from nil stats",
"related_files": [
"cmd/serve.go",
"internal/search/engine.go"
],
"evidence": [
"`cmd/serve.go` uses `state, _ := projectstate.LoadSourceState(...)` and `idxStats, _ := engine.EnsureIndexed(ctx)` in `devour_status`.",
"The same block unconditionally reads `idxStats.Documents` and `idxStats.LastIndexedAt`, which is unsafe if `EnsureIndexed` returned an error."
],
"suggestion": "Handle both errors explicitly in `devour_status`; return structured partial-status with an error field or fail the method uniformly, but do not ignore and dereference.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "openai_http_error_path_not_normalized",
"summary": "OpenAI client lacks explicit HTTP status error handling",
"related_files": [
"internal/ai/openai.go",
"internal/scraper/openapi.go",
"internal/scraper/external/astrodocs.go"
],
"evidence": [
"`internal/ai/openai.go` decodes response bodies directly and only checks `embeddingResp.Error`/`chatResp.Error`; non-2xx responses without expected JSON become generic decode errors.",
"`internal/scraper/openapi.go` and external scrapers explicitly validate HTTP status before body parsing and return explicit HTTP status errors."
],
"suggestion": "Add explicit non-2xx handling in both OpenAI request paths: include status code, bounded response body excerpt, and endpoint context before JSON decode.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "mixed_wrapping_vs_passthrough_in_core_flows",
"summary": "Adjacent paths alternate between wrapped and raw error returns",
"related_files": [
"internal/search/engine.go",
"internal/scraper/openapi.go",
"internal/config/config.go"
],
"evidence": [
"`internal/search/engine.go` frequently returns raw errors (`return nil, err`) from filesystem/index operations.",
"`internal/scraper/openapi.go` similarly passes through request/file errors raw in `readSpec`, while other branches wrap with operation context.",
"`internal/config/config.go` demonstrates contextual wrapping style (`read config`, `parse config`), creating drift against less-informative paths."
],
"suggestion": "Adopt a package-level rule: wrap external boundary failures with operation context (read/write/parse/network) and preserve `%w`; apply consistently across search/openapi paths.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "scanner_pipeline_fail_open_is_inconsistent",
"summary": "Quality scan path mixes fail-open and fail-fast behaviors",
"related_files": [
"internal/quality/scanner.go",
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/plugins/go/analyzers/detectors.go"
],
"evidence": [
"`internal/quality/scanner.go` logs detector failures and continues, silently reducing coverage of reported findings.",
"`test_coverage.go` returns `(nil, nil)` for missing `go` tool or missing generated coverage file, while other detector failures return explicit errors.",
"`detectors.go` has parse/count paths that silently `continue` on per-file errors, further mixing behavior."
],
"suggestion": "Standardize detector error semantics with typed outcomes (hard error, soft-skip with reason, per-file skip count) and surface these in scan results so degraded scans are explicit.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "cross_module_architecture",
"identifier": "rpc_cli_global_state_coupling",
"summary": "RPC handlers mutate CLI global flags to execute workflows across command boundaries.",
"related_files": [
"cmd/serve.go",
"cmd/scrape.go",
"cmd/sync.go"
],
"evidence": [
"cmd/serve.go sets scrapeFormat/scrapeOutput/scrapeAllowEmpty before calling scrapeOne and restores afterward.",
"cmd/serve.go sets syncForce/syncRebuild/syncSource before calling runSync and restores afterward."
],
"suggestion": "Extract scrape/sync/query use-cases into stateless service functions (input structs + return structs), call them from both Cobra commands and RPC handlers, and remove shared mutable command globals from runtime execution paths.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "silent_error_drops_in_rpc_paths",
"summary": "Several RPC paths ignore parse/index/state errors, producing inconsistent failure contracts.",
"related_files": [
"cmd/serve.go",
"internal/search/engine.go",
"internal/projectstate/state.go"
],
"evidence": [
"cmd/serve.go ignores JSON unmarshal errors for devour_query/devour_sync (`_ = json.Unmarshal(...)`).",
"cmd/serve.go ignores errors from LoadSourceState and EnsureIndexed, yet reads fields from returned values.",
"Other command paths generally propagate wrapped errors with `%w`."
],
"suggestion": "Treat request decode, source-state load, and index-check failures uniformly: return explicit wrapped errors from each branch and avoid underscore-discarded errors in RPC handlers.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "single_edit"
},
{
"dimension": "abstraction_fitness",
"identifier": "external_scraper_transport_duplication",
"summary": "External scrapers duplicate the same HTTP fetch/hash/change-detection boilerplate.",
"related_files": [
"internal/scraper/external/reactdocs.go",
"internal/scraper/external/tsdocs.go",
"internal/scraper/external/godocs.go",
"internal/scraper/external/rustdocs.go",
"internal/scraper/external/cloudflaredocs.go"
],
"evidence": [
"Each scraper reimplements equivalent `fetchPage` with identical request/header/response-body flow.",
"Each scraper reimplements nearly identical `DetectChanges` and `generateHash` logic."
],
"suggestion": "Introduce a shared base helper (e.g., `fetchPage`, `contentHash`, `detectChanges`) in internal/scraper/external/types.go or a dedicated internal transport module, then keep per-scraper files focused on parser-to-document mapping.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "test_strategy",
"identifier": "missing_tests_on_orchestration_and_adapters",
"summary": "Critical orchestration commands and most external adapters have no direct tests.",
"related_files": [
"cmd/serve.go",
"cmd/sync.go",
"cmd/query.go",
"internal/scraper/external/godocs.go",
"internal/scraper/external/reactdocs.go"
],
"evidence": [
"No *_test.go peers for cmd/serve.go, cmd/sync.go, cmd/query.go despite high-risk orchestration behavior.",
"Only one external scraper has direct tests while many adapter implementations contain custom mapping and error-path logic."
],
"suggestion": "Add table-driven tests for RPC method branches and error propagation in cmd/serve.go, plus httptest-based adapter contract tests covering fetch failures, parser errors, and document mapping for each external scraper family.",
"confidence": "high",
"impact_scope": "codebase",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "design_coherence",
"identifier": "serve_handler_multi_responsibility_switch",
"summary": "Single handler function mixes transport, parsing, orchestration, and mutable state management.",
"related_files": [
"cmd/serve.go",
"cmd/scrape.go",
"cmd/sync.go",
"cmd/query.go"
],
"evidence": [
"handleServeMethod contains method routing plus per-method request schemas, domain calls, and response shaping in one body.",
"The function coordinates temporary mutation of command globals to reuse CLI code paths."
],
"suggestion": "Split each RPC method into dedicated handler functions (e.g., handleQueryRPC, handleScrapeRPC, handleSyncRPC) that depend on explicit service interfaces instead of command globals.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
],
"review_quality": {
"batch_count": 6,
"dimension_coverage": 0.367,
"evidence_density": 1.667,
"high_score_without_risk": 0,
"finding_pressure": 48.928,
"dimensions_with_findings": 5
}
}
@@ -0,0 +1,49 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101201.json
Batch index: 1
Batch name: Architecture & Coupling
Batch dimensions: cross_module_architecture
Batch rationale: god modules, import-time side effects
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Architecture & Coupling",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,76 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101201.json
Batch index: 2
Batch name: Abstractions & Dependencies
Batch dimensions: abstraction_fitness
Batch rationale: abstraction hotspots (wrappers/interfaces/param bags), dep cycles
Files assigned:
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/scanner.go
- internal/search/engine.go
- cmd/serve.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Abstractions & Dependencies",
"batch_index": 2,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,50 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101201.json
Batch index: 3
Batch name: Governance & Contracts
Batch dimensions: cross_module_architecture, test_strategy
Batch rationale: architecture contracts, compatibility policy, docs-vs-runtime scope, and quality-gate coverage
Files assigned:
- README.md
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Governance & Contracts",
"batch_index": 3,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,139 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101201.json
Batch index: 4
Batch name: Design Coherence — Mechanical Concern Signals
Batch dimensions: design_coherence
Batch rationale: mechanical detectors identified structural patterns needing judgment; concern types: design_concern, duplication_design
Files assigned:
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
- desloppify/desloppify/desloppify/languages/csharp/deps/cli.py
- desloppify/desloppify/desloppify/languages/csharp/deps/fallback.py
- desloppify/desloppify/desloppify/languages/csharp/detectors/deps.py
- desloppify/desloppify/desloppify/languages/csharp/phases.py
- desloppify/desloppify/desloppify/languages/csharp/test_coverage.py
- desloppify/desloppify/desloppify/languages/dart/__init__.py
- desloppify/desloppify/desloppify/languages/dart/commands.py
- desloppify/desloppify/desloppify/languages/dart/detectors/deps.py
- desloppify/desloppify/desloppify/languages/dart/extractors.py
- desloppify/desloppify/desloppify/languages/dart/move.py
- desloppify/desloppify/desloppify/languages/framework/commands_base.py
- desloppify/desloppify/desloppify/languages/gdscript/__init__.py
- desloppify/desloppify/desloppify/languages/gdscript/detectors/deps.py
- desloppify/desloppify/desloppify/languages/python/__init__.py
- desloppify/desloppify/desloppify/languages/python/commands.py
- desloppify/desloppify/desloppify/languages/python/detectors/security.py
- desloppify/desloppify/desloppify/languages/python/detectors/smells.py
- desloppify/desloppify/desloppify/languages/python/move.py
- desloppify/desloppify/desloppify/languages/python/phases.py
- desloppify/desloppify/desloppify/languages/python/test_coverage.py
- desloppify/desloppify/desloppify/languages/python/tests/test_py_facade.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/_smell_detectors.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/_smell_effects.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/deps.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/exports.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/react.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/unused.py
- desloppify/desloppify/desloppify/languages/typescript/fixers/common.py
- desloppify/desloppify/desloppify/languages/typescript/fixers/if_chain.py
- desloppify/desloppify/desloppify/languages/typescript/fixers/logs.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_concerns.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_deprecated.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_deps.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_exports.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_fixers.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_logs.py
- desloppify/desloppify/desloppify/languages/typescript/tests/test_ts_react.py
- desloppify/desloppify/desloppify/tests/commands/fix/test_cmd_fix_review.py
- desloppify/desloppify/desloppify/tests/commands/test_cmd_detect.py
- desloppify/desloppify/desloppify/tests/commands/test_cmd_fix.py
- desloppify/desloppify/desloppify/tests/commands/test_cmd_next.py
- desloppify/desloppify/desloppify/tests/commands/test_cmd_scan.py
- desloppify/desloppify/desloppify/tests/commands/test_cmd_show.py
- desloppify/desloppify/desloppify/tests/commands/test_config_cmd.py
- desloppify/desloppify/desloppify/tests/detectors/test_architecture_boundaries.py
- desloppify/desloppify/desloppify/tests/detectors/test_complexity.py
- desloppify/desloppify/desloppify/tests/detectors/test_coupling.py
- desloppify/desloppify/desloppify/tests/detectors/test_gods.py
- desloppify/desloppify/desloppify/tests/detectors/test_naming.py
- desloppify/desloppify/desloppify/tests/detectors/test_orphaned.py
- desloppify/desloppify/desloppify/tests/lang/common/test_lang_contract_validation.py
- desloppify/desloppify/desloppify/tests/lang/csharp/test_csharp_deps.py
- desloppify/desloppify/desloppify/tests/lang/csharp/test_csharp_scan.py
- desloppify/desloppify/desloppify/tests/lang/dart/test_dart_deps.py
- desloppify/desloppify/desloppify/tests/review/test_review_coverage.py
- desloppify/desloppify/desloppify/tests/review/test_review_dimensions_direct.py
- desloppify/desloppify/desloppify/tests/review/test_work_queue.py
- desloppify/desloppify/desloppify/tests/scan/test_flat_dirs.py
- desloppify/desloppify/desloppify/tests/scan/test_scan_reporting_direct.py
- desloppify/desloppify/desloppify/tests/scan/test_scan_workflow_wontfix_direct.py
- desloppify/desloppify/desloppify/tests/scoring/test_scorecard.py
- desloppify/desloppify/desloppify/tests/scoring/test_scorecard_draw_direct.py
- desloppify/desloppify/desloppify/tests/snapshots/cli_smoke/state-python.json
- desloppify/desloppify/desloppify/tests/state/test_state.py
- desloppify/desloppify/desloppify/tests/state/test_state_internal_direct.py
- devour_data/docs/docker_compose_-_ask_me_about_docker_1.md
- devour_data/docs/docker_compose_-_browse_common_faqs_10.md
- devour_data/docs/docker_compose_-_docker_compose_2.md
- devour_data/docs/docker_compose_-_explore_the_compose_file_referenc_8.md
- devour_data/docs/docker_compose_-_how_compose_works_4.md
- devour_data/docs/docker_compose_-_install_compose_5.md
- devour_data/docs/docker_compose_-_use_compose_bridge_9.md
- internal/scraper/web.go
- pkg/godocs/parser.go
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Design Coherence — Mechanical Concern Signals",
"batch_index": 4,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101201.json
Batch index: 5
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/scanner.go
- internal/search/engine.go
- cmd/serve.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- README.md
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
- desloppify/desloppify/desloppify/languages/csharp/deps/cli.py
- desloppify/desloppify/desloppify/languages/csharp/deps/fallback.py
- desloppify/desloppify/desloppify/languages/csharp/detectors/deps.py
- desloppify/desloppify/desloppify/languages/csharp/phases.py
- desloppify/desloppify/desloppify/languages/csharp/test_coverage.py
- desloppify/desloppify/desloppify/languages/dart/__init__.py
- desloppify/desloppify/desloppify/languages/dart/commands.py
- desloppify/desloppify/desloppify/languages/dart/detectors/deps.py
- desloppify/desloppify/desloppify/languages/dart/extractors.py
- desloppify/desloppify/desloppify/languages/dart/move.py
- desloppify/desloppify/desloppify/languages/framework/commands_base.py
- desloppify/desloppify/desloppify/languages/gdscript/__init__.py
- desloppify/desloppify/desloppify/languages/gdscript/detectors/deps.py
- desloppify/desloppify/desloppify/languages/python/__init__.py
- desloppify/desloppify/desloppify/languages/python/commands.py
- desloppify/desloppify/desloppify/languages/python/detectors/security.py
- desloppify/desloppify/desloppify/languages/python/detectors/smells.py
- desloppify/desloppify/desloppify/languages/python/move.py
- desloppify/desloppify/desloppify/languages/python/phases.py
- desloppify/desloppify/desloppify/languages/python/test_coverage.py
- desloppify/desloppify/desloppify/languages/python/tests/test_py_facade.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/_smell_detectors.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/_smell_effects.py
- desloppify/desloppify/desloppify/languages/typescript/detectors/deps.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 5,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,161 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101201.json
Batch index: 6
Batch name: Full Codebase Sweep
Batch dimensions: cross_module_architecture, error_consistency, abstraction_fitness, test_strategy, design_coherence
Batch rationale: thorough default: evaluate cross-cutting quality across all production files
Files assigned:
- cleanup_unused.go
- cmd/ask.go
- cmd/auto.go
- cmd/demo.go
- cmd/desloppify_proxy.go
- cmd/devour/main.go
- cmd/generate_scorecards/main.go
- cmd/get.go
- cmd/init.go
- cmd/languages.go
- cmd/push.go
- cmd/quality.go
- cmd/query.go
- cmd/realtest/main.go
- cmd/review.go
- cmd/root.go
- cmd/runtime_helpers.go
- cmd/scorecard.go
- cmd/scrape.go
- cmd/serve.go
- cmd/status.go
- cmd/sync.go
- cmd/verify.go
- examples/demo_scrapers.go
- internal/ai/ai.go
- internal/ai/openai.go
- internal/config/config.go
- internal/indexer/indexer.go
- internal/markdown/formatter.go
- internal/projectstate/state.go
- internal/quality/analyzers/controlflow.go
- internal/quality/analyzers/dataflow.go
- internal/quality/analyzers/practices.go
- internal/quality/detector.go
- internal/quality/detectors/complexity.go
- internal/quality/detectors/duplication.go
- internal/quality/detectors/naming.go
- internal/quality/docs_evidence.go
- internal/quality/enhanced_types.go
- internal/quality/languages.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/quality/plugins/go/analyzers/deadcode.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/security.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- internal/quality/plugins/go/fixers/fixers.go
- internal/quality/plugins/go/plugin.go
- internal/quality/plugins/plugin.go
- internal/quality/plugins/registry.go
- internal/quality/scanner.go
- internal/quality/scoring.go
- internal/quality/state.go
- internal/quality/types.go
- internal/scheduler/scheduler.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/scraper/external/godocs.go
- internal/scraper/external/javadocs.go
- internal/scraper/external/mcpdocs.go
- internal/scraper/external/nuxtdocs.go
- internal/scraper/external/pythondocs.go
- internal/scraper/external/reactdocs.go
- internal/scraper/external/register.go
- internal/scraper/external/rustdocs.go
- internal/scraper/external/springdocs.go
- internal/scraper/external/tsdocs.go
- internal/scraper/external/types.go
- internal/scraper/external/vuedocs.go
- internal/scraper/github.go
- internal/scraper/local.go
- internal/scraper/localsearch.go
- internal/scraper/normalize.go
- internal/scraper/openapi.go
- internal/scraper/register_core.go
- internal/scraper/registry_simple.go
- internal/scraper/scraper.go
- internal/scraper/web.go
- internal/scraper/wrapper.go
- internal/search/engine.go
- internal/server/server.go
- internal/storage/writer.go
- internal/ui/banner.go
- internal/ui/character.go
- internal/vector/store.go
- main.go
- pkg/astrodocs/parser.go
- pkg/astrodocs/types.go
- pkg/client/client.go
- pkg/cloudflaredocs/parser.go
- pkg/cloudflaredocs/types.go
- pkg/dockerdocs/parser.go
- pkg/dockerdocs/types.go
- pkg/godocs/parser.go
- pkg/godocs/types.go
- pkg/javadocs/parser.go
- pkg/javadocs/types.go
- pkg/mcpdocs/parser.go
- pkg/mcpdocs/types.go
- pkg/nuxtdocs/parser.go
- pkg/nuxtdocs/types.go
- pkg/parserutil/url.go
- pkg/pythondocs/parser.go
- pkg/pythondocs/types.go
- pkg/reactdocs/parser.go
- pkg/reactdocs/types.go
- pkg/rustdocs/parser.go
- pkg/rustdocs/types.go
- pkg/springdocs/parser.go
- pkg/springdocs/types.go
- pkg/tsdocs/parser.go
- pkg/tsdocs/types.go
- pkg/types/types.go
- pkg/vuedocs/parser.go
- pkg/vuedocs/types.go
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Full Codebase Sweep",
"batch_index": 6,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,40 @@
{
"batch": "Architecture & Coupling",
"batch_index": 1,
"assessments": {
"cross_module_architecture": 82.0
},
"dimension_notes": {
"cross_module_architecture": {
"evidence": [
"`internal/quality/enhanced_types.go` centralizes many unrelated boundary contracts (scoring metrics, detector transparency, narrative strategy/tools, debt tracking, config) in one package-level type hub.",
"`internal/quality/types.go` also acts as a second broad contract hub (findings, scan result, scorecard, language/config, extraction structs), overlapping the same ownership area as `enhanced_types.go` instead of separating by subdomain.",
"`internal/quality/scoring_test.go` consumes these shared package-level contracts directly, which reinforces coupling to a wide internal surface rather than narrower scorer-specific interfaces/types."
],
"impact_scope": "module",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "cross_module_architecture",
"identifier": "quality_package_contract_hub_coupling",
"summary": "Quality contracts are concentrated in broad type hubs, creating a coupling hotspot.",
"related_files": [
"internal/quality/enhanced_types.go",
"internal/quality/types.go",
"internal/quality/scoring_test.go"
],
"evidence": [
"`enhanced_types.go` and `types.go` both define large cross-cutting models for multiple concerns (analysis narrative, scoring, detector stats, config, extraction metadata) under one package boundary.",
"The two files blur subdomain ownership, so edits to one concern can force unrelated consumers in the same package to track evolving shared structs.",
"Scoring tests rely on shared package contracts rather than a tighter scorer-local contract, indicating broad internal API exposure."
],
"suggestion": "Split `internal/quality` contracts by bounded concern (for example: `qualitycore` findings/scan types, `qualityscore` scorecard/metrics, `qualitynarrative` narrative/report DTOs) and keep scorer-facing types in a narrow subpackage/API. Migrate tests to import only scorer-relevant types to reduce transitive coupling.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,83 @@
{
"batch": "Abstractions & Dependencies",
"batch_index": 2,
"assessments": {
"abstraction_fitness": 72.0
},
"dimension_notes": {
"abstraction_fitness": {
"evidence": [
"Four external scrapers (Astro, Docker, Cloudflare, Nuxt) each reimplement the same transport/change-detection skeleton (`fetchPage`, `DetectChanges`, `generateHash`, per-page `Document` assembly) with only parser/model differences.",
"`cmd/serve.go` RPC path for `devour_scrape` mutates CLI globals (`scrapeFormat`, `scrapeOutput`, `scrapeAllowEmpty`) to call `scrapeOne` from `cmd/scrape.go`, showing a leaky abstraction where server flow depends on CLI stateful wiring.",
"`vector.Store` advertises interchangeable backends, but `NewStore` can return `ChromemStore` whose methods are all unimplemented runtime errors, so the abstraction surface overstates usable implementations."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"sub_axes": {
"abstraction_leverage": 68.0,
"indirection_cost": 73.0,
"interface_honesty": 70.0
}
}
},
"findings": [
{
"dimension": "abstraction_fitness",
"identifier": "duplicated_external_scraper_skeleton",
"summary": "External docs scrapers duplicate the same orchestration instead of sharing one adapter base",
"related_files": [
"internal/scraper/external/astrodocs.go",
"internal/scraper/external/cloudflaredocs.go",
"internal/scraper/external/dockerdocs.go",
"internal/scraper/external/nuxtdocs.go"
],
"evidence": [
"Each scraper defines near-identical `fetchPage`, `DetectChanges`, and `generateHash` logic.",
"Each `Scrape` method repeats the same flow: validate URL -> fetch HTML -> parser call -> append main doc + sub-doc loop(s).",
"Differences are mostly parser/model-specific mapping, but transport/error/hash logic is copy-pasted."
],
"suggestion": "Introduce a shared docs-scraper base (or helper pipeline) for HTTP fetch + hashing + standard error handling, and keep only parser-specific mapping in per-provider adapters.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "abstraction_fitness",
"identifier": "scrape_api_leaks_cli_state",
"summary": "Server scrape RPC depends on mutable CLI globals to reuse scrape pipeline",
"related_files": [
"cmd/serve.go",
"cmd/scrape.go",
"cmd/get.go"
],
"evidence": [
"`handleServeMethod` temporarily rewrites `scrapeFormat`, `scrapeOutput`, and `scrapeAllowEmpty` before calling `scrapeOne`, then restores them.",
"`scrapeOne` is not a pure service API; it is coupled to CLI-level shared state and output behavior.",
"`cmd/get.go` also routes through `runScrape`, reinforcing that scraping orchestration is command-centric rather than a reusable application service."
],
"suggestion": "Extract a stateless scrape service function (explicit request struct + options) used by both CLI commands and RPC handlers; keep CLI flags as translation-only at command boundary.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "abstraction_fitness",
"identifier": "vector_store_interface_overpromises",
"summary": "Vector store abstraction exposes backends that are selectable but not actually implemented",
"related_files": [
"internal/vector/store.go",
"internal/indexer/indexer.go"
],
"evidence": [
"`NewStore` can return `ChromemStore` when config type is `chromem`.",
"All `ChromemStore` interface methods currently return `not implemented` errors.",
"`Indexer` depends only on `vector.Store`, so backend failure appears at runtime after abstraction selection instead of at wiring/validation time."
],
"suggestion": "Make backend capabilities explicit: either remove/guard `chromem` selection until complete, or return an initialization error type from store construction and enforce backend readiness before indexing starts.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,87 @@
{
"batch": "Governance & Contracts",
"batch_index": 3,
"assessments": {
"cross_module_architecture": 81.0,
"test_strategy": 69.0
},
"dimension_notes": {
"cross_module_architecture": {
"evidence": [
"README.md defines the quality model publicly as 5 mechanical + 7 subjective dimensions, implying a stable external contract for score interpretation.",
"internal/quality/enhanced_types.go defines additional dimensions (e.g., DimensionElegance, DimensionContracts) that are not reflected in README governance docs.",
"internal/quality/types.go exposes status/state enums (including StatusIgnored) that are absent from README user-facing resolution policy examples, creating docs-vs-runtime boundary drift."
],
"impact_scope": "codebase",
"fix_scope": "architectural_change",
"confidence": "medium"
},
"test_strategy": {
"evidence": [
"internal/quality/scoring_test.go is heavily unit-focused and validates scorer internals, but does not validate public contract stability between quality types and README-documented behavior.",
"README.md publishes CLI and JSON-RPC command contracts, but assigned tests do not exercise those published interfaces as compatibility gates.",
"pkg/rustdocs/parser_test.go and internal/quality/scoring_test.go include brittle assertions (fixed positional result indexing and strict output text matching) that couple tests to implementation/presentation details."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "cross_module_architecture",
"identifier": "docs_runtime_quality_contract_drift",
"summary": "Quality dimensions/statuses drift between public docs and runtime model contracts.",
"related_files": [
"README.md",
"internal/quality/enhanced_types.go",
"internal/quality/types.go"
],
"evidence": [
"README.md frames score interpretation around a specific dimension set and user workflow.",
"internal/quality/enhanced_types.go includes extra dimension constants not represented in README contract text.",
"internal/quality/types.go includes StatusIgnored while README resolution examples only expose fixed/wontfix/false_positive paths."
],
"suggestion": "Define a single versioned public quality contract (dimensions + statuses) as source-of-truth, generate README contract tables from it, and add a CI check that fails when exported enums and published docs diverge.",
"confidence": "medium",
"impact_scope": "codebase",
"fix_scope": "architectural_change"
},
{
"dimension": "test_strategy",
"identifier": "missing_public_contract_compat_tests",
"summary": "Published CLI/RPC governance contracts are not protected by compatibility tests.",
"related_files": [
"README.md",
"internal/quality/scoring_test.go",
"internal/quality/types.go"
],
"evidence": [
"README.md documents stable command and RPC method surfaces for users.",
"internal/quality/scoring_test.go covers scoring behavior but not end-to-end contract assertions tied to documented surfaces.",
"No assigned test verifies that externally documented score/status semantics remain compatible with exported model types."
],
"suggestion": "Add contract tests that parse/validate documented command and RPC surface claims against runtime registration/types, and add schema-level golden tests for serialized quality/status payloads.",
"confidence": "high",
"impact_scope": "codebase",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "test_strategy",
"identifier": "brittle_assertions_on_order_and_formatting",
"summary": "Tests are fragile due to strict ordering and presentation-string coupling.",
"related_files": [
"internal/quality/scoring_test.go",
"pkg/rustdocs/parser_test.go"
],
"evidence": [
"pkg/rustdocs/parser_test.go asserts semantic expectations through fixed indexes (results[0], results[1], results[2]) rather than identity-based matching.",
"internal/quality/scoring_test.go asserts many exact output substrings in FormatScorecard, coupling tests to formatting text that can change without behavioral regressions."
],
"suggestion": "Refactor tests to assert semantic invariants (presence by key/kind, normalized structured fields) and reserve strict golden-output checks for explicitly versioned presentation contracts.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,76 @@
{
"batch": "Design Coherence \u2014 Mechanical Concern Signals",
"batch_index": 4,
"assessments": {
"design_coherence": 74.0
},
"dimension_notes": {
"design_coherence": {
"evidence": [
"Command passthrough wrappers add non-functional indirection in language command modules: `languages/dart/commands.py` defines `_cmd_*_impl` plus thin `cmd_*` forwarders for each command (`cmd_large`, `cmd_complexity`, `cmd_deps`, `cmd_cycles`, `cmd_orphaned`, `cmd_dupes`).",
"C# deps module mixes parsing, graph construction, CLI arg resolution, and terminal rendering in one file (`languages/csharp/detectors/deps.py` contains core graph builders and also `cmd_deps`/`cmd_cycles` UI handlers).",
"Status rendering duplicates score-bar construction logic in two loops in `app/commands/status_parts/render.py` (same threshold/color/filled computation blocks around lines ~191-199 and ~223-231), increasing drift risk."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "design_coherence",
"identifier": "passthrough_command_wrappers_add_low_leverage_layers",
"summary": "Language command modules include thin forwarding wrappers with no behavioral value.",
"related_files": [
"desloppify/desloppify/desloppify/languages/dart/commands.py",
"desloppify/desloppify/desloppify/languages/csharp/commands.py",
"desloppify/desloppify/desloppify/languages/framework/commands_base.py"
],
"evidence": [
"`languages/dart/commands.py` creates `_cmd_*_impl` callables and then defines six `cmd_*` functions that only call the corresponding impl.",
"`languages/csharp/commands.py` also keeps thin wrappers (`cmd_large`, `cmd_complexity`, `cmd_deps`, `cmd_cycles`) that forward directly to other callables.",
"The framework already provides factory-returned callables; wrapper layers increase symbol count and call depth without adding policy."
],
"suggestion": "Assign factory outputs directly to exported command names (or build the registry directly from generated callables) and keep wrappers only where they add language-specific behavior, validation, or formatting.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "design_coherence",
"identifier": "csharp_deps_module_blends_core_and_cli_responsibilities",
"summary": "C# dependency detector file combines analysis engine logic with CLI presentation.",
"related_files": [
"desloppify/desloppify/desloppify/languages/csharp/detectors/deps.py",
"desloppify/desloppify/desloppify/languages/csharp/commands.py",
"desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py"
],
"evidence": [
"`languages/csharp/detectors/deps.py` includes internal graph/parsing functions (`_parse_project_assets_references`, `_build_dep_graph_roslyn`, `build_dep_graph`) and command handlers (`cmd_deps`, `cmd_cycles`) in the same module.",
"`languages/csharp/commands.py` forwards to `cmd_deps_direct`/`cmd_cycles_deps`, meaning command routing depends on detector-module UI functions instead of a clean detector API.",
"Other language paths use shared command scaffolding (`languages/_shared/scaffold_detect_commands.py`) that separates command shell concerns from graph/detection logic."
],
"suggestion": "Split C# deps into `detectors/deps_core.py` (graph/parsing only) and command-facing adapters in `commands.py` (or scaffold factories), so detectors expose data and command modules own JSON/table rendering.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "design_coherence",
"identifier": "status_bar_render_logic_duplicated_in_two_paths",
"summary": "Status renderer repeats identical score-bar construction for mechanical and subjective rows.",
"related_files": [
"desloppify/desloppify/desloppify/app/commands/status_parts/render.py",
"desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py"
],
"evidence": [
"`show_dimension_table` in `status_parts/render.py` computes `filled`, score thresholds, and colored bar in one loop for mechanical dimensions and repeats the same logic in a second loop for subjective entries.",
"Duplicated threshold constants (`>=98`, `>=93`) and color composition appear in both blocks, creating a two-site maintenance point for one rendering policy."
],
"suggestion": "Extract a shared `render_score_bar(score_val, bar_len)` helper (or move the row formatting policy into scorecard projection/output helpers) and reuse it for both loops to keep display semantics consistent.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
}
]
}
@@ -0,0 +1,113 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 5,
"assessments": {
"error_consistency": 68.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"RPC paths mix strict and lax decode behavior: `cmd/serve.go` returns decode errors for `devour_scrape`/`devour_ask` but ignores decode errors for `devour_query` and `devour_sync` (`_ = json.Unmarshal(...)`).",
"`cmd/serve.go` `devour_status` ignores errors from `LoadSourceState` and `EnsureIndexed` then dereferences `idxStats.Documents`, which can panic on nil when indexing fails.",
"`internal/server/server.go` exposes raw internal errors to clients (`Message: err.Error()`), while parse/invalid-request errors are normalized strings; HTTP transport always emits 400 for any RPC error, collapsing error classes.",
"`internal/ai/openai.go` does not check HTTP status before JSON decode, unlike scraper fetchers in `internal/scraper/external/*.go` and `internal/scraper/openapi.go` that explicitly gate on status codes.",
"`internal/search/engine.go` and `internal/scraper/openapi.go` mix wrapped and passthrough errors in adjacent paths, producing uneven context for operators."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "rpc_decode_and_response_contract_drift",
"summary": "RPC methods use inconsistent decode and error-response contracts",
"related_files": [
"cmd/serve.go",
"internal/server/server.go"
],
"evidence": [
"`cmd/serve.go` ignores JSON decode errors in `devour_query`/`devour_sync` but returns decode errors in `devour_scrape`/`devour_ask`.",
"`internal/server/server.go` returns raw `err.Error()` in RPC payloads and maps all RPC errors to HTTP 400 in `writeRPC`."
],
"suggestion": "Define one RPC error policy: always validate/decode params the same way, map known classes to stable RPC codes/messages, and map transport HTTP statuses by error class (client input vs internal failure).",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "serve_status_swallows_errors_then_dereferences_nil",
"summary": "Status handler ignores errors and can panic from nil stats",
"related_files": [
"cmd/serve.go",
"internal/search/engine.go"
],
"evidence": [
"`cmd/serve.go` uses `state, _ := projectstate.LoadSourceState(...)` and `idxStats, _ := engine.EnsureIndexed(ctx)` in `devour_status`.",
"The same block unconditionally reads `idxStats.Documents` and `idxStats.LastIndexedAt`, which is unsafe if `EnsureIndexed` returned an error."
],
"suggestion": "Handle both errors explicitly in `devour_status`; return structured partial-status with an error field or fail the method uniformly, but do not ignore and dereference.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "openai_http_error_path_not_normalized",
"summary": "OpenAI client lacks explicit HTTP status error handling",
"related_files": [
"internal/ai/openai.go",
"internal/scraper/openapi.go",
"internal/scraper/external/astrodocs.go"
],
"evidence": [
"`internal/ai/openai.go` decodes response bodies directly and only checks `embeddingResp.Error`/`chatResp.Error`; non-2xx responses without expected JSON become generic decode errors.",
"`internal/scraper/openapi.go` and external scrapers explicitly validate HTTP status before body parsing and return explicit HTTP status errors."
],
"suggestion": "Add explicit non-2xx handling in both OpenAI request paths: include status code, bounded response body excerpt, and endpoint context before JSON decode.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "mixed_wrapping_vs_passthrough_in_core_flows",
"summary": "Adjacent paths alternate between wrapped and raw error returns",
"related_files": [
"internal/search/engine.go",
"internal/scraper/openapi.go",
"internal/config/config.go"
],
"evidence": [
"`internal/search/engine.go` frequently returns raw errors (`return nil, err`) from filesystem/index operations.",
"`internal/scraper/openapi.go` similarly passes through request/file errors raw in `readSpec`, while other branches wrap with operation context.",
"`internal/config/config.go` demonstrates contextual wrapping style (`read config`, `parse config`), creating drift against less-informative paths."
],
"suggestion": "Adopt a package-level rule: wrap external boundary failures with operation context (read/write/parse/network) and preserve `%w`; apply consistently across search/openapi paths.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "scanner_pipeline_fail_open_is_inconsistent",
"summary": "Quality scan path mixes fail-open and fail-fast behaviors",
"related_files": [
"internal/quality/scanner.go",
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/plugins/go/analyzers/detectors.go"
],
"evidence": [
"`internal/quality/scanner.go` logs detector failures and continues, silently reducing coverage of reported findings.",
"`test_coverage.go` returns `(nil, nil)` for missing `go` tool or missing generated coverage file, while other detector failures return explicit errors.",
"`detectors.go` has parse/count paths that silently `continue` on per-file errors, further mixing behavior."
],
"suggestion": "Standardize detector error semantics with typed outcomes (hard error, soft-skip with reason, per-file skip count) and surface these in scan results so degraded scans are explicit.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
]
}
@@ -0,0 +1,161 @@
{
"batch": "Full Codebase Sweep",
"batch_index": 6,
"assessments": {
"cross_module_architecture": 72.0,
"error_consistency": 70.0,
"abstraction_fitness": 68.0,
"test_strategy": 64.0,
"design_coherence": 69.0
},
"dimension_notes": {
"cross_module_architecture": {
"evidence": [
"cmd/serve.go calls command handlers directly (runSync, scrapeOne) and mutates command-level globals (scrapeFormat/scrapeOutput/scrapeAllowEmpty and syncForce/syncRebuild/syncSource) before invoking them, coupling RPC transport to CLI flag state.",
"Source-type detection logic exists in both internal/scraper/scraper.go:92 (DetectSourceType) and cmd/scrape.go:314 (detectSourceType), creating boundary drift for core classification behavior."
],
"impact_scope": "subsystem",
"fix_scope": "architectural_change",
"confidence": "high"
},
"error_consistency": {
"evidence": [
"cmd/serve.go suppresses parse and subsystem errors via `_ = json.Unmarshal(...)` and `state, _ := projectstate.LoadSourceState(...)` / `idxStats, _ := engine.EnsureIndexed(...)`, while sibling paths return wrapped errors.",
"Startup failure behavior differs across modules: cmd/root.go exits process with os.Exit(1), while internal/quality/plugins/go/plugin.go init() panics on registration failure."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
},
"abstraction_fitness": {
"evidence": [
"Most external scraper implementations repeat near-identical transport/change-detection scaffolding (`fetchPage`, `DetectChanges`, `generateHash`) across files such as internal/scraper/external/reactdocs.go, tsdocs.go, godocs.go, rustdocs.go, and cloudflaredocs.go.",
"This repeated wrapper structure adds maintenance indirection without policy variance (same HTTP GET + user-agent + status check + body read flow)."
],
"impact_scope": "subsystem",
"fix_scope": "architectural_change",
"confidence": "high",
"sub_axes": {
"abstraction_leverage": 61.0,
"indirection_cost": 43.0,
"interface_honesty": 74.0
}
},
"test_strategy": {
"evidence": [
"High-impact command flows lack direct tests: cmd/serve.go, cmd/sync.go, cmd/query.go, cmd/push.go, cmd/verify.go have no file-level tests while they orchestrate indexing/scraping/status behavior.",
"Most external scrapers are untested at integration unit level (e.g., internal/scraper/external/{godocs,rustdocs,reactdocs,cloudflaredocs,nuxtdocs,...}.go) even though they include custom parsing-to-document mapping and network error handling."
],
"impact_scope": "codebase",
"fix_scope": "multi_file_refactor",
"confidence": "high"
},
"design_coherence": {
"evidence": [
"cmd/serve.go:71-210 centralizes multiple unrelated workflows (query/status/scrape/ask/sync) in one switch, with request parsing, domain orchestration, and response formatting mixed in a single function.",
"The same function also performs cross-command mutable state choreography (temporarily overriding scrape/sync globals), combining transport logic with command execution mechanics."
],
"impact_scope": "module",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "cross_module_architecture",
"identifier": "rpc_cli_global_state_coupling",
"summary": "RPC handlers mutate CLI global flags to execute workflows across command boundaries.",
"related_files": [
"cmd/serve.go",
"cmd/scrape.go",
"cmd/sync.go"
],
"evidence": [
"cmd/serve.go sets scrapeFormat/scrapeOutput/scrapeAllowEmpty before calling scrapeOne and restores afterward.",
"cmd/serve.go sets syncForce/syncRebuild/syncSource before calling runSync and restores afterward."
],
"suggestion": "Extract scrape/sync/query use-cases into stateless service functions (input structs + return structs), call them from both Cobra commands and RPC handlers, and remove shared mutable command globals from runtime execution paths.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "silent_error_drops_in_rpc_paths",
"summary": "Several RPC paths ignore parse/index/state errors, producing inconsistent failure contracts.",
"related_files": [
"cmd/serve.go",
"internal/search/engine.go",
"internal/projectstate/state.go"
],
"evidence": [
"cmd/serve.go ignores JSON unmarshal errors for devour_query/devour_sync (`_ = json.Unmarshal(...)`).",
"cmd/serve.go ignores errors from LoadSourceState and EnsureIndexed, yet reads fields from returned values.",
"Other command paths generally propagate wrapped errors with `%w`."
],
"suggestion": "Treat request decode, source-state load, and index-check failures uniformly: return explicit wrapped errors from each branch and avoid underscore-discarded errors in RPC handlers.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "single_edit"
},
{
"dimension": "abstraction_fitness",
"identifier": "external_scraper_transport_duplication",
"summary": "External scrapers duplicate the same HTTP fetch/hash/change-detection boilerplate.",
"related_files": [
"internal/scraper/external/reactdocs.go",
"internal/scraper/external/tsdocs.go",
"internal/scraper/external/godocs.go",
"internal/scraper/external/rustdocs.go",
"internal/scraper/external/cloudflaredocs.go"
],
"evidence": [
"Each scraper reimplements equivalent `fetchPage` with identical request/header/response-body flow.",
"Each scraper reimplements nearly identical `DetectChanges` and `generateHash` logic."
],
"suggestion": "Introduce a shared base helper (e.g., `fetchPage`, `contentHash`, `detectChanges`) in internal/scraper/external/types.go or a dedicated internal transport module, then keep per-scraper files focused on parser-to-document mapping.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "test_strategy",
"identifier": "missing_tests_on_orchestration_and_adapters",
"summary": "Critical orchestration commands and most external adapters have no direct tests.",
"related_files": [
"cmd/serve.go",
"cmd/sync.go",
"cmd/query.go",
"internal/scraper/external/godocs.go",
"internal/scraper/external/reactdocs.go"
],
"evidence": [
"No *_test.go peers for cmd/serve.go, cmd/sync.go, cmd/query.go despite high-risk orchestration behavior.",
"Only one external scraper has direct tests while many adapter implementations contain custom mapping and error-path logic."
],
"suggestion": "Add table-driven tests for RPC method branches and error propagation in cmd/serve.go, plus httptest-based adapter contract tests covering fetch failures, parser errors, and document mapping for each external scraper family.",
"confidence": "high",
"impact_scope": "codebase",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "design_coherence",
"identifier": "serve_handler_multi_responsibility_switch",
"summary": "Single handler function mixes transport, parsing, orchestration, and mutable state management.",
"related_files": [
"cmd/serve.go",
"cmd/scrape.go",
"cmd/sync.go",
"cmd/query.go"
],
"evidence": [
"handleServeMethod contains method routing plus per-method request schemas, domain calls, and response shaping in one body.",
"The function coordinates temporary mutation of command globals to reuse CLI code paths."
],
"suggestion": "Split each RPC method into dedicated handler functions (e.g., handleQueryRPC, handleScrapeRPC, handleSyncRPC) that depend on explicit service interfaces instead of command globals.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,85 @@
{
"assessments": {
"error_consistency": 56.9
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"Quality analyzers mix hard failures and silent skips: `TestCoverageDetector.Detect` returns `nil, nil` when `go` is missing and when coverage file is still absent (`internal/quality/plugins/go/analyzers/test_coverage.go:38-41,50-52`), while other paths return wrapped errors.",
"Multiple detector paths suppress parse/read failures instead of propagating context (`internal/quality/plugins/go/analyzers/detectors.go:44-47,111-114`).",
"Scraper modules differ on partial failure handling: `LocalScraper.Scrape` drops document conversion errors (`internal/scraper/local.go:90-93`), while `WebScraper`/`LocalSearchScraper` accumulate and return aggregated scrape errors (`internal/scraper/web.go:257-261`, `internal/scraper/localsearch.go:141-145`).",
"HTTP error context is uneven: external scrapers return bare `HTTP <code>` (`internal/scraper/external/astrodocs.go:86-88`) while local search includes status plus response body excerpt (`internal/scraper/localsearch.go:212-217`).",
"Plugin startup uses process-terminating panic on registration failure (`internal/quality/plugins/go/plugin.go:360-363`) instead of the recoverable error style used elsewhere in scanner execution (`internal/quality/scanner.go:109-116`)."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "quality_detectors_silent_failure_paths",
"summary": "Quality detectors silently skip failures in some paths but fail loudly in others",
"related_files": [
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/plugins/go/analyzers/detectors.go"
],
"evidence": [
"`TestCoverageDetector.Detect` returns `nil, nil` when `go` is unavailable and when `coverage.out` is missing after test run, making tooling/environment failures indistinguishable from a clean run.",
"`LargeFileDetector.Detect` continues on `countLines` error and `GodStructDetector.analyzeFile` returns nil on parse error, suppressing scanner visibility into unreadable/unparseable files."
],
"suggestion": "Standardize detector contracts: return typed non-fatal diagnostics (or wrapped errors) for tool-missing/parse/read failures, and let scanner decide whether to downgrade to warnings instead of silently returning no findings.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "scraper_partial_failure_contract_drift",
"summary": "Scraper implementations disagree on whether per-item errors are surfaced or dropped",
"related_files": [
"internal/scraper/local.go",
"internal/scraper/web.go",
"internal/scraper/localsearch.go"
],
"evidence": [
"`LocalScraper.Scrape` ignores `fileToDocument` errors by returning nil in the walk callback and continues without recording failures.",
"`WebScraper` and `LocalSearchScraper` collect per-URL failures and return an explicit error when no documents are produced."
],
"suggestion": "Adopt one partial-failure policy across scrapers (for example: collect bounded per-item errors and return them when output is empty, optionally include warnings when output is partial). Implement this via a shared helper used by local/web/localsearch scrapers.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "http_error_context_inconsistent",
"summary": "HTTP failure messages vary from rich context to opaque status-only strings",
"related_files": [
"internal/scraper/external/astrodocs.go",
"internal/scraper/external/cloudflaredocs.go",
"internal/scraper/external/dockerdocs.go",
"internal/scraper/external/nuxtdocs.go",
"internal/scraper/localsearch.go"
],
"evidence": [
"External docs scrapers return generic `HTTP %d` without endpoint or response snippet, reducing traceability during failures.",
"Local search includes status code and trimmed response body in error messages, providing significantly better debugging context."
],
"suggestion": "Create a shared HTTP error formatter for scraper clients that includes URL host/path, status code, and a bounded response-body excerpt; update all external scraper fetchers to use it.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
}
],
"review_quality": {
"batch_count": 1,
"dimension_coverage": 1.0,
"evidence_density": 1.667,
"high_score_without_risk": 0,
"finding_pressure": 6.604,
"dimensions_with_findings": 1
}
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_101740.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/scanner.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
- desloppify/desloppify/desloppify/languages/csharp/deps/cli.py
- desloppify/desloppify/desloppify/languages/csharp/deps/fallback.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,78 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {
"error_consistency": 73.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"Quality analyzers mix hard failures and silent skips: `TestCoverageDetector.Detect` returns `nil, nil` when `go` is missing and when coverage file is still absent (`internal/quality/plugins/go/analyzers/test_coverage.go:38-41,50-52`), while other paths return wrapped errors.",
"Multiple detector paths suppress parse/read failures instead of propagating context (`internal/quality/plugins/go/analyzers/detectors.go:44-47,111-114`).",
"Scraper modules differ on partial failure handling: `LocalScraper.Scrape` drops document conversion errors (`internal/scraper/local.go:90-93`), while `WebScraper`/`LocalSearchScraper` accumulate and return aggregated scrape errors (`internal/scraper/web.go:257-261`, `internal/scraper/localsearch.go:141-145`).",
"HTTP error context is uneven: external scrapers return bare `HTTP <code>` (`internal/scraper/external/astrodocs.go:86-88`) while local search includes status plus response body excerpt (`internal/scraper/localsearch.go:212-217`).",
"Plugin startup uses process-terminating panic on registration failure (`internal/quality/plugins/go/plugin.go:360-363`) instead of the recoverable error style used elsewhere in scanner execution (`internal/quality/scanner.go:109-116`)."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "quality_detectors_silent_failure_paths",
"summary": "Quality detectors silently skip failures in some paths but fail loudly in others",
"related_files": [
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/plugins/go/analyzers/detectors.go"
],
"evidence": [
"`TestCoverageDetector.Detect` returns `nil, nil` when `go` is unavailable and when `coverage.out` is missing after test run, making tooling/environment failures indistinguishable from a clean run.",
"`LargeFileDetector.Detect` continues on `countLines` error and `GodStructDetector.analyzeFile` returns nil on parse error, suppressing scanner visibility into unreadable/unparseable files."
],
"suggestion": "Standardize detector contracts: return typed non-fatal diagnostics (or wrapped errors) for tool-missing/parse/read failures, and let scanner decide whether to downgrade to warnings instead of silently returning no findings.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "scraper_partial_failure_contract_drift",
"summary": "Scraper implementations disagree on whether per-item errors are surfaced or dropped",
"related_files": [
"internal/scraper/local.go",
"internal/scraper/web.go",
"internal/scraper/localsearch.go"
],
"evidence": [
"`LocalScraper.Scrape` ignores `fileToDocument` errors by returning nil in the walk callback and continues without recording failures.",
"`WebScraper` and `LocalSearchScraper` collect per-URL failures and return an explicit error when no documents are produced."
],
"suggestion": "Adopt one partial-failure policy across scrapers (for example: collect bounded per-item errors and return them when output is empty, optionally include warnings when output is partial). Implement this via a shared helper used by local/web/localsearch scrapers.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "http_error_context_inconsistent",
"summary": "HTTP failure messages vary from rich context to opaque status-only strings",
"related_files": [
"internal/scraper/external/astrodocs.go",
"internal/scraper/external/cloudflaredocs.go",
"internal/scraper/external/dockerdocs.go",
"internal/scraper/external/nuxtdocs.go",
"internal/scraper/localsearch.go"
],
"evidence": [
"External docs scrapers return generic `HTTP %d` without endpoint or response snippet, reducing traceability during failures.",
"Local search includes status code and trimmed response body in error messages, providing significantly better debugging context."
],
"suggestion": "Create a shared HTTP error formatter for scraper clients that includes URL host/path, status code, and a bounded response-body excerpt; update all external scraper fetchers to use it.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,117 @@
{
"assessments": {
"error_consistency": 50.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"cmd/scrape.go uses `wrapErr` for YAML fallback parsing but returns `%w` with outer `err` (`return fmt.Errorf(\"parse sources file: %w\", err)`), which can misreport or drop the actual parse failure.",
"cmd/ask.go drops `localErr` (`localRanked = nil`) and later reports only live fetch errors, so a failed local retrieval path is silently omitted from the returned error contract.",
"internal/search/engine.go frequently returns raw errors from filesystem/JSON boundaries (`return nil, err`) while nearby modules like internal/indexer/indexer.go and cmd/serve.go consistently wrap with operation context.",
"internal/quality/plugins/go/analyzers/test_coverage.go returns `nil, nil` for missing `go` tool and missing `coverage.out`, but returns hard errors for other failures, creating mixed silent-skip vs fail-fast behavior in one detector family.",
"internal/quality/plugins/go/plugin.go panics in package init on registration failure, while command entrypoints use returned errors + controlled process exit (cmd/root.go), producing inconsistent failure modes across startup paths."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "wrong_error_wrapped_in_sources_fallback_parse",
"summary": "Fallback YAML parse wraps the wrong error variable, losing true parse context.",
"related_files": [
"cmd/scrape.go",
"internal/config/config.go"
],
"evidence": [
"cmd/scrape.go:153-155 checks `wrapErr` but returns `%w` with `err` from a different scope.",
"internal/config/config.go consistently wraps the current failing error with `%w` at parse/read boundaries, showing intended local convention."
],
"suggestion": "In cmd/scrape.go, change the return to `fmt.Errorf(\"parse sources file: %w\", wrapErr)` so the emitted error always preserves the actual fallback parse failure.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "local_ask_retrieval_error_is_silently_dropped",
"summary": "Local retrieval failures are discarded, so final errors hide one failing path.",
"related_files": [
"cmd/ask.go",
"cmd/serve.go"
],
"evidence": [
"cmd/ask.go:122-125 sets `localRanked = nil` on `localErr` and does not append/report that error.",
"cmd/ask.go:145-147 returns only `fetchErrors` for failure messaging, excluding local retrieval failure cause.",
"cmd/serve.go wraps and propagates lower-level errors with operation context (`run devour_ask search: %w`), showing a stricter error propagation pattern at adjacent boundary code."
],
"suggestion": "Capture `localErr` into the same error aggregation path (or return immediately with context) so both local and live retrieval failures are visible to callers.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "search_engine_drops_operation_context_on_io_errors",
"summary": "Search engine returns raw IO/JSON errors without operation context at key boundaries.",
"related_files": [
"internal/search/engine.go",
"internal/indexer/indexer.go"
],
"evidence": [
"internal/search/engine.go returns bare errors at several boundaries (e.g., MkdirAll/listDocFiles/os.ReadFile/json.Unmarshal paths).",
"internal/indexer/indexer.go wraps errors with explicit operation strings (`failed to generate embeddings`, `failed to add to vector store`), improving traceability."
],
"suggestion": "Wrap engine boundary errors with operation-specific context (`fmt.Errorf(\"ensure index metadata: %w\", err)`, etc.) consistently across Rebuild/EnsureIndexed/Search.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "test_coverage_detector_mixes_silent_skip_and_hard_failure",
"summary": "Coverage detector silently skips some environment failures but fails hard on others.",
"related_files": [
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/scanner.go"
],
"evidence": [
"internal/quality/plugins/go/analyzers/test_coverage.go:39-41 returns `nil, nil` if `go` is unavailable; lines 50-51 also return `nil, nil` when profile is missing.",
"The same detector returns hard errors for command execution failures (`failed to run test coverage`) and parse failures, yielding mixed failure contracts.",
"internal/quality/scanner.go aggregates detector errors, so silent `nil,nil` prevents scanner-level visibility for some failure modes."
],
"suggestion": "Standardize detector contract: either return explicit typed 'skipped' metadata/finding for non-actionable environment gaps, or return wrapped errors consistently so scanner can report them predictably.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "plugin_registration_uses_panic_while_cli_paths_return_errors",
"summary": "Plugin init panics on registration failure instead of using returned error flow.",
"related_files": [
"internal/quality/plugins/go/plugin.go",
"cmd/root.go"
],
"evidence": [
"internal/quality/plugins/go/plugin.go:360-363 panics in `init()` when registration fails.",
"cmd/root.go:41-45 follows controlled error propagation (`Execute` prints error and exits), indicating a different process-level failure strategy."
],
"suggestion": "Replace panic-based registration with explicit initialization returning errors (or a centralized startup validation step) so failures follow the same surfaced error path as other startup errors.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
],
"review_quality": {
"batch_count": 1,
"dimension_coverage": 1.0,
"evidence_density": 1.0,
"high_score_without_risk": 0,
"finding_pressure": 12.12,
"dimensions_with_findings": 1
}
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_102123.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/scanner.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
- desloppify/desloppify/desloppify/languages/csharp/deps/cli.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,110 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {
"error_consistency": 74.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"cmd/scrape.go uses `wrapErr` for YAML fallback parsing but returns `%w` with outer `err` (`return fmt.Errorf(\"parse sources file: %w\", err)`), which can misreport or drop the actual parse failure.",
"cmd/ask.go drops `localErr` (`localRanked = nil`) and later reports only live fetch errors, so a failed local retrieval path is silently omitted from the returned error contract.",
"internal/search/engine.go frequently returns raw errors from filesystem/JSON boundaries (`return nil, err`) while nearby modules like internal/indexer/indexer.go and cmd/serve.go consistently wrap with operation context.",
"internal/quality/plugins/go/analyzers/test_coverage.go returns `nil, nil` for missing `go` tool and missing `coverage.out`, but returns hard errors for other failures, creating mixed silent-skip vs fail-fast behavior in one detector family.",
"internal/quality/plugins/go/plugin.go panics in package init on registration failure, while command entrypoints use returned errors + controlled process exit (cmd/root.go), producing inconsistent failure modes across startup paths."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "wrong_error_wrapped_in_sources_fallback_parse",
"summary": "Fallback YAML parse wraps the wrong error variable, losing true parse context.",
"related_files": [
"cmd/scrape.go",
"internal/config/config.go"
],
"evidence": [
"cmd/scrape.go:153-155 checks `wrapErr` but returns `%w` with `err` from a different scope.",
"internal/config/config.go consistently wraps the current failing error with `%w` at parse/read boundaries, showing intended local convention."
],
"suggestion": "In cmd/scrape.go, change the return to `fmt.Errorf(\"parse sources file: %w\", wrapErr)` so the emitted error always preserves the actual fallback parse failure.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "local_ask_retrieval_error_is_silently_dropped",
"summary": "Local retrieval failures are discarded, so final errors hide one failing path.",
"related_files": [
"cmd/ask.go",
"cmd/serve.go"
],
"evidence": [
"cmd/ask.go:122-125 sets `localRanked = nil` on `localErr` and does not append/report that error.",
"cmd/ask.go:145-147 returns only `fetchErrors` for failure messaging, excluding local retrieval failure cause.",
"cmd/serve.go wraps and propagates lower-level errors with operation context (`run devour_ask search: %w`), showing a stricter error propagation pattern at adjacent boundary code."
],
"suggestion": "Capture `localErr` into the same error aggregation path (or return immediately with context) so both local and live retrieval failures are visible to callers.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "search_engine_drops_operation_context_on_io_errors",
"summary": "Search engine returns raw IO/JSON errors without operation context at key boundaries.",
"related_files": [
"internal/search/engine.go",
"internal/indexer/indexer.go"
],
"evidence": [
"internal/search/engine.go returns bare errors at several boundaries (e.g., MkdirAll/listDocFiles/os.ReadFile/json.Unmarshal paths).",
"internal/indexer/indexer.go wraps errors with explicit operation strings (`failed to generate embeddings`, `failed to add to vector store`), improving traceability."
],
"suggestion": "Wrap engine boundary errors with operation-specific context (`fmt.Errorf(\"ensure index metadata: %w\", err)`, etc.) consistently across Rebuild/EnsureIndexed/Search.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "test_coverage_detector_mixes_silent_skip_and_hard_failure",
"summary": "Coverage detector silently skips some environment failures but fails hard on others.",
"related_files": [
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/scanner.go"
],
"evidence": [
"internal/quality/plugins/go/analyzers/test_coverage.go:39-41 returns `nil, nil` if `go` is unavailable; lines 50-51 also return `nil, nil` when profile is missing.",
"The same detector returns hard errors for command execution failures (`failed to run test coverage`) and parse failures, yielding mixed failure contracts.",
"internal/quality/scanner.go aggregates detector errors, so silent `nil,nil` prevents scanner-level visibility for some failure modes."
],
"suggestion": "Standardize detector contract: either return explicit typed 'skipped' metadata/finding for non-actionable environment gaps, or return wrapped errors consistently so scanner can report them predictably.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "plugin_registration_uses_panic_while_cli_paths_return_errors",
"summary": "Plugin init panics on registration failure instead of using returned error flow.",
"related_files": [
"internal/quality/plugins/go/plugin.go",
"cmd/root.go"
],
"evidence": [
"internal/quality/plugins/go/plugin.go:360-363 panics in `init()` when registration fails.",
"cmd/root.go:41-45 follows controlled error propagation (`Execute` prints error and exits), indicating a different process-level failure strategy."
],
"suggestion": "Replace panic-based registration with explicit initialization returning errors (or a centralized startup validation step) so failures follow the same surfaced error path as other startup errors.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
]
}
@@ -0,0 +1,106 @@
{
"assessments": {
"error_consistency": 47.2
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"Multiple analyzers silently suppress parse/read failures instead of returning contextual errors (internal/quality/plugins/go/analyzers/detectors.go:112-114, 240-245; internal/quality/plugins/go/analyzers/test_coverage.go:211-214).",
"Scraper entrypoints mix contextual wrapping and raw passthrough in similar boundary operations (internal/scraper/openapi.go:43-50 returns raw err; internal/scraper/github.go:29-37 returns raw err; internal/scraper/external/nuxtdocs.go:39-45 wraps with %w).",
"Several paths collapse structured errors into joined strings, reducing traceability and unwrapping (internal/scraper/web.go:259; internal/scraper/localsearch.go:143; cmd/ask.go:320,340).",
"Some runtime errors are dropped and processing continues without durable signal (internal/server/server.go:213 ignores encode error; internal/scraper/local.go:90-93 drops file parse errors; internal/search/engine.go:134-137 skips parse failures)."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "silent_parse_failures_in_analyzers",
"summary": "Analyzer parse/read errors are silently converted to no findings.",
"related_files": [
"internal/quality/plugins/go/analyzers/detectors.go",
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/scanner.go"
],
"evidence": [
"GodStructDetector.analyzeFile returns nil on parser.ParseFile error (detectors.go:112-114).",
"DebugLogDetector.analyzeFile also returns nil on parse failure (detectors.go:240-241).",
"UntestedFuncDetector returns (nil, nil) when coverage.out read fails (test_coverage.go:211-214), making failure indistinguishable from success.",
"Scanner loop logs detector failure and continues (scanner.go:77-79), so detector internals that swallow errors become invisible."
],
"suggestion": "Standardize detector contract: return wrapped errors for parse/read failures (`fmt.Errorf(\"parse %s: %w\", path, err)`) and let scanner classify them as detector execution errors instead of empty findings.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "mixed_error_wrapping_at_scraper_boundaries",
"summary": "Scrapers mix raw error passthrough with contextual wrapping.",
"related_files": [
"internal/scraper/openapi.go",
"internal/scraper/github.go",
"internal/scraper/external/nuxtdocs.go"
],
"evidence": [
"OpenAPI scraper returns raw `err` from readSpec/parseOpenAPISpec (openapi.go:43-50).",
"GitHub scraper returns raw resolveRepo/MkdirTemp errors (github.go:29-37).",
"Nuxt external scraper wraps fetch/parse failures with operation context and `%w` (nuxtdocs.go:39-45)."
],
"suggestion": "Adopt one boundary rule for scraper packages: every external I/O or parse failure should be wrapped with operation context and `%w` before returning.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "string_aggregated_errors_lose_causal_chain",
"summary": "Aggregated scrape failures are flattened to strings, losing unwrap support.",
"related_files": [
"internal/scraper/web.go",
"internal/scraper/localsearch.go",
"cmd/ask.go"
],
"evidence": [
"Web scraper returns `fmt.Errorf(\"web scrape failed: %s\", strings.Join(scrapeErrors, \"; \"))` (web.go:259).",
"Local search scraper similarly returns joined string error text (localsearch.go:143).",
"ask command accumulates URL/term errors as formatted strings (ask.go:320,340), not typed/wrapped errors."
],
"suggestion": "Store and return structured error sets (e.g., `[]error` wrapped via a multi-error type) and only stringify at CLI presentation boundaries.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "error_drop_and_continue_without_signal",
"summary": "Some failures are intentionally ignored with no traceable signal.",
"related_files": [
"internal/server/server.go",
"internal/scraper/local.go",
"internal/search/engine.go"
],
"evidence": [
"Server ignores encode error when writing parse-error RPC response (`_ = out.Encode(...)`) (server.go:213).",
"Local scraper drops file conversion errors by returning nil in walk callback (local.go:90-93).",
"Search engine skips parseDocFile errors with `continue` and no reporting (engine.go:134-137)."
],
"suggestion": "When continuing after non-fatal errors, emit a consistent warning/collector path (counter + sampled log + optional returned diagnostics) so operators can detect degraded runs.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
}
],
"review_quality": {
"batch_count": 1,
"dimension_coverage": 1.0,
"evidence_density": 1.0,
"high_score_without_risk": 0,
"finding_pressure": 9.74,
"dimensions_with_findings": 1
}
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_103046.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/scanner.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
- .desloppify/subagents/runs/20260224_101740/prompts/batch-1.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,99 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {
"error_consistency": 71.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"Multiple analyzers silently suppress parse/read failures instead of returning contextual errors (internal/quality/plugins/go/analyzers/detectors.go:112-114, 240-245; internal/quality/plugins/go/analyzers/test_coverage.go:211-214).",
"Scraper entrypoints mix contextual wrapping and raw passthrough in similar boundary operations (internal/scraper/openapi.go:43-50 returns raw err; internal/scraper/github.go:29-37 returns raw err; internal/scraper/external/nuxtdocs.go:39-45 wraps with %w).",
"Several paths collapse structured errors into joined strings, reducing traceability and unwrapping (internal/scraper/web.go:259; internal/scraper/localsearch.go:143; cmd/ask.go:320,340).",
"Some runtime errors are dropped and processing continues without durable signal (internal/server/server.go:213 ignores encode error; internal/scraper/local.go:90-93 drops file parse errors; internal/search/engine.go:134-137 skips parse failures)."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "silent_parse_failures_in_analyzers",
"summary": "Analyzer parse/read errors are silently converted to no findings.",
"related_files": [
"internal/quality/plugins/go/analyzers/detectors.go",
"internal/quality/plugins/go/analyzers/test_coverage.go",
"internal/quality/scanner.go"
],
"evidence": [
"GodStructDetector.analyzeFile returns nil on parser.ParseFile error (detectors.go:112-114).",
"DebugLogDetector.analyzeFile also returns nil on parse failure (detectors.go:240-241).",
"UntestedFuncDetector returns (nil, nil) when coverage.out read fails (test_coverage.go:211-214), making failure indistinguishable from success.",
"Scanner loop logs detector failure and continues (scanner.go:77-79), so detector internals that swallow errors become invisible."
],
"suggestion": "Standardize detector contract: return wrapped errors for parse/read failures (`fmt.Errorf(\"parse %s: %w\", path, err)`) and let scanner classify them as detector execution errors instead of empty findings.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "mixed_error_wrapping_at_scraper_boundaries",
"summary": "Scrapers mix raw error passthrough with contextual wrapping.",
"related_files": [
"internal/scraper/openapi.go",
"internal/scraper/github.go",
"internal/scraper/external/nuxtdocs.go"
],
"evidence": [
"OpenAPI scraper returns raw `err` from readSpec/parseOpenAPISpec (openapi.go:43-50).",
"GitHub scraper returns raw resolveRepo/MkdirTemp errors (github.go:29-37).",
"Nuxt external scraper wraps fetch/parse failures with operation context and `%w` (nuxtdocs.go:39-45)."
],
"suggestion": "Adopt one boundary rule for scraper packages: every external I/O or parse failure should be wrapped with operation context and `%w` before returning.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "string_aggregated_errors_lose_causal_chain",
"summary": "Aggregated scrape failures are flattened to strings, losing unwrap support.",
"related_files": [
"internal/scraper/web.go",
"internal/scraper/localsearch.go",
"cmd/ask.go"
],
"evidence": [
"Web scraper returns `fmt.Errorf(\"web scrape failed: %s\", strings.Join(scrapeErrors, \"; \"))` (web.go:259).",
"Local search scraper similarly returns joined string error text (localsearch.go:143).",
"ask command accumulates URL/term errors as formatted strings (ask.go:320,340), not typed/wrapped errors."
],
"suggestion": "Store and return structured error sets (e.g., `[]error` wrapped via a multi-error type) and only stringify at CLI presentation boundaries.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "error_drop_and_continue_without_signal",
"summary": "Some failures are intentionally ignored with no traceable signal.",
"related_files": [
"internal/server/server.go",
"internal/scraper/local.go",
"internal/search/engine.go"
],
"evidence": [
"Server ignores encode error when writing parse-error RPC response (`_ = out.Encode(...)`) (server.go:213).",
"Local scraper drops file conversion errors by returning nil in walk callback (local.go:90-93).",
"Search engine skips parseDocFile errors with `continue` and no reporting (engine.go:134-137)."
],
"suggestion": "When continuing after non-fatal errors, emit a consistent warning/collector path (counter + sampled log + optional returned diagnostics) so operators can detect degraded runs.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,103 @@
{
"assessments": {
"error_consistency": 52.1
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"HTTP RPC path collapses response write failures to generic `http.Error(..., \"rpc write error\", ...)`, while stdio path returns wrapped encode errors (`encode parse-error response: %w`) in the same server module.",
"Batch scrape aggregates per-source failures but returns only `one or more sources failed`, while other command paths return joined/wrapped causes (`errors.Join(...)` in ask flow).",
"Quality scan loop logs detector failures and continues, while detector implementations mix per-file silent skips (`continue` on file read/count errors) and fail-fast returns for parse errors, yielding inconsistent failure visibility.",
"Ask fallback persistence/reindex errors are explicitly ignored (`_, _ = storage.SaveDocuments`, `_, _ = engine.Rebuild`) whereas push/scrape treat analogous save/reindex failures as returned errors."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "rpc_transport_error_detail_divergence",
"summary": "HTTP and stdio RPC transports expose write/encode failures with different fidelity.",
"related_files": [
"internal/server/server.go",
"cmd/serve.go"
],
"evidence": [
"In `internal/server/server.go`, HTTP `/rpc` writes generic `rpc write error` on writeRPC failure (lines ~132-140), dropping underlying encode context.",
"In the same file, stdio transport returns wrapped encode errors (line ~218) and raw encode failures (line ~224), preserving actionable context.",
"`cmd/serve.go` uses one server abstraction for both modes, so callers see transport-dependent error behavior for equivalent failure classes."
],
"suggestion": "Unify transport error contract: introduce a shared helper that classifies encode/write failures and records structured context (operation, transport, cause). Keep client-facing RPC payload stable, but log/return wrapped internal causes consistently for both HTTP and stdio.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "batch_scrape_error_cause_loss",
"summary": "Batch scrape returns a generic terminal error after printing detailed source failures.",
"related_files": [
"cmd/scrape.go",
"cmd/ask.go"
],
"evidence": [
"`cmd/scrape.go` records per-source failures, prints each error, then returns `one or more sources failed` (lines ~187-207), losing machine-readable causes.",
"`cmd/ask.go` returns joined upstream causes when retrieval fails (`errors.Join(fetchErrors...)`, lines ~149-154), preserving aggregate failure detail.",
"This creates inconsistent caller behavior across commands: some flows expose causal chains, others require scraping stdout logs."
],
"suggestion": "Accumulate per-source errors in `scrapeFromConfig` and return `fmt.Errorf(\"...: %w\", errors.Join(errs...))` while still printing the summary; this keeps CLI UX and provides consistent programmatic error chains.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "quality_scan_detector_failure_semantics_mixed",
"summary": "Quality scanning mixes swallowed detector failures with fail-fast detector behavior.",
"related_files": [
"internal/quality/scanner.go",
"internal/quality/plugins/go/analyzers/detectors.go",
"internal/quality/plugins/go/analyzers/advanced.go"
],
"evidence": [
"`internal/quality/scanner.go` logs detector errors and continues (lines ~76-79), so scan succeeds even when detectors fail.",
"`detectors.go` has inconsistent per-file policy: `LargeFileDetector` silently `continue`s on count errors (lines ~44-47), while `GodStructDetector` returns wrapped errors and aborts detector run (lines ~102-105).",
"This produces non-uniform failure propagation: some analysis gaps are silent, some are surfaced, and scanner-level behavior masks both as successful scans."
],
"suggestion": "Define a uniform detector error policy (e.g., collect per-file errors + thresholded hard-fail) and enforce it via shared helper APIs so scanner output includes a structured `partial_failures` section instead of ad-hoc continue/abort choices.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "ask_fallback_ignores_persistence_errors",
"summary": "Ask fallback suppresses save/reindex failures that analogous command flows propagate.",
"related_files": [
"cmd/ask.go",
"cmd/push.go",
"cmd/scrape.go"
],
"evidence": [
"`cmd/ask.go` ignores persistence/index maintenance errors with blank identifier assignments (lines ~369-377).",
"`cmd/push.go` and `cmd/scrape.go` both return save/reindex failures (`save docs failed`, `reindex failed`, `reindex after scrape...`) instead of suppressing them.",
"Equivalent storage/index boundary failures therefore produce different observability depending on command path."
],
"suggestion": "Handle ask fallback persistence/reindex errors explicitly: either return them when they invalidate guarantees, or attach them to response metadata/logged warnings with a consistent typed error category used across commands.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
],
"review_quality": {
"batch_count": 1,
"dimension_coverage": 1.0,
"evidence_density": 1.0,
"high_score_without_risk": 0,
"finding_pressure": 8.88,
"dimensions_with_findings": 1
}
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_104658.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/quality/scanner.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
- .desloppify/subagents/runs/20260224_101740/prompts/batch-1.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,96 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {
"error_consistency": 74.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"HTTP RPC path collapses response write failures to generic `http.Error(..., \"rpc write error\", ...)`, while stdio path returns wrapped encode errors (`encode parse-error response: %w`) in the same server module.",
"Batch scrape aggregates per-source failures but returns only `one or more sources failed`, while other command paths return joined/wrapped causes (`errors.Join(...)` in ask flow).",
"Quality scan loop logs detector failures and continues, while detector implementations mix per-file silent skips (`continue` on file read/count errors) and fail-fast returns for parse errors, yielding inconsistent failure visibility.",
"Ask fallback persistence/reindex errors are explicitly ignored (`_, _ = storage.SaveDocuments`, `_, _ = engine.Rebuild`) whereas push/scrape treat analogous save/reindex failures as returned errors."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "rpc_transport_error_detail_divergence",
"summary": "HTTP and stdio RPC transports expose write/encode failures with different fidelity.",
"related_files": [
"internal/server/server.go",
"cmd/serve.go"
],
"evidence": [
"In `internal/server/server.go`, HTTP `/rpc` writes generic `rpc write error` on writeRPC failure (lines ~132-140), dropping underlying encode context.",
"In the same file, stdio transport returns wrapped encode errors (line ~218) and raw encode failures (line ~224), preserving actionable context.",
"`cmd/serve.go` uses one server abstraction for both modes, so callers see transport-dependent error behavior for equivalent failure classes."
],
"suggestion": "Unify transport error contract: introduce a shared helper that classifies encode/write failures and records structured context (operation, transport, cause). Keep client-facing RPC payload stable, but log/return wrapped internal causes consistently for both HTTP and stdio.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "batch_scrape_error_cause_loss",
"summary": "Batch scrape returns a generic terminal error after printing detailed source failures.",
"related_files": [
"cmd/scrape.go",
"cmd/ask.go"
],
"evidence": [
"`cmd/scrape.go` records per-source failures, prints each error, then returns `one or more sources failed` (lines ~187-207), losing machine-readable causes.",
"`cmd/ask.go` returns joined upstream causes when retrieval fails (`errors.Join(fetchErrors...)`, lines ~149-154), preserving aggregate failure detail.",
"This creates inconsistent caller behavior across commands: some flows expose causal chains, others require scraping stdout logs."
],
"suggestion": "Accumulate per-source errors in `scrapeFromConfig` and return `fmt.Errorf(\"...: %w\", errors.Join(errs...))` while still printing the summary; this keeps CLI UX and provides consistent programmatic error chains.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "single_edit"
},
{
"dimension": "error_consistency",
"identifier": "quality_scan_detector_failure_semantics_mixed",
"summary": "Quality scanning mixes swallowed detector failures with fail-fast detector behavior.",
"related_files": [
"internal/quality/scanner.go",
"internal/quality/plugins/go/analyzers/detectors.go",
"internal/quality/plugins/go/analyzers/advanced.go"
],
"evidence": [
"`internal/quality/scanner.go` logs detector errors and continues (lines ~76-79), so scan succeeds even when detectors fail.",
"`detectors.go` has inconsistent per-file policy: `LargeFileDetector` silently `continue`s on count errors (lines ~44-47), while `GodStructDetector` returns wrapped errors and aborts detector run (lines ~102-105).",
"This produces non-uniform failure propagation: some analysis gaps are silent, some are surfaced, and scanner-level behavior masks both as successful scans."
],
"suggestion": "Define a uniform detector error policy (e.g., collect per-file errors + thresholded hard-fail) and enforce it via shared helper APIs so scanner output includes a structured `partial_failures` section instead of ad-hoc continue/abort choices.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
},
{
"dimension": "error_consistency",
"identifier": "ask_fallback_ignores_persistence_errors",
"summary": "Ask fallback suppresses save/reindex failures that analogous command flows propagate.",
"related_files": [
"cmd/ask.go",
"cmd/push.go",
"cmd/scrape.go"
],
"evidence": [
"`cmd/ask.go` ignores persistence/index maintenance errors with blank identifier assignments (lines ~369-377).",
"`cmd/push.go` and `cmd/scrape.go` both return save/reindex failures (`save docs failed`, `reindex failed`, `reindex after scrape...`) instead of suppressing them.",
"Equivalent storage/index boundary failures therefore produce different observability depending on command path."
],
"suggestion": "Handle ask fallback persistence/reindex errors explicitly: either return them when they invalidate guarantees, or attach them to response metadata/logged warnings with a consistent typed error category used across commands.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
}
]
}
@@ -0,0 +1,87 @@
{
"assessments": {
"error_consistency": 56.5
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"Error wrapping is inconsistent across neighboring call paths: `cmd/serve.go` wraps many failures with operation context (e.g. `run devour_query search`), while `runServe` and `handleServeMethod` still return raw errors directly from `loadAppConfig` (`cmd/serve.go:45`, `cmd/serve.go:75`).",
"Several lower-level functions return bare underlying errors without context (`internal/scraper/local.go:49`, `internal/scraper/local.go:57`, `internal/config/config.go:207`, `internal/config/config.go:364`) while sibling code in the same files uses contextual wrapping.",
"Error classification is string-based in `cmd/ask.go` (`strings.Contains(fetchErr.Error(), \"persistence warning:\")` at line 191), making behavior dependent on message text rather than typed/sentinel error contracts.",
"At least one path suppresses error details entirely (`countLOC` returns `0` on read failure in `internal/quality/plugins/go/plugin.go:353-356`), while other analyzer code returns explicit detector errors."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "mixed_wrapped_and_bare_error_propagation",
"summary": "Adjacent layers mix contextual wrapping and bare error returns",
"related_files": [
"cmd/serve.go",
"internal/config/config.go",
"internal/scraper/local.go",
"cmd/scrape.go"
],
"evidence": [
"`cmd/serve.go:87-109` wraps errors with operation labels, but `cmd/serve.go:45` and `cmd/serve.go:75` return raw `loadAppConfig` errors.",
"`internal/config/config.go:207` and `:364` return bare errors, while nearby code uses contextual `fmt.Errorf(...: %w)`.",
"`internal/scraper/local.go:49`, `:57`, `:104`, `:154`, `:164` return raw errors despite other branches adding context and joins."
],
"suggestion": "Adopt a single propagation rule for non-boundary layers: always wrap external/I-O failures with operation context (e.g., `fmt.Errorf(\"load config path: %w\", err)`). Apply this consistently in `cmd/serve.go`, `internal/config/config.go`, and `internal/scraper/local.go`.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "string_based_error_classification_in_ask_flow",
"summary": "Ask flow branches on error message text instead of typed categories",
"related_files": [
"cmd/ask.go",
"cmd/scrape.go",
"internal/server/server.go"
],
"evidence": [
"`cmd/ask.go:379` and `:384` encode category in message prefix (`\"persistence warning:\"`).",
"`cmd/ask.go:191` uses `strings.Contains(fetchErr.Error(), \"persistence warning:\")` for control flow, coupling behavior to mutable message strings.",
"Other modules treat errors opaquely and pass through generic text (`internal/server/server.go:256` returns `err.Error()` to RPC clients), amplifying inconsistency in downstream handling."
],
"suggestion": "Introduce typed/sentinel errors for recoverable warning classes (e.g., `var ErrPersistenceWarning`) and use `errors.Is`/`errors.As` in `cmd/ask.go` instead of string matching. Keep human-readable text separate from machine classification.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "analyzer_error_handling_policy_is_incoherent",
"summary": "Analyzer/plugin paths alternate between explicit, wrapped, and silent failures",
"related_files": [
"internal/quality/plugins/go/analyzers/detectors.go",
"internal/quality/plugins/go/analyzers/advanced.go",
"internal/quality/plugins/go/plugin.go"
],
"evidence": [
"`internal/quality/plugins/go/analyzers/detectors.go:46-60` converts read failures into synthetic findings (`detector_error`) rather than returning an error.",
"`internal/quality/plugins/go/analyzers/advanced.go:242` returns raw parse errors from helper methods without context.",
"`internal/quality/plugins/go/plugin.go:353-356` swallows file read failures in `countLOC` by returning `0`, losing failure provenance entirely."
],
"suggestion": "Define a consistent analyzer failure contract: either (a) report detector-execution issues as standardized `detector_error` findings with metadata, or (b) return wrapped errors; do not silently coerce errors to default values. Refactor `countLOC` to return `(int, error)` and propagate classification consistently.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
],
"review_quality": {
"batch_count": 1,
"dimension_coverage": 1.0,
"evidence_density": 1.333,
"high_score_without_risk": 0,
"finding_pressure": 7.244,
"dimensions_with_findings": 1
}
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_105325.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/scanner.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
- .desloppify/subagents/runs/20260224_101740/prompts/batch-1.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
- desloppify/desloppify/desloppify/languages/csharp/commands.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,80 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {
"error_consistency": 74.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"Error wrapping is inconsistent across neighboring call paths: `cmd/serve.go` wraps many failures with operation context (e.g. `run devour_query search`), while `runServe` and `handleServeMethod` still return raw errors directly from `loadAppConfig` (`cmd/serve.go:45`, `cmd/serve.go:75`).",
"Several lower-level functions return bare underlying errors without context (`internal/scraper/local.go:49`, `internal/scraper/local.go:57`, `internal/config/config.go:207`, `internal/config/config.go:364`) while sibling code in the same files uses contextual wrapping.",
"Error classification is string-based in `cmd/ask.go` (`strings.Contains(fetchErr.Error(), \"persistence warning:\")` at line 191), making behavior dependent on message text rather than typed/sentinel error contracts.",
"At least one path suppresses error details entirely (`countLOC` returns `0` on read failure in `internal/quality/plugins/go/plugin.go:353-356`), while other analyzer code returns explicit detector errors."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "mixed_wrapped_and_bare_error_propagation",
"summary": "Adjacent layers mix contextual wrapping and bare error returns",
"related_files": [
"cmd/serve.go",
"internal/config/config.go",
"internal/scraper/local.go",
"cmd/scrape.go"
],
"evidence": [
"`cmd/serve.go:87-109` wraps errors with operation labels, but `cmd/serve.go:45` and `cmd/serve.go:75` return raw `loadAppConfig` errors.",
"`internal/config/config.go:207` and `:364` return bare errors, while nearby code uses contextual `fmt.Errorf(...: %w)`.",
"`internal/scraper/local.go:49`, `:57`, `:104`, `:154`, `:164` return raw errors despite other branches adding context and joins."
],
"suggestion": "Adopt a single propagation rule for non-boundary layers: always wrap external/I-O failures with operation context (e.g., `fmt.Errorf(\"load config path: %w\", err)`). Apply this consistently in `cmd/serve.go`, `internal/config/config.go`, and `internal/scraper/local.go`.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "string_based_error_classification_in_ask_flow",
"summary": "Ask flow branches on error message text instead of typed categories",
"related_files": [
"cmd/ask.go",
"cmd/scrape.go",
"internal/server/server.go"
],
"evidence": [
"`cmd/ask.go:379` and `:384` encode category in message prefix (`\"persistence warning:\"`).",
"`cmd/ask.go:191` uses `strings.Contains(fetchErr.Error(), \"persistence warning:\")` for control flow, coupling behavior to mutable message strings.",
"Other modules treat errors opaquely and pass through generic text (`internal/server/server.go:256` returns `err.Error()` to RPC clients), amplifying inconsistency in downstream handling."
],
"suggestion": "Introduce typed/sentinel errors for recoverable warning classes (e.g., `var ErrPersistenceWarning`) and use `errors.Is`/`errors.As` in `cmd/ask.go` instead of string matching. Keep human-readable text separate from machine classification.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "analyzer_error_handling_policy_is_incoherent",
"summary": "Analyzer/plugin paths alternate between explicit, wrapped, and silent failures",
"related_files": [
"internal/quality/plugins/go/analyzers/detectors.go",
"internal/quality/plugins/go/analyzers/advanced.go",
"internal/quality/plugins/go/plugin.go"
],
"evidence": [
"`internal/quality/plugins/go/analyzers/detectors.go:46-60` converts read failures into synthetic findings (`detector_error`) rather than returning an error.",
"`internal/quality/plugins/go/analyzers/advanced.go:242` returns raw parse errors from helper methods without context.",
"`internal/quality/plugins/go/plugin.go:353-356` swallows file read failures in `countLOC` by returning `0`, losing failure provenance entirely."
],
"suggestion": "Define a consistent analyzer failure contract: either (a) report detector-execution issues as standardized `detector_error` findings with metadata, or (b) return wrapped errors; do not silently coerce errors to default values. Refactor `countLOC` to return `(int, error)` and propagate classification consistently.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
]
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_105807.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/scanner.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
- .desloppify/subagents/runs/20260224_101740/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_104658/prompts/batch-1.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,86 @@
{
"assessments": {
"error_consistency": 56.5
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"CLI command handlers frequently return upstream errors without operation context (e.g., cmd/get.go:47, cmd/scrape.go:91/126, cmd/push.go:52, cmd/ask.go:130), while nearby code in the same command set does wrap with contextual messages (e.g., cmd/push.go:81/91/97, cmd/scrape.go:132/146/204/210).",
"Server transport paths mix wrapped and raw propagation: write/encode paths use wrapTransportError and contextual fmt.Errorf (internal/server/server.go:223/229/267/273), but Start returns raw listener/scanner errors directly (internal/server/server.go:171/234).",
"Python CLI surfaces process-fatal errors inconsistently across sibling commands: direct sys.exit after print (cmd/devour_enhanced.py:600/607/616, cmd/devour_enhanced_v2.py:601/608/617), raise SystemExit in another command flow (desloppify/.../app/commands/next.py:137), and validation-time sys.exit in resolve flow (desloppify/.../app/commands/resolve/selection.py:84/87)."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high",
"unreported_risk": ""
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "cli_raw_error_passthrough_inconsistent_context",
"summary": "Sibling CLI commands mix raw error passthrough and contextual wrapping.",
"related_files": [
"cmd/get.go",
"cmd/scrape.go",
"cmd/push.go",
"cmd/ask.go"
],
"evidence": [
"runGet returns constructDocURL error directly (cmd/get.go:47).",
"runScrape returns load/scrape errors directly (cmd/scrape.go:91, cmd/scrape.go:126).",
"runPush returns loadAppConfig error directly (cmd/push.go:52), but wraps later failures with operation labels (cmd/push.go:81, cmd/push.go:91, cmd/push.go:97).",
"runAsk similarly passes config load error directly (cmd/ask.go:130)."
],
"suggestion": "Standardize command-boundary wrapping: every external call failure should be wrapped with command+operation context (for example, \"load app config for get command: %w\") before returning.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "transport_error_contract_mixed_wrapped_and_raw",
"summary": "Server transport code alternates between wrapped errors and raw returns.",
"related_files": [
"internal/server/server.go",
"cmd/serve.go"
],
"evidence": [
"RPC setup/handler paths in cmd/serve consistently wrap with operation context (e.g., cmd/serve.go:69, cmd/serve.go:96, cmd/serve.go:107).",
"internal server code has contextual wrappers for encode paths (internal/server/server.go:223, 229, 267, 273), but returns raw runtime errors in Start (internal/server/server.go:171, 234)."
],
"suggestion": "Define a transport-level error policy (wrapped with transport+operation context vs typed sentinel mapping) and apply it to listener/scanner failure returns in Start for parity with existing wrapped encode paths.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "python_cli_exit_strategy_fragmented",
"summary": "Python command flows use inconsistent fatal-error signaling patterns.",
"related_files": [
"cmd/devour_enhanced.py",
"cmd/devour_enhanced_v2.py",
"desloppify/desloppify/desloppify/app/commands/next.py",
"desloppify/desloppify/desloppify/app/commands/resolve/selection.py"
],
"evidence": [
"Enhanced scripts print then call sys.exit(1) in multiple branches (cmd/devour_enhanced.py:600/607/616; cmd/devour_enhanced_v2.py:601/608/617).",
"Another command raises SystemExit directly on output failure (desloppify/.../next.py:137).",
"Resolve validation path also exits process directly via sys.exit(1) (desloppify/.../resolve/selection.py:84/87)."
],
"suggestion": "Adopt one CLI failure contract for Python commands (for example, raise a command exception and let one top-level runner map to exit code and formatted output) instead of mixing local sys.exit, print+exit, and raise SystemExit.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
],
"review_quality": {
"batch_count": 1,
"dimension_coverage": 1.0,
"evidence_density": 1.0,
"high_score_without_risk": 0,
"finding_pressure": 7.244,
"dimensions_with_findings": 1
}
}
@@ -0,0 +1,125 @@
You are a focused subagent reviewer for a single holistic investigation batch.
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_110336.json
Batch index: 1
Batch name: Cross-cutting Sweep
Batch dimensions: error_consistency
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
Files assigned:
- internal/quality/enhanced_types.go
- internal/quality/scoring_test.go
- internal/quality/types.go
- pkg/rustdocs/parser_test.go
- internal/config/config.go
- cmd/scrape.go
- internal/quality/plugins/go/analyzers/detectors.go
- internal/quality/plugins/go/analyzers/advanced.go
- internal/scraper/web.go
- internal/quality/plugins/go/plugin.go
- internal/scheduler/scheduler.go
- cmd/push.go
- internal/scraper/localsearch_test.go
- cmd/ask.go
- internal/ai/openai.go
- internal/server/server.go
- cmd/get.go
- internal/quality/analyzers/controlflow.go
- internal/vector/store.go
- examples/demo_scrapers.go
- internal/indexer/indexer.go
- internal/scraper/openapi.go
- pkg/pythondocs/parser.go
- cmd/get_test.go
- internal/quality/scanner_test.go
- internal/scraper/localsearch.go
- cmd/serve.go
- internal/scraper/external/nuxtdocs.go
- internal/quality/scanner.go
- internal/quality/plugins/go/analyzers/test_coverage.go
- internal/search/engine.go
- internal/scraper/github.go
- internal/scraper/external/astrodocs.go
- internal/scraper/external/cloudflaredocs.go
- internal/scraper/external/dockerdocs.go
- internal/quality/plugins/go/fixers/advanced_fixers.go
- cleanup_unused.go
- main.go
- cmd/ask_test.go
- cmd/auto.go
- internal/scraper/local.go
- internal/scraper/local_test.go
- README.md
- .desloppify/config.json
- .desloppify/query.json
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
- .desloppify/subagents/runs/20260224_101740/prompts/batch-1.md
- .desloppify/subagents/runs/20260224_104658/prompts/batch-1.md
- .github/workflows/ci.yml
- AGENTS.md
- cmd/devour_enhanced.py
- cmd/devour_enhanced_fixed.py
- cmd/devour_enhanced_v2.py
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
- desloppify/desloppify/desloppify/app/commands/next.py
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
Task requirements:
1. Read the immutable packet and follow `system_prompt` constraints exactly.
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
3. Return 0-10 high-quality findings for this batch (empty array allowed).
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
5. Every finding must include `related_files` with at least 2 files when possible.
6. Every finding must include `impact_scope` and `fix_scope`.
7. Every scored dimension MUST include dimension_notes with concrete evidence.
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
10. Do not edit repository files.
11. Return ONLY valid JSON, no markdown fences.
Scope enums:
- impact_scope: "local" | "module" | "subsystem" | "codebase"
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
Output schema:
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {"<dimension>": <0-100 with one decimal place>},
"dimension_notes": {
"<dimension>": {
"evidence": ["specific code observations"],
"impact_scope": "local|module|subsystem|codebase",
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
"confidence": "high|medium|low",
"unreported_risk": "required when score >85",
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
}
},
"findings": []
}
@@ -0,0 +1,79 @@
{
"batch": "Cross-cutting Sweep",
"batch_index": 1,
"assessments": {
"error_consistency": 74.0
},
"dimension_notes": {
"error_consistency": {
"evidence": [
"CLI command handlers frequently return upstream errors without operation context (e.g., cmd/get.go:47, cmd/scrape.go:91/126, cmd/push.go:52, cmd/ask.go:130), while nearby code in the same command set does wrap with contextual messages (e.g., cmd/push.go:81/91/97, cmd/scrape.go:132/146/204/210).",
"Server transport paths mix wrapped and raw propagation: write/encode paths use wrapTransportError and contextual fmt.Errorf (internal/server/server.go:223/229/267/273), but Start returns raw listener/scanner errors directly (internal/server/server.go:171/234).",
"Python CLI surfaces process-fatal errors inconsistently across sibling commands: direct sys.exit after print (cmd/devour_enhanced.py:600/607/616, cmd/devour_enhanced_v2.py:601/608/617), raise SystemExit in another command flow (desloppify/.../app/commands/next.py:137), and validation-time sys.exit in resolve flow (desloppify/.../app/commands/resolve/selection.py:84/87)."
],
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor",
"confidence": "high"
}
},
"findings": [
{
"dimension": "error_consistency",
"identifier": "cli_raw_error_passthrough_inconsistent_context",
"summary": "Sibling CLI commands mix raw error passthrough and contextual wrapping.",
"related_files": [
"cmd/get.go",
"cmd/scrape.go",
"cmd/push.go",
"cmd/ask.go"
],
"evidence": [
"runGet returns constructDocURL error directly (cmd/get.go:47).",
"runScrape returns load/scrape errors directly (cmd/scrape.go:91, cmd/scrape.go:126).",
"runPush returns loadAppConfig error directly (cmd/push.go:52), but wraps later failures with operation labels (cmd/push.go:81, cmd/push.go:91, cmd/push.go:97).",
"runAsk similarly passes config load error directly (cmd/ask.go:130)."
],
"suggestion": "Standardize command-boundary wrapping: every external call failure should be wrapped with command+operation context (for example, \"load app config for get command: %w\") before returning.",
"confidence": "high",
"impact_scope": "subsystem",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "transport_error_contract_mixed_wrapped_and_raw",
"summary": "Server transport code alternates between wrapped errors and raw returns.",
"related_files": [
"internal/server/server.go",
"cmd/serve.go"
],
"evidence": [
"RPC setup/handler paths in cmd/serve consistently wrap with operation context (e.g., cmd/serve.go:69, cmd/serve.go:96, cmd/serve.go:107).",
"internal server code has contextual wrappers for encode paths (internal/server/server.go:223, 229, 267, 273), but returns raw runtime errors in Start (internal/server/server.go:171, 234)."
],
"suggestion": "Define a transport-level error policy (wrapped with transport+operation context vs typed sentinel mapping) and apply it to listener/scanner failure returns in Start for parity with existing wrapped encode paths.",
"confidence": "high",
"impact_scope": "module",
"fix_scope": "multi_file_refactor"
},
{
"dimension": "error_consistency",
"identifier": "python_cli_exit_strategy_fragmented",
"summary": "Python command flows use inconsistent fatal-error signaling patterns.",
"related_files": [
"cmd/devour_enhanced.py",
"cmd/devour_enhanced_v2.py",
"desloppify/desloppify/desloppify/app/commands/next.py",
"desloppify/desloppify/desloppify/app/commands/resolve/selection.py"
],
"evidence": [
"Enhanced scripts print then call sys.exit(1) in multiple branches (cmd/devour_enhanced.py:600/607/616; cmd/devour_enhanced_v2.py:601/608/617).",
"Another command raises SystemExit directly on output failure (desloppify/.../next.py:137).",
"Resolve validation path also exits process directly via sys.exit(1) (desloppify/.../resolve/selection.py:84/87)."
],
"suggestion": "Adopt one CLI failure contract for Python commands (for example, raise a command exception and let one top-level runner map to exit code and formatted output) instead of mixing local sys.exit, print+exit, and raise SystemExit.",
"confidence": "medium",
"impact_scope": "subsystem",
"fix_scope": "architectural_change"
}
]
}