mirror of
https://github.com/penpot/penpot.git
synced 2026-11-26 21:00:32 +00:00
📚 Remove redundant delimiter repair memory
Keep the repair command in frontend diagnostics and remove the outdated standalone tool instructions. AI-assisted-by: gpt-6.1-terra
This commit is contained in:
parent
ea0759d74b
commit
e4e31c962b
@ -40,7 +40,6 @@ This is a monorepo. Principles that apply to one module do *not* generally apply
|
||||
# Dev Scripts (scripts/)
|
||||
|
||||
- `scripts/nrepl-eval.mjs` — Evaluate Clojure/ClojureScript code via nREPL. Supports `--backend` (port 6064) and `--frontend` (port 3447) aliases. See `mem:scripts/nrepl-eval`.
|
||||
- `scripts/paren-repair` — Fix mismatched delimiters in Clojure/CLJS and reformat with cljfmt. If edits break delimiters, repair them before lint and format checks. See `mem:scripts/paren-repair`.
|
||||
- `scripts/psql` — PostgreSQL client wrapper with devenv defaults. Companion: `scripts/db-schema` for DDL dumps. See `mem:scripts/psql`.
|
||||
- `scripts/gh.py` — GitHub operations helper: list milestone issues, fetch PR details, compare against CHANGES.md, create issues with their Issue Type in one command. Requires `gh` CLI. See `mem:scripts/gh`.
|
||||
- Before changing coverage summaries or PR comments, read `mem:scripts/coverage-reporting` for metrics, concurrent comment updates, and fork permissions.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Frontend compile diagnostics
|
||||
|
||||
- Diagnose the `:main` shadow-cljs build before restarting the app or treating stale behavior as a runtime bug. Read the watch output or use Penpot MCP `cljs_compiler_output` if available. `common/` CLJC changes normally recompile through the same watch.
|
||||
- A delimiter error can point to a later form or EOF. Repair the affected file before linting: `mem:scripts/paren-repair`. Penpot MCP `clj_check_parentheses`, if available, can help locate the mismatch.
|
||||
- A delimiter error can point to a later form or EOF. Repair the affected file before linting with `bb scripts/paren-repair <file>` from the repo root. Penpot MCP `clj_check_parentheses`, if available, can help locate the mismatch.
|
||||
- From `frontend/`, `clojure -M:dev:shadow-cljs compile test` reports analyzer warnings only for namespaces it recompiles. A warm incremental run with no warnings is not evidence that old warnings are gone; use a fresh test build cache to verify the whole target. Treat `:fn-arity` as a defect; see `mem:frontend/testing-unit`.
|
||||
- If the build succeeds but the browser still fails, use `mem:frontend/cljs-repl` or `mem:frontend/handling-crashes`. For minified stacks, consult the release targets and source-map settings in `frontend/shadow-cljs.edn` and the build commands in `frontend/package.json`.
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
# Paren-Repair
|
||||
|
||||
`scripts/paren-repair` fixes mismatched parentheses, brackets, and braces in
|
||||
Clojure/ClojureScript files, then reformats them with cljfmt.
|
||||
|
||||
## When to use
|
||||
|
||||
- After LLM edits introduce broken delimiters — proactively run it on files
|
||||
you just touched.
|
||||
- When lint (clj-kondo), the Clojure compiler, or shadow-cljs report syntax
|
||||
errors mentioning mismatched/unclosed delimiters, reader errors, or
|
||||
unexpected EOF.
|
||||
- Before running lint/format checks — delimiter errors make linter output
|
||||
misleading. Fix them first, then lint.
|
||||
|
||||
## How to use (CLI)
|
||||
|
||||
```bash
|
||||
# File mode (in-place fix + format)
|
||||
bb scripts/paren-repair path/to/file.clj
|
||||
|
||||
# Pipe mode (stdin → fixed code to stdout)
|
||||
echo '(def x 1' | bb scripts/paren-repair
|
||||
|
||||
# Help
|
||||
bb scripts/paren-repair --help
|
||||
```
|
||||
`bb` must be invoked from the repo root so the path `scripts/paren-repair` resolves.
|
||||
|
||||
## Native Tool Available (OpenCode V2)
|
||||
|
||||
A native OpenCode V2 tool `paren-repair` is available. It is defined in
|
||||
`.opencode/plugins/penpot.js` and registered through `setup()`. The LLM can
|
||||
call it directly with:
|
||||
- `files`: comma-separated file paths to fix (a string, not an array)
|
||||
- `code`: Code string to fix via stdin
|
||||
|
||||
Example usage by the LLM:
|
||||
```
|
||||
paren-repair(files="src/foo.clj, src/bar.cljs")
|
||||
paren-repair(code="(defn foo [x")
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user