|
| 1 | +;; SPDX-License-Identifier: AGPL-3.0-or-later |
| 2 | +;; SPDX-FileCopyrightText: 2026 Hyperpolymath |
| 3 | +;; |
| 4 | +;; LLM Superintendent Instructions for WokeLang |
| 5 | +;; This file provides guidance for AI assistants working on this codebase. |
| 6 | + |
| 7 | +(define llm-superintendent |
| 8 | + '((schema . "hyperpolymath.llm-superintendent/1") |
| 9 | + (repo . "hyperpolymath/wokelang") |
| 10 | + (last-updated . "2026-01-01") |
| 11 | + |
| 12 | + (identity |
| 13 | + . ((project . "WokeLang") |
| 14 | + (role . "authoritative-upstream") |
| 15 | + (description |
| 16 | + . "WokeLang is a human-centered programming language emphasizing empathy, consent, and gratitude. This is the authoritative implementation."))) |
| 17 | + |
| 18 | + (scope-boundaries |
| 19 | + . ((in-scope |
| 20 | + . ("Language grammar and parsing (src/lexer/, src/parser/)" |
| 21 | + "Abstract syntax tree definitions" |
| 22 | + "Type system implementation" |
| 23 | + "Interpreter and evaluation" |
| 24 | + "WASM compilation target" |
| 25 | + "Standard library (lib/)" |
| 26 | + "FFI bindings (include/, zig/)" |
| 27 | + "Formal proofs and verification (docs/proofs/)" |
| 28 | + "Documentation and wiki (docs/)" |
| 29 | + "Examples (examples/)" |
| 30 | + "CI/CD and security workflows (.github/)")) |
| 31 | + (out-of-scope |
| 32 | + . ("Playground UX (belongs in wokelang-playground)" |
| 33 | + "Editor extensions (separate repos)" |
| 34 | + "Package registry infrastructure" |
| 35 | + "Third-party integrations not covered by FFI")))) |
| 36 | + |
| 37 | + (language-policy |
| 38 | + . ((primary-languages . ("Rust" "OCaml")) |
| 39 | + (documentation . ("Markdown" "AsciiDoc")) |
| 40 | + (proofs . ("Lean" "Coq")) |
| 41 | + (config . ("TOML" "Scheme")) |
| 42 | + (forbidden . ("TypeScript" "Go" "Python-outside-SaltStack")))) |
| 43 | + |
| 44 | + (semantic-invariants |
| 45 | + . ((consent-gates |
| 46 | + . "All operations that are 'sensitive' (file I/O, network, env) MUST use consent gates. The 'only if okay' construct is not optional sugar.") |
| 47 | + (gratitude-blocks |
| 48 | + . "'thanks to' blocks are semantically meaningful and preserved in AST. They are not comments.") |
| 49 | + (emote-tags |
| 50 | + . "@feeling annotations are part of the type system and affect compilation.") |
| 51 | + (units |
| 52 | + . "'measured in' provides compile-time unit checking. Unit mismatches are errors, not warnings."))) |
| 53 | + |
| 54 | + (contribution-rules |
| 55 | + . ((before-changes |
| 56 | + . ("Read docs/grammar.ebnf for syntax decisions" |
| 57 | + "Check docs/proofs/ for semantic guarantees" |
| 58 | + "Run 'cargo test' to verify baseline")) |
| 59 | + (when-changing-grammar |
| 60 | + . ("Update docs/grammar.ebnf first" |
| 61 | + "Update parser to match" |
| 62 | + "Add test cases for new syntax" |
| 63 | + "Update formal semantics if applicable")) |
| 64 | + (when-adding-features |
| 65 | + . ("Consider consent implications" |
| 66 | + "Preserve human-centered design philosophy" |
| 67 | + "Add documentation alongside code" |
| 68 | + "Add example programs demonstrating feature")))) |
| 69 | + |
| 70 | + (critical-files |
| 71 | + . (("docs/grammar.ebnf" . "Canonical EBNF grammar - all parsing decisions derive from this") |
| 72 | + ("src/parser/" . "Parser implementation - must match grammar.ebnf") |
| 73 | + ("src/vm.rs" . "Virtual machine - core execution semantics") |
| 74 | + ("docs/proofs/formal-semantics/" . "Formal specifications - semantic truth source") |
| 75 | + ("docs/proofs/type-theory/" . "Type system proofs") |
| 76 | + ("examples/" . "Reference programs - used for testing and documentation"))) |
| 77 | + |
| 78 | + (testing-requirements |
| 79 | + . ((unit-tests . "cargo test") |
| 80 | + (examples . "Run all .woke files in examples/") |
| 81 | + (proofs . "Lean/Coq proofs in docs/proofs/verification/"))) |
| 82 | + |
| 83 | + (security-notes |
| 84 | + . ((pre-commit-hooks . "hooks/ contains validation scripts") |
| 85 | + (spdx-required . "All source files need SPDX headers") |
| 86 | + (sha-pins . "Dependencies must be SHA-pinned") |
| 87 | + (no-secrets . "Never commit credentials or API keys"))) |
| 88 | + |
| 89 | + (communication-style |
| 90 | + . ((error-messages |
| 91 | + . "WokeLang error messages are kind and constructive. They explain what went wrong, why it matters, and suggest fixes.") |
| 92 | + (documentation |
| 93 | + . "Documentation uses welcoming, accessible language. Technical accuracy does not require hostility.") |
| 94 | + (code-comments |
| 95 | + . "Comments explain intent, not mechanics. 'This ensures user consent before file deletion' not 'deletes file'."))))) |
0 commit comments