Skip to content

Commit b4e983e

Browse files
committed
Prepare docs site and release readiness
1 parent 58dcdbb commit b4e983e

34 files changed

Lines changed: 779 additions & 456 deletions

AGENT.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Compatibility pointer for tools that look for a singular `AGENT.md`.
88
`AGENTS.md`.
99
- **User-facing docs:** [`README.md`](README.md) and [`RELEASE.md`](RELEASE.md)
1010
remain authoritative for end users.
11+
- **Agent/curl docs:** [`site/public/llms.txt`](site/public/llms.txt) and
12+
[`site/public/docs/index.md`](site/public/docs/index.md) are the
13+
agent-readable public docs entry points derived from the authoritative docs.
1114

1215
## Key Commands (short form)
1316

@@ -17,8 +20,10 @@ Compatibility pointer for tools that look for a singular `AGENT.md`.
1720
`uv run python scripts/build_examples.py --profile debug --backend both --clean`
1821
- Release artifacts:
1922
`uv run python scripts/build_examples.py --profile release --backend both --clean`
23+
- Backend parity: `uv run python scripts/verify_backend_parity.py`
2024
- Package build: `uv build`
2125
- Docs site build: `cd site && npm install && npm run build`
26+
- Agent/curl.md docs: `site/public/llms.txt` and `site/public/docs/`
2227

2328
## Key Rules (short form)
2429

@@ -27,6 +32,8 @@ Compatibility pointer for tools that look for a singular `AGENT.md`.
2732
worklists in examples and tests.
2833
- Keep `README.md`, `docs/SPEC.md`, `CHANGELOG.md`, `MISSING_FEATURES.md`,
2934
and `TODO.md` aligned with any user-visible change.
35+
- Keep `site/public/llms.txt` and `site/public/docs/` aligned when site
36+
navigation, release commands, CLI behavior, or public docs structure changes.
3037

3138
See `AGENTS.md` for the full workflow, post-change checklist, and security
3239
caveats.

AGENTS.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# agents.md
1+
# AGENTS.md
22

33
Guidance for coding agents working in this repository. Keep changes consistent
44
with `README.md` and `RELEASE.md`; those are the authoritative user-facing docs.
5+
For terminal/curl workflows, `site/public/llms.txt` and
6+
`site/public/docs/index.md` are the agent-readable docs entry points derived
7+
from the authoritative docs.
58

69
## Running the Compiler
710

@@ -21,11 +24,19 @@ checkout without a synced environment.
2124
- Full local release gate: `./run_all_tests.sh`
2225
- Package build: `uv build`
2326
- Docs site build: `cd site && npm install && npm run build`
27+
- Agent/curl.md docs preview: `cd site && npm run build && npm run preview`
28+
then check `/a7-py/llms.txt` and `/a7-py/docs/index.md`.
2429

2530
`run_all_tests.sh` is the single source of truth for the full gate (pytest,
26-
backend tests, example e2e, debug + release artifacts, error-stage matrix,
27-
docs style). Run it before tagging or before reporting a task as done when
28-
changes are non-trivial.
31+
parser/semantic/codegen tests, example e2e for Zig and C, backend parity,
32+
debug + release artifacts, error-stage matrix, docs style, secrets check).
33+
Run it before tagging or before reporting a task as done when changes are
34+
non-trivial.
35+
36+
The public docs site also ships Markdown entry points for agent tooling under
37+
`site/public/llms.txt` and `site/public/docs/`. Keep those files aligned with
38+
`README.md`, `RELEASE.md`, and user-visible site navigation when docs structure
39+
changes.
2940

3041
## A7 Source Rules
3142

