Skip to content
cccskills
FreePublished on GitHub

cross-module-consistency-auditor

変更が波及する全モジュール・全フローを特定し、集計ルール、状態遷移、符号反転、 コピペ差分、表示/帳票/APIの整合性を監査するスキル。Impact Mapで変更核から 影響範囲を可視化し、Consistency Matrixで横断整合を検証し、Copy Propagation Review戦略でコピペ実装を効率的にレビューする。

Use when one change affects multiple modules, reports, flows, or copied implementations. Audits aggregation totals, state transitions, sign inversion, and cross-module consistency.

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (10)

  • SKILL.md16.0 KB
  • assets/consistency_matrix_template.md5.4 KB
  • assets/copy_propagation_review_template.md6.3 KB
  • assets/cross_module_test_checklist_template.md7.0 KB
  • assets/impact_map_template.md7.3 KB
  • references/aggregation_reconciliation_guide.md9.3 KB
  • references/change_impact_analysis_guide.md6.6 KB
  • references/consistency_rule_catalog.md8.6 KB
  • references/copy_propagation_strategy.md8.2 KB
  • references/reverse_flow_checklist.md10.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Cross Module Consistency Auditor

Overview

A structured audit skill for verifying cross-module consistency when a single change propagates across multiple modules, flows, reports, APIs, and copied implementations. This skill maps the blast radius of a change, defines consistency rules that must hold across all affected touchpoints, and produces a review strategy that avoids redundant effort on copy-paste code.

Core Value: Prevents the class of defects where "the fix was applied correctly in one place but missed or applied inconsistently elsewhere" -- the root cause behind aggregation mismatches, sign-inversion bugs, report-vs-drilldown discrepancies, and incomplete reverse-flow implementations.

Scope Boundary: This skill focuses on cross-module consistency of a known change. For single-function code quality, use critical-code-reviewer. For data migration QA, use migration-validation-explorer. For incident root cause analysis, use incident-rca-specialist.

When to Use

  • A specification change affects multiple screens, reports, APIs, or batch jobs
  • The same logic must be replicated across multiple flows (e.g., 6 transaction types)
  • Refund / void / cancellation / correction requires sign inversion or reverse journaling
  • Report totals and drill-down totals must reconcile
  • A canonical implementation was copied to multiple locations and you need an efficient review strategy
  • A DB schema change propagates to views, stored procedures, APIs, and UI
  • You need to verify that state transition rules are enforced consistently at every entry point
  • Tax or rounding logic must be identical across all calculation paths

Prerequisites

  • Change specification available: A description of what is changing (feature spec, ticket, PR description)
  • Module inventory accessible: Ability to identify affected modules, files, or services
  • Output specifications available: Report definitions, API contracts, UI mockups, or export formats
  • Existing tests identifiable: Access to test suites or test case documentation

Inputs

  • Change specification or feature description
  • Implementation target list (modules, files, services)
  • Related module inventory
  • Report / API / UI output specifications
  • Existing test cases or test suites
  • (Optional) Prior review findings or RCA reports

Outputs

  1. Change Impact Map -- Visualizes the change kernel, source of truth, and all affected modules/outputs/tests/docs
  2. Cross-Module Consistency Matrix -- Rules x modules grid showing expected vs actual behavior and gaps
  3. Copy Propagation Review Plan -- Efficient review strategy separating canonical review from diff-only review
  4. Cross-Module Test Checklist -- Consistency rules converted to testable assertions with tiers and owners
  5. Open Questions / Missing Modules List -- Unresolved items and modules that may be affected but lack confirmation (recorded as an appendix in assets/impact_map_template.md)

Workflows

Workflow 1: Define the Change Kernel (変更核定義)

Identify the atomic unit of change and its canonical representation.

  1. Extract the minimal change unit from the specification:
    • New line item type (e.g., adjustment, correction, refund)
    • New calculation rule (e.g., rounding, tax, discount)
    • New status or state transition
    • New aggregation rule or filter condition
    • Schema modification (column addition, type change, constraint)
    • Semantic change (e.g., timestamp meaning shifts from "created" to "submitted")
  2. Identify the source of truth -- the single authoritative location where this logic is defined or should be defined
  3. Document the change kernel using:
    • What: Precise description of the change
    • Where: Source of truth file/module/function
    • Why: Business requirement driving the change
    • Invariant: The consistency rule that must hold everywhere this change touches
  4. If the change kernel is compound (multiple independent changes bundled), decompose into separate kernels and process each independently

Workflow 2: Apply Impact Lenses (影響レンズ適用)

Systematically expand the blast radius using eight impact lenses.

  1. For each lens below, ask "Does this change affect [lens area]?" and list affected components:
    • Input flows: Forms, API endpoints, file imports, message consumers that create or modify data
    • Persistence: Database writes, cache updates, event stores, audit logs
    • Aggregation: Summation, grouping, rollup, materialized views, batch calculations
    • Display / Reports: UI screens, dashboards, PDF reports, Excel exports, email notifications
    • API / Export: REST/GraphQL responses, file exports, webhook payloads, integration feeds
    • Reverse flow: Refund, void, cancellation, deletion, undo, correction, reversal journal entries
    • Permission / Visibility: Role-based access, field-level security, tenant isolation, data masking
    • Downstream jobs: Batch processes, scheduled tasks, sync jobs, event-driven subscribers, external system integrations
  2. For each affected component, record:
    • Module/file name
    • Whether it reads or writes the affected data
    • Whether it contains a copy of the logic or references the source of truth
  3. Load references/change_impact_analysis_guide.md for detailed techniques on tracing propagation paths

Workflow 3: Build the Impact Map (Impact Map作成)

Create a structured impact map from the lens analysis.

  1. Use the template from assets/impact_map_template.md
  2. Fill in all sections:
    • Change Kernel: From Workflow 1
    • Source of Truth: Canonical implementation location
    • Affected Modules: Grouped by lens category (input/persistence/aggregation/display/API/reverse/permission/downstream)
    • Affected Outputs: Reports, API responses, exports, notifications
    • Affected Tests: Unit tests, integration tests, E2E tests, manual test cases
    • Affected Documentation: Technical specs, API docs, user guides, runbooks
    • Risk Notes: Modules with high copy count, modules with no test coverage, modules owned by other teams
  3. Generate a dependency summary:
    • Count of affected modules per lens
    • Count of copy-paste implementations vs shared-reference implementations
    • Identify modules with no current test coverage for the affected behavior
  4. Flag any modules where impact is uncertain with [NEEDS CONFIRMATION]

Workflow 4: Define Consistency Rules (Consistency Rules定義)

Define the rules that must hold across all affected modules.

  1. Load references/consistency_rule_catalog.md for the full category list
  2. For each applicable category, define specific rules for this change:
    • Aggregation totals: Sum of parts equals whole; included/excluded items are consistent
    • Status transitions: Allowed transitions are identical at every entry point; guard conditions match
    • Sign inversion: Positive/negative symmetry for forward/reverse flows
    • Tax / Rounding: Same calculation method, same precision, same rounding direction everywhere
    • Visibility / Permission: Same data is visible/hidden to the same roles across all views
    • Naming / Constants: Enum values, status codes, error codes are consistent
    • Report vs Drill-down: Summary totals match the sum of detail rows
  3. Load references/aggregation_reconciliation_guide.md for aggregation-specific rules
  4. Load references/reverse_flow_checklist.md for reverse-flow-specific rules
  5. Populate the consistency matrix using assets/consistency_matrix_template.md:
    • One row per module/flow/report/API
    • Columns: Rule, Expected Behavior, Current State, Gap, Owner
  6. Mark each cell as: PASS / FAIL / NOT TESTED / NOT APPLICABLE

Workflow 5: Design Copy Propagation Review Strategy (Copy Propagationレビュー戦略)

Create an efficient review plan for copied implementations.

  1. Load references/copy_propagation_strategy.md
  2. Identify the canonical implementation -- the one copy that will receive full, thorough review
  3. For all other copies, determine:
    • Allowed differences: Intentional variations (different entity type, different field names, different error messages)
    • Required sameness: Logic that must be identical (calculation, validation, rounding, sign handling)
  4. Define the review approach:
    • Canonical: Full line-by-line review with test verification
    • Copy targets: Diff-only review against canonical, focusing on required-sameness sections
    • Exception documentation: Record every detected difference and classify as allowed or suspicious
  5. Populate the template from assets/copy_propagation_review_template.md
  6. Define the recheck trigger: conditions under which all copies must be re-reviewed from scratch (e.g., canonical implementation changes fundamentally)
  7. Assess extraction threshold: if copy count exceeds 3 and allowed differences are minimal, recommend extracting shared logic into a common module

Workflow 6: Convert to Test Checklist (テスト観点変換)

