dimensional analysis

Other Community

Skill notes

When to Use

Annotating a codebase with unit/dimension comments (e.g., D18{tok}, D27{UoA/tok}) Performing dimensional analysis on DeFi protocols, financial code, or scientific computations Hunting for arithmetic bugs caused by unit mismatches, missing scaling, or precision loss Auditing codebases with mixed decimal precisions or fixed-point arithmetic

When NOT to Use

Codebases with no numeric arithmetic or unit conversions — there is nothing to annotate Pure integer counting logic (loop indices, array lengths) with no physical or financial dimensions When you only need a quick spot-check of a single formula — read the code directly instead of running the full pipeline

Execution Mode

This skill runs in one mode only: full-auto. This is a workflow-based skill that delegates step-specific work to specialized agents via the Task tool. You orchestrate the overall process, manage coverage and state persistence, and ensure that every in-scope file is processed through each step of the pipeline. Always run the full pipeline in this order: Step 1 -> Step 2 -> Step 3 -> Step 4. The main skill context must not perform repository-wide dimensional analysis, annotation, propagation, or bug validation itself when a dedicated subagent exists for that step.

Scope and Coverage Guarantees

This skill must audit all in-scope arithmetic files, including large repositories. In-scope files are defined by Step 1 scanner output (files array), across all priority tiers (CRITICAL, HIGH, MEDIUM, LOW). If Step 1 narrows inputs for vocabulary discovery (for example, CRITICAL/HIGH only), that narrowing applies to discovery only. It never reduces annotation or validation scope. arithmetic-scanner persists the in-scope file manifest to DIMENSIONAL_SCOPE.json in the project root, and that manifest is the source of truth for Steps 2-4.

Delegation Contract

arithmetic-scanner owns repository scanning, arithmetic-file prioritization, and writing DIMENSIONAL_SCOPE.json. dimension-discoverer owns dimensional vocabulary discovery, unit inference, and writing DIMENSIONAL_UNITS.md. dimension-annotator owns annotation format decisions, anchor-point edits, and comment-writing behavior. dimension-propagator owns propagation logic, inferred annotations, and mismatch reporting during tracing.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@trailofbits · no license declared
Token usage
Heavy
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview dimensional-analysis.preview
# Final Output

{
  "mode": "full-auto",
  "project_root": "<path>",
  "vocabulary": {
    "base_units": ["..."],
    "derived_units": ["..."],
    "precision_prefixes": ["..."]
  },
  "annotations": {
    "total_added": 0,
    "by_file": {}
  },
  "findings": {
    "critical": 0,
    "high": 0,
    "medium": 0,
    "details": []
  },
  "uncertainties_resolved": 0,
  "coverage": {
    "in_scope_files": 0,
    "anchor_reviewed_files": "0/0",
    "propagation_reviewed_files": "0/0",
    "validation_reviewed_files": "0/0",
    "annotated_functions": "0/0",
    "annotated_variables": "0/0",
    "unprocessed_files": [
      {
        "path": "/path/to/repo/contracts/LegacyMath.sol",
        "blocked_step": "step3",
        "reason": "Parser could not process generated source",
        "retry_count": 1
      }
    ]
  }
}

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.