plugin-seam-and-mirror-auditor
Audit, stress-test, and auto-synchronize plugin codebases across IoC DAG topology, adversarial parameter fuzzing, and AST documentation mirroring on any target directory. Do not use for generic prose copyediting or unstructured markdown note-taking.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- plugin-seam-and-mirror-auditor
- description
- Audit, stress-test, and auto-synchronize plugin codebases across IoC DAG topology, adversarial parameter fuzzing, and AST documentation mirroring on any target directory. Do not use for generic prose copyediting or unstructured markdown note-taking.
02 资源文件 3
- 参考文档CARD.md4.0 KB
- 参考文档references/audit_schema.json1.5 KB
- 脚本scripts/plugin_auditor.py43.3 KB
03 SKILL.md 正文
Plugin Seam & Mirror Auditor
A specialized operational skill and CLI suite for auditing IoC service dependency DAGs, detecting async runtime deadlocks via adversarial parameter fuzzing, verifying documentation-to-code AST mirroring, and auto-fixing documentation and manifest drift across arbitrary target directories.
Overview
When authoring or modifying Harness plugins, architectural seams frequently degrade:
- Dependency Drift: Circular IoC registrations or dangling
ServiceKey[T]requirements that crash kernel lifecycle startup. - Event Loop & Timeout Deadlocks: Entrypoints that call
asyncio.run()inside running event loops, or execute unpruned subprocesses exceeding bounded budgets. - Documentation Drift: README tools tables that omit active entrypoints, or list out-of-date parameter names that fail model tool-calling.
This skill packages an autonomous 5-phase audit and auto-fix pipeline that can be pointed at any directory (single plugin, category group, or entire repository) to ensure 100% architectural integrity and zero documentation drift.
Dependencies
- adversarial-agent-verifier: For DAG seam analysis and inspect-before-edit protocols.
- repo-doc-synchronizer: For Diátaxis documentation taxonomy and documentation drift verification.
- agent-skill-sdlc: For two-phase validation pipelines and zero-fork operational budgets.
Companion quick-reference card: CARD.md
JSON Schema reference: references/audit_schema.json
Quick Start
Execute a full audit with automatic remediation on any target directory:
# Point at any single plugin
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py all --target-dir plugins/integration_and_io/chatbotx
# Point at a domain category
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py all --target-dir plugins/data_engineering
# Run on the whole plugins directory with JSON report output
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py all --target-dir plugins --output audit_report.json
Utility Scripts
The companion CLI script scripts/plugin_auditor.py provides 5 dedicated subcommands:
1. dag — IoC Dependency Graph Audit
Analyzes service registrations (provides) and service resolutions (requires).
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py dag --target-dir plugins/
- Traverses all discovered manifests.
- Detects circular dependencies using Tarjan / DFS cycle detection.
- Flags unprovided or dangling
ServiceKeyrequirements.
2. fuzz — Adversarial Parameter Fuzzing
Subjects every exposed function to 4 distinct parameter matrices with async timeout bounds (default: 5.0s):
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py fuzz --target-dir plugins/software_engineering/test_runner --timeout 5.0
empty: Zero-argument invocation (fn()).null_none: PassesNoneto every parameter.type_confusion: Passes integer literals (42) into expected strings/collections.boundary_injection: Traversal paths (../../etc/passwd\x00\n🔥) and Unicode symbols.- Identifies unhandled exceptions, event loop crashes (
asyncio.run()), and thread deadlocks.
3. mirror — Documentation-to-Code AST Mirroring
Parses main.py via Python's ast module and inspects companion plugin.json and README.md:
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py mirror --target-dir plugins/agent_orchestration
- Flags entrypoints present in code but missing from
README.mdtools tables. - Validates that documented parameter lists mirror actual AST argument names.
- Verifies syntax validity of all embedded Python code blocks in markdown.
4. sync — Auto-Fix & Synchronization Engine
Automatically repairs discovered documentation and manifest drift in place:
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py sync --target-dir plugins/
- Scaffolds missing Diátaxis
README.mdfiles with complete metadata and tool tables. - Rewrites
## Tools & Entrypointsmarkdown tables to mirror exact AST code parameters. - Populates
entrypointsinplugin.jsonif initially unconfigured.
5. all — Full 5-Phase End-to-End Pipeline
Executes DAG verification, AST mirroring, Auto-Fix remediation, and parameter fuzzing in sequence:
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py all --target-dir plugins/ --output audit_summary.json
Workflow
When verifying or onboarding plugins into the repository, follow this 4-step sequence:
Target Directory ──> [1. DAG Audit] ──> [2. AST Mirror Audit]
│ │
v v
Cycle/Dangling? Doc Drift Detected?
│ │
│ └──> [3. Auto-Fix Sync]
v │
[4. Adversarial Fuzzing] <───────────────┘
│
v
Verified Plugin Seam
- Point the Auditor at the Target Directory: Run
python .agents/skills/plugin-seam-and-mirror-auditor/scripts/plugin_auditor.py all --target-dir <path>. - Review Auto-Fix Actions: Inspect the output log for any scaffolded READMEs or synchronized tool tables.
- Inspect Fuzzing Exceptions: Review any unhandled runtime exceptions or timeouts surfaced during parameter injection. If a tool uses
asyncio.run(), refactor toasync defwithawait. - Final Regression Test: Execute targeted test suites via
pytest tests/test_plugin_<name>.pyto guarantee zero behavior regressions.
Visual Brief Pillar
When completing comprehensive plugin audits, the auditor generates an interactive HTML visual brief alongside structured JSON findings:
- Interactive HTML Dashboard: Written to
%TEMP%/plugin-verification-matrix.htmlor specified via--html-matrix <path>. - Status Badges & Metrics: Renders real-time DOM status cards for DAG validity, mirror parity rate, safe fuzz executions, and exception counts.
Mandatory Checkpoint Gates
Before committing plugin changes or finalizing verification, agents must assert the following gates:
- Gate 1 (DAG Zero-Cycle): Assert
cycles_detected == 0anddangling_requirements == 0. - Gate 2 (AST Mirror Parity): Assert 0 missing READMEs, 0 missing entrypoint table rows, and 0 parameter drift warnings.
- Gate 3 (Fuzz Boundedness): Assert 0 hang or deadlock timeouts (>5.0s) and 0 unhandled
asyncio.run()loop collisions. - Gate 4 (User Feedback & Approvals): When scaffolding new plugins or applying sweeping syncs, request user review via
RequestFeedback: truein the artifact implementation plan.
Anti-Patterns
- Direct In-Process Asyncio Run — Calling
asyncio.run()inside tool functions causes fatalRuntimeErrorcrashes when invoked inside async agent loops or test runners; always expose async entrypoints asasync defwithawait. - Manual Table Drift — Manually typing parameter lists into
README.mdleads to silent documentation rot; always derive documentation tables directly from Python AST signatures viaplugin_auditor.py sync. - Unbounded Fuzzing Loops — Executing parameter fuzzing without per-call timeouts causes worker threads to hang indefinitely on rogue subprocesses; always enforce bounded timeouts ($\le 5.0$s).
- Hardcoded Path Assumptions — Scanners assuming plugins only live in
plugins/<cat>/<name>/fail on standalone repos or flat directories; always inspect directory contents dynamically.
Common Mistakes
- Running inline
-cstrings on PowerShell: Avoid invoking Python snippets through PowerShell-cstrings due to quote escaping and UTF-16 corruptions. Always use the provided script CLI (Rule 29). - Omitting Windows UTF-8 reconfigure: Running CLI tools on Windows without
sys.stdout.reconfigure(encoding='utf-8')causescp1252encoding crashes when printing Unicode DAG symbols or fuzz payloads (Rule 23). - Skipping AST validation after code changes: Modifying function signatures in
main.pywithout re-runningsyncleaves stale documentation tables inREADME.md.
04 同仓库更多 Skills
ui-behavior-primitive-architect
Architect, audit, and verify zero-dependency headless UI behavior primitives, WebMCP agent bridges, WAI-ARIA/SSR/RTL tri-modal checks, and framework expert routing. Do not use for static CSS theme styling or backend database migrations.
trustgraph-ontology-governor
Govern knowledge graphs, SHACL-AF triple policies, OntologyRAG subclass validation, PROV-O dual named graphs, and Laya entropy decision scoring. Do not use for relational SQL queries or generic web scraping.
shim-harness-governor
Govern universal CLI agent loops, 4-tier tool permissions, ancestor-symlink workspace sandboxes, deterministic-first command routing, collision-safe MCP namespacing, and layered skill loading. Do not use for static UI styling or external SQL analytics.
graphiti-zep-memory-governor
Govern bi-temporal knowledge graphs with Graphiti future-edge clamping, MinHash/LSH entity dedup, RRF/MMR reranking, and Zep typed ontologies. Do not use for static SQL joins or generic web crawling.
agora-mcp-workbench-architect
Architect, audit, and orchestrate Agora Workbench MCP servers, loopback sidecars, unified state graphs, gateway/dispatcher connectors, and policy-enforced data lakes. Do not use for static frontend CSS styling or non-MCP desktop GUI automation.
skill-eval-assurance-runner
Evaluate and assure agent skills using small-N Wilson confidence intervals, unbiased pass^k reliability, deterministic trajectory graders, preflight boundary honesty, and sealed digest verification. Do not use for subjective prose review or unconstrained production deployment.