Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .machine_read/ANCHOR.scope-arrest.2026-01-01.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
;; ANCHOR.scope-arrest.2026-01-01.Jewell.scm (anvomidav)
;; SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
;; SPDX-FileCopyrightText: 2026 hyperpolymath
;;
;; This anchor file defines the scope arrest for phase f0.
;; It freezes the project identity and establishes the conformance baseline.

(define anchor
'((schema . "hyperpolymath.anchor/1")
(repo . "hyperpolymath/anvomidav")
(date . "2026-01-01")
(authority . "repo-superintendent")
(purpose . ("Scope arrest + make repo unambiguously runnable + freeze identity."))
(identity
. ((project . "Anvomidav")
(kind . "domain-language + CLI toolchain")
(domain . "figure-skating choreography")
(one-sentence . "A DSL and toolchain for expressing skating choreography and validating rule constraints.")))

(semantic-anchor
. ((policy . "dual")
(reference-impl . ("Rust workspace" "CLI is authoritative behavior"))
(formal-spec . ("SPEC.core.scm defines syntax/semantics; conformance corpus is binding"))))

(allowed-implementation-languages
. ("Rust")) ;; keep narrow in f0; editors/tooling optional later
(forbidden
. ("Expanding into unrelated domains"
"Adding new backends"
"Rewriting as a different project"))

(golden-path
. ((smoke-test-command . "cargo test && cargo run -p anv-cli -- check examples/*")
(success-criteria . ("parse+check succeeds on at least 1 example"
"at least 5 invalid examples produce stable diagnostics"))))

(mandatory-files
. ("./.machine_read/LLM_SUPERINTENDENT.scm"
"./.machine_read/SPEC.core.scm"
"./.machine_read/ROADMAP.f0.scm"
"./conformance/"))

(first-pass-directives
. ("Ensure README(s) do not contradict this identity."
"If multiple READMEs exist, create one canonical machine README pointer (no prose needed)."
"Quarantine tree-sitter/editor integration as optional: it must not block core build."
"Add conformance corpus representing core grammar + rule checks."))

(rsr
. ((target-tier . "bronze-now") (upgrade-path . "silver-after-f1")))))
47 changes: 47 additions & 0 deletions .machine_read/AUTHORITY_STACK.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
;; AUTHORITY_STACK.mustfile-nickel.scm
;; SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
;; SPDX-FileCopyrightText: 2026 hyperpolymath
;;
;; Shared drop for hyperpolymath repos: defines task routing + config authority.

(define authority-stack
'((schema . "hyperpolymath.authority-stack/1")
(intent
. ("Stop agentic drift and toolchain creep."
"Make the repo executable via a single blessed interface."
"Prevent the LLM from inventing commands, tools, or files."))

(operational-authority
. ((local-tasks . "just")
(deployment-transitions . "must")
(config-manifests . "nickel")
(container-engine . "podman-first")))

(hard-rules
. ("Makefiles are forbidden."
"All operations must be invoked via `just <recipe>` (local) or `must <transition>` (deployment)."
"If a recipe/transition does not exist, the correct action is to ADD it (and document it), not to run ad-hoc commands."
"Nickel manifests are the single source of truth for config; do not hand-edit generated outputs."
"No network-required runtime paths for demos/tests unless explicitly permitted in ANCHOR."))

(workflow
. ((first-run
. ("Read ANCHOR*.scm"
"Read STATE.scm"
"Run: just --list"
"Run: just test"
"Run: just demo (if defined)"))
(adding-new-capability
. ("Update SPEC/ROADMAP first"
"Add a `just` recipe (and tests) that implements the capability"
"Only then edit code"))))

(tooling-contract
. ((mustfile-notes
. ("Mustfile is the deployment contract (physical state transitions)."
"must is the supervisor/enforcer for must-spec; it routes through just where appropriate."))
(nickel-notes
. ("Nickel provides validated, type-safe manifests."
"Prefer .ncl for machine-truth; render docs from it via your conversion pipeline."))
(shell-entrypoints
. ("Shell wrappers may exist; all must route to just/must without inventing extra logic."))))))
89 changes: 89 additions & 0 deletions .machine_read/CANONICAL_README.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
;; SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
;; SPDX-FileCopyrightText: 2025-2026 hyperpolymath
;;
;; CANONICAL_README.scm - Pointer to Canonical Documentation
;;
;; This file establishes the documentation hierarchy for the repository.
;; Multiple READMEs exist for different purposes; this file clarifies authority.

