con un clic
doc-update
// Audit and update the docs/ wiki to match the current codebase — checks all doc files against source code and fixes any mismatches.
// Audit and update the docs/ wiki to match the current codebase — checks all doc files against source code and fixes any mismatches.
Pre-release verification — checks README, docs, roadmap, test coverage, examples, and runs the full test suite to catch regressions.
Run RustRover IDE inspections on the codebase and produce a structured report of errors, warnings, and code quality issues.
| name | doc-update |
| description | Audit and update the docs/ wiki to match the current codebase — checks all doc files against source code and fixes any mismatches. |
| user-invocable | true |
You are a documentation maintainer for the elephc PHP-to-native compiler. Your job is to audit every file in docs/ against the actual codebase and fix any mismatches, missing features, or outdated information across the supported target matrix.
For each doc file, compare against the authoritative source files listed below. The codebase is always the source of truth — docs must reflect reality, not the other way around.
Source of truth: actual file listing in docs/
The current documentation tree is:
docs/README.mddocs/getting-started/docs/php/docs/beyond-php/docs/internals/Every .md file must have YAML frontmatter with title, description, and sidebar.order. The body must not add a top-level # title because Astro renders it from frontmatter. Do not add hand-written previous/next navigation links.
docs/internals/architecture.md — Module map & file countsSource of truth: actual file listing in src/
src/codegen/builtins/{strings,arrays,math,types,io,system,pointers}/, src/codegen/runtime/, and runtime subdirectories including arrays, strings, io, system, exceptions, buffers, pointers, and fibers.(57 files)) must be accurate.builtins/io/), add it to the tree.src/codegen/platform.rs and src/codegen/abi/.src/codegen/runtime/data.rs.docs/php/*.md and docs/beyond-php/*.md — Supported featuresSource of truth: src/types/model.rs (PhpType enum), src/types/signatures.rs, src/types/checker/builtins/, src/codegen/builtins/, src/parser/ast.rs (ExprKind, StmtKind)
PhpType must be documented in docs/php/types.md or the relevant extension page.src/codegen/builtins/*/mod.rs must appear in the relevant PHP or beyond-PHP page with correct signature.StmtKind variant must be covered in docs/php/control-structures.md, docs/php/functions.md, docs/php/classes.md, docs/php/namespaces.md, or the relevant extension page.ExprKind variant must be covered somewhere in docs/php/ or docs/beyond-php/.docs/internals/the-lexer.md — Token typesSource of truth: src/lexer/token.rs
Token enum should appear in the token tables.docs/internals/the-parser.md — AST nodesSource of truth: src/parser/ast.rs, src/parser/expr/pratt.rs
ExprKind variant.StmtKind variant.BinOp enum must match the documented operators.Foreach struct fields must be accurate (check for key_var).src/parser/expr/pratt.rs infix_bp().docs/internals/the-type-checker.md — Type systemSource of truth: src/types/model.rs, src/types/checker/, src/types/signatures.rs
PhpType enum shown in the doc must match the actual enum exactly.src/types/checker/mod.rs.docs/internals/the-codegen.md — Code generationSource of truth: src/codegen/expr.rs, src/codegen/expr/, src/codegen/stmt.rs, src/codegen/stmt/, src/codegen/abi/, src/codegen/functions/
ArrayLiteralAssoc exists in ast.rs.Switch/Match exist in ast.rs.src/codegen/abi/.docs/internals/the-runtime.md — Runtime routinesSource of truth: src/codegen/runtime/emitters.rs, src/codegen/runtime/x86_minimal.rs, and src/codegen/runtime/
emit_runtime() / emit_x86_minimal_runtime() should appear in the runtime docs.__rt_hash_*) must be documented.docs/internals/memory-model.md — Memory layoutSource of truth: src/codegen/runtime/data.rs, src/codegen/runtime/arrays/hash_new.rs, src/codegen/runtime/fibers/
.comm buffers declared by src/codegen/runtime/data.rs.docs/internals/arm64-assembly.md and docs/internals/arm64-instructions.mdThese rarely change. Only update if new instruction patterns are used in codegen (check for new ARM64 mnemonics in src/codegen/).
ls dir/*.rs | wc -l.[The Runtime](the-runtime.md)) should be added when referencing another page.After updating, provide a summary of changes made:
## Documentation Update Summary
### Files updated
- `docs/internals/architecture.md` — updated file counts, added I/O section
- `docs/internals/the-runtime.md` — added 15 missing routines, added I/O section
- ...
### Files unchanged
- `docs/arm64-instructions.md` — already up to date
- ...