@1aboveio/skills 0.20.2 → 0.20.3

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 (85) hide show
  1. package/README.md +12 -5
  2. package/package.json +1 -1
  3. package/runtime/skills/distribution/generated/recipes.json +220 -25
  4. package/runtime/skills/distribution/scripts/bundles.mjs +49 -5
  5. package/runtime/skills/engineering/engineering-runtime/scripts/workflow-coherence.mjs +4 -0
  6. package/runtime/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
  7. package/skills/compliance/compliance-audit/LICENSE +3 -0
  8. package/skills/compliance/compliance-audit/SKILL.md +466 -0
  9. package/skills/compliance/compliance-audit/references/findings-schema.md +290 -0
  10. package/skills/compliance/compliance-audit/references/vars-checklist.md +1068 -0
  11. package/skills/compliance/compliance-audit/references/vars-findings-schema.md +395 -0
  12. package/skills/compliance/compliance-audit/scripts/reconcile_tracker.py +454 -0
  13. package/skills/compliance/compliance-audit/scripts/test_validate_tracker.py +90 -0
  14. package/skills/compliance/compliance-audit/scripts/validate_tracker.py +752 -0
  15. package/skills/compliance/doc-authenticity/LICENSE +3 -0
  16. package/skills/compliance/doc-authenticity/SKILL.md +158 -0
  17. package/skills/compliance/doc-authenticity/references/agreement.md +66 -0
  18. package/skills/compliance/doc-authenticity/references/bank-statement.md +150 -0
  19. package/skills/compliance/doc-authenticity/references/forensic-signals.md +157 -0
  20. package/skills/compliance/doc-authenticity/references/image-signals.md +114 -0
  21. package/skills/compliance/doc-authenticity/references/invoice.md +66 -0
  22. package/skills/compliance/doc-authenticity/references/issuer-profiles.md +86 -0
  23. package/skills/compliance/doc-authenticity/references/verdict-and-report.md +95 -0
  24. package/skills/compliance/doc-authenticity/references/verdict.schema.json +81 -0
  25. package/skills/compliance/doc-authenticity/scripts/image_forensics.py +294 -0
  26. package/skills/compliance/doc-authenticity/scripts/pdf_forensics.py +401 -0
  27. package/skills/compliance/doc-authenticity/scripts/validate_codes.py +224 -0
  28. package/skills/compliance/doc-authenticity/scripts/validate_verdict.py +308 -0
  29. package/skills/compliance/report-writing/LICENSE +3 -0
  30. package/skills/compliance/report-writing/SKILL.md +206 -0
  31. package/skills/compliance/report-writing/references/audit-report-template.md +121 -0
  32. package/skills/compliance/report-writing/references/external-assessment-template.md +167 -0
  33. package/skills/compliance/report-writing/references/management-report-template.md +145 -0
  34. package/skills/compliance/report-writing/references/vars-report-template.md +224 -0
  35. package/skills/document-utils/doc-to-md/LICENSE +3 -0
  36. package/skills/document-utils/doc-to-md/SKILL.md +77 -0
  37. package/skills/document-utils/doc-to-md/scripts/convert.py +157 -0
  38. package/skills/document-utils/reg-parser/LICENSE +3 -0
  39. package/skills/document-utils/reg-parser/SKILL.md +201 -0
  40. package/skills/document-utils/reg-parser/references/checklist-schema.md +223 -0
  41. package/skills/document-utils/reg-parser/references/checklists/hk-amlo-checklist.json +1306 -0
  42. package/skills/document-utils/reg-parser/references/checklists/hk-amlo-checklist.md +469 -0
  43. package/skills/document-utils/reg-parser/references/checklists/hk-fi-corporate-onboarding-cdd-checklist.json +634 -0
  44. package/skills/document-utils/reg-parser/references/checklists/hk-fi-corporate-onboarding-cdd-checklist.md +233 -0
  45. package/skills/document-utils/reg-parser/references/checklists/hk-mso-guideline-checklist.json +2194 -0
  46. package/skills/document-utils/reg-parser/references/checklists/hk-mso-guideline-checklist.md +771 -0
  47. package/skills/document-utils/reg-parser/references/checklists/kyc-aml-checklist.md +258 -0
  48. package/skills/document-utils/reg-parser/references/checklists/visa-vars-checklist.md +1058 -0
  49. package/skills/document-utils/reg-parser/references/mandates/hk-amlo-cap615.md +389 -0
  50. package/skills/document-utils/reg-parser/references/mandates/visa-vars.md +205 -0
  51. package/skills/document-utils/reg-parser/scripts/compare_checklist.py +228 -0
  52. package/skills/document-utils/reg-parser/scripts/dump_checklist.py +348 -0
  53. package/skills/document-utils/reg-parser/scripts/preprocess-mandate.sh +171 -0
  54. package/skills/document-utils/reg-parser/scripts/test_quarantine.sh +102 -0
  55. package/skills/document-utils/reg-parser/scripts/validate_checklist.py +532 -0
  56. package/skills/document-utils/reg-parser/scripts/validate_mandate.py +242 -0
  57. package/skills/engineering/engineering-runtime/coherence/workflow.json +16 -16
  58. package/skills/engineering/engineering-runtime/scripts/workflow-coherence.mjs +4 -0
  59. package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
  60. package/skills/payment/similar-domain/LICENSE +3 -0
  61. package/skills/payment/similar-domain/SKILL.md +178 -0
  62. package/skills/payment/similar-domain/references/entities.md +58 -0
  63. package/skills/payment/similar-domain/references/fingerprints.md +82 -0
  64. package/skills/payment/similar-domain/references/pivots.md +66 -0
  65. package/skills/payment/similar-domain/references/report-template.md +76 -0
  66. package/skills/payment/similar-domain/references/scoring.md +61 -0
  67. package/skills/payment/similar-domain/references/terminology.md +37 -0
  68. package/skills/payment/similar-domain/references/workflow.md +79 -0
  69. package/skills/payment/tld-detection/SKILL.md +76 -21
  70. package/skills/payment/tld-detection/references/clean.md +1 -1
  71. package/skills/payment/tld-detection/references/clustering.md +21 -6
  72. package/skills/payment/tld-detection/references/decision.md +7 -2
  73. package/skills/payment/tld-detection/references/fx-conversion.md +229 -0
  74. package/skills/payment/tld-detection/references/report-template.md +63 -27
  75. package/skills/payment/tld-detection/references/streams.md +90 -0
  76. package/skills/payment/tld-detection/references/terminology.md +15 -7
  77. package/skills/payment/tld-detection/references/workflow.md +1 -1
  78. package/skills/payment/tld-detection/scripts/detect_streams.py +542 -0
  79. package/skills/engineering/ensure-coverage/evals/evals.json +0 -125
  80. package/skills/engineering/rush-issues/evals/evals.json +0 -65
  81. package/skills/engineering/rush-release/evals/evals.json +0 -58
  82. package/skills/fullstack/shadcn/evals/evals.json +0 -90
  83. package/skills/payment/fraud-analysis/evals/evals.json +0 -40
  84. package/skills/payment/tld-detection/evals/evals.json +0 -107
  85. package/skills/payment/tld-detection/tests/test_detect_ladders.py +0 -132