(define canonical-docs
'((schema . "hyperpolymath.canonical-docs/1")
(updated . "2026-01-01")

;; ==========================================================================
;; PRIMARY DOCUMENTATION
;; ==========================================================================
(primary
. ((readme
. ((path . "./README.adoc")
(purpose . "Main project documentation, quick start, syntax examples")
(authority . "canonical")))
(roadmap
. ((path . "./ROADMAP.adoc")
(purpose . "Development phases and milestones")
(authority . "canonical")))
(contributing
. ((path . "./CONTRIBUTING.adoc")
(purpose . "How to contribute")
(authority . "canonical")))
(security
. ((path . "./SECURITY.md")
(purpose . "Security policy and vulnerability reporting")
(authority . "canonical")))))

;; ==========================================================================
;; MACHINE-READABLE DOCUMENTATION
;; ==========================================================================
(machine-readable
. ((superintendent
. ((path . "./.machine_read/LLM_SUPERINTENDENT.scm")
(purpose . "Instructions for AI/LLM agents")))
(spec
. ((path . "./.machine_read/SPEC.core.scm")
(purpose . "Core language specification (binding)")))
(roadmap-f0
. ((path . "./.machine_read/ROADMAP.f0.scm")
(purpose . "Phase f0 scope arrest roadmap")))
(state
. ((path . "./STATE.scm")
(purpose . "Current project state")))))

;; ==========================================================================
;; SUPPLEMENTARY DOCUMENTATION (Non-authoritative for Core)
;; ==========================================================================
(supplementary
. ((academic
. ((path . "./docs/academic/README.adoc")
(purpose . "Academic papers and formal proofs")
(status . "optional")))
(implementation
. ((path . "./docs/IMPLEMENTATION.adoc")
(purpose . "Implementation details")
(status . "optional")))))

;; ==========================================================================
;; EDITOR/TOOLING DOCUMENTATION (OPTIONAL - Does not affect core)
;; ==========================================================================
(optional-tooling
. ((neovim
. ((path . "./editors/neovim/README.md")
(purpose . "Neovim integration")
(status . "optional - does not block core build")))
(helix
. ((path . "./editors/helix/README.md")
(purpose . "Helix editor integration")
(status . "optional - does not block core build")))
(tree-sitter
. ((path . "./tree-sitter-anvomidav/")
(purpose . "Tree-sitter grammar for syntax highlighting")
(status . "optional - does not block core build")))))

;; ==========================================================================
;; READING ORDER FOR NEW CONTRIBUTORS
;; ==========================================================================
(reading-order
. (("README.adoc" . "Start here for project overview")
("ROADMAP.adoc" . "Understand development phases")
("CONTRIBUTING.adoc" . "How to participate")
(".machine_read/SPEC.core.scm" . "Language specification")
("crates/anv-cli/src/main.rs" . "CLI entry point")))))
81 changes: 81 additions & 0 deletions .machine_read/LLM_SUPERINTENDENT.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
;; SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
;; SPDX-FileCopyrightText: 2025-2026 hyperpolymath
;;
;; LLM_SUPERINTENDENT.scm - Instructions for AI/LLM agents operating on this repository
;;
;; This file provides machine-readable directives for LLM code assistants.

(define superintendent
'((schema . "hyperpolymath.superintendent/1")
(updated . "2026-01-01")

;; Project identity - DO NOT DEVIATE
(identity
. ((name . "Anvomidav")
(kind . "domain-specific language + CLI toolchain")
(domain . "figure skating choreography")
(one-sentence . "A DSL and toolchain for expressing skating choreography and validating ISU rule constraints.")))

;; Implementation constraints
(implementation
. ((language . "Rust")
(workspace . "Cargo.toml defines workspace members")
(cli-binary . "anv-cli")
(reference-behavior . "CLI output is authoritative")))

;; What to protect
(invariants
. (("Core semantics must match SPEC.core.scm")
("ISU rule validation must pass for valid examples in conformance/valid/")
("Invalid examples in conformance/invalid/ must produce stable diagnostics")
("All 90+ tests must pass after any change")))

;; What is allowed
(allowed
. (("Bug fixes in existing crates")
("Extending ISU rule coverage")
("Adding new conformance tests")
("Improving error messages")
("Documentation improvements")))

;; What is forbidden
(forbidden
. (("Changing project identity or domain")
("Adding non-Rust implementation languages")
("Adding external service dependencies")
("Rewriting the parser without migration plan")
("Breaking existing conformance tests")))

;; Before making changes, verify
(verification
. ((smoke-test . "just smoke-test")
(conformance . "just conformance")
(tests . "just test")))

;; Operational authority - HOW to run commands
(authority-stack
. ((local-tasks . "just <recipe>")
(see-also . ".machine_read/AUTHORITY_STACK.scm")
(hard-rules
. ("Makefiles are forbidden"
"All operations via `just <recipe>` - do not run ad-hoc commands"
"If a recipe does not exist, ADD it to justfile first"))))

;; Key files to understand the system
(key-files
. (("justfile" . "Task runner - use `just --list` to see recipes")
("README.adoc" . "Project overview and quick start")
("ROADMAP.adoc" . "Development phases and milestones")
("Cargo.toml" . "Workspace configuration")
("crates/anv-syntax/src/lib.rs" . "Lexer and parser entry")
("crates/anv-semantics/src/lib.rs" . "ISU rules validation")
("crates/anv-cli/src/main.rs" . "CLI entry point")
(".machine_read/SPEC.core.scm" . "Core language specification")
(".machine_read/AUTHORITY_STACK.scm" . "Task routing rules")))

;; Current phase and scope limits
(phase
. ((current . "f0")
(focus . "Make repo unambiguously runnable and establish conformance baseline")
(scope-arrest . #t)
(no-new-features . #t)))))
94 changes: 94 additions & 0 deletions .machine_read/ROADMAP.f0.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
;; SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
;; SPDX-FileCopyrightText: 2025-2026 hyperpolymath
;;
;; ROADMAP.f0.scm - Phase f0: Scope Arrest & Baseline Establishment
;;
;; This roadmap defines the immediate stabilization phase.
;; Focus: Make the repository unambiguously runnable and freeze identity.

(define roadmap-f0
'((schema . "hyperpolymath.roadmap/1")
(phase . "f0")
(name . "Scope Arrest")
(goal . "Establish stable, runnable baseline with conformance corpus")
(started . "2026-01-01")
(target-tier . "bronze")

;; ==========================================================================
;; PHASE F0 OBJECTIVES
;; ==========================================================================
(objectives
. (("O1" . "Repository is unambiguously runnable")
("O2" . "Identity is frozen and documented")
("O3" . "Conformance corpus exists with valid/invalid examples")
("O4" . "Tree-sitter/editor integration is marked optional")
("O5" . "Smoke test passes reliably")))

;; ==========================================================================
;; ACCEPTANCE CRITERIA
;; ==========================================================================
(acceptance-criteria
. ((smoke-test
. ((command . "cargo test && cargo run -p anv-cli -- check examples/*")
(expected . "All tests pass, at least 1 example parses successfully")))
(conformance-valid
. ((command . "cargo run -p anv-cli -- check conformance/valid/*")
(expected . "All valid examples parse and validate without errors")))
(conformance-invalid
. ((command . "for f in conformance/invalid/*; do cargo run -p anv-cli -- check $f 2>&1; done")
(expected . "Each invalid example produces stable diagnostic output")
(count . ">= 5 invalid examples")))))

;; ==========================================================================
;; TASKS (CHECKLIST)
;; ==========================================================================
(tasks
. ((done
. (("Create .machine_read directory")
("Add LLM_SUPERINTENDENT.scm")
("Add SPEC.core.scm")
("Add ROADMAP.f0.scm")
("Add CANONICAL_README.scm")
("Fix STATE.scm language reference")
("Add conformance/valid/ examples (4 files)")
("Add conformance/invalid/ examples (7 files, exceeds >= 5)")
("Mark tree-sitter as optional (OPTIONAL.md)")
("Mark editors as optional (OPTIONAL.md)")
("Verify smoke test passes (152 tests)")
("Verify conformance tests pass")))
(pending
. ())))

;; ==========================================================================
;; SCOPE BOUNDARIES
;; ==========================================================================
(scope
. ((in-scope
. (("Bug fixes in core crates")
("Conformance test additions")
("Documentation corrections")
("Error message improvements")))
(out-of-scope
. (("New language features")
("New crates or binaries")
("Editor/IDE integration work")
("Visualization features")
("IR layer implementation")))))

;; ==========================================================================
;; SUCCESS METRICS
;; ==========================================================================
(success-metrics
. ((tests-passing . ">= 90")
(valid-conformance-files . ">= 3")
(invalid-conformance-files . ">= 5")
(smoke-test-reliable . #t)))

;; ==========================================================================
;; NEXT PHASE
;; ==========================================================================
(next-phase
. ((name . "f1")
(focus . "IR layer and code generation")
(prerequisite . "f0 acceptance criteria met")
(target-tier . "silver")))))
Loading
Loading