@rasensio/aidlc-content 2.26.0 → 2.27.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.
@@ -0,0 +1,228 @@
1
+ # SOX IT general controls — change management only.
2
+ #
3
+ # Sarbanes-Oxley defines no control list and no numbering. External auditors test
4
+ # IT general controls in four areas against a control matrix the audited company
5
+ # writes. The ids below are this pack's own, one prefix per area:
6
+ #
7
+ # PC program changes
8
+ # PD program development
9
+ # APD access to programs and data
10
+ # CO computer operations
11
+ #
12
+ # A user maps them to the matrix their company and auditor agreed. The prefixes
13
+ # keep every id distinct from the SOC 2 pack's CC ids and the ISO 27001 pack's
14
+ # A<n>.<n> ids, which matters because `aidlc compliance check` keys agent outcomes
15
+ # by control id across all installed packs (sox-itgc-pack/AC-4, sox-itgc-pack/AC-13).
16
+ #
17
+ # The text below states each control's intent in this pack's own words. It quotes
18
+ # no COBIT or PCAOB text.
19
+ #
20
+ # `kind` says what the AIDLC artifact trail can establish:
21
+ #
22
+ # evidenced the trail genuinely demonstrates the control
23
+ # checked-only the control operates over a running system, so no document
24
+ # evidences it; the pack supplies a fail condition an agent
25
+ # applies, and the trail records only that the check happened
26
+ #
27
+ # Every control is `check_kind: agent`. Each fail condition needs a reading of the
28
+ # instance's records, and none of them is visible as a pattern over added lines.
29
+ #
30
+ # Five controls are `evidenced`. One is `checked-only`. Eleven IT general controls
31
+ # are not covered at all, each listed below with its reason.
32
+
33
+ controls:
34
+ # -------------------------------------------------------------------------
35
+ # Evidenced: the lifecycle is a change process, so its trail is the record an
36
+ # auditor tests for these.
37
+ # -------------------------------------------------------------------------
38
+ - id: PC1
39
+ kind: evidenced
40
+ check_kind: agent
41
+ severity: major
42
+ phases:
43
+ - requirements
44
+ requires: >-
45
+ Every change starts from a documented request that says what is to change and
46
+ why, so the change can be traced back to the need it answers.
47
+ look_at: >-
48
+ requirements.md for the problem statement and the numbered acceptance
49
+ criteria, and the roadmap item the instance was started from.
50
+ fails_when: >-
51
+ The change has no requirements.md, or requirements.md carries no numbered
52
+ acceptance criterion, or the change does work that no criterion asks for.
53
+ evidence_artifact: requirements.md
54
+
55
+ - id: PC2
56
+ kind: evidenced
57
+ check_kind: agent
58
+ severity: critical
59
+ phases:
60
+ - requirements
61
+ - design
62
+ requires: >-
63
+ The change request is authorized before work on it starts, and a request
64
+ changed after it was authorized is authorized again.
65
+ look_at: >-
66
+ transitions.log for the requirements-to-design transition and its `by`;
67
+ phase-requirements.yaml for `completed_by`; the review findings recorded for
68
+ requirements.md; any amendment sections appended to requirements.md.
69
+ fails_when: >-
70
+ Design or implementation started with no recorded completion of the
71
+ requirements phase, or requirements.md was changed after that completion
72
+ without an amendment.
73
+ evidence_artifact: transitions.log
74
+
75
+ - id: PC3
76
+ kind: evidenced
77
+ check_kind: agent
78
+ severity: critical
79
+ phases:
80
+ - testing
81
+ requires: >-
82
+ The change is tested against its request before it is released, and the
83
+ result of that testing is recorded.
84
+ look_at: >-
85
+ test-results.md, the tests that reference each acceptance criterion, and the
86
+ testing phase's transition in transitions.log.
87
+ fails_when: >-
88
+ test-results.md is absent, or records a failing test, or leaves an active
89
+ acceptance criterion with no referencing test.
90
+ evidence_artifact: test-results.md
91
+
92
+ - id: PC4
93
+ kind: evidenced
94
+ check_kind: agent
95
+ severity: critical
96
+ phases:
97
+ - deployment
98
+ requires: >-
99
+ A person approves the change for production before it is released, and the
100
+ approval is recorded with who gave it and when.
101
+ look_at: >-
102
+ deployment-record.md for the release plan and the approval it records,
103
+ transitions.log for the deployment transition, and the release tag or merge
104
+ time of the change.
105
+ fails_when: >-
106
+ The deployment record names no person approving the release, or records that
107
+ approval after the release.
108
+ evidence_artifact: deployment-record.md
109
+
110
+ - id: PC5
111
+ kind: evidenced
112
+ check_kind: agent
113
+ severity: critical
114
+ phases:
115
+ - implementation
116
+ - deployment
117
+ requires: >-
118
+ Segregation of duties: the person or agent who wrote a change is not the one
119
+ who approved it for production.
120
+ look_at: >-
121
+ sessions.ndjson for the sessions that claimed the instance; transitions.log
122
+ for the `by` on each transition; the `completed_by` field of each phase file;
123
+ the autopilot approval record; and refusals.ndjson in the git common
124
+ directory, which logs every person-only command an agent was refused.
125
+ fails_when: >-
126
+ The approval for production was recorded by an identity also recorded as
127
+ writing the change, or by an agent session.
128
+ evidence_artifact: transitions.log
129
+
130
+ # -------------------------------------------------------------------------
131
+ # Checked only: operates over the environments a change runs in, so no
132
+ # document evidences it. The trail records that the check was applied.
133
+ # -------------------------------------------------------------------------
134
+ - id: PC6
135
+ kind: checked-only
136
+ check_kind: agent
137
+ severity: major
138
+ phases:
139
+ - implementation
140
+ - deployment
141
+ requires: >-
142
+ Development, test and production environments are kept apart, so a change
143
+ reaches production only through its release.
144
+ look_at: >-
145
+ Environment configuration, test setup and fixtures in the change: which
146
+ endpoints, databases and credentials each environment's code and configuration
147
+ points at.
148
+ fails_when: >-
149
+ Development or test code or configuration points at a production endpoint,
150
+ database or credential, or a production configuration enables a feature meant
151
+ only for development.
152
+ references: secure-defaults#secrets-management
153
+
154
+ # ---------------------------------------------------------------------------
155
+ # Not covered. Eleven IT general controls.
156
+ #
157
+ # organizational the control runs over live systems or the business's own
158
+ # governance, which the lifecycle trail does not record
159
+ # not-yet-built a code lifecycle could check something here; this pack
160
+ # does not yet, and says so rather than claiming it
161
+ #
162
+ # Every exclusion carries a note, because `organizational` alone misdescribes a
163
+ # control that runs over live systems (sox-itgc-pack/AC-11).
164
+ # ---------------------------------------------------------------------------
165
+ excluded:
166
+ # Program changes.
167
+ - id: PC7
168
+ reason: not-yet-built
169
+ note: >-
170
+ Emergency changes have a lifecycle angle: a fix released before its review
171
+ could be required to carry a retrospective approval. This pack does not check
172
+ for one and does not claim the control.
173
+ - id: PC8
174
+ reason: not-yet-built
175
+ note: >-
176
+ Reconciling production against approved changes has a lifecycle angle: the
177
+ commits deployed could be compared with the deployment records. This pack does
178
+ not do that, and a change made outside the lifecycle is invisible to it.
179
+ # Program development.
180
+ - id: PD1
181
+ reason: not-yet-built
182
+ note: >-
183
+ Data conversion has a lifecycle angle: a migration's record could carry a
184
+ reconciliation of the data before and after. This pack does not check one and
185
+ does not claim the control.
186
+ - id: PD2
187
+ reason: organizational
188
+ note: >-
189
+ Acquiring or developing a new system is chosen and signed off through the
190
+ business's own project governance, not recorded in a change's trail.
191
+ # Access to programs and data.
192
+ - id: APD1
193
+ reason: organizational
194
+ note: >-
195
+ Provisioning user access is done in live identity systems, which the
196
+ lifecycle trail does not record.
197
+ - id: APD2
198
+ reason: organizational
199
+ note: >-
200
+ Removing access for leavers and movers is done in live identity systems,
201
+ which the lifecycle trail does not record.
202
+ - id: APD3
203
+ reason: organizational
204
+ note: >-
205
+ Periodic access review is a review of live accounts and their rights, which
206
+ the lifecycle trail does not record.
207
+ - id: APD4
208
+ reason: organizational
209
+ note: >-
210
+ Who holds production and database administrator rights is live configuration,
211
+ which the lifecycle trail does not record.
212
+ # Computer operations.
213
+ - id: CO1
214
+ reason: organizational
215
+ note: >-
216
+ Job scheduling and monitoring concern batch jobs running in production, which
217
+ the lifecycle trail does not record.
218
+ - id: CO2
219
+ reason: organizational
220
+ note: >-
221
+ Backup and recovery run over live data, and a restore test happens in
222
+ operations, not in a change's trail.
223
+ - id: CO3
224
+ reason: organizational
225
+ note: >-
226
+ Problem and incident management is an operations process. A fix for an
227
+ incident leaves a trail when it goes through the lifecycle, but the incident
228
+ process itself does not.
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: sox-constraints
3
+ description: SOX IT general controls for change management that apply while code is being written
4
+ ---
5
+ # SOX ITGC Constraints
6
+
7
+ **This pack's control text has not been reviewed by a compliance practitioner.**
8
+ It was written by an engineer. Treat it as a working draft: useful for applying
9
+ controls while you write code, not as an opinion on whether your controls are
10
+ adequate. Nothing here makes a project SOX compliant, certified, attested, or
11
+ audit-ready.
12
+
13
+ The control text states each control's intent in this pack's own words. It quotes no
14
+ COBIT or PCAOB text.
15
+
16
+ ## What SOX asks and what this pack covers
17
+
18
+ SOX defines no control list or numbering. External auditors test IT general controls
19
+ against a control matrix the audited company writes. The ids `PC`, `PD`, `APD` and
20
+ `CO` — program changes, program development, access to programs and data, computer
21
+ operations — are this pack's own. Map them to the control matrix your company and
22
+ auditor agreed.
23
+
24
+ This pack covers the change-management ITGCs only. Access to programs and data and
25
+ computer operations run over live systems the lifecycle trail does not record, so
26
+ those controls are listed in the pack's `controls.yaml` under `excluded:` with a
27
+ reason: `organizational` where they run over live systems or the business's own
28
+ governance, `not-yet-built` where a code lifecycle could say something and this pack
29
+ does not yet.
30
+
31
+ ## Which controls apply, and when
32
+
33
+ | Phase | Controls to have in mind |
34
+ |---|---|
35
+ | Requirements | PC1, PC2 |
36
+ | Design | PC2 |
37
+ | Implementation | PC5, PC6 |
38
+ | Testing | PC3 |
39
+ | Deployment | PC4, PC5, PC6 |
40
+
41
+ Run `aidlc compliance check` for each control's exact fail condition. Apply the fail
42
+ condition as written rather than your reading of the control — that is what makes two
43
+ reviews of the same change agree.
44
+
45
+ ## Five controls are evidenced. One is only checked.
46
+
47
+ **PC1, PC2, PC3, PC4 and PC5 are evidenced.** They are controls over how a change is
48
+ requested, authorized, tested, approved and kept apart from its author, and this
49
+ lifecycle *is* a change process, so the artifact trail demonstrates them.
50
+
51
+ **PC6 is checked only.** Keeping environments apart is a property of the systems a
52
+ change runs in. No document establishes it — so the pack gives you a fail condition to
53
+ apply, and the trail records that you applied it. A report will say which is which.
54
+ Never present a checked-only control as evidence.
55
+
56
+ ## What the evidenced controls ask of you while you build
57
+
58
+ Make sure each of these leaves a record, because the record is the evidence:
59
+
60
+ - **PC1, change request.** `requirements.md` says what is to change and why, in
61
+ numbered acceptance criteria.
62
+ - **PC2, change authorization.** The requirements phase is completed before design
63
+ starts, and `transitions.log` shows who completed it. A requirement changed later goes
64
+ through `aidlc amend`.
65
+ - **PC3, change testing.** `test-results.md` records the outcome, and every active
66
+ criterion has a referencing test.
67
+ - **PC4, approval before production.** `deployment-record.md` names the person who
68
+ approved the release, and the approval is recorded before the release.
69
+ - **PC5, segregation of duties.** The person or agent who wrote the change is not the
70
+ one who approved it for production.
71
+
72
+ ## What PC5 does not evidence
73
+
74
+ PC5 is judged from `sessions.ndjson`, `transitions.log`, each phase file's
75
+ `completed_by`, the autopilot approval record and `refusals.ndjson`. The identities in
76
+ the trail are as recorded, not authenticated: a session id and a git user name say who
77
+ the tool was told it was, not who it was. And one person who both directs the agent
78
+ and approves the release fails PC5 — the agent wrote the change on that person's
79
+ instruction, so the approval is not independent of the author.
80
+
81
+ ## What the trail cannot show
82
+
83
+ A change made outside the lifecycle leaves no trail. A hotfix pushed straight to
84
+ production, a configuration edited on a server, a migration run by hand — none of them
85
+ appears here, so the pack cannot show that every production change went through it.
86
+ That is the gap PC8 names, and why PC8 is excluded rather than covered.
87
+
88
+ ## SOC 1
89
+
90
+ A SOX audit of a service your company relies on often arrives as a request for a SOC 1
91
+ report. The SOC 2 pack's SOC 1 note, in `docs/hygiene-and-compliance.md`, says what
92
+ its trail shows a SOC 1 auditor and what it does not. This pack names the
93
+ change-management controls directly instead.
94
+
95
+ ## Security rules live in one place, not here
96
+
97
+ This pack does not restate the project's security rules. Read
98
+ `.aidlc/guidance/secure-defaults.md` and apply it. PC6 references its secrets
99
+ management section, so there is exactly one place to change when a rule changes.
@@ -0,0 +1,30 @@
1
+ id: sox
2
+ # SOX names the statute; the pack covers the IT general controls an auditor tests
3
+ # under it, and the change-management ones only. The report prints this string as
4
+ # its section heading (sox-itgc-pack/AC-2, sox-itgc-pack/AC-25).
5
+ regime: SOX ITGC
6
+ version: 0.1.0
7
+
8
+ # The first pack scoped to an industry. Sarbanes-Oxley applies to companies that
9
+ # file with the SEC, and the teams that ask for its IT general controls work at
10
+ # public companies, banks and fintechs. Naming an industry other than `any` is what
11
+ # makes the init wizard ask which industry a project serves, and offer this pack
12
+ # only under `financial-services` (sox-itgc-pack/AC-27).
13
+ industries:
14
+ - financial-services
15
+
16
+ entitlement: unrestricted
17
+
18
+ # Null on purpose. The control text in this pack was written by an engineer, not
19
+ # a compliance practitioner. Nulling this field obliges the constraint layer to
20
+ # say so, obliges every report to say so, and makes a doctor check watch for
21
+ # someone editing the statement out.
22
+ reviewed_by: null
23
+
24
+ layers:
25
+ - name: sox-constraints
26
+ file: sox-constraints.md
27
+ # Pack layers are delivered as a read-instruction whatever their size. A small
28
+ # layer that got inlined would put pack text inside an emitted skill, which is
29
+ # forbidden outright.
30
+ always_pointer: true
@@ -48,7 +48,7 @@ See **The context rule** (`.aidlc/resources/rules/context.md`).
48
48
  - Specific and unambiguous
