|
4 | 4 | # Component Readiness — KRL |
5 | 5 |
|
6 | 6 | **Standard:** [CRG v2.0 STRICT](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades) |
7 | | -**Current Grade:** X |
8 | | -**Assessed:** 2026-04-05 |
| 7 | +**Current Grade:** E |
| 8 | +**Assessed:** 2026-04-05 (promoted X → E after iteration 1) |
9 | 9 | **Assessor:** Jonathan D.A. Jewell |
10 | 10 |
|
11 | 11 | --- |
12 | 12 |
|
13 | | -## Grade rationale (evidence for X) |
| 13 | +## Grade rationale (evidence for E — promoted from X) |
14 | 14 |
|
15 | | -**Untested — default state.** Repository was scaffolded from rsr-template-repo |
16 | | -on 2026-04-05. No KRL-specific content beyond the template placeholders exists yet. |
| 15 | +Grade E criterion: "At least 1 test, documented failures." |
17 | 16 |
|
18 | | -Template default of "C" was overridden to X per CRG v2 STRICT honesty rule: |
19 | | -"Grade as-is TODAY, not aspirational — honest D > dishonest B". |
| 17 | +### Evidence |
20 | 18 |
|
21 | | -### What exists |
| 19 | +- **Grammar drafted:** `spec/grammar.ebnf` v0.1.0 — EBNF for all four KRL |
| 20 | + operation families (CONSTRUCT / TRANSFORM / RESOLVE / RETRIEVE) |
| 21 | +- **Grammar overview:** `spec/grammar-overview.md` — prose introduction, |
| 22 | + operator precedence, reserved words, known gaps |
| 23 | +- **Examples:** 4 runnable examples covering all 4 operation families |
| 24 | + - `examples/trefoil.krl` — CONSTRUCT + RESOLVE + TRANSFORM |
| 25 | + - `examples/figure_eight.krl` — CONSTRUCT + TRANSFORM |
| 26 | + - `examples/query-by-jones.krl` — CONSTRUCT + RESOLVE + RETRIEVE |
| 27 | + - `examples/tensor-and-close.krl` — CONSTRUCT with tensor + closure |
| 28 | +- **Smoke test:** `tests/smoke/grammar_smoke.sh` — 16 lexical checks against |
| 29 | + the examples, all passing. Validates terminator presence, paren balance, |
| 30 | + generator-argument shape, operation-family coverage. |
| 31 | +- **RSR compliance:** inherited from rsr-template-repo scaffold |
22 | 32 |
|
23 | | -- RSR template infrastructure (workflows, SECURITY/CONTRIBUTING/CODE_OF_CONDUCT, `.machine_readable/6a2/` skeleton) |
24 | | -- 0-AI-MANIFEST.a2ml |
25 | | -- Template-provided directory structure |
| 33 | +### What was tested (16 assertions) |
26 | 34 |
|
27 | | -### What does not yet exist |
| 35 | +Per .krl example file: |
| 36 | +- Statement terminators (`;`) present |
| 37 | +- Parentheses balanced |
| 38 | +- No v0.2-reserved tokens (equivalent?, near, classify_by, prove) used prematurely |
| 39 | +- At least one operation family exercised |
28 | 40 |
|
29 | | -- KRL grammar (EBNF/PEG) |
30 | | -- Parser, AST, typechecker, compiler |
31 | | -- Surface-syntax examples |
32 | | -- KRL-specific test suite |
33 | | -- Language reference documentation |
| 41 | +### What is NOT tested (honest — documented failures) |
34 | 42 |
|
35 | | ---- |
36 | | - |
37 | | -## Path to E (pre-alpha) |
| 43 | +- **No parser.** The grammar is declared, not implemented. None of the |
| 44 | + examples have been parsed by code. |
| 45 | +- **No AST.** Nothing reads a .krl file into a structured form. |
| 46 | +- **No typechecker.** Port-arity compatibility not verified. |
| 47 | +- **No TangleIR compilation.** No path from .krl source to |
| 48 | + KRLAdapter.TangleIR yet. |
| 49 | +- **No error messages.** Absence of parser means absence of diagnostics. |
38 | 50 |
|
39 | | -1. Draft KRL EBNF/PEG grammar with `construct`, `transform`, `resolve`, `retrieve` |
40 | | - operation families + compositional syntax (`;`, `|`, `close`, `let`, `find`). |
41 | | -2. Add at least 1 test — smoke test that parses a "hello tangle" KRL source. |
42 | | -3. Document known failures / incomplete grammar branches. |
| 51 | +--- |
43 | 52 |
|
44 | | -## Path to D (alpha) |
| 53 | +## Path to D (alpha, test matrix + RSR) |
45 | 54 |
|
46 | | -After E: AST + typechecker + rudimentary compiler to TangleIR (via KRLAdapter.jl) |
47 | | -+ test matrix across parse/typecheck/compile stages. |
| 55 | +1. Choose parser implementation language (tangle OCaml host, KRLAdapter |
| 56 | + Julia, or sibling OCaml compiler — see `spec/grammar-overview.md`). |
| 57 | +2. Implement lexer + parser for v0.1.0 grammar. |
| 58 | +3. Define AST in chosen language. |
| 59 | +4. Add test matrix: parse tests (one per example), parse-fail tests (one |
| 60 | + per malformed input), roundtrip tests (AST → pretty-print → parse). |
| 61 | +5. Scope documentation in this file: what KRL programs parse, what KRL |
| 62 | + programs don't yet. |
48 | 63 |
|
49 | 64 | ## Path to C (alpha-stable) |
50 | 65 |
|
51 | | -After D: deep annotation, per-directory orientation, reliable dogfooding |
52 | | -(compile several real KRL programs into stored Skein records). |
| 66 | +After D: typechecker (port-arity + generator index validity), compiler |
| 67 | +to TangleIR via KRLAdapter.jl, deep annotation per-directory, real |
| 68 | +dogfooding by parsing 20+ KRL programs representing knots from the |
| 69 | +knot table. |
53 | 70 |
|
54 | 71 | ## Path to B (beta) |
55 | 72 |
|
56 | | -After C: 6+ diverse external targets tested, issues fed back. |
| 73 | +After C: 6+ diverse external targets (knot researchers, DSL authors, |
| 74 | +topology educators) write KRL programs and report back. |
57 | 75 |
|
58 | 76 | --- |
59 | 77 |
|
| 78 | +## Iteration history |
| 79 | + |
| 80 | +### Iteration 0 (X grade — 2026-04-05 initial scaffold) |
| 81 | +Templated from rsr-template-repo. Zero KRL-specific content. |
| 82 | + |
| 83 | +### Iteration 1 (promoted to E — 2026-04-05) |
| 84 | +- spec/grammar.ebnf (v0.1.0 EBNF) |
| 85 | +- spec/grammar-overview.md |
| 86 | +- 4 examples/ programs |
| 87 | +- tests/smoke/grammar_smoke.sh (16 lexical assertions, all passing) |
| 88 | + |
60 | 89 | ## Review cycle |
61 | 90 |
|
62 | | -Reassess on first grammar draft and on each implementation milestone. |
| 91 | +Reassess on first parser implementation milestone, or if examples drift |
| 92 | +from what the grammar admits. |
63 | 93 |
|
64 | 94 | --- |
65 | 95 |
|
|
0 commit comments