Skip to content

docs: add ADRs 0013-0016, TODO.md, and consistency cleanups#71

Merged
fzipi merged 6 commits into
mainfrom
docs/crslang-v2-adrs-13-16
Apr 26, 2026
Merged

docs: add ADRs 0013-0016, TODO.md, and consistency cleanups#71
fzipi merged 6 commits into
mainfrom
docs/crslang-v2-adrs-13-16

Conversation

@fzipi

@fzipi fzipi commented Apr 26, 2026

Copy link
Copy Markdown
Member

Adds four new ADRs covering structural concepts that were missing or under-specified in the prior set:

  • ADR-0013: Documentation Model — four tiers (ruleset/group/rule/directive) with doc-comments for narrative + structured fields for machine-readable content. Groups nest for conceptual cohesion; cross-cutting concepts (paranoia, severity) get their own documentation blocks.
  • ADR-0014: Imports and Modularity — explicit import directive, hierarchical namespaces for groups/macros/data, single flat namespace for rule IDs, package distribution model, compile-time conflict detection.
  • ADR-0015: Macros and Named Compositions — typed expression macros, pure and inlined at compile time, file/group/package scoped. Resolves the "named composition" references scattered across earlier ADRs.
  • ADR-0016: External Data Sources — typed data declarations for IP lists, regex sets, geo databases, regex assemblies. Replaces the implicit @ipMatchFromFile style with compile-time-validated references.

Also adds docs/TODO.md tracking second-tier and lower-priority structural gaps (durations, versioning, function signatures, test attachment, persistent collections, capture groups) with reserved ADR numbers.

Cleanups in existing ADRs to keep cross-references consistent:

  • README: Status section, Phase 0 reframed (open vs proposed), Phase 3 table fixed (scoring_threshold → config), Pipeline operator framing softened to acknowledge Phase 0 dependency.
  • ADR-0004: corrected stale claim that ADR-0011 lifts scoring_threshold to globals (it's actually ADR-0012's config block); updated example.
  • ADR-0007: noted that most cited TX-only patterns are now eliminated by ADR-0006/0011/0012; added note on rule 901001 as compiler-generated.

Summary by CodeRabbit

  • Documentation

    • Clarified that ADRs/docs describe proposed (not ratified) designs, expanded phase roadmap and examples, swapped illustrative examples, added a TODO tracker for unresolved topics, and updated multiple ADRs for scope and wording. Added markdownlint config.
  • New Features

    • Added proposals for a structured documentation model, typed compile-time expression macros, typed external data sources with fetch/validation semantics, and multi-file imports/modularity with conflict and override rules.

Adds four new ADRs covering structural concepts that were missing or
under-specified in the prior set:

- ADR-0013: Documentation Model — four tiers (ruleset/group/rule/directive)
  with doc-comments for narrative + structured fields for machine-readable
  content. Groups nest for conceptual cohesion; cross-cutting concepts
  (paranoia, severity) get their own documentation blocks.
- ADR-0014: Imports and Modularity — explicit `import` directive,
  hierarchical namespaces for groups/macros/data, single flat namespace
  for rule IDs, package distribution model, compile-time conflict detection.
- ADR-0015: Macros and Named Compositions — typed expression macros,
  pure and inlined at compile time, file/group/package scoped. Resolves
  the "named composition" references scattered across earlier ADRs.
- ADR-0016: External Data Sources — typed `data` declarations for IP
  lists, regex sets, geo databases, regex assemblies. Replaces the
  implicit `@ipMatchFromFile` style with compile-time-validated references.

Also adds docs/TODO.md tracking second-tier and lower-priority structural
gaps (durations, versioning, function signatures, test attachment,
persistent collections, capture groups) with reserved ADR numbers.

Cleanups in existing ADRs to keep cross-references consistent:
- README: Status section, Phase 0 reframed (open vs proposed), Phase 3
  table fixed (scoring_threshold → config), Pipeline operator framing
  softened to acknowledge Phase 0 dependency.
- ADR-0004: corrected stale claim that ADR-0011 lifts scoring_threshold
  to globals (it's actually ADR-0012's config block); updated example.
- ADR-0007: noted that most cited TX-only patterns are now eliminated by
  ADR-0006/0011/0012; added note on rule 901001 as compiler-generated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fzipi
fzipi requested a review from Copilot April 26, 2026 14:24
@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

