Regulations.gov Attachments Fetch
Use the CLI-owned regulations-gov.attachments/download operation. This Skill
supplies intent routing, explicit-ID selection, local-directory discipline, and
result-use boundaries only. The CLI TypeScript 7 runtime owns the official API
contract, credential injection, endpoint restrictions, schemas, limits,
downloads, transactional file writes, partial results, and receipts.
Before running
- Read
references/tiangong-data-requirement.json.
- Use the caller- or workspace-resolved stable CLI. The requirement declares
compatible capability and operation contract majors; it does not select a
package build.
- Run
data describe with that same CLI. Continue only when the capability
ID and required contract majors match, and copy the exact current
capability/operation versions from that response into the run request.
- Inspect
manifest.availability and discovery.availability. This capability
is currently suspended because its prerequisite Regulations.gov live gate
returned HTTP 503. Stop while it remains suspended; do not create an
artifact run, retry directly, or assume a configured API key restores it.
tiangong-ai data describe regulations-gov.attachments --json
Use the returned Discovery Metadata to confirm current coverage, granularity,
limits, selection hints, provides, and doesNotProvide. Do not rely on source
facts copied from an older Skill revision.
Select comments and attachments
- Start from exact public comment IDs selected by the user or by the
regulationsgov-comments-fetch or regulationsgov-comment-detail-fetch
workflow. This operation does not search comments, dockets, or documents.
- Omit
attachmentIds to select every attachment returned for those comments,
or supply an exact allowlist when only reviewed attachment IDs are needed.
- Set
maxFiles and maxTotalBytes deliberately. The CLI also applies the
lower manifest/runtime limits and reports bounded or missing coverage.
- Configure
REGGOV_API_KEY only in the environment. Never place it in argv,
request JSON, a URL, or the artifact directory.
- Create a dedicated, empty, existing directory and use its absolute path for
--artifact-dir. The CLI refuses symlink directories and existing target
filenames; it never returns the absolute directory in the result or receipt.
Prepare the request
Build one tiangong.data.run-request.v1 envelope. Replace both version
placeholders with the exact versions from the same data describe response and validate input against the current
operation schema returned by data describe.
{
"schemaVersion": "tiangong.data.run-request.v1",
"capabilityId": "regulations-gov.attachments",
"capabilityVersion": "<describe.manifest.capabilityVersion>",
"operationId": "download",
"operationVersion": "<describe.manifest.operations[0].operationVersion>",
"input": {
"commentIds": ["EPA-HQ-OAR-2026-0001-0002"],
"attachmentIds": ["EPA-HQ-OAR-2026-0001-0002-ATTACHMENT-1"],
"maxFiles": 10,
"maxTotalBytes": 10000000
}
}
Use run-request limits only when intentionally lowering the manifest's page,
record, response-byte, or timeout ceiling. Do not place a base URL, download
URL, output path, retry setting, or credential in input.
Run
tiangong-ai data run regulations-gov.attachments download \
--input /absolute/path/to/request.json \
--artifact-dir /absolute/path/to/empty-artifact-directory \
--json
Preserve the complete tiangong.data.run-result.v1 envelope and the generated
manifest together with every committed file. The result binds relative names,
source URLs, content types, provider and actual sizes, SHA-256 hashes,
observations, warnings, errors, and the core receipt.
Result boundaries
- The CLI obtains attachment relationships through official comment-detail
requests and downloads only exact-origin
downloads.regulations.gov URLs.
It does not accept arbitrary download URLs, standalone attachment lookup, or
redirects.
- Treat all files as untrusted public-submission bytes. A successful download,
matching provider size, content type, or SHA-256 establishes byte identity
and lineage, not safety, truth, relevance, or evidentiary sufficiency.
success means the explicitly bounded selection completed. A max-file,
max-byte, or runtime cap still narrows coverage; report it and never claim
that omitted attachments do not exist.
partial preserves verified earlier files and the manifest while identifying
missing metadata or files. Report each missing item. Treat blocked as no
usable run and do not use temporary or pre-existing directory contents.
- Keep the generated manifest with the files when moving them. Verify hashes
before downstream processing and retain comment, attachment, format, and URL
lineage.
- Malware scanning, safe opening, OCR, text extraction, personal-data review,
content interpretation, stance or sentiment analysis, legal conclusions, and
durable evidence admission require separate governed workflows.
Reference
references/tiangong-data-requirement.json: stable capability requirement; it is not a package lock.
1---2name: regulationsgov-attachments-fetch3description: Download bounded public attachment files for exact Regulations.gov comment IDs through the Tiangong CLI. Use when selected regulatory comments have supporting files that must be acquired locally with source lineage, SHA-256 hashes, byte counts, and a manifest; do not use for comment search, arbitrary URL download, file safety certification, text extraction, stance analysis, legal interpretation, or evidence synthesis.4---5
6# Regulations.gov Attachments Fetch
7
8Use the CLI-owned `regulations-gov.attachments/download` operation. This Skill
9supplies intent routing, explicit-ID selection, local-directory discipline, and
10result-use boundaries only. The CLI TypeScript 7 runtime owns the official API
11contract, credential injection, endpoint restrictions, schemas, limits,
12downloads, transactional file writes, partial results, and receipts.
13
14## Before running
15
161. Read `references/tiangong-data-requirement.json`.
172. Use the caller- or workspace-resolved stable CLI. The requirement declares
18 compatible capability and operation contract majors; it does not select a
19 package build.
203. Run `data describe` with that same CLI. Continue only when the capability
21 ID and required contract majors match, and copy the exact current
22 capability/operation versions from that response into the run request.
234. Inspect `manifest.availability` and `discovery.availability`. This capability
24 is currently `suspended` because its prerequisite Regulations.gov live gate
25 returned HTTP 503. Stop while it remains suspended; do not create an
26 artifact run, retry directly, or assume a configured API key restores it.
27
28```bash
29tiangong-ai data describe regulations-gov.attachments --json
30```
31
32Use the returned Discovery Metadata to confirm current coverage, granularity,
33limits, selection hints, `provides`, and `doesNotProvide`. Do not rely on source
34facts copied from an older Skill revision.
35
36## Select comments and attachments
37
38- Start from exact public comment IDs selected by the user or by the
39 `regulationsgov-comments-fetch` or `regulationsgov-comment-detail-fetch`
40 workflow. This operation does not search comments, dockets, or documents.
41- Omit `attachmentIds` to select every attachment returned for those comments,
42 or supply an exact allowlist when only reviewed attachment IDs are needed.
43- Set `maxFiles` and `maxTotalBytes` deliberately. The CLI also applies the
44 lower manifest/runtime limits and reports bounded or missing coverage.
45- Configure `REGGOV_API_KEY` only in the environment. Never place it in argv,
46 request JSON, a URL, or the artifact directory.
47- Create a dedicated, empty, existing directory and use its absolute path for
48 `--artifact-dir`. The CLI refuses symlink directories and existing target
49 filenames; it never returns the absolute directory in the result or receipt.
50
51## Prepare the request
52
53Build one `tiangong.data.run-request.v1` envelope. Replace both version
54placeholders with the exact versions from the same `data describe` response and validate `input` against the current
55operation schema returned by `data describe`.
56
57```json
58{
59 "schemaVersion": "tiangong.data.run-request.v1",
60 "capabilityId": "regulations-gov.attachments",
61 "capabilityVersion": "<describe.manifest.capabilityVersion>",
62 "operationId": "download",
63 "operationVersion": "<describe.manifest.operations[0].operationVersion>",
64 "input": {
65 "commentIds": ["EPA-HQ-OAR-2026-0001-0002"],
66 "attachmentIds": ["EPA-HQ-OAR-2026-0001-0002-ATTACHMENT-1"],
67 "maxFiles": 10,
68 "maxTotalBytes": 10000000
69 }
70}
71```
72
73Use run-request `limits` only when intentionally lowering the manifest's page,
74record, response-byte, or timeout ceiling. Do not place a base URL, download
75URL, output path, retry setting, or credential in `input`.
76
77## Run
78
79```bash
80tiangong-ai data run regulations-gov.attachments download \
81 --input /absolute/path/to/request.json \
82 --artifact-dir /absolute/path/to/empty-artifact-directory \
83 --json
84```
85
86Preserve the complete `tiangong.data.run-result.v1` envelope and the generated
87manifest together with every committed file. The result binds relative names,
88source URLs, content types, provider and actual sizes, SHA-256 hashes,
89observations, warnings, errors, and the core receipt.
90
91## Result boundaries
92
93- The CLI obtains attachment relationships through official comment-detail
94 requests and downloads only exact-origin `downloads.regulations.gov` URLs.
95 It does not accept arbitrary download URLs, standalone attachment lookup, or
96 redirects.
97- Treat all files as untrusted public-submission bytes. A successful download,
98 matching provider size, content type, or SHA-256 establishes byte identity
99 and lineage, not safety, truth, relevance, or evidentiary sufficiency.
100- `success` means the explicitly bounded selection completed. A max-file,
101 max-byte, or runtime cap still narrows coverage; report it and never claim
102 that omitted attachments do not exist.
103- `partial` preserves verified earlier files and the manifest while identifying
104 missing metadata or files. Report each missing item. Treat `blocked` as no
105 usable run and do not use temporary or pre-existing directory contents.
106- Keep the generated manifest with the files when moving them. Verify hashes
107 before downstream processing and retain comment, attachment, format, and URL
108 lineage.
109- Malware scanning, safe opening, OCR, text extraction, personal-data review,
110 content interpretation, stance or sentiment analysis, legal conclusions, and
111 durable evidence admission require separate governed workflows.
112
113## Reference
114
115- `references/tiangong-data-requirement.json`: stable capability requirement; it is not a package lock.