@@ -49,10 +60,13 @@ committing:
4960
3. **docs/SPEC.md** — update if language semantics or syntax changed
5061
4. **MISSING_FEATURES.md** — mark completed gaps or document new ones
5162
5. **TODO.md** — check off completed items or add newly discovered work
63+
6. **site/public/llms.txt** and **site/public/docs/** — update agent/curl.md
64+
entry points if site navigation, release commands, CLI behavior, or public
65+
docs structure changed
5266

5367
Keep examples and docs aligned across `README.md`, `docs/SPEC.md`,
54-
`CHANGELOG.md`, `MISSING_FEATURES.md`, and `TODO.md` — drift between them is
55-
treated as a bug.
68+
`CHANGELOG.md`, `MISSING_FEATURES.md`, `TODO.md`, `site/public/llms.txt`, and
69+
`site/public/docs/` — drift between them is treated as a bug.
5670

5771
## Security Caveat
5872

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
status-only.
3030
- Added a selected Zig/C backend parity verifier that compiles, builds, runs,
3131
and compares non-example smoke programs across both native backends.
32+
- Expanded the parity verifier to cover match statements, match expressions,
33+
slice fields, indexed slice iteration, and string slice iteration.
34+
- Added curl.md-friendly public Markdown docs and an `llms.txt` entry point
35+
for agent and terminal documentation workflows.
3236

3337
## [0.3.0] - 2026-05-07
3438

CLAUDE.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
Project-level guidance for Claude Code. Mirrors `AGENTS.md`; treat that file
44
as the canonical agent guide and keep both in sync. `README.md` and
55
`RELEASE.md` remain the authoritative user-facing docs.
6+
For terminal/curl workflows, `site/public/llms.txt` and
7+
`site/public/docs/index.md` are the agent-readable docs entry points derived
8+
from the authoritative docs.
69

710
## Running the Compiler
811

@@ -21,10 +24,18 @@ the `main.py` wrapper when working from a fresh checkout.
2124
- Full local release gate: `./run_all_tests.sh`
2225
- Package build: `uv build`
2326
- Docs site build: `cd site && npm install && npm run build`
27+
- Agent/curl.md docs preview: `cd site && npm run build && npm run preview`
28+
then check `/a7-py/llms.txt` and `/a7-py/docs/index.md`.
2429

2530
`run_all_tests.sh` is the single source of truth for the full gate (pytest,
26-
backend tests, example e2e, debug + release artifacts, error-stage matrix,
27-
docs style). Run it before reporting a non-trivial task as done.
31+
parser/semantic/codegen tests, example e2e for Zig and C, backend parity,
32+
debug + release artifacts, error-stage matrix, docs style, secrets check).
33+
Run it before reporting a non-trivial task as done.
34+
35+
The public docs site also ships Markdown entry points for agent tooling under
36+
`site/public/llms.txt` and `site/public/docs/`. Keep those files aligned with
37+
`README.md`, `RELEASE.md`, and user-visible site navigation when docs structure
38+
changes.
2839

2940
## A7 Source Rules
3041

@@ -46,10 +57,13 @@ When language features, backends, or user-facing behavior change, update:
4657
3. `docs/SPEC.md` — language semantics or syntax
4758
4. `MISSING_FEATURES.md` — close or open gaps
4859
5. `TODO.md` — check off or add follow-ups
60+
6. `site/public/llms.txt` and `site/public/docs/` — update agent/curl.md entry
61+
points when site navigation, release commands, CLI behavior, or public docs
62+
structure changes
4963

5064
Keep examples and docs aligned across `README.md`, `docs/SPEC.md`,
51-
`CHANGELOG.md`, `MISSING_FEATURES.md`, and `TODO.md` — drift between them is
52-
treated as a bug.
65+
`CHANGELOG.md`, `MISSING_FEATURES.md`, `TODO.md`, `site/public/llms.txt`, and
66+
`site/public/docs/` — drift between them is treated as a bug.
5367

5468
## Security Caveat
5569

MISSING_FEATURES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
- Ownership/borrow-style lifetime guarantees are not implemented.
6565

6666
4. **Backend semantic parity hardening**
67-
- Core conformance is green, but differential/backend-equivalence checks should be expanded and kept mandatory for new language features.
67+
- Core conformance is green, and the selected differential/backend-equivalence suite now covers control flow, match statements/expressions, slices, string slices, labels, and function pointers.
68+
- Keep expanding mandatory parity cases for new language features.
6869
- C `match` expressions with side-effectful scrutinees lower through generated single-evaluation locals in variable initializers, return values, assignments, function arguments, and I/O arguments.
6970
- C backend generic function lowering is not implemented; generic coverage remains semantic/test-level rather than runtime example-level.
7071
- Union declarations lower, but runtime union field construction/access is not yet a completed source-language workflow.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Use fixed-width integers such as `i32`, `i64`, `u32`, or `u64` when the data its
175175
## Learn More
176176

177177
- Documentation website: `https://code5717.github.io/a7-py/`
178+
- Agent/curl.md docs entry point: `https://code5717.github.io/a7-py/llms.txt`
178179
- `docs/SPEC.md` - Language specification
179180
- `RELEASE.md` - Release/debug build checklist
180181
- `SECURITY.md` - Security policy and trust boundary

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ uvx pip-audit --strict
8080
- docs style checks
8181
- committed secrets check
8282
- full pytest suite
83-
- Python dependency audit
84-
- docs runtime dependency audit
83+
84+
The Python and docs dependency audits are separate release-gate commands above.
8585

8686
## Tagging
8787

RELEASE_READINESS_REVIEW.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release Readiness Review
22

3-
Date: 2026-05-07
3+
Date: 2026-05-08
44

55
## Result
66

@@ -21,6 +21,8 @@ The repository is substantially more release-ready than before this pass:
2121
- protected GitHub `pypi` environment requiring `code5717` review
2222
- semantic recursion rejection for direct and mutual named call cycles, with
2323
scope-aware handling for local function-pointer shadowing
24+
- consolidated docs-site navigation with curl.md-friendly Markdown entry points
25+
under `site/public/llms.txt` and `site/public/docs/`
2426

2527
This is not a claim that the implementation is free of all bugs or
2628
vulnerabilities. For a compiler and native-code build pipeline, that standard is
@@ -39,7 +41,12 @@ not factually provable from local tests alone.
3941
- `uvx bandit -r src scripts -q --severity-level medium`
4042
- `uv run python scripts/check_no_secrets.py`
4143
- `cd site && npm audit --omit=dev --audit-level=moderate`
42-
- `cd site && npm run build`
44+
- `cd site && npm run check`
45+
- direct Chromium CDP preview checks for canonical and compatibility hash links
46+
such as `#/language#standard-library`, `#/stdlib`, `#/pipeline#backend-notes`,
47+
and `#/cli#flags`
48+
- preview HTTP checks for `/a7-py/llms.txt`, `/a7-py/docs/index.md`,
49+
`/a7-py/docs/status.md`, `/a7-py/sitemap.xml`, and `/a7-py/robots.txt`
4350
- built wheel installed into a temporary virtualenv and invoked as `a7`
4451
- `git diff --check`
4552
- hosted CI and Deploy Docs must be checked after each release-candidate push;
@@ -105,7 +112,16 @@ not factually provable from local tests alone.
105112
recursion reports when a local function-pointer variable shadows a top-level
106113
function name.
107114
- Selected non-example programs now run through both Zig and C backends and
108-
compare runtime output.
115+
compare runtime output, including match statements/expressions, slices,
116+
string slices, labels, and function pointers.
117+
- Public docs-site top navigation is reduced and old CLI, stdlib, pipeline, and
118+
testing pages are consolidated into Start, Language, and Compiler sections
119+
with compatibility aliases and verified hash scrolling.
120+
- `llms.txt` and public Markdown docs under `site/public/docs/` provide stable
121+
curl.md/agent entry points for CLI, language, compiler, examples, release,
122+
and status information.
123+
- Site metadata, README, robots, and sitemap now consistently use
124+
`https://code5717.github.io/a7-py/`.
109125

110126
## Residual Risks
111127

@@ -116,7 +132,9 @@ not factually provable from local tests alone.
116132
- Built-in stdlib imports are virtual and still need unification with file-based
117133
module semantics.
118134
- Backend parity is verified for examples and selected differential smoke
119-
programs, not all possible source programs.
135+
programs, including core control flow, match, slices, string slices, labels,
136+
and function pointers. It is still not exhaustive for all possible source
137+
programs.
120138
- Tag-based PyPI publishing is wired, but `a7-py` is not yet a public PyPI
121139
project and still needs matching trusted-publisher configuration before the
122140
first real publish.

scripts/verify_backend_parity.py

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,90 @@
8484
op = mul
8585
io.println("mul = {}", apply(op, 6, 7))
8686
}
87+
''',
88+
"slice_index_fields": r'''
89+
io :: import "std/io"
90+
91+
main :: fn() {
92+
arr: [4]i32 = [10, 20, 30, 40]
93+
tail := arr[1..4]
94+
ptr := tail.ptr
95+
total := tail[0]
96+
for x in tail {
97+
total += x
98+
}
99+
index_sum: usize = 0
100+
indexed_value_total := 0
101+
for i, x in tail {
102+
index_sum += i
103+
indexed_value_total += x
104+
}
105+
io.println("slice = {} {} {}", tail.len, ptr.val, total)
106+
io.println("indexed = {} {}", index_sum, indexed_value_total)
107+
}
108+
''',
109+
"match_statement_ranges": r'''
110+
io :: import "std/io"
111+
112+
main :: fn() {
113+
value := 7
114+
match value {
115+
case 0: io.println("zero")
116+
case 1..5: io.println("small")
117+
case 6..10: io.println("medium")
118+
else: io.println("large")
119+
}
120+
}
121+
''',
122+
"match_expression_side_effects": r'''
123+
io :: import "std/io"
124+
125+
calls: i32 = 0
126+
127+
value :: fn() i32 {
128+
calls += 1
129+
ret 2
130+
}
131+
132+
pick :: fn() i32 {
133+
ret match value() {
134+
case 2: 20
135+
else: 0
136+
}
137+
}
138+
139+
identity :: fn(x: i32) i32 {
140+
ret x
141+
}
142+
143+
main :: fn() {
144+
x: i32 = 0
145+
x = match value() {
146+
case 2: 7
147+
else: 1
148+
}
149+
y := identity(match value() {
150+
case 2: 5
151+
else: 0
152+
})
153+
z := pick()
154+
io.println("match = {} {} {} {}", x, y, z, calls)
155+
}
156+
''',
157+
"string_slice_iteration": r'''
158+
io :: import "std/io"
159+
160+
main :: fn() {
161+
text: string = "abcdef"
162+
io.print("text = ")
163+
for ch in text[1..4] {
164+
io.print("{}", ch)
165+
}
166+
for ch in text[4..] {
167+
io.print("{}", ch)
168+
}
169+
io.println("")
170+
}
87171
''',
88172
}
89173

@@ -103,6 +187,12 @@ def ok(self) -> bool:
103187
return self.zig_ok and self.c_ok and self.output_match
104188

105189

190+
def result_to_json(result: ParityResult) -> dict[str, object]:
191+
data = asdict(result)
192+
data["ok"] = result.ok
193+
return data
194+
195+
106196
def run_cmd(
107197
cmd: list[str],
108198
*,
@@ -285,7 +375,7 @@ def main() -> int:
285375
"passed": passed,
286376
"total": total,
287377
"ok": passed == total,
288-
"results": [asdict(result) for result in results],
378+
"results": [result_to_json(result) for result in results],
289379
},
290380
indent=2,
291381
),

site/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
<link rel="preconnect" href="https://fonts.googleapis.com" />
1010
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1111
<link href="https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap" rel="stylesheet" />
12-
<link rel="canonical" href="https://airbus5717.github.io/a7-py/" />
12+
<link rel="canonical" href="https://code5717.github.io/a7-py/" />
1313
<title>A7 Programming Language</title>
1414
<meta name="description" content="A7 is a statically-typed, procedural language with array programming capabilities, generics, and manual memory management. Compiles to Zig." />
1515
<meta property="og:title" content="A7 Programming Language" />
1616
<meta property="og:description" content="A small systems language with explicit control flow, clear diagnostics, and direct compiler output." />
1717
<meta property="og:type" content="website" />
18-
<meta property="og:url" content="https://airbus5717.github.io/a7-py/" />
18+
<meta property="og:url" content="https://code5717.github.io/a7-py/" />
1919
<meta property="og:site_name" content="A7 Docs" />
2020
<meta property="og:locale" content="en_US" />
21-
<meta property="og:image" content="https://airbus5717.github.io/a7-py/a7-terminal-hero.png" />
21+
<meta property="og:image" content="https://code5717.github.io/a7-py/a7-terminal-hero.png" />
2222
<meta name="twitter:card" content="summary_large_image" />
2323
<meta name="twitter:title" content="A7 Programming Language" />
2424
<meta name="twitter:description" content="A small systems language with explicit control flow, clear diagnostics, and direct compiler output." />
25-
<meta name="twitter:image" content="https://airbus5717.github.io/a7-py/a7-terminal-hero.png" />
25+
<meta name="twitter:image" content="https://code5717.github.io/a7-py/a7-terminal-hero.png" />
2626
</head>
2727
<body>
2828
<div id="root"></div>

0 commit comments

Comments
 (0)