@@ -34,25 +34,25 @@ test/
3434
3535** π« DO NOT violate these rules. This project depends heavily on predictability.**
3636
37- ### 1. The * planner * is pure and deterministic
37+ ### 1. The _ planner _ is pure and deterministic
3838
3939All modules in ` lib/planner/ ` MUST:
4040
41- * contain ** no AWS SDK calls**
42- * avoid reading the filesystem
43- * avoid environment access
44- * avoid time-based behavior
45- * avoid randomization
41+ - contain ** no AWS SDK calls**
42+ - avoid reading the filesystem
43+ - avoid environment access
44+ - avoid time-based behavior
45+ - avoid randomization
4646
4747They must take ** inputs β outputs** and be fully testable.
4848
4949### 2. No business logic in CDK constructs
5050
5151` budget-alerts-stack.ts ` must only:
5252
53- * evaluate planner results
54- * wire CDK constructs and StackSets
55- * pass validated data to resources
53+ - evaluate planner results
54+ - wire CDK constructs and StackSets
55+ - pass validated data to resources
5656
5757### 3. Validation is performed ** before** CDK synthesis
5858
@@ -62,8 +62,8 @@ They must take **inputs β outputs** and be fully testable.
6262
6363In particular:
6464
65- * TypeScript sources must compile cleanly via ` npm run build `
66- * No hard-coded organization ID
65+ - TypeScript sources must compile cleanly via ` npm run build `
66+ - No hard-coded organization ID
6767 (this is resolved dynamically via the custom resource)
6868
6969### 5. No test-breaking rewrites
@@ -117,10 +117,10 @@ npm test
117117
118118Tests focus on:
119119
120- * Organizational Unit tree building
121- * Effective budget calculation
122- * Homogeneous subtree detection
123- * Stack attachment selection
120+ - Organizational Unit tree building
121+ - Effective budget calculation
122+ - Homogeneous subtree detection
123+ - Stack attachment selection
124124
125125The entire planner layer is fully unit-testable.
126126
@@ -155,58 +155,58 @@ npx budget-alerts-init-config
155155
156156# 𧬠Making Changes
157157
158- ## 1. Planner logic (lib/planner/* )
158+ ## 1. Planner logic (lib/planner/\ * )
159159
160160Changes must:
161161
162- * be ** pure functions**
163- * include ** unit tests** for new behaviors
164- * avoid dependencies outside the planner folder
165- * receive architectural approval if changing core algorithm flow
162+ - be ** pure functions**
163+ - include ** unit tests** for new behaviors
164+ - avoid dependencies outside the planner folder
165+ - receive architectural approval if changing core algorithm flow
166166
167167## 2. Organization loader (org-loader.ts)
168168
169169Allowed:
170170
171- * Using AWS SDK v3
172- * Querying Organizations API
173- * Returning normalized OU nodes
171+ - Using AWS SDK v3
172+ - Querying Organizations API
173+ - Returning normalized OU nodes
174174
175175Not allowed:
176176
177- * Writing planner logic here
178- * Modifying planner output logic in this layer
177+ - Writing planner logic here
178+ - Modifying planner output logic in this layer
179179
180180## 3. Budget config loader (budget-config-loader.ts)
181181
182182Allowed:
183183
184- * YAML parsing
185- * YAML comment round-tripping
186- * Validation
187- * Synchronization logic
184+ - YAML parsing
185+ - YAML comment round-tripping
186+ - Validation
187+ - Synchronization logic
188188
189189Not allowed:
190190
191- * Introducing side effects that would break determinism
192- * Moving org-structure-dependent logic into the config loader
191+ - Introducing side effects that would break determinism
192+ - Moving org-structure-dependent logic into the config loader
193193
194194## 4. CDK stack (budget-alerts-stack.ts)
195195
196196Allowed:
197197
198- * Mapping planner outputs to StackSets
199- * Adding CloudFormation resources
200- * Creating custom resources
201- * Wiring permissions
202- * Adding future IAM boundaries or service integrations
198+ - Mapping planner outputs to StackSets
199+ - Adding CloudFormation resources
200+ - Creating custom resources
201+ - Wiring permissions
202+ - Adding future IAM boundaries or service integrations
203203
204204Not allowed:
205205
206- * Planner logic
207- * Config merging logic
208- * Introducing account-specific assumptions
209- * Hard-coding organization IDs
206+ - Planner logic
207+ - Config merging logic
208+ - Introducing account-specific assumptions
209+ - Hard-coding organization IDs
210210
211211---
212212
@@ -244,41 +244,41 @@ npm publish --access public
244244
245245# π Branching Strategy
246246
247- * ` main ` β always stable, publishable
248- * ` dev ` or feature branches β active development
249- * PRs must include tests when affecting planner or validation logic
247+ - ` main ` β always stable, publishable
248+ - ` dev ` or feature branches β active development
249+ - PRs must include tests when affecting planner or validation logic
250250
251251---
252252
253253# π§Ύ Pull Request Requirements
254254
255255Every PR must include:
256256
257- * [ ] Clear description of the change
258- * [ ] Unit tests for new or changed planner behavior
259- * [ ] No breaking changes unless discussed
260- * [ ] No architectural violations
261- * [ ] Maintains npm package status
262- * [ ] Does not remove or bypass existing validation
257+ - [ ] Clear description of the change
258+ - [ ] Unit tests for new or changed planner behavior
259+ - [ ] No breaking changes unless discussed
260+ - [ ] No architectural violations
261+ - [ ] Maintains npm package status
262+ - [ ] Does not remove or bypass existing validation
263263
264264---
265265
266266# π Anti-Patterns (Do Not Do This)
267267
268- * β Adding AWS calls into planner logic
269- * β Running unmocked AWS calls in unit tests
270- * β Stubbing away planner logic to make tests pass
271- * β Hard-coding Organization IDs or account numbers
272- * β Adding features without documentation
273- * β Rewriting module architecture without explicit approval
268+ - β Adding AWS calls into planner logic
269+ - β Running unmocked AWS calls in unit tests
270+ - β Stubbing away planner logic to make tests pass
271+ - β Hard-coding Organization IDs or account numbers
272+ - β Adding features without documentation
273+ - β Rewriting module architecture without explicit approval
274274
275275---
276276
277277# π§ Design Principles Summary
278278
279- * ** Strong separation** of planner, config I/O, org discovery, and CDK stack
280- * ** Predictability** and ** determinism** in every planner function
281- * ** Minimal customer boilerplate**
282- * ** Pure functional planning logic**
283- * ** Safe deployment via service-managed StackSets**
284- * ** Config as the single source of truth**
279+ - ** Strong separation** of planner, config I/O, org discovery, and CDK stack
280+ - ** Predictability** and ** determinism** in every planner function
281+ - ** Minimal customer boilerplate**
282+ - ** Pure functional planning logic**
283+ - ** Safe deployment via service-managed StackSets**
284+ - ** Config as the single source of truth**
0 commit comments