Install
$ agentstack add skill-outcomeeng-claude-auditing-python-architecture ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Review ADRs against /standardizing-python-architecture conventions, /testing principles, atemporal voice rules, and applicable PDR constraints. Produce a structured verdict per concern. This skill is read-only -- it produces verdicts, not code changes.
Read /standardizing-python-architecture before reviewing any ADR. It defines the canonical ADR sections, how testability appears in Compliance rules, and what does NOT belong in an ADR.
For spec-tree work items: Load complete ADR/PDR hierarchy before reviewing.
If you're reviewing ADRs for a spec-tree work item (enabler/outcome), ensure complete architectural context is loaded:
- Invoke
spec-tree:contextualizingwith the node path - Verify all ancestor ADRs/PDRs are loaded -- must check for consistency with decision hierarchy
- Verify ADR references ancestor decisions -- node ADRs should reference relevant ancestor ADRs/PDRs
The spec-tree:contextualizing skill provides:
- Complete ADR/PDR hierarchy (product and ancestor decisions at all levels)
- TRD with technical requirements
- Target node spec with typed assertions
Review focus:
- Does ADR contradict any ancestor ADR/PDR decisions?
- Does ADR Compliance section include testability constraints (DI, no mocking)?
- Does ADR use only the authoritative sections (no phantom sections)?
- Does ADR honor atemporal voice in ALL sections?
- Does ADR document trade-offs and consequences?
If NOT working on spec-tree work item: Proceed directly with ADR review using provided architectural decision.
- Read
/standardizing-python-architecturefor canonical conventions - Read
/testingfor methodology (5 stages, 5 factors, 7 exceptions) - Verify an ADR exists. If the module makes architectural decisions (module layout, library choice, DI patterns) without an ADR, the absence is the violation — REJECT immediately. Do not treat missing ADRs as N/A.
- Read the ADR completely
- Check section structure -- only authoritative sections allowed (Purpose, Context, Decision, Rationale, Trade-offs accepted, Invariants, Compliance). Flag phantom sections (Testing Strategy, Status, etc.)
- Check EVERY section for temporal language -- reject any reference to current code, existing files, or migration plans
- Check Compliance section -- must include testability constraints as MUST/NEVER rules; must NOT include level assignment tables
- Check for mocking language -- reject unittest.mock.patch, respx.mock, "mock at boundary" in any section
- Verify level accuracy -- SaaS services jump L1 to L3 (no Level 2)
- Check test double usage -- must document which
/testingexception case applies - Identify all violations and classify per concern
- Output structured verdict -- APPROVED or REJECTED with per-concern table
These are real failures from past audits. Study them to avoid repeating them.
Accepted temporal language because it was in the Rationale section. The auditor assumed Rationale was exempt from atemporal voice because it explains "why." It is not exempt. "After evaluating options, we decided..." narrates decision history. Atemporal: "X was rejected because Y violates Z." The atemporal voice rule applies to ALL sections, no exceptions.
Approved ADR with "DI Protocol" but no testing strategy in Compliance. The auditor saw a Protocol definition in the Decision section and assumed testing was covered. The ADR had no Compliance rules enabling specific levels -- the Protocol existed but nothing mandated its use. A Protocol definition is not a testability constraint; a MUST rule requiring it as a parameter is.
Missed "respx.mock" in a code example. The ADR's Compliance section showed mocking in a code block illustrating the "correct approach." The auditor only checked prose for mocking language, not code examples. Check ALL content -- prose and code blocks.
Accepted Level 2 for a SaaS service. The auditor didn't verify the "SaaS services jump L1 to L3" rule and accepted Level 2 for Trakt.tv API testing. SaaS services cannot run locally -- there is no Level 2. This is one of the most commonly violated principles.
Flagged a phantom section but missed the real problem. The auditor correctly rejected a Testing Strategy section but didn't check whether the Compliance section had equivalent testability constraints. Removing a phantom section is not enough -- the testability constraints must appear somewhere in the ADR (in Compliance).
Confused sys.path manipulation with a real import. A test fixture inserted a fake module into sys.path, making it appear as a real dependency. The auditor missed this because they only checked import statements, not runtime path manipulation. When reviewing ADR examples that reference imports, check for sys.path and importlib tricks.
All canonical conventions are in /standardizing-python-architecture. Read it first. The audit checks these specific concerns:
1. Section structure -- Only authoritative sections from the ADR template. See ` in /standardizing-python-architecture` for the complete list. Flag any section not in that list.
2. Testability in Compliance -- The Compliance section must include MUST/NEVER rules that enable appropriate testing. See ` in /standardizing-python-architecture` for the correct pattern. Level assignment tables and Testing Strategy sections are violations.
3. Atemporal voice -- ADRs state architectural truth in ALL sections. See ` in /standardizing-python-architecture` for temporal patterns to reject and rewrite examples.
4. Mocking prohibition -- No mocking language anywhere in the ADR. See ` in /standardizing-python-architecture` for what to check and correct ADR language.
5. Level accuracy -- When the Compliance section references testing levels, verify against /testing definitions. See ` in /standardizing-python-architecture`. Key rule: SaaS services (Trakt, GitHub API, Stripe, Auth0) jump L1 to L3 (no Level 2).
6. Anti-patterns -- Check for content that does not belong in an ADR. See ` in /standardizing-python-architecture for the full table. Note Python-specific anti-pattern: src. import examples should use product. / product_testing.*`.
7. Test double exception cases -- Any test double usage must document which of the 7 /testing Stage 5 exceptions applies. No exception = no doubles.
````markdown
ARCHITECTURE REVIEW
Decision: [APPROVED | REJECTED]
Verdict
| # | Concern | Status | Detail | | - | --------------------- | ----------------- | ----------------- | | 1 | Section structure | {PASS/REJECT} | {one-line detail} | | 2 | Testability in Compl. | {PASS/REJECT} | {one-line detail} | | 3 | Atemporal voice | {PASS/REJECT} | {one-line detail} | | 4 | Mocking prohibition | {PASS/REJECT} | {one-line detail} | | 5 | Level accuracy | {PASS/REJECT} | {one-line detail} | | 6 | Anti-patterns | {PASS/REJECT} | {one-line detail} | | 7 | Ancestor consistency | {PASS/REJECT/N/A} | {one-line detail} |
Violations
{Violation name}
Where: {Section name or quoted text identifying the location} Concern: {Which concern from the verdict table} Why this fails: {Direct explanation}
Correct approach:
{Show what the architecture should be}
{Repeat for each violation}
Required Changes
{Concise list of what must change}
References
- /standardizing-python-architecture: {section name}
- /testing: {section name if applicable}
{If REJECTED: "Revise and resubmit."} {If APPROVED: "Architecture meets standards."}
````
Don't:
- Reference specific line numbers (they change) -- use section names or quoted text
- Provide grep commands -- focus on principles, not tooling
- Explain the same principle multiple times -- be concise
- Approve an ADR just because it removed a phantom section -- check that testability constraints moved to Compliance
Do:
- Reference
/standardizing-python-architecturesection names (e.g., `,`) - Reference
/testingsection names for level rules (e.g., "Stage 2 Five Factors", "Cardinal Rule") - Reference
/standardizing-python-testingfor Python-specific Protocol patterns - Show correct architecture with code examples
- Be direct about violations
- Reject temporal language in ANY section -- Context, Decision, Rationale, Compliance
- Show the atemporal rewrite alongside each temporal violation
Read ${SKILL_DIR}/references/example-review.md for a complete REJECTED review showing all concern types: SaaS Level 2 violation, mocking language, missing testability in Compliance, and temporal voice violations.
Review is complete when:
- [ ] Read
/standardizing-python-architecturebefore starting review - [ ] Checked section structure against authoritative ADR template
- [ ] Checked ALL sections for temporal language -- Context, Decision, Rationale, Compliance
- [ ] Verified Compliance section includes testability constraints (MUST/NEVER for DI, no mocking)
- [ ] Verified no phantom sections (Testing Strategy, Status, etc.)
- [ ] Verified no mocking language anywhere in ADR (prose AND code examples)
- [ ] Verified level assignments -- no Level 2 for SaaS services
- [ ] Verified test double usage has documented exception case
- [ ] Verified ADR never names files to delete or code to replace
- [ ] Output follows format with section references (not line numbers)
- [ ] Structured verdict table with per-concern status
- [ ] Correct approach shown with code examples for each violation
- [ ] Decision clearly stated (APPROVED/REJECTED)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: outcomeeng
- Source: outcomeeng/claude
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.