Adds ADRs 0013–0016 (documentation model, imports/modularity, macros, external data), updates README to mark designs as proposed and reassign features across phases, adds docs/TODO.md tracking unresolved topics, and clarifies examples in ADR-0004 and ADR-0007. (Documentation-only changes.)

Changes

Cohort / File(s) Summary
Narrative & index
docs/README.md, docs/TODO.md
README marks designs as proposed, remaps features across phases (composable functions, scoring config), ties engine-independence to ADR-0008, and points to docs/TODO.md; adds docs/TODO.md listing open/partially-covered/deferred design items with priorities and ADR cross-references.
New ADRs — Documentation & Modularity
docs/adr/0013-documentation-model.md, docs/adr/0014-imports-and-modularity.md
ADR-0013 specifies attachable narrative + structured documentation IR, attachment tiers, inheritance/composition, serialization, and tooling consumers; ADR-0014 defines import-based multi-file modularity, resolution rules, namespace/conflict semantics, package layout, idempotent imports, and compilation/export behavior.
New ADRs — Macros & External Data
docs/adr/0015-macros-and-compositions.md, docs/adr/0016-external-data-sources.md
ADR-0015 defines typed, pure, compile-time inlined expression macros with scoping, typing, and non-recursive constraints; ADR-0016 defines data declarations, supported data types/formats, fetch/validation/reload semantics, compile-time validation, IR DataDecl, and mapping/export behaviors for target engines.
ADR clarifications & examples
docs/adr/0004-structured-actions.md, docs/adr/0007-phase-inference.md
ADR-0004 updates examples to avoid implying built-in TX assignments and uses TX-only illustrative fields; ADR-0007 narrows cross-phase inference scope to current CRS patterns and clarifies explicit-phase metadata applicability for user-authored TX-only rules.
Linters / config
.markdownlint.jsonc
Adds markdownlint config enabling default rules and disabling MD040 (fenced code block language tag enforcement) with an explanatory comment.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant FS as FileSystem
  participant Compiler as Compiler
  participant Remote as RemoteDataSource
  participant Engine as TargetEngine

  Dev->>Compiler: open / compile `package.crs` (sources + macros + imports)
  Compiler->>FS: read files & `import` targets
  FS-->>Compiler: file contents
  Compiler->>Remote: fetch external `data` (if URL + checksum)
  Remote-->>Compiler: data payload / checksum validation
  Compiler->>Compiler: parse, validate types, expand macros (inline), resolve imports
  Compiler->>Compiler: generate IR (`Documentation`, `DataDecl`, flattened rules)
  Compiler->>FS: write outputs (SecLang `.conf`, YAML/manifests)
  Compiler->>Engine: emit export / manifest indicating runtime data references
  Engine-->>Compiler: runtime load semantics (static vs dynamic) noted in output
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I nibble at pages, whiskers twitch with glee,
New ADRs unfurl—docs, imports, macros, and data tree,
A TODO trail of questions left to chase,
Examples pruned, a tidy modular space,
Hop, stamp, I cheer—CRSLang grows gracefully ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding four new ADRs (0013-0016), a TODO.md file, and consistency updates across documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/crslang-v2-adrs-13-16

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/adr/0004-structured-actions.md`:
- Line 171: The fenced code block containing "rule 900100 (phase:
request_headers) { ... }" is missing a language identifier which triggers
markdownlint MD040; update the fence to include the language tag (e.g., add
"crslang" after the opening ```), so the block becomes ```crslang followed by
the existing rule code and a closing ```.

In `@docs/adr/0013-documentation-model.md`:
- Line 65: Several fenced code blocks in the ADR "0013-documentation-model" are
missing language identifiers (MD040); update each triple-backtick fence for the
examples (the blocks at the noted positions) to include the appropriate language
tag (e.g., use crslang for CRS examples, yaml for YAML snippets, go for Go code,
or hcl for Terraform) so markdownlint stops warning; search for the unlabeled
``` fences in the document (around the examples referenced) and change them to
```crslang, ```yaml, ```go or ```hcl as appropriate.

In `@docs/adr/0014-imports-and-modularity.md`:
- Line 26: Several fenced code blocks in the "But the proposals do not specify:"
section and the other nearby fenced examples are missing language identifiers
(markdownlint MD040); update each triple-backtick fence (the blocks beginning
near the "But the proposals do not specify:" paragraph and the other example
blocks) to include the appropriate language tag (e.g., ```js, ```ts, ```bash, or
```text as appropriate for the snippet) so each fenced block has a language
identifier and satisfies MD040.
- Around line 124-126: The prose states “last-import-wins on collision, with a
compile-time warning” but the conflict table says the same scenario is a
compile-time error; make these semantics consistent by adopting strict error
semantics: change the prose phrase “last-import-wins on collision, with a
compile-time warning” to “collisions are a compile-time error” and update the
conflict table entry (and any related entries in the same conflict section) to
mark unaliased-import collisions as a compile-time error rather than a warning
so both narrative and table agree.

In `@docs/adr/0016-external-data-sources.md`:
- Line 53: Several fenced code blocks in the ADR titled "0016 - External Data
Sources" are missing language specifiers (MD040); update each triple-backtick
fence used for examples so they include an appropriate language tag (e.g.,
```crslang, ```go, ```yaml) instead of bare ```; prefer specific tags for typed
snippets and ensure all code fences referenced in the review are updated
consistently so linters recognize the language.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5973e847-e2df-4a58-b30f-825e210a68c8

📥 Commits

Reviewing files that changed from the base of the PR and between 8083cd5 and 7029fb7.

📒 Files selected for processing (8)
  • docs/README.md
  • docs/TODO.md
  • docs/adr/0004-structured-actions.md
  • docs/adr/0007-phase-inference.md
  • docs/adr/0013-documentation-model.md
  • docs/adr/0014-imports-and-modularity.md
  • docs/adr/0015-macros-and-compositions.md
  • docs/adr/0016-external-data-sources.md

Comment thread docs/adr/0004-structured-actions.md
Comment thread docs/adr/0013-documentation-model.md
Comment thread docs/adr/0014-imports-and-modularity.md
Comment thread docs/adr/0014-imports-and-modularity.md
Comment thread docs/adr/0016-external-data-sources.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new architecture decision records (ADRs) that fill in previously under-specified CRSLang design areas (documentation model, imports/modularity, macros, and external data sources), plus a TODO tracker and cross-reference consistency updates across existing docs.

Changes:

  • Add ADRs 0013–0016 covering documentation tiers, import/namespacing semantics, macro design, and typed external data sources.
  • Add docs/TODO.md to track next-wave structural gaps with reserved ADR numbers.
  • Update existing docs (docs/README.md, ADR-0004, ADR-0007) to align examples and references with the newer ADRs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/adr/0013-documentation-model.md Introduces a 4-tier documentation model (ruleset/group/rule/directive) with narrative doc-comments + structured fields.
docs/adr/0014-imports-and-modularity.md Defines explicit imports, namespace rules, load order, idempotency, and conflicts for multi-file/package composition.
docs/adr/0015-macros-and-compositions.md Specifies typed, pure, compile-time-inlined expression macros with scoping rules.
docs/adr/0016-external-data-sources.md Proposes typed data declarations for external sources (files/URLs/inline) and target-specific compilation mappings.
docs/adr/0007-phase-inference.md Updates narrative/examples to reflect newer proposals that reduce TX-only authored patterns.
docs/adr/0004-structured-actions.md Refreshes examples/notes to reflect config/scoring/paranoia moving out of TX-assignment setup patterns per newer ADRs.
docs/TODO.md Tracks unaddressed structural concepts and reserves ADR numbers for future work.
docs/README.md Adds “Status” framing, updates phase descriptions, and links ADRs 0013–0016 into the roadmap.

Comment thread docs/adr/0014-imports-and-modularity.md Outdated
Comment thread docs/adr/0016-external-data-sources.md Outdated
Comment thread docs/adr/0016-external-data-sources.md Outdated
Comment thread docs/adr/0015-macros-and-compositions.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
docs/adr/0014-imports-and-modularity.md (1)

12-12: ⚠️ Potential issue | 🟡 Minor

Fix bare fenced blocks to satisfy MD040.

Line 12, Line 59, Line 81, Line 104, Line 171, Line 203, Line 216, Line 229, and Line 242 need fence language tags. Use text for these CRSLang/pseudocode/file-tree snippets.

Suggested fix pattern
-```
+```text
 ...

</details>

Based on learnings: In this repository’s Markdown docs, `crslang` is not a recognized fence language; use `text`/`plaintext` or explicitly suppress MD040.


Also applies to: 59-59, 81-81, 104-104, 171-171, 203-203, 216-216, 229-229, 242-242

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/adr/0014-imports-and-modularity.md at line 12, Several fenced code
blocks in this ADR use bare fences or the nonstandard language tag crslang,
triggering MD040; update each affected fence to include an explicit language tag
by replacing opening fences like orcrslang with ```text (or

re-run the linter to confirm MD040 is resolved.
docs/adr/0016-external-data-sources.md (1)

53-53: ⚠️ Potential issue | 🟡 Minor

Add language identifiers to all fenced code blocks (MD040).

Line 53, Line 59, Line 156, Line 167, Line 178, Line 280, and Line 293 still use bare fences, which will keep markdownlint failing. Use text (or plaintext) for CRSLang snippets in this repo.

Suggested fix
-```
+```text
 data <name> from <source> type <type> [format <format>] [reload <policy>]

...
- +text

IP list from a file, hot-reloadable

...

Based on learnings: In this repository, crslang is not a supported fenced-code language tag; use text/plaintext (or explicitly suppress MD040).

Also applies to: 59-59, 156-156, 167-167, 178-178, 280-280, 293-293

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/0016-external-data-sources.md` at line 53, Update all bare fenced
code blocks in the ADR document that contain CRSLang snippets to include a
language identifier (use "text" or "plaintext") so markdownlint MD040 passes;
specifically modify the fenced blocks referenced around the CRSLang examples
(the blocks shown in the diff such as the snippet starting with "data <name>
from <source> type <type> ..." and other CRSLang examples) by changing their
opening backticks to ```text (or ```plaintext) for each occurrence (lines noted
in the review: 53, 59, 156, 167, 178, 280, 293) to ensure consistent tagging or
alternatively add an MD040 suppression if you intentionally want bare fences.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/adr/0016-external-data-sources.md`:
- Around line 78-84: The example uses the token managed_by_engine on the data
declaration (data geo_db) but the declared grammar doesn't accept that token, so
either extend the grammar to accept managed_by_engine on data declarations
(update the parser/IR production that handles data declarations to parse and
preserve a managed_by_engine flag and propagate it into the IR) or remove
managed_by_engine from the examples and instead express “engine-managed” via the
documented metadata fields for the data source; pick one approach and make
consistent changes to the data declaration handling (parser/AST/IR code paths
that consume data declarations) and to all examples (e.g., the data geo_db
example) so the grammar and examples match.
- Around line 116-121: Add a concrete example showing the URL source and its
required checksum: include a snippet that demonstrates using the from "<url>"
form (HTTPS only), the sibling checksum field with the exact `sha256:<hex>`
format, and other commonly used keys (e.g., a resource name like `data
threat_feed`, `type`, `format`, and `reload interval`) so readers see how to
declare `checksum "sha256:<hex>"` alongside `from "<url>"`.

---

Duplicate comments:
In `@docs/adr/0014-imports-and-modularity.md`:
- Line 12: Several fenced code blocks in this ADR use bare fences or the
nonstandard language tag `crslang`, triggering MD040; update each affected fence
to include an explicit language tag by replacing opening fences like ``` or
```crslang with ```text (or ```plaintext) so the snippets
(CRSLang/pseudocode/file-tree) are recognized, and re-run the linter to confirm
MD040 is resolved.

In `@docs/adr/0016-external-data-sources.md`:
- Line 53: Update all bare fenced code blocks in the ADR document that contain
CRSLang snippets to include a language identifier (use "text" or "plaintext") so
markdownlint MD040 passes; specifically modify the fenced blocks referenced
around the CRSLang examples (the blocks shown in the diff such as the snippet
starting with "data <name> from <source> type <type> ..." and other CRSLang
examples) by changing their opening backticks to ```text (or ```plaintext) for
each occurrence (lines noted in the review: 53, 59, 156, 167, 178, 280, 293) to
ensure consistent tagging or alternatively add an MD040 suppression if you
intentionally want bare fences.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a6436981-720c-4703-8eaf-4375603ff1fa