Transform consistency rules into a testable checklist.

  1. For each consistency rule from Workflow 4, create test assertions:
    • Cross-module assertion: Same input produces same output across all modules
    • Totals reconciliation: Report total equals sum of drill-down rows
    • Sign inversion check: Forward amount + reverse amount = 0 (or net expected value)
    • Before/after snapshot diff: State before change vs after change matches specification
    • Report vs drill-down match: Summary report numbers reconcile with detail views
    • Reverse flow symmetry: Create/refund, entry/void produce symmetric results
  2. Assign each test to a tier:
    • Unit: Can be tested within a single module
    • Integration: Requires two or more modules interacting
    • E2E: Requires full system flow from input to output
    • Manual: Requires human verification (UI layout, report formatting)
  3. Define test data requirements:
    • Standard case data set
    • Boundary case data set (zero amounts, maximum values, empty collections)
    • Reverse flow data set (refund after payment, void after entry)
  4. Populate the template from assets/cross_module_test_checklist_template.md
  5. Assign owners and priority based on gap analysis from Workflow 4

Resources

ResourceTypePurposeWhen to Load
references/change_impact_analysis_guide.mdReferenceSource of truth identification, propagation path tracing, upstream/downstream distinctionWorkflow 2
references/consistency_rule_catalog.mdReferenceFull catalog of consistency rule categories with examplesWorkflow 4
references/copy_propagation_strategy.mdReferenceCanonical review, diff review, exception handling, extraction thresholdWorkflow 5
references/aggregation_reconciliation_guide.mdReferenceTotal vs subtotal vs drill-down reconciliation, refund/void reversal rulesWorkflow 4
references/reverse_flow_checklist.mdReferenceCreate/update/delete symmetry, entry/refund/void/suspend patternsWorkflow 4
assets/impact_map_template.mdTemplateChange impact map with all sectionsWorkflow 3
assets/consistency_matrix_template.mdTemplateCross-module consistency matrixWorkflow 4
assets/copy_propagation_review_template.mdTemplateCopy propagation review planWorkflow 5
assets/cross_module_test_checklist_template.mdTemplateTest checklist derived from consistency rulesWorkflow 6

Worked Example: Multi-Flow Rounding Change

This example illustrates the full workflow for a cash rounding rule change that affects 6 transaction flows.

Scenario: A POS system needs to add cash rounding (round to nearest 0.05) to all cash payment transactions. The system has 6 transaction flows: Sale, Return, Exchange, Layaway Payment, Layaway Pickup, and Account Payment.

Step 1 -- Change Kernel:

  • What: Insert cash rounding adjustment line when payment method is cash
  • Where: payment_calculator.apply_cash_rounding() (source of truth)
  • Invariant: rounded_total = round_to_increment(original_total, Decimal("0.05")) and adjustment = rounded_total - original_total (use decimal/fixed-point arithmetic — never float for monetary calculations)

Step 2 -- Impact Lenses:

  • Input flows: 6 transaction entry screens
  • Persistence: transaction_lines table, adjustment_lines table
  • Aggregation: Daily cash summary, shift report, GL posting
  • Display: Receipt, transaction detail screen
  • API: POS-to-HQ sync payload
  • Reverse flow: Return must reverse the rounding adjustment
  • Permission: N/A (all cashiers see rounding)
  • Downstream: HQ consolidation, tax filing extract

Step 3 -- Impact Map: 6 input modules, 2 persistence modules, 3 aggregation modules, 4 display modules, 1 API module, 1 reverse flow module = 17 total touchpoints.

Step 4 -- Consistency Rules:

  • Rule 1: All 6 flows use identical rounding formula
  • Rule 2: Rounding adjustment appears as a distinct line item (not merged into product lines)
  • Rule 3: Return flow reverses rounding with opposite sign
  • Rule 4: Daily cash summary includes rounding adjustments in total
  • Rule 5: Receipt displays rounding adjustment as separate line
  • Rule 6: HQ sync payload includes rounding adjustment line

Step 5 -- Copy Propagation Review:

  • Canonical: Sale flow (full review)
  • Copy targets: Return, Exchange, Layaway Payment, Layaway Pickup, Account Payment (diff review)
  • Allowed differences: Transaction type enum, flow-specific validation
  • Required sameness: Rounding formula, adjustment line creation, sign handling

Step 6 -- Test Checklist:

  • Unit: Rounding formula produces correct result for boundary values (0.01, 0.02, 0.03, 0.04, 0.05)
  • Integration: Each flow creates correct adjustment line in DB
  • E2E: Receipt total matches DB total for each flow
  • Cross-module: Daily summary total = sum of all transaction totals (including rounding adjustments)
  • Reverse: Sale(100.03) + Return(100.03) rounding adjustments net to zero

