{"id":"98b7bb80-9515-4c77-bebb-53117fe63efd","entityType":"agent","slug":"clawhub-athola-nm-pensive-tiered-audit","name":"tiered-audit","canonicalUrl":"https://www.xpersona.co/agent/clawhub-athola-nm-pensive-tiered-audit","canonicalPath":"/agent/clawhub-athola-nm-pensive-tiered-audit","generatedAt":"2026-10-10T10:49:47.587Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":null},"description":"Runs a three-tier codebase audit (git history, targeted scans, full review) with gating Skill: tiered-audit Owner: athola Summary: Runs a three-tier codebase audit (git history, targeted scans, full review) with gating Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:19:39.886Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:39:49.189Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:56:37.407Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:04:46.458Z | user Release v1.9.14 v1.9.13 | 2026-06-27","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-pensive-tiered-audit","sourceUrl":"https://clawhub.ai/athola/nm-pensive-tiered-audit","homepage":"https://clawhub.ai/athola/skills/nm-pensive-tiered-audit","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/athola/nm-pensive-tiered-audit","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/athola/skills/nm-pensive-tiered-audit","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Runs a three-tier codebase audit (git history, targeted scans, full review) with gating Skill: tiered-audit Owner: athola Summary: Runs a three-tier codebase au"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":null},"stars":null,"forks":null,"downloads":1600,"packageName":null,"latestVersion":"1.9.19","tractionLabel":"1.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T07:08:31.244Z","lastCrawledAt":"2026-10-10T07:08:31.244Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T07:08:31.244Z","lastVerifiedAt":null,"highlights":[{"version":"1.9.19","createdAt":"2026-08-26T13:19:39.886Z","changelog":"Release v1.9.19","fileCount":6,"zipByteSize":7649},{"version":"1.9.17","createdAt":"2026-07-30T05:39:49.189Z","changelog":"Release v1.9.17","fileCount":6,"zipByteSize":7757},{"version":"1.9.16","createdAt":"2026-07-14T19:56:37.407Z","changelog":"Release v1.9.16","fileCount":6,"zipByteSize":7660},{"version":"1.9.14","createdAt":"2026-06-30T18:04:46.458Z","changelog":"Release v1.9.14","fileCount":6,"zipByteSize":7639},{"version":"1.9.13","createdAt":"2026-06-27T16:22:41.885Z","changelog":"Release v1.9.13","fileCount":6,"zipByteSize":7637},{"version":"1.9.12","createdAt":"2026-06-19T03:17:57.765Z","changelog":"Release v1.9.12","fileCount":6,"zipByteSize":7657},{"version":"1.0.3","createdAt":"2026-06-18T15:17:00.399Z","changelog":"Release v1.9.12","fileCount":6,"zipByteSize":7723},{"version":"1.0.2","createdAt":"2026-05-09T02:19:34.401Z","changelog":"Release v1.9.5","fileCount":6,"zipByteSize":7539}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-pensive-tiered-audit","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T10:49:47.584Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-tiered-audit/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":null},"readme":"Skill: tiered-audit\n\nOwner: athola\n\nSummary: Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\n\nTags: latest:1.9.19\n\nVersion history:\n\nv1.9.19 | 2026-08-26T13:19:39.886Z | user\n\nRelease v1.9.19\n\nv1.9.17 | 2026-07-30T05:39:49.189Z | user\n\nRelease v1.9.17\n\nv1.9.16 | 2026-07-14T19:56:37.407Z | user\n\nRelease v1.9.16\n\nv1.9.14 | 2026-06-30T18:04:46.458Z | user\n\nRelease v1.9.14\n\nv1.9.13 | 2026-06-27T16:22:41.885Z | user\n\nRelease v1.9.13\n\nv1.9.12 | 2026-06-19T03:17:57.765Z | user\n\nRelease v1.9.12\n\nv1.0.3 | 2026-06-18T15:17:00.399Z | user\n\nRelease v1.9.12\n\nv1.0.2 | 2026-05-09T02:19:34.401Z | user\n\nRelease v1.9.5\n\nv1.0.1 | 2026-05-06T14:20:52.503Z | user\n\nRelease v1.9.4\n\nv1.0.0 | 2026-04-15T15:02:04.557Z | auto\n\n- Initial release of the tiered-audit skill for codebase auditing.\n- Implements a three-tier process: Git history analysis (Tier 1), targeted deep-dives (Tier 2), and full codebase review with gating (Tier 3).\n- Designed for escalation based on codebase risk, starting with git analysis and escalating only if needed.\n- Output contract and evidence requirements defined for each tier, with file-based coordination of findings.\n- Not intended for individual file reviews or architecture-only audits; see documentation for alternatives.\n\nArchive index:\n\nArchive v1.9.19: 6 files, 7649 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2026b), SKILL.md (4958b), _meta.json (143b)\n\nFile v1.9.19:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.9.19:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.19\",\n  \"publishedAt\": 1787750379886\n}\n\nFile v1.9.19:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.9.19:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.9.19:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.9.19:skill-card.md\n\n## Description:\n\nRuns a three-tier codebase audit across git history, targeted scans, and full review with escalation gating.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[athola](https://clawhub.ai/user/athola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to audit codebase quality, branch changes, unstable areas, and pre-PR release risk through tiered evidence gathering.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The workflow may inspect repository history and selected source areas and create local findings files.\n\nMitigation: Invoke it intentionally only for repositories where that audit behavior is desired.\n\nRisk: Broad shell examples can produce misleading results if the base revision is wrong.\n\nMitigation: Validate the base revision before running the shown git commands.\n\nRisk: Repository-provided instruction files can be untrusted context during an audit.\n\nMitigation: Treat repository-provided instruction files as evidence to review rather than authority to follow.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-pensive-tiered-audit)\n- [Project homepage from ClawHub metadata](https://github.com/athola/claude-night-market/tree/master/plugins/pensive)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Guidance]\n\n**Output Format:** [Markdown findings with inline shell command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write tiered audit findings under .coordination/agents and requires explicit approval before a full codebase audit.]\n\n## Skill Version(s):\n\n1.9.19 (source: server release evidence; artifact frontmatter is 1.9.8)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.9.17: 6 files, 7757 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2347b), SKILL.md (4958b), _meta.json (143b)\n\nFile v1.9.17:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.9.17:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.17\",\n  \"publishedAt\": 1785389989189\n}\n\nFile v1.9.17:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.9.17:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.9.17:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.9.17:skill-card.md\n\n## Description: <br>\nRuns a three-tier codebase audit using git-history analysis, targeted area review, and gated full-codebase review. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineers use this skill to audit codebase quality, branch changes, instability, churn, and pre-PR readiness with escalating levels of review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad triggers such as \"review\" may invoke this workflow when a narrower review workflow was intended. <br>\nMitigation: Confirm the intended audit scope before running and use a narrower review workflow for single-file, architecture-only, or single-commit reviews. <br>\nRisk: A full-codebase Tier 3 audit can consume significant compute and context if it is started without a strong reason. <br>\nMitigation: Require documented Tier 2 justification and explicit user approval before Tier 3, then process areas sequentially. <br>\nRisk: Git-history evidence can be incomplete or misleading if the base branch or commit range is wrong. <br>\nMitigation: Verify the base resolves correctly and confirm each Tier 1 command produces expected output before escalating. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-pensive-tiered-audit) <br>\n- [Project homepage from ClawHub metadata](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Markdown, Shell commands, Guidance] <br>\n**Output Format:** [Markdown findings files with evidence summaries and inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Writes local tiered audit findings under .coordination/agents; Tier 3 requires explicit approval.] <br>\n\n## Skill Version(s): <br>\n1.9.17 (source: server release metadata; artifact frontmatter reports 1.9.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.16: 6 files, 7660 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2180b), SKILL.md (4958b), _meta.json (143b)\n\nFile v1.9.16:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.9.16:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.16\",\n  \"publishedAt\": 1784058997407\n}\n\nFile v1.9.16:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.9.16:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.9.16:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.9.16:skill-card.md\n\n## Description: <br>\nRuns a three-tier codebase audit with git-history triage, targeted area review, and gated full-codebase review. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and maintainers use this skill to audit branch or release changes, identify churn and instability, and escalate only when evidence supports deeper review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill writes local audit findings under .coordination/agents, which may include incomplete or sensitive review notes if committed without checking. <br>\nMitigation: Review generated findings files before committing or sharing them. <br>\nRisk: Broad review prompts may trigger a multi-tier audit workflow when a narrower review was intended. <br>\nMitigation: Use explicit prompts that define the desired audit scope and tier. <br>\nRisk: Full-codebase Tier 3 audits can consume substantial context, compute, and reviewer attention. <br>\nMitigation: Proceed to Tier 3 only after documented Tier 2 justification and explicit user approval. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-pensive-tiered-audit) <br>\n- [Project homepage from metadata](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Markdown, Shell commands, Guidance] <br>\n**Output Format:** [Markdown findings files with inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Writes tiered audit findings under .coordination/agents and requires explicit approval before Tier 3 full-codebase audits.] <br>\n\n## Skill Version(s): <br>\n1.9.16 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.14: 6 files, 7639 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2162b), SKILL.md (4958b), _meta.json (143b)\n\nFile v1.9.14:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.9.14:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.14\",\n  \"publishedAt\": 1782842686458\n}\n\nFile v1.9.14:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.9.14:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.9.14:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.9.14:skill-card.md\n\n## Description: <br>\nRuns a three-tier codebase audit with git-history analysis, targeted scans, and gated full-review escalation. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineering reviewers use this skill to audit codebase changes before merge, release, or incident follow-up. It stages review from git-history signals to targeted source review and requires explicit approval before a full-codebase audit. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Reviewed diffs or optional prompt and dataset content may be sent to the selected reviewer CLI or provider. <br>\nMitigation: Use only approved reviewer providers, consider --no-web-search for private repositories, and avoid running the skill on changes that contain secrets. <br>\nRisk: Audit findings are advisory and may include incorrect or incomplete recommendations. <br>\nMitigation: Review findings before acting on them and verify any optional --parallel-tests command before use. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-pensive-tiered-audit) <br>\n- [Clawdis homepage](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n- [Publisher profile](https://clawhub.ai/user/athola) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [markdown, shell commands, guidance] <br>\n**Output Format:** [Markdown findings with inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Findings include evidence-tagged summaries, audit scope, recommendations, and escalation decisions.] <br>\n\n## Skill Version(s): <br>\n1.9.14 (source: server release metadata; artifact frontmatter lists 1.9.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.13: 6 files, 7637 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2146b), SKILL.md (4958b), _meta.json (143b)\n\nFile v1.9.13:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.9.13:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.13\",\n  \"publishedAt\": 1782577361885\n}\n\nFile v1.9.13:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.9.13:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.9.13:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.9.13:skill-card.md\n\n## Description: <br>\nRuns a three-tier codebase audit covering git history, targeted scans, and gated full review. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineering reviewers use this skill to audit codebase quality, branch changes, instability, churn, and pre-PR readiness through staged review tiers. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad triggers such as review or audit may activate the skill during routine code-review requests. <br>\nMitigation: Confirm the intended audit scope before allowing Tier 2 or Tier 3 review. <br>\nRisk: Audit findings and generated local files may influence code decisions if accepted without review. <br>\nMitigation: Review the findings, cited evidence, and any proposed commands before relying on them. <br>\nRisk: Full-codebase Tier 3 review can expand scope and resource use beyond the initial audit. <br>\nMitigation: Require documented Tier 2 justification and explicit user approval before Tier 3 begins. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-pensive-tiered-audit) <br>\n- [Project homepage](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Shell commands, Files, Guidance] <br>\n**Output Format:** [Markdown findings with inline shell commands and YAML output contracts] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Writes local findings under .coordination/agents and requires explicit user approval before Tier 3 full-codebase review.] <br>\n\n## Skill Version(s): <br>\n1.9.13 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.12: 6 files, 7657 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2237b), SKILL.md (4958b), _meta.json (143b)\n\nFile v1.9.12:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.9.12:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.12\",\n  \"publishedAt\": 1781839077765\n}\n\nFile v1.9.12:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.9.12:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.9.12:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.9.12:skill-card.md\n\n## Description: <br>\nRuns a gated, three-tier codebase audit that starts with git-history review, escalates to targeted source review when evidence warrants it, and requires approval for full-codebase audit. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineering reviewers use this skill to audit codebase changes before release, before merge, or after instability by collecting evidence from git history and escalating to deeper review only when criteria are met. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad audit and review triggers may activate the skill during ordinary review discussions. <br>\nMitigation: Confirm the audit scope and commit range before running the workflow. <br>\nRisk: Deeper tiers can read repository source files and write local .coordination findings. <br>\nMitigation: Run the skill only in the intended repository and review generated findings before sharing them. <br>\nRisk: A full-codebase audit can consume substantial context and compute. <br>\nMitigation: Use the Tier 3 gate and proceed only after explicit user approval. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/nm-pensive-tiered-audit) <br>\n- [Skill homepage](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, guidance] <br>\n**Output Format:** [Markdown findings files with evidence-tagged sections and inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Writes local .coordination/agents/*.findings.md files during audit workflows; Tier 3 requires explicit user approval.] <br>\n\n## Skill Version(s): <br>\n1.9.12 (source: ClawHub release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.3: 6 files, 7723 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1870b), skill-card.md (2377b), SKILL.md (4958b), _meta.json (142b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1781795820399\n}\n\nFile v1.0.3:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.0.3:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.0.3:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nRuns a three-tier codebase audit using git history, targeted scans, and gated full-codebase review. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineers use this skill to audit codebase quality before release, before merge, or after incidents. It starts with git-history signals and escalates to targeted or full review only when documented criteria are met. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill reads git history and, after escalation, source files that may contain sensitive code or audit findings. <br>\nMitigation: Use it only in repositories where the agent is allowed to inspect code, and review local .coordination/agents/ findings before sharing them. <br>\nRisk: A Tier 3 full-codebase audit can consume significant time and expose a broader portion of the repository to review. <br>\nMitigation: Require explicit user approval and a documented Tier 2 justification before starting Tier 3. <br>\nRisk: Git-history commands can produce misleading results if the base revision or commit range is wrong. <br>\nMitigation: Confirm the base branch or merge-base resolves correctly before relying on the audit findings. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/nm-pensive-tiered-audit) <br>\n- [Homepage from skill metadata](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, guidance] <br>\n**Output Format:** [Markdown findings files with evidence summaries and inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Writes local findings under .coordination/agents/ and requires explicit user approval before Tier 3 full-codebase review.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: ClawHub release metadata; artifact frontmatter says 1.9.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.2: 6 files, 7539 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1571b), skill-card.md (2359b), SKILL.md (4939b), _meta.json (142b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Audit a codebase using three escalation tiers: git history analysis, targeted deep-dives, and full codebase review with gating\nversion: 1.9.5\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1778293174401\n}\n\nFile v1.0.2:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.0.2:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.0.2:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nAudit a codebase using three escalation tiers: git history analysis, targeted deep-dives, and full codebase review with gating. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineers use this skill to audit repository changes, identify unstable or high-churn areas, and decide when deeper review is warranted. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad triggers such as audit or review may invoke the skill when a narrower review workflow was intended. <br>\nMitigation: Invoke it explicitly for repository-level audits and confirm the intended scope before running the tiered workflow. <br>\nRisk: The audit workflow may read repository history and source files to produce findings. <br>\nMitigation: Run it only in repositories the user intends to audit and review generated findings before acting on recommendations. <br>\nRisk: The workflow may create local .coordination findings files. <br>\nMitigation: Inspect generated .coordination/agents files and remove or exclude them if they should not be retained. <br>\nRisk: A full codebase audit can expand scope significantly. <br>\nMitigation: Require explicit user approval before Tier 3 and process areas sequentially with documented justification. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/nm-pensive-tiered-audit) <br>\n- [claude-night-market pensive plugin](https://github.com/athola/claude-night-market/tree/master/plugins/pensive) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, guidance] <br>\n**Output Format:** [Markdown findings with evidence sections and inline shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May create local .coordination/agents findings files during an audit.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: ClawHub release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.1: 5 files, 6312 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1571b), SKILL.md (4939b), _meta.json (142b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Audit a codebase using three escalation tiers: git history analysis, targeted deep-dives, and full codebase review with gating\nversion: 1.9.4\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1778077252503\n}\n\nFile v1.0.1:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.0.1:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.0.1:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.\n\nArchive v1.0.0: 5 files, 6311 bytes\n\nFiles: modules/escalation-criteria.md (3141b), modules/tier2-targeted.md (1822b), modules/tier3-gate.md (1571b), SKILL.md (4939b), _meta.json (142b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: tiered-audit\ndescription: |\n  Audit a codebase using three escalation tiers: git history analysis, targeted deep-dives, and full codebase review with gating\nversion: 1.8.2\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}\n```\n\n### Escalation Decision\n\nAfter Tier 1 completes, check findings against the\nescalation criteria in `modules/escalation-criteria.md`.\n\nIf NO criteria are met: audit is complete. Report findings.\n\nIf criteria ARE met: list flagged areas and proceed to\nTier 2 for each area sequentially.\n\n## Tier 2: Targeted Area Audit\n\n**Runs only for areas flagged by Tier 1.**\nEach flagged area is audited one at a time, not in\nparallel.\n\n### What Tier 2 Analyzes\n\nFor each flagged area:\n\n1. Read the source files in the area\n2. Check for patterns, anti-patterns, bugs\n3. Verify test coverage exists\n4. Check documentation currency\n5. Assess architectural fit\n\n### Tier 2 Output Format\n\nOne findings file per area:\n`.coordination/agents/tier2-{area-name}.findings.md`\n\nEach file follows the output contract for audits\n(see imbue:proof-of-work/modules/output-contracts).\n\n## Tier 3: Full Codebase Audit\n\n**Requires explicit user approval.** See\n`modules/escalation-criteria.md` for the gate protocol.\n\nTier 3 should use dedicated sessions (one per area)\nwith file-based coordination, NOT parallel subagents.\n\n## Output Contract\n\nAll tiers use this contract:\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal\n```\n\nTier 2 raises the minimum evidence count to 8 because\nit reads source files and should produce deeper analysis.\n\n**Verification:** After each tier completes, verify the\nfindings file exists and contains at least the minimum\nevidence count (`[E1]`, `[E2]`, etc.) before proceeding\nto the next tier or reporting results.\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776265324557\n}\n\nFile v1.0.0:modules/escalation-criteria.md\n\n---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at Tier 1\n- Summary reports \"no areas flagged for deeper review\"\n- No Tier 2 is triggered\n- This is the expected happy path for stable codebases\n\nFile v1.0.0:modules/tier2-targeted.md\n\n---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval.\n\nFile v1.0.0:modules/tier3-gate.md\n\n---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report.","readmeExcerpt":"Skill: tiered-audit Owner: athola Summary: Runs a three-tier codebase audit (git history, targeted scans, full review) with gating Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:19:39.886Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:39:49.189Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:56:37.407Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:04:46.458Z | user Release v1.9.14 v1.9.13 | 2026-06-27","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD"},{"language":"markdown","snippet":"---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E2] Command: git log --oneline ... | grep -iE ...\n     Output: {relevant output}\n\n## New File Clusters\n\n{modules with 5+ new files}\n\n## Large Diffs\n\n{commits with 200+ line changes}\n\n## Escalation Recommendation\n\n{list of areas flagged for Tier 2, or \"no escalation needed\"}"},{"language":"yaml","snippet":"output_contract:\n  required_sections:\n    - summary\n    - evidence\n  min_evidence_count: 3    # Tier 1\n  # min_evidence_count: 8  # Tier 2\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: normal"},{"language":"markdown","snippet":"## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}"},{"language":"yaml","snippet":"output_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict"},{"language":"markdown","snippet":"## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: tiered-audit\ndescription: |\n  Runs a three-tier codebase audit (git history, targeted scans, full review) with gating\nversion: 1.9.8\ntriggers:\n  - audit\n  - git-history\n  - code-quality\n  - review\n  - escalation\n  - auditing a codebase before release or after incidents\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/pensive\", \"emoji\": \"\\ud83e\\udd9e\", \"requires\": {\"config\": [\"night-market.imbue:proof-of-work\"]}}}\nsource: claude-night-market\nsource_plugin: pensive\n---\n\n> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Tiered Audit\n\n## Table of Contents\n\n- [When to Use](#when-to-use)\n- [When NOT to Use](#when-not-to-use)\n- [Tier 1: Git History Audit](#tier-1-git-history-audit)\n- [Tier 2: Targeted Area Audit](#tier-2-targeted-area-audit)\n- [Tier 3: Full Codebase Audit](#tier-3-full-codebase-audit)\n- [Output Contract](#output-contract)\n\n## When To Use\n\n- Auditing codebase quality, patterns, or problems\n- Reviewing what changed on a branch before merge\n- Investigating areas of instability or churn\n- Pre-PR quality assessment\n\n## When NOT to Use\n\n- Reviewing a specific file (use pensive:code-reviewer)\n- Architecture-only review (use pensive:architecture-review)\n- Single-commit review (use imbue:diff-analysis)\n\n## Tier 1: Git History Audit\n\n**Always runs first.** Analyzes git log, diff stats, and\nblame to identify areas of concern without reading any\nsource files.\n\n### What Tier 1 Analyzes\n\nRun these git commands for the target commit range\n(default: current branch vs main):\n\n```bash\n# 1. Churn hotspots: files changed most often\ngit log --format=\"\" --name-only {base}..HEAD \\\n  | sort | uniq -c | sort -rn | head -20\n\n# 2. Diff stats: size of changes per file\ngit diff --stat {base}..HEAD\n\n# 3. Fix-on-fix patterns: commits fixing previous commits\ngit log --oneline {base}..HEAD \\\n  | grep -iE \"(fix|revert|patch|hotfix)\"\n\n# 4. New file clusters: modules with many new files\ngit diff --name-status {base}..HEAD \\\n  | grep \"^A\" | cut -f2 \\\n  | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn\n\n# 5. Large commits: single commits with big diffs\ngit log --format=\"%h %s\" --shortstat {base}..HEAD\n```\n\n**Verification:** Confirm each command produces output.\nIf a command returns empty, the commit range may be wrong;\nverify `{base}` resolves correctly with `git merge-base`.\n\n### Tier 1 Output Format\n\nWrite findings to `.coordination/agents/tier1-audit.findings.md`:\n\n```markdown\n---\nagent: tier1-audit\ntier: 1\nevidence_count: {N}\n---\n\n## Summary\n\n{1-2 sentence overview of what the git history reveals}\n\n## Churn Hotspots\n\n{top 10 most-changed files with change counts}\n\n[E1] Command: git log --format=\"\" --name-only ...\n     Output: {relevant output}\n\n## Fix-on-Fix Patterns\n\n{commits that fix previous commits in the same area}\n\n[E"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-pensive-tiered-audit\",\n  \"version\": \"1.9.19\",\n  \"publishedAt\": 1787750379886\n}"},{"path":"modules/escalation-criteria.md","content":"---\nname: escalation-criteria\ndescription: |\n  Defines when and why to escalate between audit tiers.\n  Tier 1 (git history) -> Tier 2 (targeted area) ->\n  Tier 3 (full codebase).\ncategory: audit-scoping\n---\n\n# Escalation Criteria\n\nAudit tiers escalate based on evidence from the\nprevious tier, not by default.\nEach escalation requires documented justification.\n\n## Tier 1 -> Tier 2 Escalation\n\nTier 1 (git-history analysis) flags areas for Tier 2\nwhen ANY of these criteria are met:\n\n### Churn Hotspots\n\n- **3+ files** in the same module changed in the\n  analyzed commit range\n- **AND** at least one file changed more than twice\n- Indicates active development area worth deeper review\n\n### Fix-on-Fix Patterns\n\n- A commit that fixes a previous fix within the same\n  module (commit messages containing \"fix\", \"revert\",\n  \"patch\", \"hotfix\" targeting the same files)\n- Indicates instability or insufficient testing\n\n### Large Diffs\n\n- Any single commit touching **200+ lines** in one\n  module\n- Large changes are statistically more likely to\n  contain defects\n\n### Suspicious Patterns\n\n- Reverted commits (indicates something went wrong)\n- Commits with no tests added alongside implementation\n  changes\n- Force-pushed branches affecting the module\n\n### New File Clusters\n\n- **5+ new files** added to a single module in the\n  analyzed range\n- Indicates new feature work that may lack review\n  coverage\n\n## Tier 2 -> Tier 3 Escalation\n\nTier 2 (targeted area audit) recommends Tier 3 when\nANY of these criteria are met:\n\n### Cross-Cutting Concerns\n\n- Findings in one area reveal issues that likely\n  affect other areas (e.g., a shared utility function\n  with a bug, a pattern used across modules)\n\n### Architectural Issues\n\n- Tier 2 findings indicate structural problems\n  (circular dependencies, layering violations,\n  inconsistent patterns across modules)\n\n### Coverage Gaps\n\n- Tier 2 reveals that the flagged area is\n  representative of a broader pattern (e.g., all\n  plugins share the same anti-pattern)\n\n### Severity Threshold\n\n- Tier 2 finds **3+ critical-severity issues** in\n  a single area, suggesting systemic quality problems\n\n## Tier 3 Gate\n\nTier 3 (full codebase audit) requires:\n\n1. **Documented justification** from Tier 2 findings\n2. **Explicit user approval** before proceeding\n3. **Recommended execution mode**: dedicated sessions\n   (not subagents), one area at a time, sequential\n\nThe system MUST present the justification and wait for\nconfirmation.\nIt MUST NOT auto-escalate to Tier 3.\n\n## Escalation Log Format\n\nEvery escalation records:\n\n```markdown\n## Escalation: Tier {N} -> Tier {N+1}\n\n**Date**: {timestamp}\n**From tier**: {N}\n**To tier**: {N+1}\n**Target areas**: {list of modules/directories}\n\n### Triggering Evidence\n\n{specific findings from the previous tier that\ntriggered this escalation, with evidence tags}\n\n### Justification\n\n{why this escalation is warranted, referencing\nthe criteria above}\n```\n\n## No-Escalation Path\n\nWhen Tier 1 finds NO flags:\n\n- Audit completes at T"},{"path":"modules/tier2-targeted.md","content":"---\nname: tier2-targeted\ndescription: |\n  Tier 2 targeted area audit. Deep-dives into areas\n  flagged by Tier 1, one area at a time, sequential.\ncategory: audit\n---\n\n# Tier 2: Targeted Area Audit\n\nRuns ONLY for areas flagged by Tier 1 escalation.\nEach area is audited sequentially, never in parallel.\n\n## Execution Protocol\n\nFor each flagged area in the escalation list:\n\n1. Load the area context from plugin CLAUDE.md and\n   skill descriptions\n2. Read source files in the area\n3. Analyze for:\n   - Code quality patterns and anti-patterns\n   - Test coverage (do tests exist for this code?)\n   - Documentation currency (do docs match the code?)\n   - Architectural fit (does this follow project\n     conventions?)\n4. Write findings to\n   `.coordination/agents/tier2-{area-slug}.findings.md`\n5. Validate findings against the Tier 2 output contract\n6. Move to next area\n\n## Output Contract (Tier 2)\n\n```yaml\noutput_contract:\n  required_sections:\n    - summary\n    - scope_analyzed\n    - findings_by_severity\n    - recommendations\n    - evidence\n  min_evidence_count: 8\n  expected_artifacts: []\n  retry_budget: 1\n  strictness: strict\n```\n\nTier 2 uses strict mode because it reads source files\nand should produce thorough, evidence-backed analysis.\n\n## Sequential Execution\n\nAreas are processed one at a time because:\n\n- Each area analysis fills a significant portion of\n  the agent's context\n- Sequential processing prevents context cross-\n  contamination between areas\n- The coordinator can review each area's findings\n  before proceeding to the next\n- If early areas reveal the issue is resolved, later\n  areas can be skipped\n\n## Escalation to Tier 3\n\nAfter all Tier 2 areas are audited, check whether\nTier 3 is warranted per `escalation-criteria.md`.\nIf so, present justification to the user and wait\nfor explicit approval."},{"path":"modules/tier3-gate.md","content":"---\nname: tier3-gate\ndescription: |\n  Gate for Tier 3 full-codebase audit. Requires explicit\n  user approval and recommends dedicated sessions.\ncategory: audit\n---\n\n# Tier 3: Full Codebase Audit Gate\n\nTier 3 is the most expensive audit tier.\nIt MUST NOT run without explicit user approval.\n\n> **Why this stays opt-in.** Per\n> [docs/inclusive-defaults.md][inc] (TRUE-exception\n> category 7), Tier 1 (git history) is the inclusive\n> default. Full-codebase scans burn compute and tokens\n> at a rate that requires explicit user authorization.\n\n[inc]: ../../../../../docs/inclusive-defaults.md\n\n## Gate Protocol\n\nWhen Tier 2 findings indicate Tier 3 is warranted:\n\n1. Present the justification to the user:\n\n```markdown\n## Tier 3 Escalation Recommended\n\nTier 2 findings suggest a full codebase audit is\nwarranted.\n\n### Justification\n\n{specific Tier 2 findings that triggered this}\n\n### Areas Already Reviewed (Tier 2)\n\n{list of areas already audited}\n\n### Estimated Scope\n\n{number of remaining areas / files}\n\n### Recommended Approach\n\n- Use dedicated sessions (one per area)\n- Process areas sequentially\n- Coordinate via .coordination/ files\n- Do NOT use parallel subagents\n\nProceed with Tier 3? [requires explicit yes]\n```\n\n2. Wait for user confirmation\n3. If approved, execute with dedicated sessions\n4. If declined, finalize with Tier 2 findings\n\n## Execution Mode\n\nTier 3 MUST use dedicated sessions because:\n\n- Full codebase analysis fills context windows quickly\n- Parallel subagents would degrade quality\n  (the exact problem this system solves)\n- Dedicated sessions get full context windows with\n  no completion pressure\n- File-based coordination preserves all findings\n\n## Output\n\nEach area produces findings in the standard format:\n`.coordination/agents/tier3-{area-slug}.findings.md`\n\nFinal synthesis reads all findings files and produces\na comprehensive report."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Runs a three-tier codebase audit (git history, targeted scans, full review) with gating Skill: tiered-audit Owner: athola Summary: Runs a three-tier codebase audit (git history, targeted scans, full review) with gating Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:19:39.886Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:39:49.189Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:56:37.407Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:04:46.458Z | user Release v1.9.14 v1.9.13 | 2026-06-27","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":881,"uniquenessScore":55,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T07:08:31.244Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:49:47.587Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}