SuperAPI AI Directory

sync-docs

Office & productivity

View repository

Updated 10-15 20:09

About this skill

sync-docs

.agents/docs/ All existing files under it are in scope. When the user names a new one, a .agents/docs/ file may be created, and a row appended to the root AGENTS.md documentation table. See persistent-docs.md。

Not triggered automatically by review. When going through implement / rush , documentation alignment is completed in the same round as implementation (architecture-level changes are dispatched by rush to this skill), and review only checks whether anything was missed.

Pre-checks

Execute according to the "Pre-checks" section of common.md ; when only the script is missing, use the setup update mode. For when to change CODE-MAP, see code-map-update.md。

Choose path

If the parameters or the user's own words request adding documentation (including "add a ... doc"): take the add path. Otherwise take the alignment path. If both match at the same time, do both.

Add path

Only create user-defined documentation under .agents/docs/ . Do not ask again about anything that can be determined from the user's own words; when the file name, when to read it, or what body content to write is missing, ask using 交互式提问 .

  1. Path:.agents/docs/<NAME>.md。<NAME> use uppercase with hyphens (e.g. TEAM-RULES.md). If it already exists, change to updating the body, while still ensuring the index row is present.
  2. Do not create items that setup must have (PROJECT.md; for code-related there is also ARCHITECTURE.md、DEV-STANDARDS.md、CODE-MAP.md、SMELLS.md) and ACCEPTANCE.md. If these are missing, have the user run setup or acceptance。
  3. Write body: write only the content that this repository needs to execute, not a tutorial.
  4. In the root AGENTS.md documentation table, append a row:| .agents/docs/.md | <何时读> | <何时更新> |. For when to update, the default is sync-docs. Do not delete or modify required rows specified by the template, and do not write body content in AGENTS.md .
  5. Non-code can also add custom documentation; do not for that reason go write the required code-related docs.

Input

Used by the alignment path. If the add path has already been taken and the user did not provide a comparison path, and there are no changes in the working tree or staging area: skip this section and alignment, and do not ask which commit to compare against.

  • Dispatched by rush (the task statement names the changes): take the named items as authoritative, take the alignment path, and do not ask the user.
  • The user names a change to .agents/docs/ a certain document, or gives category / architecture / standards / map or similar changes: take the user's original intent as authoritative.
  • The user gave paths: determine only from these paths which existing documents have been made wrong.
  • Otherwise use git to get the changes in the working tree and staging area (git status --porcelain、git diff --name-only、git diff --cached --name-only union, deduplicated).
  • Ignore .agents/cooking/。
  • No named changes, no paths, and no changes in the working tree or staging area: use the 交互式提问 tool to ask the user which commit or which files to compare against, and do not automatically take the most recent commit.

.agents/docs

Change only the sentences/sections that have been overturned or named, and do not rewrite the whole text. For non-code, do not open code-related docs (even if leftovers exist on disk), unless the user names that particular one.

  1. PROJECT.md: change only when category, organizational structure, or full-stack form has been overturned or named. Changing code ↔ non-code: stop, have the user setup(requires switching the AGENTS template / supplementing code-related docs).
  2. ARCHITECTURE.md: change only when there are architecture-level changes (for the definition see the "Architecture-level changes" section of code-map-update.md ), or when the business/technical architecture is stated incorrectly or is named. If the architecture was changed, then according to code-map-update.md synchronize CODE-MAP.md。
  3. DEV-STANDARDS.md: Only change specs/preferences when the user explicitly names them. Do not infer new specs from code.
  4. SMELLS.md: If inconsistent with smells.md , overwrite as-is. Do not rewrite, append, or delete entries based on the project.
  5. CODE-MAP.md: When it touches code-map-update.md items to be changed, only change the relevant lines.
  6. ACCEPTANCE.md: Only change if it exists and is stated incorrectly or explicitly named.
  7. Root AGENTS.md other .agents/docs/ files in the document table: only change if stated incorrectly or explicitly named.

Other existing documents

Skills, packages/modules AGENTS.md, modules' existing convention documents: only change if stated incorrectly.

If unsure whether an existing document has been overturned: use the 交互式提问 tool to ask the user, do not guess (subagent environments do not have this tool: skip and list it in the final report). Documents that are neither stated incorrectly nor explicitly named: do not write.

Prohibited

Do not write business code, do not modify cooking. Root AGENTS.md only touch the document table: you may append or correct custom rows, you may not delete or modify template-required rows, and you may not write into the body. Except for new paths, do not create new files.

End

Report: which paths were compared, which .agents/docs files were created/changed, whether the root AGENTS.md had index rows appended, which other existing documents were changed, and whether setupis needed. If there were no changes, say there were none.