Best Practices

Source of Truth Discipline

  • Every piece of logic should have exactly one source of truth
  • Copies should be documented and tracked in the impact map
  • When copy count exceeds 3 with minimal allowed differences, recommend extraction to shared module
  • Review the source of truth first and most thoroughly; review copies via diff

Completeness Over Depth

  • It is more important to identify all affected modules than to deeply analyze one module
  • Use the 8 impact lenses systematically -- do not skip lenses because they "probably" do not apply
  • Flag uncertain modules with [NEEDS CONFIRMATION] rather than omitting them
  • An incomplete impact map is the primary cause of post-deployment consistency bugs

Reverse Flow Is Not Optional

  • Every forward flow that creates data should have an identified reverse flow
  • If no reverse flow exists, document this as a gap (it may be intentional or it may be a missing requirement)
  • Reverse flows must be sign-symmetric: the sum of forward and reverse operations should produce the expected net result
  • Test reverse flows with the same rigor as forward flows

Consistency Rules Must Be Testable

  • A consistency rule that cannot be expressed as a pass/fail assertion is too vague
  • Each rule should reference specific modules, specific fields, and specific expected values
  • Prefer automated assertions over manual verification
  • Every FAIL in the consistency matrix should produce a ticket or action item with an owner

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Track and update action item status from natural language updates like 'Seanのメールには返信しておいた' or 'Lu対応予定'. Integrates with daily-comms-ops workflow. Use when managing action items across communication channels.

The English summary is being prepared. Showing the original description.

takusaotome/claude-skills-library10Updated Oct 23, 2026

AI活用提案の専門コンサルタントスキル。LLM・AIエージェントの活用事例知識を基に、業界別、部門別、シーン別に最適なAI導入提案を行います。システム化、業務改善、効率化を得意とし、具体的な活用事例、期待効果、導入ステップを含む実践的な提案を提供します。Use when proposing AI/LLM adoption strategies for specific industries, departments, or business scenarios.

The English summary is being prepared. Showing the original description.

takusaotome/claude-skills-library10Updated Oct 23, 2026

Generate AI-powered BPO service proposals for Japanese companies in the US market. Use when creating outsourcing proposals with AI service menus, ROI estimation, implementation roadmaps, and bilingual (JA/EN) proposal documents for 在米日系企業向けAI実装.

The English summary is being prepared. Showing the original description.

takusaotome/claude-skills-library10Updated Oct 23, 2026

AI(LLM)が生成した日本語テキストの「AI臭」を検出・診断し、人間らしい文章にリライトするスキル。 Use when: 「AIっぽい文章を直して」「人間らしくリライトして」「AI臭を消して」「この文章をもっと自然にして」 「テキストのAI感を減らして」「機械っぽさを取りたい」 "make this sound more human", "remove AI tone", "humanize this text", "detect if this is AI-generated". 6つのAI特有パターン(視覚的マーカー、単調なリズム、マニュアル的構成、非コミット姿勢、抽象語の濫用、 定型メタファー)を正規表現ベースで検出し、0-100のAI臭スコアを算出。3つの人間化技法 (バランスを崩す・客観を崩す・論理を崩す)でリライトを実行する。 Note: 検出スクリプトは日本語テキスト専用。英語テキストの場合はClaude自身がreferences/を参照して分析・リライトする。

The English summary is being prepared. Showing the original description.

takusaotome/claude-skills-library10Updated Oct 23, 2026

Generate audit-ready internal control design documents from As-Is business process inventories. Produces control IDs, assertion mappings, procedures, SoD analysis, KPIs, materiality thresholds, and implementation roadmaps. Use when building internal controls for new audit engagements, SOX/J-SOX compliance, or process improvement initiatives.

The English summary is being prepared. Showing the original description.

takusaotome/claude-skills-library10Updated Oct 23, 2026

Review audit-related documents (control design documents, bottleneck analyses, requirements definitions, etc.) for quality, scoring them 0-100 with a severity-rated findings list. Use when reviewing audit documents, checking control design quality, or verifying cross-document consistency. Supports documents governed by US GAAP, IFRS, or J-GAAP.

The English summary is being prepared. Showing the original description.

takusaotome/claude-skills-library10Updated Oct 23, 2026

See all skills by takusaotome

Report a problem with this skill