Skip to content

adf context --files: report live ceiling headroom for each file #443

Done

Description

@stackbilt-admin

Problem

adf evidence --auto-measure already knows each governed file's live line count and ceiling. It's only shown at commit time, after the code is written. At pinned 5412100, adf_migrate_loc is 792/792, so any added line fails the gate, and nothing tells the agent before it edits.

Measured on this repo's last 100 non-merge commits: 55 touched package source, and 18 of those touched a file with a METRICS ceiling.

Proposed (additive JSON)

For each --files entry that maps to a manifest METRICS source:

"ceilings": [{ "file": "packages/cli/src/commands/adf-migrate.ts", "metric": "adf_migrate_loc",
  "value": 792, "ceiling": 792, "headroom": 0, "status": "warn", "module": "core.adf" }]

Use exactly the same counting convention as adf evidence (trailing newline included), so the number the agent sees is the number CI enforces.

Acceptance

  • adf context --files packages/cli/src/commands/adf-migrate.ts --format json returns headroom: 0, and the value equals adf evidence --auto-measure's for that metric.
  • Files with no metric get no ceilings entry; existing keys are unchanged.

Starting points

Manifest METRICS map, auto-measure in adf-evidence.ts.

Works on its own. Part of #437.

Activity

  1. added
    enhancement
    area:adf
    type:feature
    priority:p1
    epic:preflight
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:adfenhancementepic:preflightpriority:p1type:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions