agentic-scorecard 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/AGENT_PROMPT.md +68 -52
  2. package/README.md +50 -37
  3. package/benchmark/v0.4/adapter-contract.md +129 -0
  4. package/benchmark/v0.4/adapters/known-agent-harnesses.yaml +266 -0
  5. package/benchmark/v0.4/adapters/known-ci-providers.yaml +57 -0
  6. package/benchmark/v0.4/adapters/known-command-wrappers.yaml +37 -0
  7. package/benchmark/v0.4/adapters/known-environment-tooling.yaml +17 -0
  8. package/benchmark/v0.4/adapters/known-github-conventions.yaml +27 -0
  9. package/benchmark/v0.4/adapters/known-python-tooling.yaml +15 -0
  10. package/benchmark/v0.4/adapters/known-security-tools.yaml +45 -0
  11. package/benchmark/v0.4/adapters/known-verification-tools.yaml +65 -0
  12. package/benchmark/v0.4/agent-evidence-schema.json +74 -0
  13. package/benchmark/v0.4/attestation-schema.json +35 -0
  14. package/benchmark/v0.4/benchmark.yaml +127 -0
  15. package/benchmark/v0.4/calibration-matrix.md +60 -0
  16. package/benchmark/v0.4/controls/context.yaml +75 -0
  17. package/benchmark/v0.4/controls/environment.yaml +93 -0
  18. package/benchmark/v0.4/controls/governance.yaml +132 -0
  19. package/benchmark/v0.4/controls/learning.yaml +78 -0
  20. package/benchmark/v0.4/controls/observability.yaml +91 -0
  21. package/benchmark/v0.4/controls/resilience.yaml +170 -0
  22. package/benchmark/v0.4/controls/security.yaml +143 -0
  23. package/benchmark/v0.4/controls/specification.yaml +65 -0
  24. package/benchmark/v0.4/controls/testing.yaml +82 -0
  25. package/benchmark/v0.4/controls/tooling.yaml +69 -0
  26. package/benchmark/v0.4/report-schema.json +89 -0
  27. package/benchmark/v0.4/scoring-policy.md +175 -0
  28. package/dist/cli.js +2315 -162
  29. package/package.json +3 -2
  30. package/templates/agent-evidence.yaml +2 -2
  31. package/templates/attestations.yaml +3 -1
package/AGENT_PROMPT.md CHANGED
@@ -1,69 +1,85 @@
1
- # Ask an AI coding agent to run ADRB v0.3
1
+ # Ask an AI coding agent to run ADRB v0.4
2
2
 
3
3
  These prompts are vendor-neutral. The agent needs terminal access to the repository and permission
4
4
  to download the published npm package. The default benchmark runs locally, reads only tracked paths,
5
5
  invokes no model, uploads no source, and makes no network calls after installation.
6
6
 
7
- ## Recommended: repository baseline
7
+ ## Recommended: complete agent-assisted assessment
8
8
 
9
9
  Copy and paste:
10
10
 