@@ -0,0 +1,395 @@
1
+ # VARS Assessment Tracker Schema
2
+
3
+ Output schema for **Visa Acceptance Risk Standards (VARS)** audits. The
4
+ deliverable is a **tracker** — a worksheet with one row per Control ID — not a
5
+ narrative findings report. Per-mandatory-item detail (`1a`, `1b`, `3.i`, …) is
6
+ captured as bulleted entries **inside** the Observations cell, following the
7
+ canonical Visa VCA assessment structure.
8
+
9
+ For non-VARS audits use the generic `findings-schema.md` instead.
10
+
11
+ ## Contents
12
+
13
+ - [Source Documents](#source-documents) — what feeds the tracker
14
+ - [Output Files](#output-files) — `tracker.md` + `phase-trail.md`
15
+ - [Tracker Columns](#tracker-columns-visa-canonical) — the Visa-canonical column set
16
+ - [Control Effectiveness Rubric](#control-effectiveness-rubric-canonical) — Satisfactory / Improvement Recommended / Unsatisfactory / N/A
17
+ - [Granularity Rule](#granularity-rule) — per Control ID rows; per-item bullets in Observations
18
+ - [Audit Metadata Header](#audit-metadata-header) — what sits above the table
19
+ - [Tracker Format](#tracker-format) — markdown table example
20
+ - [Field Definitions](#field-definitions) — per-column rules
21
+ - [Phase Trail Companion](#phase-trail-companion-phase-trailmd) — work-product schema
22
+ - [Subagent Prompt Templates](#subagent-prompt-template) — Variant A (per-phase), B (synthesis), C (judge), D (challenger)
23
+ - [Notes for Auditors](#notes-for-auditors) — gotchas
24
+ - [Worked Example](#worked-example--tracker-slice)
25
+
26
+ ## Source Documents
27
+
28
+ - `references/vars-checklist.md` — control library (Archetype, Risk Domain, Sub-Domain, Risk, Control Requirement, Control ID, Mandatory Controls, Recommended Controls).
29
+
30
+ ## Output Files
31
+
32
+ Two files per audit:
33
+
34
+ 1. `tracker.md` — the deliverable. Visa-canonical tracker columns. **One row per Control ID.** Per-item details (`Control 1a`, `Control 1b`, …) are bulleted inside the Observations cell.
35
+ 2. `phase-trail.md` — audit work product. Per-Control-ID record showing what each phase (`document_review`, `onsite_review`, `sample_test`) found, preserved as-is for audit defensibility.
36
+
37
+ The tracker is the artifact handed to the client; the phase trail is internal.
38
+
39
+ ## Tracker Columns (Visa-canonical)
40
+
41
+ | Column | Owner | Stage | Description |
42
+ |---|---|---|---|
43
+ | Control ID | — | Checklist | e.g. `AACQ.C2.1` (row identifier) |
44
+ | Control Title | — | Checklist | Short title from the checklist |
45
+ | Archetype | — | Checklist | `AACQ` / `ATPA` / `AHIR` / `AATM` / `AVDC` |
46
+ | **Observations** | Reviewer | During review | Bulleted per-item observations at the control level. One bullet per mandatory / recommended item: `Control 1.a: Covered in [doc section clause]`, `Control 1.b: Partial — [what's weak]`, `Control 1.c: Not addressed`. Recommended items carry an `R` prefix (`Control R1.a`). Use `<br>` between bullets. |
47
+ | Issue Description | Reviewer | During review | Enumerated gap inventory responding to each unmet item. Two labelled groups — **Actions Required** (unmet mandatory items) and **Recommendations** (unmet recommended items + mandatory items to strengthen) — each a `(i)/(ii)/(iii)` list of `[Control <id>: <status>] — <one-line action>` entries. An empty group is omitted entirely. |
48
+ | Control Effectiveness Rating | Reviewer | During review | One of `Satisfactory` / `Improvement Recommended` / `Unsatisfactory` / `N/A` (rated **prior to remediation**). |
49
+ | Proposed Remediation | Client | Within 30 days of first review | Bulleted remediation actions per identified gap. If a recommended action will **not** be adopted: explicit non-adoption statement + reason. Reviewer assesses adequacy out-of-band. |
50
+ | Complete By | Client | Within 30 days of first review | Target completion date per remediation item. `YYYY-MM-DD`. ≤90 days default unless capital investment or senior sign-off is referenced. |
51
+ | Remediation Status | Reviewer | During remediation | Colour-coded latest status + chronological log. Log entries capture timeline extensions and reasons where remediation cannot complete as planned. |
52
+
53
+ ## Control Effectiveness Rubric (canonical)
54
+
55
+ Rated **prior to remediation**. Exactly **four** outcomes — do **not** use critical/major/minor.
56
+
57
+ - **Unsatisfactory** *(Red)* — at least one **mandatory** control is **not fulfilled**, i.e. its observation is `Partial` or `Not addressed`. Each unfulfilled mandatory item becomes an **Actions Required** entry.
58
+ - **Improvement Recommended** *(Amber)* — every mandatory control is fulfilled, but at least one **recommended** control is missing/partial **and/or** a fulfilled mandatory control can be strengthened. Each becomes a **Recommendations** entry.
59
+ - **Satisfactory** *(Green)* — all mandatory and recommended controls are in place; no gaps observed.
60
+ - **N/A** — the control does not apply to the entity's scope (e.g. an archetype or service the acquirer does not operate). N/A is a scoping decision, not derived from observations; record the rationale in the phase trail.
61
+
62
+ The label is the rating; the colour is presentation.
63
+
64
+ A **mandatory `Partial` is Unsatisfactory** — this is the decisive rule. A partially-met mandatory control is *not* Improvement Recommended; Improvement Recommended applies only when every mandatory control is fully met and the only gaps are recommended items or strengthening opportunities.
65
+
66
+ Coverage rolls up: a checklist item with no direct bullet is read from its nearest bulleted ancestor (e.g. listing `Control 6.a` covers descriptive sub-items `6.a.i … 6.a.x`). Recommended-only Control IDs (e.g. `AACQ.C11.1`, `AACQ.C17.1`, `AACQ.C17.2`, `ATPA.C2.1`, `AVDC.C1.1`, `AVDC.C2.1`) carry no mandatory items, so they cannot trigger Unsatisfactory — their worst rating is Improvement Recommended.
67
+
68
+ ## Granularity Rule
69
+
70
+ - **Row granularity** is per **Control ID** (`AACQ.C2.1`, `AACQ.C14.1`, …). One row per control.
71
+ - **Observation granularity** is per **mandatory / recommended item**, captured as bulleted entries inside the Observations cell.
72
+ - **Item ids are dotted and hierarchical:** top-level `1`, `2`, `3`; sub-items `1.a`, `2.c`; sub-sub-items `1.f.i`, `6.a.x`. **Recommended** items within a mandatory control carry an `R` prefix — `R1`, `R1.a`. (Wholly-recommended controls use plain numbering; the control's severity already marks them recommended.)
73
+ - Items are prefixed `Control` to match Visa VCA convention: `Control 1.a: ...`, `Control R1.a: ...`.
74
+ - Every numbered item from the checklist row is covered — directly as a bullet, or by rolling up under a bulleted parent (see the rubric's roll-up rule).
75
+
76
+ ## Audit Metadata Header
77
+
78
+ `tracker.md` opens with a metadata block:
79
+
80
+ ```markdown
81
+ # VARS Assessment Tracker
82
+
83
+ - **Date:** YYYY-MM-DD
84
+ - **Reviewer:** [name / firm]
85
+ - **Client / Acquirer:** [entity]
86
+ - **Archetypes In Scope:** [subset of AACQ, ATPA, AHIR, AATM, AVDC]
87
+ - **Checklist:** references/vars-checklist.md (vN.N)
88
+ - **Audit Phases Completed:** [document_review, onsite_review, sample_test]
89
+ - **Review Cut-off Date:** YYYY-MM-DD
90
+ - **Remediation Window:** 30 days (client proposal) + 90 days (target completion)
91
+ ```
92
+
93
+ No executive summary, no roll-up counts. Filtering and aggregation happen on the tracker itself.
94
+
95
+ ## Tracker Format
96
+
97
+ Single markdown table. Multi-line cells use `<br>` between bullets. Bullets use `•` to match Visa VCA convention.
98
+
99
+ ```markdown
100
+ | Control ID | Control Title | Archetype | Observations | Issue Description | Control Effectiveness Rating | Proposed Remediation | Complete By | Remediation Status |
101
+ |------------|---------------|-----------|--------------|-------------------|------------------------------|----------------------|-------------|--------------------|
102
+ | AACQ.C2.1 | Merchant Agreement Content | AACQ | • Control 1: Covered in Merchant Agreement v2.4 section 3.2<br>• Control 1.a: Covered in section 3.2(a)(i)<br>• Control 1.c: Covered in section 3.2(a)(iii)<br>• Control 2: Covered in termination clause section 7.1<br>• Control 2.c: Partial — VMSS listing referenced but procedure not described<br>• Control R1: Covered<br>• Control R1.c: Not addressed — no Acquirer disclosure clause | **Actions Required:** — Missing controls under mandatory controls<br>(i) [Control 2.c: Partial] — Document the VMSS listing procedure.<br>**Recommendations:** — Mandatory controls can be improved and/or missing recommended controls<br>(i) [Control R1.c: Not addressed] — Add an Acquirer disclosure clause. | Unsatisfactory | | | |
103
+ | AACQ.C14.1 | PCI DSS Compliance | AACQ | • Control 1: Not addressed — no PCI DSS AOC on file<br>• Control 2: Not addressed | **Actions Required:** — Missing controls under mandatory controls<br>(i) [Control 1: Not addressed] — Engage a QSA and file the PCI DSS AOC.<br>(ii) [Control 2: Not addressed] — Complete the PCI DSS RoC. | Unsatisfactory | | | |
104
+ ```
105
+
106
+ In the first row, `Control 2.c` is a **mandatory** item rated `Partial`, so the control is **Unsatisfactory** even though the recommended `R1.c` gap is only a recommendation. Had every mandatory item been Covered, the lone `R1.c` gap would make it **Improvement Recommended**.
107
+
108
+ Empty cells are valid for fields the reviewer doesn't yet own (`Proposed Remediation`, `Complete By`, `Remediation Status`).
109
+
110
+ ## Field Definitions
111
+
112
+ ### Observations
113
+ - One bullet per numbered item from the checklist row (descriptive sub-items may roll up under their parent).
114
+ - Prefix each bullet with `Control <item>:` (e.g. `Control 1.a:`, `Control 1.f.i:`, `Control R1.a:`) to match Visa VCA convention. Recommended items carry the `R` prefix.
115
+ - Each bullet states one of:
116
+ - `Covered in [doc section clause]` — fully met, with the covering reference.
117
+ - `Partial — [what's weak]` — addressed but with gap.
118
+ - `Not addressed` — absent from evidence.
119
+ - Multiple covering references can be listed: `Control 1.a: Covered in section 3.2.a(e) and section 3.2.a(b)`.
120
+ - Use `<br>` between bullets for in-cell line breaks.
121
+ - Detail of the underlying observation across phases lives in `phase-trail.md`, not the tracker cell.
122
+
123
+ ### Issue Description
124
+ - An **enumerated gap inventory** that responds to each unmet item. Up to two labelled groups, each on its own line separated by `<br>`:
125
+ - `**Actions Required:** — Missing controls under mandatory controls` — every **mandatory** item rated `Partial` or `Not addressed`.
126
+ - `**Recommendations:** — Mandatory controls can be improved and/or missing recommended controls` — unmet **recommended** items plus any fulfilled mandatory item flagged for strengthening.
127
+ - Under each group, list one entry per gap with a lowercase **roman enumerator**: the bracketed item reference, then ` — ` and a **one-line action/recommendation** stating what is needed.
128
+ - Actions Required: `(i) [Control 2.c: Partial] — Document the VMSS listing procedure.` (status included)
129
+ - Recommendations: `(i) [Control R1.c: Not addressed] — Add an Acquirer disclosure clause.` (status optional for recommended items)
130
+ - The bracketed `[Control <id>: …]` reference traces each gap back to its Observations bullet; the one-liner gives the remediation in a sentence.
131
+ - **Omit an empty group entirely** — do not pad with `**Recommendations:** —`. A row with only mandatory gaps shows just the Actions Required group; a row with only recommended gaps shows just the Recommendations group.
132
+ - A `Satisfactory` row's cell reads exactly `No remediation required.` (no groups). An `N/A` row has a blank cell. An `Unsatisfactory` row has an Actions Required group (plus Recommendations only if recommended gaps also exist). An `Improvement Recommended` row has only a Recommendations group.
133
+
134
+ ### Control Effectiveness Rating
135
+ - One of `Satisfactory` / `Improvement Recommended` / `Unsatisfactory` / `N/A`.
136
+ - Rated **prior to remediation**, at the Control ID level.
137
+ - A control with **any** mandatory item rated `Partial` or `Not addressed` is `Unsatisfactory`, regardless of how many other items are met.
138
+ - `N/A` is set by the reviewer when the control is out of the entity's scope; it is never derived from observations.
139
+
140
+ ### Proposed Remediation
141
+ - Client owns the cell; reviewer assesses adequacy out-of-band.
142
+ - One bullet per remediation action, referencing the gap (`[Control 1.c]`).
143
+ - Non-adoption: explicit `Will not implement: [reason]` per declined item.
144
+
145
+ ### Complete By
146
+ - `YYYY-MM-DD` per remediation item.
147
+ - Default expectation ≤90 days. Items beyond 90 days must reference capital investment, senior sign-off, or another concrete justification (capture the justification in `phase-trail.md`).
148
+
149
+ ### Remediation Status
150
+ - Latest status: `Not Started` / `In Progress` / `Completed` / `Extended` / `Blocked` (colour-coded).
151
+ - Followed by a chronological log of progress events, especially timeline extensions and the reason where remediation cannot complete as planned.
152
+ - Log format example:
153
+ - `**(i) SOP revision**`
154
+ - `[17 Apr] SOP revised and approved`
155
+ - `[2 Apr] Client requested time extension due to pending SOP approval from management`
156
+
157
+ ## Phase Trail Companion (`phase-trail.md`)
158
+
159
+ Audit work product — one block per Control ID, preserves what each phase saw before the rating was finalised.
160
+
161
+ ```markdown
162
+ # VARS Phase Trail
163
+
164
+ ### [Control ID]: [Control Title]
165
+
166
+ - **Archetype:** AACQ | ATPA | AHIR | AATM | AVDC
167
+ - **Risk Domain:** [from checklist]
168
+ - **Sub-Domain:** [from checklist]
169
+ - **Control Requirement:** [requirement statement from checklist]
170
+
171
+ #### document_review
172
+ - **Observations:**
173
+ - Control 1a: [observation + evidence ref]
174
+ - Control 1b: [observation]
175
+ - …
176
+ - **Evidence Reviewed:** [document names / paths]
177
+ - **Phase Note:** [interim view at end of document review]
178
+
179
+ #### onsite_review
180
+ - **Observations:**
181
+ - Control 1a: [confirmed | refined | contradicted]
182
+ - …
183
+ - **Evidence Reviewed:** [interview notes / walkthroughs]
184
+ - **Phase Note:** [how onsite changed the view]
185
+
186
+ #### sample_test
187
+ - **Observations:**
188
+ - Control 1a: [operating effectiveness test result]
189
+ - …
190
+ - **Evidence Reviewed:** [sample IDs, transactions, files]
191
+ - **Phase Note:** [how sample testing changed the view]
192
+ ```
193
+
194
+ Only include the phases that ran. Do not erase phase records when the tracker rating is finalised — the trail is the audit defence.
195
+
196
+ ## Subagent Prompt Template
197
+
198
+ Used by `SKILL.md` Step 6B (per-phase chunking) **and** Step 7 (synthesis chunking). Pick the appropriate variant.
199
+
200
+ ### Variant A — Phase Review (Step 6B)
201
+
202
+ Each subagent reviews one phase for one control group and outputs phase-trail blocks for those Control IDs.
203
+
204
+ ```text
205
+ You are a compliance auditor. Review the following controls for the specified audit phase.
206
+
207
+ Audit phase: <document_review | onsite_review | sample_test>
208
+ Controls:
209
+ <paste only the checklist rows for these Control IDs>
210
+
211
+ Evidence:
212
+ <paste mapped evidence only>
213
+
214
+ Output format — one block per Control ID:
215
+
216
+ ### <Control ID>: <Control Title>
217
+ - **Archetype:** AACQ | ATPA | AHIR | AATM | AVDC
218
+ - **Mandatory Status:** Mandatory | Recommended-only
219
+
220
+ #### Observations (per item)
221
+ - Control 1a: <Covered in [doc section clause] | Partial — [what's weak] | Not addressed>
222
+ - Control 1b: <…>
223
+ - (one bullet per numbered sub-item from the checklist row, prefixed "Control")
224
+
225
+ #### Evidence Reviewed
226
+ - <document name + section / file path / sample ID>
227
+
228
+ #### Phase Note
229
+ <one or two lines: how this phase shifts the view from prior phases, if applicable>
230
+
231
+ Rules:
232
+ - Mark each numbered sub-item explicitly. If a sub-item is absent from evidence, write "Not addressed".
233
+ - Do NOT assign a Control Effectiveness Rating in a chunk pass; rating is finalised only at synthesis.
234
+ - Do NOT use PASS / FAIL / Green / Amber / Red — those belong to the generic schema.
235
+ - Output observations only.
236
+ ```
237
+
238
+ Each subagent writes to `phase-<phase>-<group>.md`.
239
+
240
+ ### Variant B — Synthesis (Step 7)
241
+
242
+ Each subagent receives the phase-trail blocks for one control group (across all completed phases) and emits **tracker rows** + the merged phase-trail block per Control ID.
243
+
244
+ ```text
245
+ You are a compliance auditor consolidating a VARS assessment.
246
+
247
+ Controls in scope (this group):
248
+ <paste only the checklist rows for these Control IDs>
249
+
250
+ Phase trail blocks (all completed phases for these Control IDs):
251
+ <paste the phase-trail blocks from phase-<phase>-<group>.md files>
252
+
253
+ Produce two outputs.
254
+
255
+ OUTPUT 1 — tracker rows (markdown table rows only, no header).
256
+ One row per Control ID. Columns:
257
+ | Control ID | Control Title | Archetype | Observations | Issue Description | Control Effectiveness Rating | Proposed Remediation | Complete By | Remediation Status |
258
+
259
+ Rules:
260
+ - Observations cell: one bullet per numbered item from the checklist row. Each bullet starts "Control <item>: " (dotted ids — 1, 1.a, 1.f.i; recommended items carry an R prefix — R1, R1.a) followed by "Covered in [doc section clause]", "Partial — [what's weak]", or "Not addressed". Use `<br>` between bullets and `•` for the bullet character. Consolidate across phases — sample_test > onsite_review > document_review when phases disagree.
261
+ - Issue Description cell: enumerated gap inventory; include only the non-empty groups (omit a group's heading entirely if it has no entries), each `<br>`-separated:
262
+ - "**Actions Required:** — Missing controls under mandatory controls" then `(i) [Control <id>: <status>] — <one-line action>`, `(ii) …` for every mandatory item rated Partial or Not addressed.
263
+ - "**Recommendations:** — Mandatory controls can be improved and/or missing recommended controls" then `(i) [Control R<id>] — <one-line recommendation>`, `(ii) …` for unmet recommended items and mandatory strengthening.
264
+ - Every entry ends with ` — ` and a one-line description of the action/recommendation needed.
265
+ - Control Effectiveness Rating: one of Satisfactory / Improvement Recommended / Unsatisfactory / N/A.
266
+ - Unsatisfactory: any mandatory item is Partial or Not addressed.
267
+ - Improvement Recommended: every mandatory item Covered; at least one recommended item Partial/Not addressed OR a mandatory item needs strengthening.
268
+ - Satisfactory: all mandatory and recommended items Covered.
269
+ - N/A: control out of the entity's scope (reviewer decision; not derived).
270
+ - Proposed Remediation, Complete By, Remediation Status: leave empty (client / post-review fields).
271
+ - All multi-line cell content uses `<br>` between lines, never literal newlines (markdown tables collapse newlines).
272
+
273
+ OUTPUT 2 — merged phase-trail blocks (markdown):
274
+ For each Control ID in this group, output the consolidated phase-trail block in the format defined in vars-findings-schema.md. Preserve all phase records; do not drop earlier phase observations.
275
+
276
+ Output OUTPUT 1 first, then a `---` separator, then OUTPUT 2. No commentary.
277
+ ```
278
+
279
+ Each synthesis subagent writes to `synth-<group>.md` containing both outputs. The main agent splits on `---` and concatenates the two halves into `tracker.md` and `phase-trail.md` respectively.
280
+
281
+ ### Variant C — Citation Judge (Step 9C)
282
+
283
+ Independent grounding pass: an isolated subagent re-reads cited evidence and judges whether each "Covered in …" claim actually addresses the requirement. The agent receives **only** the tracker rows for one group + the checklist requirement text + the cited evidence excerpts — no prior phase trail, no other findings.
284
+
285
+ ```text
286
+ You are an evidence-grounding reviewer. You see audit findings cold. You do NOT trust the prior auditor — you verify each cited clause against the requirement.
287
+
288
+ Controls in scope (this group):
289
+ <paste only the checklist rows for these Control IDs, including Verification items>
290
+
291
+ Tracker rows for these Control IDs (Observations + Issue Description columns):
292
+ <paste rows>
293
+
294
+ Evidence excerpts (cited clauses with surrounding context):
295
+ <paste relevant clauses from the cited evidence files>
296
+
297
+ For every Observations bullet of the form "Control N: Covered in [doc section clause]" or "Control N: Partial — [...]":
298
+
299
+ 1. Locate the cited clause in the evidence excerpt.
300
+ 2. Compare the clause text to the corresponding Verification item in the checklist.
301
+ 3. Emit one of these verdicts per bullet:
302
+ - "Confirmed" — the clause directly addresses the Verification item's substance.
303
+ - "Weak" — the clause references the topic but does not operationalize the requirement (generic policy language, bare cross-reference, vendor contract without scope).
304
+ - "Off-target" — the cited clause does not address the Verification item.
305
+ - "Missing" — the cited clause cannot be located in the evidence.
306
+
307
+ Output format — produce **two files**, both required so Step 9E can reconcile findings deterministically.
308
+
309
+ `judge-<group>.md` (human-readable):
310
+
311
+ ### <Control ID>
312
+ - Control 1a: Confirmed
313
+ - Control 1b: Weak — clause states the policy exists but no procedure is documented
314
+ - Control 1c: (skipped — not addressed in tracker)
315
+ - Control 2a: Off-target — section 7.1 covers termination, not VMSS listing as Verification (3) requires
316
+ - Control 2b: Missing — section 3.2(b) not found in merchant-agreement-v2.4.md
317
+
318
+ `judge-<group>.json` (machine-readable; consumed by `scripts/reconcile_tracker.py` in Step 9E):
319
+
320
+ [
321
+ {"control_id": "AACQ.C2.1", "item": "1a", "verdict": "Confirmed", "reason": ""},
322
+ {"control_id": "AACQ.C2.1", "item": "1b", "verdict": "Weak", "reason": "clause states the policy exists but no procedure is documented"},
323
+ {"control_id": "AACQ.C2.1", "item": "2a", "verdict": "Off-target", "reason": "section 7.1 covers termination, not VMSS listing as Verification (3) requires"},
324
+ {"control_id": "AACQ.C2.1", "item": "2b", "verdict": "Missing", "reason": "section 3.2(b) not found in merchant-agreement-v2.4.md"}
325
+ ]
326
+
327
+ Rules:
328
+ - Skip bullets marked "Not addressed" — those are gaps, not coverage claims. Do NOT include them in the JSON.
329
+ - Use exactly one of the four verdicts: Confirmed | Weak | Off-target | Missing. Spell them as written.
330
+ - The `item` field is the bare item identifier as it appears in the checklist (`1a`, `2`, `3.i`), without the "Control " prefix.
331
+ - Do not re-rate the control. Output verdicts on individual coverage claims only.
332
+ - One bullet per cited item. No commentary in either file.
333
+ ```
334
+
335
+ Each judge subagent writes both files to its group: `judge-<group>.md` and `judge-<group>.json`. Step 9E uses the JSON to auto-apply Off-target/Missing verdicts to the tracker; the markdown is the human-readable record for the reviewer.
336
+
337
+ ### Variant D — Adversarial Challenger (Step 9D)
338
+
339
+ Adversarial second pass: a subagent with explicit "assume over-claiming" framing tries to find weaknesses the prior auditor missed. Clean context, no access to the phase trail or judge findings — only the checklist + tracker + evidence.
340
+
341
+ ```text
342
+ You are a senior compliance challenge reviewer. Your job is to challenge another auditor's work. You start from the assumption that the prior auditor was too generous — they marked items "Covered" that should be "Partial" or "Not addressed".
343
+
344
+ Your lens (apply ALL):
345
+ - A clause that *mentions* a topic does not automatically *cover* the Verification requirement. Generic policy language without operational procedure is weak coverage.
346
+ - Vendor contracts cited without scope confirmation are weak.
347
+ - Cross-references to other documents ("see SOP section X") count only if the referenced section is itself present and substantive in the evidence.
348
+ - Coverage in policy documents without evidence of operational execution (procedures, logs, samples) is design-only — flag it.
349
+ - "Partial" claims often understate the gap when the missing portion is the operative requirement (e.g. monitoring described but no thresholds defined).
350
+
351
+ Controls in scope (this group):
352
+ <paste only the checklist rows for these Control IDs, including Verification items>
353
+
354
+ Tracker rows for these Control IDs:
355
+ <paste rows>
356
+
357
+ Evidence excerpts:
358
+ <paste cited clauses + surrounding context>
359
+
360
+ For every coverage claim ("Covered" or "Partial"):
361
+ 1. Re-examine the cited clause against the Verification item.
362
+ 2. If you find a credible challenge, emit it. Otherwise stay silent on that bullet.
363
+
364
+ Output format:
365
+
366
+ ### <Control ID>
367
+ - **Challenge — Control 1a:** Cited section 3.2(a)(i) names the policy but does not require Acquirer attestation; Verification (1) calls for "requiring adherence" — recommend downgrade to Partial.
368
+ - **Challenge — Control 2:** Termination clause exists but Verification (2) requires it cite Visa-specified date and written notice form; cited section 7.1 lacks both — recommend downgrade to Not addressed.
369
+
370
+ Rules:
371
+ - If you cannot find a credible challenge for a control, write "### <Control ID>: No challenge."
372
+ - Do not re-rate the control. Surface concrete downgrades reviewers can act on.
373
+ - One bullet per challenged item. Include the requirement reference and the specific weakness.
374
+ ```
375
+
376
+ Each challenger subagent writes to `challenge-<group>.md`. The main agent collates challenges into a "Challenge Report" presented to the reviewer alongside the tracker. The reviewer chooses whether to accept each challenge before finalising.
377
+
378
+ ## Notes for Auditors
379
+
380
+ - **Severity scheme:** Do not import critical/major/minor. VARS recognises only Mandatory vs Recommended on input and Satisfactory / Improvement Recommended / Unsatisfactory / N/A on output.
381
+ - **No executive summary:** the tracker is the artifact. If the client wants a roll-up, generate it from the tracker — do not write one into the deliverable.
382
+ - **Phase trail vs tracker:** the trail is the work product; the tracker is the deliverable. Keep both.
383
+ - **Observation prefix:** always `Control <item>:` (with the word "Control"), not bare `<item>:` — this matches the Visa VCA tracker convention.
384
+ - **Compliance-attestation vs internal-policy.** When a Verification item requires compliance with a named external standard ("per PCI DSS", "PCI SSF-compliant Payment Applications", "AISP certification on Visa request", "PCI DSS compliance enforced for all TPAs"), an internal policy that *describes* similar controls is **not** sufficient evidence. Such items need attestation-class evidence — an Attestation of Compliance (AOC), a Self-Assessment Questionnaire (SAQ) on file, an entry in a certification register, an AISP submission record, or a QSA report. Mark "Covered" only when that attestation evidence is present and current. If only the internal policy is on file, mark "Partial" with a gap note that compliance-attestation evidence is missing, or "Not addressed" if the policy doesn't even reference the standard. The 9D adversarial challenger pass should explicitly downgrade any "Covered" claim that rests on an internal-policy description for an attestation-required item.
385
+ - **Evidence not yet produced is still "Partial".** When a clause is referenced in evidence but the readable exhibit hasn't yet been delivered (e.g. an online policy URL without an attached PDF, a signed copy expected but not provided, a sample log promised in next round), mark the item **Partial** with a phase note in `phase-trail.md` saying "exhibit not produced — to be reviewed in next round". When the merchant supplies the missing evidence, run a fresh phase (a second `document_review`, an `onsite_review`, or `sample_test` as appropriate) — the new phase block is appended to the same Control ID's entry in `phase-trail.md`, and synthesis (Step 7) produces an updated tracker reflecting the latest state. Do **not** invent a "Pending" status; the phase model is the temporal axis. The conservative rating treatment keeps fieldwork honest — a `Partial` on a **mandatory** item makes the control Unsatisfactory (a `Partial` on a recommended item makes it Improvement Recommended), so outstanding exhibits never quietly inflate a Satisfactory rating.
386
+
387
+ ## Worked Example — Tracker Slice
388
+
389
+ ```markdown
390
+ | Control ID | Control Title | Archetype | Observations | Issue Description | Control Effectiveness Rating | Proposed Remediation | Complete By | Remediation Status |
391
+ |------------|---------------|-----------|--------------|-------------------|------------------------------|----------------------|-------------|--------------------|
392
+ | AACQ.C2.1 | Merchant Agreement Content | AACQ | • Control 1: Covered in Merchant Agreement v2.4 section 3.2<br>• Control 1.a: Covered in section 3.2(a)(i)<br>• Control 1.c: Not addressed<br>• Control 2: Covered in termination clause section 7.1<br>• Control 2.c: Partial — VMSS listing referenced but procedure not described<br>• Control R1.c: Not addressed | **Actions Required:** — Missing controls under mandatory controls<br>(i) [Control 1.c: Not addressed] — Add the Visa-rules pass-through clause.<br>(ii) [Control 2.c: Partial] — Document the VMSS listing procedure.<br>**Recommendations:** — Mandatory controls can be improved and/or missing recommended controls<br>(i) [Control R1.c: Not addressed] — Add an Acquirer disclosure clause. | Unsatisfactory | | | |
393
+ ```
394
+
395
+ Here `Control 1.c` (a mandatory item) is `Not addressed` and `Control 2.c` (mandatory) is `Partial`, so the row is **Unsatisfactory** with two Actions Required entries; the recommended `R1.c` gap is recorded under Recommendations but does not change the rating.