원클릭으로
doc-update
Audit and update the docs/ wiki to match the current codebase — checks all doc files against source code and fixes any mismatches.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Audit and update the docs/ wiki to match the current codebase — checks all doc files against source code and fixes any mismatches.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
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/how-to/docs/compiling/ — the compiler CLI (flags, env vars) and the full compilation processdocs/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. When adding a new page, also add it to the docs/README.md index.
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/ and src/codegen/abi/.src/ir_passes/ description covers both the EIR optimization pass driver (driver.rs, identity folding, …) and linear-scan register allocation, not register allocation alone.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/catalog.rs (canonical builtin registry), src/codegen_ir/lower_inst/builtins/ (active EIR lowering), src/parser/ast.rs (ExprKind, StmtKind). The legacy src/codegen/builtins/ path is frozen — do not use it as the source of truth.
PhpType must be documented in docs/php/types.md or the relevant extension page.src/types/checker/builtins/catalog.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 (the target-aware emit_runtime() entry point) and src/codegen/runtime/
emit_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/).
docs/compiling/*.md — Compiler CLI and the compilation processSource of truth: src/cli.rs (flag parsing, defaults, env-var overrides), src/pipeline.rs (phase order and timing labels), src/codegen/platform/ (targets), src/ir_passes/ (EIR optimization passes), README.md (Usage section).
docs/compiling/cli-reference.md must document EVERY flag and environment variable parsed in src/cli.rs, with the correct accepted values and default. A new, renamed, or removed flag with no matching entry is a mismatch to fix.docs/compiling/compilation-pipeline.md phase list and labels must match the timings.record_since("…") labels and ordering in src/pipeline.rs.docs/compiling/targets.md must match the supported target matrix and accepted spellings in src/codegen/platform/.docs/compiling/optimization.md must match the optimization controls: --ir-opt/--no-ir-opt (the EIR pass driver in src/ir_passes/), --regalloc, and --null-repr.README.md consistent with this section.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
- ...