📥 Commits

Reviewing files that changed from the base of the PR and between 7029fb7 and b2ba1af.

📒 Files selected for processing (2)
  • docs/adr/0014-imports-and-modularity.md
  • docs/adr/0016-external-data-sources.md

Comment thread docs/adr/0016-external-data-sources.md
Comment thread docs/adr/0016-external-data-sources.md Outdated
fzipi and others added 2 commits April 26, 2026 11:40
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
ADR-0015 previously said macros were "explicitly exported" without
defining the syntax. Pin it down: the `export` keyword prefixes the
declaration, applied at file or group scope, with a qualified-path
table for what importers see in each case. Default is private (opt-in
exports), matching Rust `pub` / TypeScript `export` / Python `__all__`
conventions and keeping the public API grep-able.

Also covers re-export syntax for surfacing macros declared in other
files of the same package, the HCL-surface equivalent (`visibility`
attribute), and adds `Exported bool` to MacroDecl in the IR section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/adr/0015-macros-and-compositions.md`:
- Around line 305-307: The doc and IR types use two names for the same
concept—MacroDeclaration and MacroDecl—create a single canonical name (pick one,
e.g., MacroDecl) and use it everywhere: update the ADR text that currently
references MacroDeclaration to the chosen name, rename the IR/type declaration
(if present) from MacroDeclaration to MacroDecl or vice versa, and update any
AST node constructors, type aliases, comments, and tests that reference the
other variant so all code and docs consistently use the same symbol (MacroDecl
or MacroDeclaration).
- Around line 279-284: The nested fenced code blocks (e.g., the snippet for
macro deep_normalize and the HCL blocks) are missing the required blank lines
before and after the triple-backtick fences inside list items, causing MD031
failures; fix by adding a blank line above each opening ``` and a blank line
below each closing ``` for the `macro deep_normalize` block and the HCL examples
(the blocks around the HCL locals and macro "deep_normalize") so each fenced
block is separated from surrounding list text.
- Around line 101-105: There is a contradiction between the file-scope
definition and the later statement about non-exported macros being usable by
other files; pick one semantics and make the text consistent: either keep "File
scope — declared at the top of a file, visible only within that file" and change
the later line that claims non-exported macros are usable by other files so it
instead says non-exported macros are not visible outside the declaring file, or
change the file-scope line to describe a "file-local unless package-exported via
package.crs" behavior and reference ADR-0014; update all occurrences (the bullet
for File scope and the paragraph currently asserting cross-file visibility) to
use the same rule and mention package.crs/ADR-0014 when describing package-level
exporting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 68782213-5935-4eec-8e04-603373e8d8f6

📥 Commits

Reviewing files that changed from the base of the PR and between 169ef4c and c62ae08.

📒 Files selected for processing (1)
  • docs/adr/0015-macros-and-compositions.md

Comment thread docs/adr/0015-macros-and-compositions.md Outdated
Comment thread docs/adr/0015-macros-and-compositions.md
Comment thread docs/adr/0015-macros-and-compositions.md
fzipi and others added 2 commits April 26, 2026 12:10
The previous design required `checksum "sha256:<hex>"` on every URL
source, which contradicts itself for live feeds: the first reload after
upstream updates will fail verification because the pinned hash no
longer matches. Pinned checksums only work for content-pinned URLs.

Two verification modes now:

- `checksum` pins payload bytes — for versioned/immutable URLs, used
  with `reload static` or `reload on_startup`. Incompatible with live
  reloads.
- `signed_by` pins the signer (local key file) and verifies a detached
  signature on each fetch. Suitable for live feeds because the signer
  is pinned, not the content.

URL sources require at least one of the two. Both may be present.
Examples updated to show a pinned versioned release alongside a
signed-and-reloaded threat feed. Risks section reworded to match.

Also extends the grammar to accept `managed_by_engine` (used in the
geo_db example but previously not in the grammar) and fills in the
URL example that was empty after a prior linter pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…radiction

Three review fixes:

- Rename `MacroDeclaration` (one stray reference in the HCL surface
  section) to `MacroDecl` to match the canonical name used by the IR
  struct definition and elsewhere in the doc.
- Add blank lines around the Custom-parser fence and around both
  nested HCL code blocks inside the bullet list, fixing MD031
  fenced-code-blocks-surrounded-by-blank-lines violations.
- Resolve the contradiction between the File-scope bullet ("visible
  only within that file") and the Exports section ("non-exported
  macros are still usable by other files in the same package").
  Per ADR-0014, file-scope macros become visible to other files
  only via explicit `import` of the declaring file. Updated both
  passages to state this consistently, and tightened the
  Package-scope bullet to reference the `export` keyword and Exports
  section instead of the older "exported by package.crs" wording.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fzipi
fzipi merged commit b9a0546 into main Apr 26, 2026
3 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants