Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Config-Driven Ignore Architecture Analysis


title: Config-Driven Ignore Architecture Analysis authors:


Config-Driven Ignore Architecture Analysis

Problem Statement

The toolkit’s path discovery and filtering logic is currently centralized in tools/scripts/paths.py. While functional, this file contains a “transitional kernel” that mixes utility functions with hardcoded data lists (e.g., _STATIC_EXCLUDE_DIRS).

Architectural Conflict [ISO 29148: Verifiability]: The project mandate (as per the misc/plan/plan_20260308_ecosystem_roadmap_vadocs_to_mentor.md and ADR-26012) requires the toolkit to be “org-agnostic” and “config-driven.” Hardcoding infrastructure noise (like .git, .venv, node_modules) directly in Python code violates the Single Source of Truth (SSoT) principle and forces code changes for simple configuration updates, creating unnecessary friction in the CI/CD pipeline.

Root Cause Analysis: The technical debt originated from Prototyping Convenience Bias. During the early stages of the toolkit, hardcoding _STATIC_EXCLUDE_DIRS provided the lowest latency for implementation. However, as the project moved toward “org-agnostic” requirements, this convenience became a blocker for portability and traceability, transforming a temporary shortcut into a structural bottleneck.

Approach Evaluation

Validation Gap Analysis

The following table maps the current state against the required industrial-grade standards.

Subjective ClaimFalsifiable MetricGap / Required Evidence
“Hardcoded Kernel”Ratio of config-to-code changes for ignore updates.Currently 1:1 (Every config change requires a code commit).
“Org-Agnostic”Time to adapt toolkit to a new project with different noise patterns.High; requires manual editing of paths.py.
“Scalability”Cognitive load to audit all active exclusions across the toolkit.High; excludes are scattered between paths.py and registry manifests.
“Professionalism”Compliance with SWEBOK Software Configuration Management.Fail; configuration is embedded in executable logic.

Assumption Interrogation

AssumptionStatusFalsification Evidence
JSON is the optimal format for humansPlausibleUser preference survey favoring YAML for manual edits.
global ignores are universal across all toolsUnsupportedA tool (e.g., a git-history analyzer) that requires access to .git.
A single ignores.json will not bloatPlausibleThe tools map exceeding 100+ entries, leading to “Hub” symptoms.
Tools will implement the two-tier logicUnverifiedActual implementation of the loading logic in paths.py.

Architectural Alternatives Considered

To arrive at the proposed design, several iterations were analyzed to balance Centralization, Isolation, and Cognitive Load.

Proposed Target Architecture: The Unified Manifest

The proposed design adopts a centralized manifest approach, prioritizing Cohesion and Developer Intuition.

Structure: .vadocs/ignores.json

{
  "global": [".git", ".venv", "node_modules"],
  "tools": {
    "tool_name": {
      "files": ["path/to/exception.md"],
      "strings": ["ignore-this-string"]
    }
  }
}

Quantitative Validation (WRC)

Current State Audit (Hardcoded)

Proposed State Audit (Unified Manifest)

WRC Calculation:

ComponentValueWeightWeighted ScoreRationale
E (Empirical)0.900.350.315Standard pattern used by modern CLI tools.
A (Adoption)0.900.250.225Ubiquitous adoption of .ignore manifests.
P (Performance)0.950.400.380Zero overhead; high readability.
Total WRC0.92Production-Ready

Methodology Comparison

MethodologyDescription with WRCProsConsBest ForSource
Unified Manifest(WRC 0.92) [E: 0.9 / A: 0.9 / P: 0.95] Centralized JSON with tiers.High cohesion, easy to audit.No local-folder overrides.Mid-sized project kernels.Community
Standard .gitignore(WRC 0.85) [E: 0.95 / A: 0.95 / P: 0.75] Parsing .gitignore.Zero config duplication.Limited to git-patterns.Simple file discovery.Enterprise
Hierarchical Config(WRC 0.82) [E: 0.8 / A: 0.7 / P: 0.85] Folder-level ignore files.Maximum granularity.High fragmentation.Massive monorepos.Enterprise
Env-Var Flags(WRC 0.60) [E: 0.5 / A: 0.6 / P: 0.70] CLI flags.No file dependencies.Non-persistent.Ephemeral PoCs.Community

Viability Classification: Production-Ready. Satisfies all SVA criteria, maintains Git-native traceability, and aligns with industry-standard patterns.

Key Insights

Actionable Strategies

  1. The Layered Filter Pattern (WRC 0.94) [E: 0.9 / A: 0.9 / P: 0.95]: Implement a filtering pipeline in paths.py applying masks in sequence: System Global →\rightarrow Project Global →\rightarrow Tool Specific →\rightarrow Local Override.

    • The Trade-off: [Complexity / Precision]. Increases logic complexity but eliminates false positives.

    • Reliable sources: The Art of Unix Programming [Eric S. Raymond], 2003.

  2. Schema-Enforced Governance (WRC 0.88) [E: 0.8 / A: 0.8 / P: 0.90]: Define a JSON Schema for .vadocs/ignores.json and integrate it into the pre-commit pipeline.

    • The Trade-off: [Maintenance / Integrity]. Adds a schema file but prevents broken configs from crashing the pipeline.

    • Reliable sources: JSON Schema Specification [IETF], 2017.

Pitfalls & Security

Appendix

Conclusion & Next Steps: The migration from paths.py to .vadocs/ignores.json transforms the toolkit from a collection of scripts with hardcoded assumptions into a professional, config-driven system.

  1. Implement .vadocs/ignores.json manifest.

  2. Refactor tools/scripts/paths.py to load this manifest.

  3. Update the is_excluded logic to support normalized paths and the bypass_global_ignores flag.

References