Local Vault Maintenance Scripts
Relevant source files
The following files were used as context for generating this wiki page:
The Local Vault Maintenance Scripts represent a collection of Python-based automation utilities designed to steward the IDAHO-VAULT, a personal journalism research repository. These scripts function as a governed intelligence system, applying software engineering rigors—such as continuous integration, secret scanning, and manifest management—to a human-centric Obsidian knowledge base.
The primary purpose of these scripts is to maintain an authoritative, multi-agent-writable environment while ensuring that governance structures, daily task rolls, and sensitive credentials remain inviolate. They bridge the gap between manual human input (Logan) and automated agent workforce actions (Claude, Gemini, etc.).
Sources: Sieve.md, VAULT-CONVENTIONS.from-pushable-2026-05-08.md:16-25
Core Automation Systems
The maintenance infrastructure is categorized into several functional systems that handle the daily operational tempo and security of the vault.
Daily Rollover Engine
The daily_rollover.py script serves as the "heartbeat" of the vault. Running daily at 4 AM MT, it processes the TO DO LIST.md and the previous day's daily note to carry forward incomplete tasks into a newly generated daily note. It specifically handles Obsidian Tasks plugin syntax, such as stripping completion emojis to prevent "task resurrection."
Sources: Sieve.md:7-9, Sieve.md:120-125
Security and Secret Guard
The check_secret_patterns.py script acts as the vault's perimeter defense. It runs on every Pull Request and push to main, utilizing a pinned "trusted validator" checkout pattern to prevent subversion. The script scans for filename patterns (e.g., .env, id_rsa) and content patterns (e.g., GitHub tokens, OpenAI keys).
Sources: Sieve.md:10-12, Sieve.md:58-64
Manifest and Soft-Lock Layer
The update_manifest.py script manages the manifest.json file, which tracks file identity, hashes, and lock states. This prevents multiple AI agents from concurrently overwriting the same vault file, ensuring internal consistency across the "Swarmic Nest" (!/).
Sources: Sieve.md:16-18, IDAHO-VAULT — SYSTEM CONTEXT.md:103-115
Operational Logic and Data Flow
The scripts follow a structured workflow to transform raw input into verified, structured knowledge.
This diagram represents the logical progression of information as it is processed by the maintenance scripts.
Sources: IDAHO-VAULT — WORKFLOW.md:25-35, Sieve.md:7-30
Content Validation
The validate_content.py utility enforces a scoped guard policy. It blocks XSS injections, malformed YAML frontmatter, and unresolved template placeholders (e.g., <% ... %> or {{...}}). It uses a --scope flag to restrict which directories an automated workflow is permitted to modify.
Sources: Sieve.md:19-22, Sieve.md:83-88
Path Classification and Risk Routing
The classify_paths.py script determines the risk tier of repository changes to route AI-agent Pull Requests. It evaluates files on two axes:
- Filetype: Natural language (clear), machine documentation (low), or computer code (med).
- Depth: Files in the administrative nest (
!/) are high risk, while core governance files are protected.
Sources: Sieve.md:132-140
Script Inventory
| Script | Primary Function | Primary Trigger |
|---|---|---|
daily_rollover.py | Carries forward incomplete tasks | Daily 4 AM MT |
check_secret_patterns.py | Scans for API keys and credentials | Every PR/Push |
validate_content.py | Checks YAML and template syntax | CI Workflows |
classify_paths.py | Tiers PR risk for agent routing | Auto-PR workflow |
update_manifest.py | Updates file hashes and lock status | Content modification |
idaho_leg_scraper.py | Ingests Idaho legislative bill data | Daily 6 AM MT |
| Sources: Sieve.md:7-30, VAULT-CONVENTIONS.from-pushable-2026-05-08.md:270-295 |
Agent Coordination via Handoffs
Since agents in the IDAHO-VAULT are stateless and do not communicate directly, the maintenance scripts facilitate coordination through the filesystem.
The sequence of coordination between human and agent entities mediated by maintenance scripts.
Sources: Sieve.md:46-55, IDAHO-VAULT — SYSTEM CONTEXT.md:65-75
Key Implementation Details
Secret Pattern Scanning
The check_secret_patterns.py script identifies sensitive strings without logging them. It returns only the path and line number to prevent secrets from appearing in CI logs.
# Conceptual representation of secret scanning logic
# derived from Sieve.md description
patterns = {
"github_token": "ghp_[a-zA-Z0-9]{36}",
"openai_key": "sk-[a-zA-Z0-9]{48}",
"private_key": "-----BEGIN PRIVATE KEY-----"
}
Sources: Sieve.md:58-70
Risk Tiering Constants
The classify_paths.py script uses a tier4 field to categorize risk levels. The nope tier is reserved for files touching the Esto Perpetua! still-point, indicating that no automated agent should modify these files.
Sources: Sieve.md:132-145
The Local Vault Maintenance Scripts ensure that IDAHO-VAULT remains a "tamper-resistant, multi-agent-writable personal knowledge vault." By treating a journalism corpus as a governed codebase, the system formalizes the stewardship of information across its lifecycle.
Sources: Sieve.md:46-51