49
49
  - Testable (an observable outcome)
50
50
  - Independent (not relying on unstated assumptions)
51
- - **Identified**: write every criterion as a list item `- AC-<n>: <text>` (bold variants `- **AC-<n>**: ...` and `- **AC-<n>:** ...` are also valid). Assign `AC-1`, `AC-2`, ... sequentially. IDs are never renumbered or reused — an amended criterion keeps its meaning or is retired: mark it `- AC-<n> (retired YYYY-MM-DD, superseded by AC-<m>): <text>` and issue a new ID. The testing-phase gate parses these IDs and fails on any active criterion without a referencing test.
51
+ - **Identified**: write every criterion as a list item `- AC-<n>: <text>` (bold variants `- **AC-<n>**: ...` and `- **AC-<n>:** ...` are also valid). Assign `AC-1`, `AC-2`, ... sequentially. Number them across the whole document, never per section: a sub-numbered id such as `AC-6.1` is not supported. IDs are never renumbered or reused — an amended criterion keeps its meaning or is retired: mark it `- AC-<n> (retired YYYY-MM-DD, superseded by AC-<m>): <text>` and issue a new ID. The testing-phase gate parses these IDs and fails on any active criterion without a referencing test.
52
52
  - **Shaped**, when the criterion is a behaviour. Write the text after the colon in one of four shapes, each naming its own test — the condition to set up and the response to check:
53
53
  - Event — `- AC-1: WHEN the user presses Save, THE SYSTEM SHALL write the draft to disk`
54
54
  - State — `- AC-2: WHILE the draft is unsaved, THE SYSTEM SHALL show a dot in the tab`
@@ -128,7 +128,8 @@ To change a criterion after its phase closed:
128
128
 
129
129
  Field bullets accept `Retires:`, `**Retires**:` and `**Retires:**` alike. AC lists take
130
130
  whole `AC-<n>` tokens only — `AC-4..AC-6` is not a range and contributes nothing. A
131
- wrapped bullet is still one bullet.
131
+ sub-numbered id such as `AC-6.1` is refused: `aidlc amend` exits without recording
132
+ anything. A wrapped bullet is still one bullet.
132
133
  3. Run `aidlc amend <instance> --impact` to see which tasks, tests and artifacts still cite
133
134
  the retired criteria. It ends with one line naming the smallest `Reopens:` the write
134
135
  will accept: `none`, or the earliest completed phase that still cites a retired criterion.