11
11
  ```text
12
- Assess this repository's readiness for AI-agent pull-request work.
13
-
14
- From the repository root, run:
15
- npx --yes agentic-scorecard@0.3.0 assess . --profile pr-creation --scope tracked --format markdown --output .agentic/reports/agentic-readiness-v0.3.0.md
16
-
17
- Do not change product source, configuration, policies, or tests. Do not invent evidence or mark an
18
- attestation as met. Read the report and tell me:
19
- 1. the normative score out of 40 and the repository-detected progress against its offline ceiling;
20
- 2. the highest passed readiness profile and whether pr-creation passes;
21
- 3. each target-profile blocker and its evidence scope;
22
- 4. the five highest-value improvements in dependency order;
23
- 5. which findings are repository gaps versus external or outcome evidence not yet established; and
24
- 6. any likely false positive or false negative.
25
-
26
- Keep repository-detected, agent-collected, and human-attested evidence separate. Treat UNKNOWN as
27
- unresolved, not failed. Leave generated artifacts uncommitted unless I explicitly ask otherwise. If
28
- the command cannot run, explain the exact blocker without modifying the repository to work around
29
- it.
12
+ Perform the complete ADRB v0.4 assessment of this repository for AI-agent pull-request work.
13
+
14
+ Do not change product source, tests, configuration, policies, Git history, or the user's current
15
+ checkout. First inspect the repository's commit, tracked-file status, upstream tracking branch, and
16
+ ahead/behind state. If read-only network access is already authorized, fetch the upstream before
17
+ comparing it. Select the commit before creating an assessment worktree. Default to the current HEAD;
18
+ a dirty checkout does not change that selection, so assess HEAD from an isolated clean worktree. Use
19
+ the fetched upstream commit only when I asked for the latest/current upstream state and the branch is
20
+ behind. If the checkout is both dirty and behind, state both facts and preserve HEAD by default unless
21
+ I explicitly asked for upstream or another commit. State the exact commit you selected and why.
22
+
23
+ Before running the scorecard, choose and state an absolute durable artifact directory outside any
24
+ temporary worktree. Do not delete that directory during worktree cleanup. In the commands below,
25
+ replace `<artifact-dir>` with that path. The npm package and immutable ADRB benchmark are both
26
+ version 0.4.0, so report filenames also use 0.4.0.
27
+
28
+ From that clean target, run the repository-only baseline:
29
+ npx --yes agentic-scorecard@0.4.0 assess . --profile pr-creation --scope tracked --format markdown --output <artifact-dir>/agentic-readiness-v0.4.0-baseline.md
30
+
31
+ Then prepare unresolved evidence:
32
+ npx --yes agentic-scorecard@0.4.0 init-evidence . --output <artifact-dir>/agent-evidence.yaml --request-output <artifact-dir>/evidence-request.md
33
+
34
+ Read the baseline, `<artifact-dir>/evidence-request.md`, and the empty target-bound
35
+ `<artifact-dir>/agent-evidence.yaml`. Investigate nuanced repository-scoped requests only from
36
+ tracked files at the selected commit. Before accessing Git hosting settings, CI, dashboards, logs,
37
+ ticketing, or any other connected system, tell me exactly which least-privileged read-only tools,
38
+ accounts, repositories, branches, dashboards, and time ranges you need, and why. Wait for my
39
+ authorization.
40
+
41
+ After authorization, attempt only eligible requests. For every attempted claim, record its status,
42
+ scope, concise derivation, collection time, 30-day-or-shorter expiry, and durable privacy-safe
43
+ references. Repository claims must use `repo:<path>[#Lx-Ly]`; do not merely restate a keyword match.
44
+ A permission error, stale source, or inconclusive result remains unknown and records the error.
45
+ Never infer a pass, invent an attestation, or treat unavailable evidence as a failure.
46
+
47
+ Do not place credentials, prompts, source excerpts, raw logs, personal data, customer data, private
48
+ URLs that reveal secrets, or sensitive dashboard contents in generated files.
49
+
50
+ When authorized evidence collection is complete, run:
51
+ npx --yes agentic-scorecard@0.4.0 assess . --profile pr-creation --scope tracked --agent-evidence <artifact-dir>/agent-evidence.yaml --format markdown --output <artifact-dir>/agentic-readiness-v0.4.0-assisted.md
52
+
53
+ Tell me the repository-detected progress and normative score, the highest passed profile, whether
54
+ pr-creation passes, every target blocker, and the five highest-value improvements. Compare baseline
55
+ and assisted reports control by control. Keep repository-detected, agent-collected, and
56
+ human-attested evidence separate; treat UNKNOWN as unresolved, not failed; and flag likely false
57
+ positives or negatives. If I decline external access, stop after the baseline and label it clearly as
58
+ a repository-only baseline. Before removing a temporary worktree, verify that every report, evidence
59
+ request, and evidence bundle you cite exists in the durable artifact directory, then tell me that
60
+ directory's absolute path. Leave generated artifacts uncommitted unless I explicitly ask otherwise.
61
+ Do not describe any result as certified, compliant, safe, secure, or independently verified.
30
62
  ```
31
63
 
32
- ## Agent-assisted unresolved evidence
33
-
34
- Use this only after reviewing the repository baseline:
35
-
36
- ```text
37
- Investigate the controls that the ADRB v0.3 baseline could not establish.
38
-
39
- First ensure tracked files match HEAD and the repository has a commit, then run:
40
- npx --yes agentic-scorecard@0.3.0 init-evidence .
41
-
42
- Read `.agentic/evidence-request.md` and the empty target-bound
43
- `.agentic/agent-evidence.yaml` bundle. The request includes only unresolved controls that permit
44
- agent-collected evidence. Before accessing any connected system, tell me which read-only tools,
45
- accounts, repositories, branches, dashboards, and time ranges you need. Wait for my authorization.
46
-
47
- After authorization, use only least-privileged read-only operations. For each attempted control,
48
- record the source-backed status, scope, concise derivation, collection time, 30-day-or-shorter
49
- expiry, and durable privacy-safe references. For repository-scoped claims, cite only tracked files
50
- at the bound commit using `repo:<path>[#Lx-Ly]`; do not use a repository claim to restate a keyword
51
- match. Add only claims you actually investigated. A permission error or inconclusive result must
52
- remain unknown and include the error; never infer a pass.
64
+ The agent is an evidence investigator. The scorecard remains the scoring authority.
53
65
 
54
- Do not paste credentials, prompts, source excerpts, raw logs, personal data, customer data, or
55
- sensitive dashboard contents into the bundle.
66
+ ## Fast repository-only baseline
56
67
 
57
- Then run:
58
- npx --yes agentic-scorecard@0.3.0 assess . --profile pr-creation --scope tracked --agent-evidence .agentic/agent-evidence.yaml --format markdown --output .agentic/reports/agentic-readiness-v0.3.0-assisted.md
68
+ Use this when you want an offline first look and accept that platform, organization, and outcome
69
+ controls will remain unresolved:
59
70
 
60
- Summarize every score change and keep agent-collected evidence distinct from deterministic
61
- repository evidence and human attestations. Do not describe the result as certified, compliant,
62
- safe, secure, or independently verified.
71
+ ```text
72
+ Run a fast repository-only ADRB v0.4 baseline for AI-agent pull-request work. Verify and state the
73
+ selected commit and whether tracked files match HEAD, then run:
74
+ npx --yes agentic-scorecard@0.4.0 assess . --profile pr-creation --scope tracked --format markdown --output .agentic/reports/agentic-readiness-v0.4.0-baseline.md
75
+
76
+ Do not change repository files or invent evidence. Summarize repository-detected progress before
77
+ the normative score, target-profile blockers, and the five highest-value repository improvements.
78
+ Separate true repository gaps from platform, organization, and outcome evidence that this offline
79
+ scan cannot establish. Treat UNKNOWN as unresolved, not failed, and call the result a repository-only
80
+ baseline rather than a complete assessment. Leave generated artifacts uncommitted.
63
81
  ```
64
82
 
65
- The agent is an evidence investigator. The scorecard remains the scoring authority.
66
-
67
83
  ## Choose a different authority level
68
84
 
69
85
  Replace `pr-creation` with one of:
@@ -79,7 +95,7 @@ No benchmark profile grants production deployment authority.
79
95
  ## Guided remediation
80
96
 
81
97
  ```text
82
- Read the latest ADRB v0.3 report and create a remediation proposal for the failed target-profile
98
+ Read the latest ADRB v0.4 report and create a remediation proposal for the failed target-profile
83
99
  controls. Do not implement changes yet. Group recommendations into repository changes, platform or
84
100
  organizational controls, and outcome measurement. For each include the control ID, risk reduced,
85
101
  systems affected, accountable role, verification method, dependencies, and effort estimate. Never
@@ -90,7 +106,7 @@ authorize.
90
106
  ## Reassessment
91
107
 
92
108
  ```text
93
- Re-run the pinned ADRB v0.3.0 benchmark for the same profile and tracked scope. Compare reports
109
+ Re-run the pinned ADRB v0.4.0 benchmark with agentic-scorecard@0.4.0 for the same profile and tracked scope. Compare reports
94
110
  control by control. Explain changes using evidence and identify changed commit state, expired
95
111
  claims, scope differences, regressions, or newly established controls. Compare normative and
96
112
  repository-detected progress separately. Write a new dated report; do not overwrite the previous
package/README.md CHANGED
@@ -16,26 +16,33 @@ The benchmark measures the harness, not the model brand. It assesses ten dimensi
16
16
  maturity levels and applies non-compensating floors to five autonomy profiles. A high total score
17
17
  cannot hide a critical security, testing, governance, or recovery gap.
18
18
 
19
- This repository is a **v0.3 reference implementation** intended for public review and piloting. It
20
- is not a certification standard. The immutable v0.1 and v0.2 benchmarks remain available for
19
+ This repository is a **v0.4 reference implementation** intended for public review and piloting. It
20
+ is not a certification standard. The immutable v0.1, v0.2, and v0.3 benchmarks remain available for
21
21
  historical reproduction; scores from different benchmark versions are not directly comparable.
22
22
 
23
23
  ## Ask your coding agent
24
24
 
25
- You do not need to install or learn the CLI yourself. Paste this prompt into Codex, Claude Code,
25
+ You do not need to install or learn the CLI yourself. Paste this instruction into Codex, Claude Code,
26
26
  GitHub Copilot, Cursor, or another coding agent that has terminal access to your repository:
27
27
 
28
- > Assess this repository's readiness for AI-agent pull-request work. From the repository root, run
29
- > `npx --yes agentic-scorecard@0.3.0 assess . --profile pr-creation --scope tracked --format markdown --output .agentic/reports/agentic-readiness-v0.3.0.md`.
30
- > Do not change product source code or invent attestations. Read the resulting report and summarize
31
- > the score, highest passed profile, whether `pr-creation` passes, target-profile blockers, and the
32
- > five highest-value improvements. Separate repository gaps from external and outcome evidence, and
33
- > keep repository-detected, agent-collected, and human-attested evidence distinct. Flag likely false
34
- > positives or negatives. Leave generated artifacts uncommitted unless I ask you to commit them.
35
-
36
- That is the recommended first assessment. The agent downloads the pinned benchmark package, runs the
37
- read-only local collector, and explains the results. For alternate authority levels or a guided
38
- remediation session, use the prompts in [AGENT_PROMPT.md](AGENT_PROMPT.md).
28
+ > Perform the complete ADRB v0.4 assessment of this repository for AI-agent pull-request work using
29
+ > `agentic-scorecard@0.4.0`. First select and state the commit without modifying my checkout; preserve
30
+ > HEAD when the checkout is dirty, and use upstream only if I requested the latest upstream state.
31
+ > Assess it from a clean worktree and keep all generated artifacts in a durable directory outside any
32
+ > temporary worktree. Run the tracked repository baseline, then run `init-evidence`, read its evidence
33
+ > request, and tell me which least-privileged read-only connected systems you need. Wait for my
34
+ > authorization before accessing them. After authorized collection, rerun the assessment and compare
35
+ > the baseline and assisted reports control by control. Keep repository-detected, agent-collected, and
36
+ > human-attested evidence separate; never invent evidence; treat UNKNOWN as unresolved; and leave
37
+ > generated artifacts uncommitted.
38
+
39
+ The complete copy-and-paste prompt, including privacy limits and exact commands, is in
40
+ [AGENT_PROMPT.md](AGENT_PROMPT.md). It makes the evidence-assisted workflow the recommendation. A
41
+ fast filesystem scan remains available, but it is explicitly a **repository-only baseline** and
42
+ cannot establish platform, organization, or outcome controls by itself.
43
+
44
+ The reference CLI/package and immutable benchmark are both version 0.4.0. Generated report and
45
+ evidence filenames use the benchmark version.
39
46
 
40
47
  ## Feedback and community
41
48
 
@@ -70,7 +77,7 @@ A supported Node.js LTS release (20.19+, 22.13+, or 24+) is required. Assessment
70
77
  read-only, and offline by default.
71
78
 
72
79
  ```bash
73
- npx agentic-scorecard@0.3.0 assess /path/to/repository \
80
+ npx agentic-scorecard@0.4.0 assess /path/to/repository \
74
81
  --profile pr-creation \
75
82
  --scope tracked \
76
83
  --format markdown \
@@ -80,7 +87,7 @@ npx agentic-scorecard@0.3.0 assess /path/to/repository \
80
87
  To record controls that repository inspection cannot prove:
81
88
 
82
89
  ```bash
83
- npx agentic-scorecard@0.3.0 init /path/to/repository
90
+ npx agentic-scorecard@0.4.0 init /path/to/repository
84
91
  ```
85
92
 
86
93
  Complete `.agentic/attestations.yaml` with owners and durable evidence links, then assess again.
@@ -91,7 +98,7 @@ external systems, first generate a target-bound template. The repository must be
91
98
  with at least one commit so the bundle can bind to the exact assessed state:
92
99
 
93
100
  ```bash
94
- npx agentic-scorecard@0.3.0 init-evidence /path/to/repository
101
+ npx agentic-scorecard@0.4.0 init-evidence /path/to/repository
95
102
  ```
96
103
 
97
104
  Ask the agent to review `.agentic/evidence-request.md`, obtain approval before using
@@ -99,17 +106,19 @@ least-privileged read-only connectors, add attempted claims to `.agentic/agent-e
99
106
  rerun with `--agent-evidence`. The default bundle path is loaded automatically. See
100
107
  [AGENT_PROMPT.md](AGENT_PROMPT.md) for the complete copy-and-paste workflow.
101
108
 
102
- ### Migrating from v0.1 or v0.2
109
+ ### Migrating from v0.1, v0.2, or v0.3
103
110
 
104
111
  Run a new tracked-scope baseline and retain the old report as historical evidence. Do not present the
105
- score change as improvement or regression because v0.3 changes evidence and control semantics.
106
- Re-review prior attestations and agent evidence before recreating them for v0.3. All claims must
107
- expire, and repository-scoped semantic claims require tracked files to match the commit-bound target
108
- plus `repo:<path>[#Lx-Ly]` references whose optional line ranges exist in the cited tracked file.
109
- Untracked generated reports do not block this workflow.
112
+ score change as improvement or regression because v0.4 changes evidence and control semantics.
113
+ Re-review prior attestations and agent evidence before recreating them for v0.4. All claims must
114
+ expire. Human-attestation files created by `init` are bound to the assessed repository; they are not
115
+ commit-bound because accountable platform, organization, and outcome facts may span commits.
116
+ Repository-scoped semantic agent claims require tracked files to match the commit-bound target plus
117
+ `repo:<path>[#Lx-Ly]` references whose optional line ranges exist in the cited tracked file. Untracked
118
+ generated reports do not block this workflow.
110
119
 
111
120
  The default `.agentic/attestations.yaml` and `.agentic/agent-evidence.yaml` paths are migration-safe:
112
- if either contains an older benchmark version, v0.3 ignores that auto-loaded file and places a
121
+ if either contains an older benchmark version, v0.4 ignores that auto-loaded file and places a
113
122
  prominent warning in the report. Regenerate it with `init --force` or `init-evidence --force` before
114
123
  relying on those claims. An explicitly supplied `--attestations` or `--agent-evidence` file still
115
124
  fails closed on a version mismatch.
@@ -119,7 +128,7 @@ For development from this checkout:
119
128
  ```bash
120
129
  npm ci
121
130
  npm run check
122
- npm run dev -- assess tests/fixtures/mature --profile pr-creation --attestations tests/fixtures/mature/.agentic/attestations-v0.3.yaml
131
+ npx vitest run tests/v04-calibration.test.ts -t "retains the mature level-three conformance result"
123
132
  ```
124
133
 
125
134
  ## What it assesses
@@ -165,8 +174,8 @@ No profile grants production deployment authority. Organizations should evaluate
165
174
  through a separate, system-specific safety case.
166
175
 
167
176
  The exact floors live in
168
- [`benchmark/v0.3/benchmark.yaml`](benchmark/v0.3/benchmark.yaml) and their rationale in
169
- [`benchmark/v0.3/scoring-policy.md`](benchmark/v0.3/scoring-policy.md).
177
+ [`benchmark/v0.4/benchmark.yaml`](benchmark/v0.4/benchmark.yaml) and their rationale in
178
+ [`benchmark/v0.4/scoring-policy.md`](benchmark/v0.4/scoring-policy.md).
170
179
 
171
180
  ## Evidence scopes and trust labels
172
181
 
@@ -182,11 +191,11 @@ Controls also identify whether their evidence belongs in the repository, hosting
182
191
  organization, or outcome systems. This prevents expected external unknowns from masquerading as
183
192
  missing files. Declarative detector adapters recognize common harness layouts without changing
184
193
  portable control outcomes; future independently conformant external adapters require a separate
185
- protocol. v0.3 does not issue certification or independent-verification claims.
194
+ protocol. v0.4 does not issue certification or independent-verification claims.
186
195
 
187
196
  ### Interpreting the two score views
188
197
 
189
- The normative score remains `N/40` and drives readiness profiles. v0.3 also reports
198
+ The normative score remains `N/40` and drives readiness profiles. v0.4 also reports
190
199
  `repository-detected progress: A/C`, where `C` is the maximum consecutive maturity the offline
191
200
  collector can establish without platform, organization, outcome, agent-collected, or human-attested
192
201
  evidence. This second view explains how complete the visible repository harness is; it does not
@@ -218,7 +227,7 @@ The default collector:
218
227
  - reads only Git-tracked paths and records commit and dirty-worktree metadata;
219
228
  - ignores `.git`, dependencies, build output, coverage, generated reports, attestations, and imported
220
229
  evidence bundles;
221
- - caps content scanning at 512 KB per file, 5 MB total, and 250 candidates per check, with v0.3
230
+ - caps content scanning at 512 KB per file, 5 MB total, and 250 candidates per check, with v0.4
222
231
  per-pattern balancing where configured;
223
232
  - reports file paths and match counts, never matching source snippets;
224
233
  - writes nothing unless `--output`, `init`, or `init-evidence` is explicitly requested.
@@ -231,7 +240,8 @@ access-controlled evidence instead. Report suspected vulnerabilities through [SE
231
240
  ```text
232
241
  benchmark/v0.1/ immutable historical v0.1 definition
233
242
  benchmark/v0.2/ immutable historical v0.2 definition
234
- benchmark/v0.3/ current normative benchmark, schemas, and controls
243
+ benchmark/v0.3/ immutable historical v0.3 definition
244
+ benchmark/v0.4/ current normative benchmark, schemas, and controls
235
245
  adapters/ declarative path/term aliases for recognized agent harness layouts
236
246
  benchmark/mappings/ informative mappings to external frameworks
237
247
  src/ reference CLI and local evidence collectors
@@ -261,12 +271,15 @@ system, and keep exceptions narrow, owned, expiring, and visible.
261
271
 
262
272
  ## Status and roadmap
263
273
 
264
- v0.3 adds portable harness discovery with declarative detector adapters, proximity-bounded content evidence, prioritized candidate
265
- selection for large repositories, source-backed semantic repository claims, and an explanatory
266
- repository-only score and ceiling. Candidate next steps
267
- include conformant signed adapters, SARIF/HTML reports, organization-level aggregation,
268
- statistically designed benchmark tasks, and an independent-review protocol. These require public
269
- design review before becoming normative.
274
+ v0.4 adds semantic component evidence for containment guidance, partial-check reporting, structural
275
+ ownership maps, enabled integration-triggered CI command detection for guidance integrity,
276
+ verification, and secret scanning, plus a separate Level 3 control for untrusted agent input. The
277
+ public [v0.4 calibration matrix](benchmark/v0.4/calibration-matrix.md) records expected positive and
278
+ adversarial outcomes. It retains portable harness adapters, source-backed
279
+ semantic claims, and the explanatory repository score and ceiling. Candidate next steps include
280
+ conformant signed adapters, broader structural CI provider coverage, SARIF/HTML reports,
281
+ organization-level aggregation, statistically designed benchmark tasks, and an independent-review
282
+ protocol. These require public design review before becoming normative.
270
283
 
271
284
  Apache-2.0 licensed. The benchmark is a community engineering tool, not legal, compliance, or
272
285
  security advice.
@@ -0,0 +1,129 @@
1
+ # v0.4 adapter contracts
2
+
3
+ ## Repository detector adapters
4
+
5
+ Portable controls define outcomes and generic repository conventions. Files in `adapters/*.yaml`
6
+ may extend one control evidence check with recognized harness-specific `patterns`, `files`, `terms`,
7
+ `required_any_terms`, `ci_providers`, or `ci_tools`. An extension names the control and zero-based
8
+ evidence index and adds exactly one of those fields. Repository-host aliases, CI-provider entries,
9
+ and CI-tool entries bind
10
+ provider-specific configuration paths to the applicable structural or integration-trigger semantics.
11
+ An adapter may also declare catalog-wide `ci_invocation_grammar`; this supplies recognized wrapper
12
+ patterns, command prefixes, and value-taking options to every `ci_command` check without putting
13
+ those identities in scanner core.
14
+ An adapter cannot remove or weaken a threshold, change a control level, alter a readiness floor, add
15
+ an attestation path, or execute code.
16
+
17
+ Portable v0.4 collectors may use semantic `content_groups`, structural `ownership_map`, and
18
+ command-bearing `ci_command` evidence. Adapters may add harness paths to those collectors plus
19
+ provider discovery rules and recognized command definitions to `ci_command`. Ownership evidence
20
+ uses structural mappings outside former, inactive, past, or retired sections; descendant headings
21
+ remain inactive until a same-or-higher-level section resumes current ownership. A command class uses
22
+ full owner/repository action identities, explicit executable signatures with independently required
23
+ argument groups and prohibited non-blocking modes, or semantically specific standalone executables.
24
+ Signatures may cap accepted arguments when any explicit target would leave the assessed checkout.
25
+ Executables and arguments from different signatures never combine. GitHub action invocations also
26
+ require an explicit non-empty `@ref`. Names alone never turn comments, version/help commands,
27
+ display commands, disabled or non-integration steps, manual-only workflows, ineffective shell branches, or documentation prose
28
+ into enforced evidence. Push-only, post-close, or path-gated execution does not establish the
29
+ repository-wide before-integration outcome; the external platform alternative remains available
30
+ when enforcement lives outside pull-request CI. Unsupported provider conditions and any configured
31
+ non-literal blocking override fail closed. Executable GitHub step jobs require a runner; job-level reusable workflow references
32
+ are not step actions, and invalid steps that combine `uses` with `run` are rejected. Provider path
33
+ filters and GitLab rules with unparsed gating fields fail closed. GitLab jobs with unresolved
34
+ inheritance, `except` conditions, non-blocking defaults, disabled source checkout, or failure-only
35
+ job disposition also fail closed. Repository-bound commands qualify only after the provider has
36
+ made the assessed repository available: GitHub requires a preceding `actions/checkout` step,
37
+ GitLab must retain its clone/fetch checkout, and Azure must retain its default checkout or execute
38
+ `checkout: self` before the command. GitHub checkout inputs that select another repository, ref,
39
+ sparse subset, or object filter cannot establish this state, and a later checkout that replaces the
40
+ workspace clears earlier target proof for the affected event. A secondary checkout with an explicit
41
+ non-root `path` preserves an already established primary checkout but cannot establish it by itself.
42
+ A replacing checkout with an unsupported condition clears prior proof because its effect cannot be
43
+ excluded. Workflow-level `defaults.run` settings are inherited by jobs, whose defaults override
44
+ them field by field. GitHub run working directories and explicit directory-changing shell commands
45
+ must remain at the assessed checkout root. Multi-statement shell forms qualify only when each
46
+ contributing command's failure determines the step result: supported GitHub fail-fast shells and
47
+ explicit Azure fail-fast blocks may contribute earlier statements, while other multiline forms
48
+ contribute only their final effective foreground statement. Agent-guidance integrity requires a recognized validation command bound to a tracked
49
+ source file with adapter-declared executable patterns that bind guidance inspection to a blocking
50
+ failure path; comments, inert string literals, and non-empty no-op scripts are insufficient.
51
+ Pattern groups are evaluated only over top-level code and function bodies reachable from top-level
52
+ execution. Constant-false branches and unreachable validation functions fail closed; separate
53
+ unreachable functions cannot combine their inert patterns into evidence.
54
+ Scanner modes that require a source target must bind that target to the assessed checkout rather
55
+ than an arbitrary path; explicit source overrides fail closed unless the adapter can prove that
56
+ binding. Repository-relative executables do not inherit a trusted tool identity from their basename.
57
+ Verification requires both a test command class and a static-analysis command class. `ADRB-TST-003`
58
+ may aggregate them across fail-fast multiline steps and auto-loaded CI entry points;
59
+ `ADRB-ENV-003` additionally requires its locked-install, test, and static-analysis classes in one CI
60
+ execution group. Adapters may declare tool-specific listing/discovery arguments that cannot establish
61
+ execution. Scanner tools may require the final effective command to carry the step exit status
62
+ without imposing that restriction on ordinary fail-fast verification steps. Repository-specific command
63
+ surfaces that are not recognized may use eligible source-backed agent evidence instead of keyword
64
+ inference. Package-manager task invocations are resolved through the tracked root `package.json` and
65
+ must bind to a recognized executable command even through supported wrappers and global options;
66
+ context-changing package/workspace flags fail closed unless their selected manifest is resolved,
67
+ while recognized nested package-exec targets are evaluated at their executable position. Package
68
+ manager built-ins are not treated as same-named scripts, and path-qualified local executables never
69
+ inherit package-manager identity: npm resolves arbitrary task names only
70
+ through explicit `run` or `run-script`, while its documented lifecycle aliases remain eligible.
71
+ Command-wrapper identities, command prefixes, and option arity are versioned adapter data. The
72
+ scanner core applies that grammar conservatively and retains generic package-task resolution
73
+ semantics; recognized wrapper, tool, and action identities and command signatures do not live in
74
+ the portable control catalog or core wrapper parser.
75
+ Wrapper and package-manager options with separate values are consumed before executable or task
76
+ identity is evaluated; option values never inherit tool identity.
77
+ Arguments forwarded to a package task fail closed unless their effect is structurally resolved.
78
+ Package task lookup preserves the manifest's case-sensitive script identity. Backslash/backtick
79
+ continuations and heredocs fail closed rather than treating their physical lines as commands. Source
80
+ validation excludes language comments before checking bounded structural groups, and referenced
81
+ repository validation scripts must exist as non-empty assessed files. A plausible task name,
82
+ missing path, collection-only test mode, or
83
+ configuration-display mode is insufficient.
84
+ Repository wrapper executables qualify only when an adapter declares the exact root path and that
85
+ non-empty path exists in the assessed tree; arbitrary path-qualified basenames remain untrusted.
86
+ Deterministic provider discovery is limited to auto-loaded entry points: direct GitHub workflow
87
+ YAML files, the root GitLab CI file, and conventional root Azure pipeline files. Include graphs and
88
+ custom pipeline paths require eligible source-backed evidence until they are structurally resolved.
89
+ Azure commands qualify only inside valid step collections, never from command-shaped root, stage, or
90
+ job fields.
91
+ Present GitLab `workflow` and job `rules` nodes must have supported object/array shapes; malformed
92
+ nodes fail closed instead of being treated as absent.
93
+ Source-bound validator analysis scans quote state in linear passes and remains subject to the same
94
+ per-file and aggregate byte limits as every other repository collector.
95
+
96
+ Bundled adapters are loaded deterministically in filename order. Their candidates remain subject to
97
+ the same tracked/workspace scope, symlink, size, generated-artifact, co-location, proximity, and
98
+ per-pattern limits as portable candidates. Adding or changing a bundled adapter changes evidence
99
+ semantics and therefore requires a new benchmark version.
100
+
101
+ ## Agent-collected evidence adapters
102
+
103
+ The core scanner is local, read-only, network-free, and vendor-neutral. An agent or adapter may
104
+ collect semantic repository evidence or external evidence that deterministic scanning cannot
105
+ establish, then provide it through the versioned agent evidence bundle.
106
+
107
+ Each claim contains:
108
+
109
+ - benchmark version and control ID;
110
+ - exact repository target and non-null commit binding;
111
+ - `met`, `not_met`, or `unknown` status;
112
+ - repository, platform, organization, or outcome scope;
113
+ - collector name and version;
114
+ - collection timestamp and mandatory expiry;
115
+ - privacy-safe references, never credentials or raw sensitive content;
116
+ - a concise derivation summary; and
117
+ - an optional error that is distinguishable from a negative result.
118
+
119
+ Collectors must be read-only, least-privileged, bounded to the approved target, time-limited, and
120
+ fail closed. Network content is untrusted input: it cannot alter benchmark policy, prompts, tool
121
+ authority, or the set of controls being assessed.
122
+
123
+ Repository-scoped claims require tracked files to match HEAD and
124
+ `repo:<tracked-path>[#Lx-Ly]` references. They may satisfy only explicitly eligible controls, remain `agent-collected`, and never increase the
125
+ repository-detected score. External claims require durable references appropriate to their source.
126
+
127
+ Agent-collected claims remain visibly distinct from deterministic repository evidence and human
128
+ attestations. A future conformant-adapter class may add signed identity and independent conformance
129
+ tests; v0.4 does not issue an independently verified label.