diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f3beccc..e22c630 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -33,8 +33,8 @@ ## Banned Languages -- No TypeScript (use ReScript) -- No Node.js / npm / bun (use Deno) +- No TypeScript (use AffineScript) +- No Node.js / yarn (use Bun first; Deno, pnpm, npm as fallbacks) - No Go (use Rust) - No Python (use Julia or Rust) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7f8e2c2..19cfe8c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,6 +3,11 @@ # Covers common ecosystems - remove unused ones for your project version: 2 + +multi-ecosystem-groups: + js-locks: + schedule: + interval: "weekly" updates: # GitHub Actions - always include - package-ecosystem: "github-actions" @@ -40,11 +45,11 @@ updates: schedule: interval: "weekly" - # Node.js/npm - - package-ecosystem: "npm" + # Bun (bun.lock): in the js-locks group, so one PR moves package.json and bun.lock together (no npm entry: no npm lockfile here) + - package-ecosystem: "bun" directory: "/" - schedule: - interval: "weekly" + multi-ecosystem-group: "js-locks" + patterns: ["*"] # Python/pip - package-ecosystem: "pip" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3a8accd..20cfdc2 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -18,7 +18,7 @@ - [ ] Tests pass (`just test` or equivalent) - [ ] Code is formatted (`just fmt` or equivalent) - [ ] Linter is clean (no new warnings or errors) -- [ ] No banned language patterns (no TypeScript, no npm/bun, no Go/Python) +- [ ] No banned language patterns (no TypeScript, no Node.js/yarn, no Go/Python) - [ ] No `unsafe` blocks without `// SAFETY:` comments - [ ] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`, `Admitted`, `sorry`) - [ ] SPDX license headers present on all new/modified source files diff --git a/.machine_readable/MUST.contractile b/.machine_readable/MUST.contractile index ae0165a..2dfd8f7 100644 --- a/.machine_readable/MUST.contractile +++ b/.machine_readable/MUST.contractile @@ -46,7 +46,7 @@ (must "no new TypeScript files") (must "no new Python files") (must "no new Go files") - (must "no npm/bun/yarn/pnpm dependencies — Deno only") + (must "no Node.js/yarn dependencies — Bun first, then Deno, pnpm, npm as fallbacks") ; Dangerous patterns (must "no believe_me (Idris2)") diff --git a/.machine_readable/ai/.clinerules b/.machine_readable/ai/.clinerules index a29ed5f..02d614b 100644 --- a/.machine_readable/ai/.clinerules +++ b/.machine_readable/ai/.clinerules @@ -24,8 +24,8 @@ # Rust: transmute (unless FFI with // SAFETY: comment) # BANNED LANGUAGES -# TypeScript -> ReScript -# Node.js / npm / bun -> Deno +# TypeScript -> AffineScript +# Node.js / yarn -> Bun first; Deno, pnpm, npm as fallbacks # Go -> Rust # Python -> Julia or Rust diff --git a/.machine_readable/ai/.cursorrules b/.machine_readable/ai/.cursorrules index c13b393..d70e21b 100644 --- a/.machine_readable/ai/.cursorrules +++ b/.machine_readable/ai/.cursorrules @@ -23,8 +23,8 @@ # Rust: transmute (unless FFI with // SAFETY: comment) # BANNED LANGUAGES -# TypeScript -> use ReScript -# Node.js / npm / bun -> use Deno +# TypeScript -> use AffineScript +# Node.js / yarn -> use Bun first; Deno, pnpm, npm as fallbacks # Go -> use Rust # Python -> use Julia or Rust diff --git a/.machine_readable/ai/.windsurfrules b/.machine_readable/ai/.windsurfrules index a29ed5f..02d614b 100644 --- a/.machine_readable/ai/.windsurfrules +++ b/.machine_readable/ai/.windsurfrules @@ -24,8 +24,8 @@ # Rust: transmute (unless FFI with // SAFETY: comment) # BANNED LANGUAGES -# TypeScript -> ReScript -# Node.js / npm / bun -> Deno +# TypeScript -> AffineScript +# Node.js / yarn -> Bun first; Deno, pnpm, npm as fallbacks # Go -> Rust # Python -> Julia or Rust diff --git a/.machine_readable/anchors/ANCHOR.a2ml b/.machine_readable/anchors/ANCHOR.a2ml index 8723899..87175e0 100644 --- a/.machine_readable/anchors/ANCHOR.a2ml +++ b/.machine_readable/anchors/ANCHOR.a2ml @@ -35,7 +35,7 @@ owns = [ [implementation-policy] allowed = ["Rust", "Idris2", "Zig", "Scheme", "Shell", "Just", "AsciiDoc", "Markdown"] -forbidden = ["Node.js", "npm"] +forbidden = ["Node.js", "yarn"] [golden-path] smoke-test-command = [ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..49c40e2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MPL-2.0 +# package.json is JCS-canonical (LANGUAGE-POLICY §1.4); Prettier must not reformat it. +package.json diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..30b203b --- /dev/null +++ b/bun.lock @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "methodologies", + "devDependencies": { + "prettier": "3.10.1", + }, + }, + }, + "packages": { + "prettier": ["prettier@3.10.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg=="], + } +} diff --git a/docs/RSR_OUTLINE.adoc b/docs/RSR_OUTLINE.adoc index 346db26..2b0b7d7 100644 --- a/docs/RSR_OUTLINE.adoc +++ b/docs/RSR_OUTLINE.adoc @@ -224,10 +224,10 @@ project/ === Prohibited * Python outside `salt/` directory -* TypeScript/JavaScript (use ReScript) +* TypeScript/JavaScript (use AffineScript) * CUE (use Guile/Nickel) * `Dockerfile` (use `Containerfile`) -* npm, Bun, pnpm, yarn (use Deno) +* Node.js, yarn (use Bun first; Deno, pnpm, npm as fallbacks) * Go (use Rust) == STATE.a2ml diff --git a/docs/practice/AI-CONVENTIONS.adoc b/docs/practice/AI-CONVENTIONS.adoc index c77617a..452719f 100644 --- a/docs/practice/AI-CONVENTIONS.adoc +++ b/docs/practice/AI-CONVENTIONS.adoc @@ -53,8 +53,8 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | -| Node.js / npm / bun | Deno | +| TypeScript | AffineScript | +| Node.js / yarn | Bun first; Deno, pnpm, npm as fallbacks | | Go | Rust | | Python | Julia / Rust | diff --git a/mise.toml b/mise.toml index 6dd983f..7302715 100644 --- a/mise.toml +++ b/mise.toml @@ -1,34 +1,20 @@ [tools] # Language runtimes -node = "latest" -python = "latest" rust = "latest" -go = "latest" zig = "latest" -java = "latest" -bun = "latest" -denojs = "latest" +bun = "1.4" # Package managers -npm = "latest" -yarn = "latest" pnpm = "latest" -pip = "latest" cargo = "latest" go-task = "latest" # Formatting & Linting -gofmt = "latest" -black = "latest" -isort = "latest" -ruff = "latest" -prettier = "latest" shfmt = "latest" stylua = "latest" # Build tools cmake = "latest" -make = "latest" ninja = "latest" # Shell tools @@ -38,20 +24,20 @@ gnu-tar = "latest" gnu-grep = "latest" # Testing -vitest = "latest" -pytest = "latest" -jest = "latest" [env] # Common environment variables -NODE_ENV = "development" -PYTHONDONTWRITEBYTECODE = "1" -PYTHONUNBUFFERED = "1" # Task runner alias [alias] task = "go-task" -build = "cargo build --release || npm run build || go build" -test = "cargo test || npm test || go test ./..." -lint = "ruff check . || prettier --check . || black --check ." -fmt = "ruff format . || prettier --write . || black ." + +[tasks.setup] +description = "Install pinned JS dev tools (Prettier) from bun.lock" +run = "bun install --frozen-lockfile" + +[tasks.lint] +run = "bun install --frozen-lockfile && bunx --no-install --bun prettier --check ." + +[tasks.fmt] +run = "bun install --frozen-lockfile && bunx --no-install --bun prettier --write ." diff --git a/package.json b/package.json new file mode 100644 index 0000000..46cccd8 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "prettier": "3.10.1" + }, + "license": "MPL-2.0", + "name": "methodologies", + "private": true +}