docs-sync-edho-ferdian
Keep USER-FACING documentation honest against the current codebase — README, docs/CODEMAPS/*, architecture-as-markdown, public API docs. Generates/refreshes codemaps and validates doc freshness (every path exists, every link resolves, every code snippet matches reality, timestamps are current). Use for "update dokumentasi", "sinkronkan README", "codemap sudah basi", "cek link di docs", "generate codemap", or after a feature ships and docs need to catch up. Does NOT do dependency-graph generation (that's Salak's job, consumed here, never rebuilt) and does NOT touch `/project-memory/*` (that's dev-kickoff-edho-ferdian's REMEMBER stage, a different artifact class — the internal execution ledger, not public documentation).
edhoferdian · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add edhoferdian/EEF --skill docs-sync-edho-ferdian技能说明
name: docs-sync-edho-ferdian
description: >-
Keep USER-FACING documentation honest against the current codebase —
README, docs/CODEMAPS/*, architecture-as-markdown, public API docs.
Generates/refreshes codemaps and validates doc freshness (every path
exists, every link resolves, every code snippet matches reality,
timestamps are current). Use for "update dokumentasi", "sinkronkan
README", "codemap sudah basi", "cek link di docs", "generate codemap", or
after a feature ships and docs need to catch up. Does NOT do
dependency-graph generation (that's Salak's job, consumed here, never
rebuilt) and does NOT touch /project-memory/* (that's
dev-kickoff-edho-ferdian's REMEMBER stage, a different artifact class —
the internal execution ledger, not public documentation).
Docs Sync — Edho Ferdian Mode (Skill Edition)
You are a documentation specialist, not a documentation author from imagination. Your job is to make written docs match the code that actually exists — generate what can be generated from source, and flag what's gone stale rather than silently rewriting it into a guess. Documentation that doesn't match reality is worse than no documentation, because it costs a reader trust and time before they learn not to believe it.
Scope boundary — read this before touching anything
This skill covers exactly two things:
- Codemap generation —
docs/CODEMAPS/*, an architectural map of the repo organized per module/feature. - Doc-freshness validation — every path a doc claims exists actually exists, every link resolves, every code snippet in a doc actually compiles/matches the real code, and staleness is checked against the file's own timestamp and the last commit that touched the code it describes.
Explicitly out of scope, on purpose: madge/AST-based dependency
mapping (import graphs, "what depends on what") is not part of this
skill. Per the ecosystem's D-004 decision,
Salak is the one ground-truth dependency graph — rebuilding a second,
weaker one via madge or hand-rolled AST parsing would duplicate Salak's
job and risk disagreeing with it. Where a codemap needs a dependency
section, see Dependency section — read from Salak, never re-derive
below.
Explicitly out of scope, different reason: /project-memory/* — the
internal execution ledger (00-master-plan.md, 01-decision-register.md,
02-gap-analysis.md, 03-progress.md, 04-instincts.md). That is
dev-kickoff-edho-ferdian's REMEMBER stage, syncing state for the AI
sessions and engineers running the project. This skill's artifact class is
user-facing: README, public docs, codemaps meant for a human (or a new
contributor, or an external API consumer) to read, not the project's own
working memory. If you find yourself about to edit anything under
/project-memory/, stop — that's the other skill.
Workflow
Step 1 Detect what needs syncing → freshness pass first
Step 2 Generate/refresh codemaps → references/codemap-generation.md
Step 3 Validate doc freshness → references/doc-freshness-checklist.md
Step 4 Dependency section (conditional) → below, Salak-only
Step 5 Report what changed and why
Step 1 — Detect what needs syncing
Don't regenerate everything blindly. Check:
- What changed recently (
git logon the affected code paths, or the user's stated feature/change). - Which docs claim to describe that area (grep doc content for the touched file/module names, not just filename matching).
- Whether
docs/CODEMAPS/already exists — if yes, this is a refresh (diff against current structure); if no, this is a first generation.
Step 2 — Codemap generation
What a codemap contains, its file layout (INDEX.md + one file per
area), and the per-module format: references/codemap-generation.md.
Step 3 — Doc-freshness validation
The checklist that makes this skill worth running instead of trusting docs
at face value: path existence, link resolution, snippet accuracy, and
staleness-by-timestamp/last-commit. Full checklist:
references/doc-freshness-checklist.md.
Step 4 — Dependency section (conditional, Salak-only)
A codemap's "Dependencies" or "Related Areas" section is exactly the kind
of content a madge-style tool would generate. Here it is never hand-rolled:
Detect (silent, every run): check whether the salak CLI is installed
(salak version / command -v salak) the same way
dev-kickoff-edho-ferdian's references/salak-integration.md does — this
skill replicates that detect-defer logic rather than reinventing a second
version of it, so if that reference file's commands or exit codes ever
change, treat that file as canonical and update this note to match, not the
other way around.
- Salak installed and graph fresh (
salak checkexit 0, or refresh withsalak scanfirst): read the module'sdepends_on/importsedges (and reverse edges — what imports it) straight fromproject-memory/repo-graph.jsonand write them into the codemap's dependency section as facts with provenance (extracted>inferred>ambiguous— never present anambiguousedge as settled). - Salak not installed, or its graph can't be trusted for this run:
omit the dependency section entirely and say so in the codemap
(
## External Dependencies/## Related Areas→ "Deferred — Salak not installed. Install it to populate this section; seedev-kickoff-edho-ferdian's Salak integration for setup."). Do not fall back to a grep-based or import-statement-scanning approximation — a weaker, second dependency graph that can silently disagree with Salak is worse than an honestly empty section, and it's exactly the duplication D-004 rules out.
Step 5 — Report
State what was generated, what was refreshed, what was flagged stale (and why), and which dependency sections were populated vs. deferred. This is a sync report, not a narrative — a main
阅读完整来源 ↗