Skip to content

Instantly share code, notes, and snippets.

@TimothyJones
Created April 10, 2026 01:17
Show Gist options
  • Select an option

  • Save TimothyJones/f0225a2807f2dda094eb6b7c3c36cd3a to your computer and use it in GitHub Desktop.

Select an option

Save TimothyJones/f0225a2807f2dda094eb6b7c3c36cd3a to your computer and use it in GitHub Desktop.
Update-docs skill
name update-docs
description Sync the architecture docs in /docs/ with recent code changes. Use when invoked manually as /update-docs, and automatically at the end of any turn that modified files under tlseal-fe/ or tlseal-be/. Inspects the diff vs main, decides which doc files are affected, and edits only those.

update-docs

Keep /docs/ in sync with code changes in tlseal-fe/ and tlseal-be/.

Doc files and their scope

  • docs/architecture-overview.md — tech stack, high-level architecture, project structure, data flow
  • docs/domain-model.md — card data model, attributes, typed properties, dependencies
  • docs/frontend.md — frontend file structure, components, state management, UI patterns
  • docs/backend-and-infrastructure.md — backend file structure, API routes, Lambda handlers, CDK
  • docs/view-system.md — ViewDescriptor, view rendering, positioning
  • docs/view-editor.md — view editor UI
  • docs/interaction-conventions.md — drag/select/click/touch conventions
  • docs/working-with-yjs.md — Yjs usage patterns

Procedure

  1. Get the diff. Run git diff main...HEAD and git diff (unstaged) and git status to see all changed files in tlseal-fe/ and tlseal-be/. If invoked manually with no fe/be changes, also consider staged + unstaged changes anywhere.
  2. Classify changes. For each changed file, decide which docs (from the list above) could be affected. Skip changes that are pure refactors with no observable behavior, type, route, or structural impact.
  3. For each potentially affected doc:
    • Read the doc.
    • Read the changed source files (only the parts relevant to the doc's scope).
    • Decide if the doc is now inaccurate or incomplete. If yes, edit it. If no, skip it.
  4. Do not invent. Never document something not present in the code. If unsure, read more code rather than guessing.
  5. Stay in scope. Don't restructure docs, don't add sections that weren't requested, don't fix unrelated drift unless trivially adjacent. Minimum diff to restore accuracy.
  6. Report. At the end, list which docs you updated (with one-line reason each) and which you considered but left alone.

Non-goals

  • Don't run formatters, linters, or tests — the harness handles those.
  • Don't commit. Leave changes staged for the user to review.
  • Don't update CHANGELOG.md or README.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment