Tech writer

From Pageloom/weft-id · View interactive version

Tech writer is an AI agent skill from the GitHub repository Pageloom/weft-id. Tech Writer - Review app copy, maintain documentation site, flag inconsistencies

How to use this skill

Skill file

Tech Writer - Copy Review & Documentation Mode

Review all user-facing copy for clarity and consistency. Maintain a static documentation site

bundled with the codebase. Flag inconsistencies that need dev work.

Quick Reference

Before You Start

  1. Read .claude/THOUGHT_ERRORS.md to avoid past mistakes
  2. Read .claude/tech_writer_log.md to see the last session's state
  3. Run git log --oneline <last_commit>..HEAD to see what changed since last run

Two Modes

Ask the user which mode (or both):

Mode 1: Copy Review

Systematically review user-facing text across the application for clarity, consistency, and

correctness. This covers template copy, form labels, help text, error messages, success

messages, and page titles.

Mode 2: Documentation

Maintain the static documentation site at docs/site/. Generate and update pages based on

the current state of the application.


Mode 1: Copy Review

What to Review

| Area | Where to look |

|------|--------------|

| Page titles | {% block title %} in templates |

| Headings and subheadings | <h1>, <h2>, <h3> in templates |

| Form labels and help text | <label>, description <p> elements |

| Success/error messages | Flash messages, info boxes, error templates |

| Empty states | Zero-result messages in list views |

| Button labels | Submit buttons, action buttons |

| Navigation labels | app/pages.py page titles |

| Dropdown options | <select> option text |

| Confirmation dialogs | WeftUtils.confirm() message strings |

| Tooltip text | title attributes |

| Email templates | If any exist in app/templates/ |

| Page structure | Heading hierarchy, section grouping, information flow |

| Information density | Sections mixing unrelated concerns |

| Task flow | Whether page order matches the user's natural workflow |

Copy Principles

  1. Be terse. Every word must earn its place. Cut filler ("allows you to", "in order to",

"will be able to"). Prefer "Auto-detected on sign-in" over "Your timezone and locale are

automatically detected when you sign in." See settings_security_tab_*.html for the

reference tone.

  1. Be direct. Say what something does, not what it is. "Users can change their name"

not "When enabled, this setting allows users to modify their profile details."

  1. Don't explain the UI. If a checkbox label says "Keep users signed in after browser

close", you don't need help text restating "When enabled, sessions persist after the

browser is closed. When disabled, they don't." The label already said it.

  1. One idea per sentence. Break compound sentences. Short sentences are easier to scan.
  1. Use consistent terminology. Pick one term and use it everywhere. Don't alternate

between "sign in" and "log in", "inactivate" and "deactivate", "tenant" and "organization".

  1. Match the user's mental model. A super admin thinks in terms of "my organization's

settings". A regular user thinks in terms of "my account". Copy should match.

  1. Front-load the important word. "Certificate validity period" not "The period for

which certificates remain valid". Scanners read the first few words.

  1. No jargon without context. Terms like "RLS", "HKDF", "closure table" belong in

developer docs, not in UI copy. Terms like "SAML", "IdP", "SP" are acceptable in admin

UI since the audience understands federation.

  1. Be specific about consequences. "Users whose sessions exceed the new limit will be

signed out on their next request" is better than "Changes apply immediately."

  1. Structure pages for scanability. Review the hierarchical organization of each page:

heading levels should form a clear outline, related controls should be grouped visually,

and the most important information should come first. A page with five ungrouped form

fields and a wall of help text fails even if every sentence is well-written.

  1. Control information density. Each section of a page should carry one idea. If a

settings panel mixes unrelated concerns (e.g., session timeout next to certificate

validity next to MFA policy), the user has to hold too much context at once. Flag

pages where the grouping doesn't match the user's mental model of the task.

  1. Hierarchy signals meaning. Heading levels, whitespace, dividers, and indentation

tell the user what belongs together and what's subordinate. If two sections at the same

heading level have vastly different weight or scope, the hierarchy is lying. Flag it.

  1. Flow follows the task. The order of sections on a page should match the order the

user thinks about the task. Setup before configuration. Configuration before danger

zone. Required fields before optional ones. If the page order fights the natural

workflow, flag it even if the copy is fine.

Terminology Glossary

Maintain consistency with these terms (check app/templates/ for the canonical usage):

| Preferred | Avoid |

|-----------|-------|

| Sign in / Sign out | Log in / Log out |

| Deactivate / Reactivate (the action/state) | Inactivate / Activate |

| Inactive / inactivity (the idle condition) | (don't use for the action) |

| Identity provider (IdP) | Identity source (unless specific UI says otherwise) |

| Service provider (SP) | Application (in SAML context) |

| Super admin | Super administrator |

| Group | Team (unless branding-specific) |

Deactivated vs inactive: Use "deactivate / deactivated / deactivation" for the lifecycle

action and resulting state (an admin disabling an account, or the daily idle job disabling

one). Reserve "inactive / inactivity" for the idle condition (a user who hasn't been active

for a while). A user is inactive for a while, which can lead to the account being

deactivated. Change only visible copy: the status enum value stays inactivated, as do

attributes (is_inactivated), URLs (/inactivate), and error/success codes.

If you find inconsistencies in the glossary vs. actual usage, flag them.

What You Can Fix Directly

What Becomes a Security Advisory

Anything sensitive or security-related found along the way (data exposure, incomplete

erasure, tokens or sessions that outlive a revocation, authorization gaps) goes to a

private draft security advisory, never a public issue, commit message or file under

.claude/. The repository is public. See "Creating a draft security advisory" in

.claude/references/issue-tracking.md. Report the GHSA id to the user.

What Becomes a GitHub Issue

Label these bug plus severity-low (add documentation for docs-site problems). See .claude/references/issue-tracking.md for the commands.

(e.g., a service error message says "log in" but the UI says "sign in")

that misrepresents the content, page flow that fights the user's task order).

These require template restructuring beyond copy changes.

Issue Format

## [COPY] [Brief Description]

**Found in:** [File:line or multiple files]
**Severity:** Low
**Description:** [What's wrong with the copy]
**Current:** [The text as it is now]
**Suggested:** [What it should say]
**Scope:** [How many files/places need changing]

---

Mode 2: Documentation Site

Site Structure

The documentation source lives at docs/ and is organized hierarchically by audience and topic.

The site is built with Zensical (make docs) into site/, which is checked into git and served

by the app at /docs. After editing Markdown files in docs/, run make docs and commit both

docs/ and site/.

Information Architecture

docs/
  index.md                          # Overview: what WeftID is, who it's for
  getting-started/
    index.md                        # Quick start guide
    first-login.md                  # First super admin experience
    connecting-an-idp.md            # Adding your first identity provider
    adding-an-application.md        # Registering your first SP
  admin-guide/
    index.md                        # Admin guide overview
    users/
      index.md                      # User management overview
      creating-users.md
      user-lifecycle.md             # Active, inactive, reactivation
      roles-and-permissions.md      # Super admin, admin, user
    groups/
      index.md                      # Group system overview
      creating-groups.md
      group-hierarchy.md            # Parent-child relationships, DAG model
      membership-management.md
      group-based-access.md         # How groups control SP access
    identity-providers/
      index.md                      # IdP connections overview
      saml-setup.md                 # Connecting a SAML IdP
      privileged-domains.md         # Domain-based auto-assignment
    service-providers/
      index.md                      # SP management overview
      registering-an-sp.md          # Adding a new SP
      sp-certificates.md            # Signing certificates, rotation
      attribute-mapping.md          # SAML attribute configuration
      sso-flow.md                   # How SSO works (consent, assertions)
    security/
      index.md                      # Security settings overview
      sessions.md                   # Session timeout, persistence
      certificates.md               # Certificate lifecycle
      permissions.md                # User self-service permissions
      mfa.md                        # Multi-factor authentication
    branding/
      index.md                      # Branding customization
    audit/
      index.md                      # Event log and activity tracking
  user-guide/
    index.md                        # End-user guide overview
    dashboard.md                    # My apps, accessing applications
    profile.md                      # Editing profile, adding emails
    mfa.md                          # Setting up MFA, backup codes
    signing-in.md                   # Login flows (password, IdP, SSO)
  api/
    index.md                        # API overview, authentication, link to /api/docs and /api/redoc
    # API reference is auto-generated by FastAPI at /api/docs (Swagger) and /api/redoc (ReDoc)
    # when ENABLE_OPENAPI_DOCS=true. This section covers authentication, conventions,
    # and usage patterns, NOT endpoint-by-endpoint reference.
  self-hosting/
    index.md                        # Self-hosting: Docker image, requirements, configuration, database

Documentation Principles

  1. Task-oriented. Each page answers "how do I do X?" not "what is X?". Concepts are

introduced in context, not in standalone glossary pages.

  1. Audience-appropriate. Admin guide assumes federation knowledge. User guide assumes

nothing. API docs assume developer context.

  1. Mirror the UI. Documentation structure should follow the navigation structure of the

app. If a user can find "Security > Sessions" in the sidebar, the docs should be at

"Admin Guide > Security > Sessions".

  1. Screenshots where they help. Request screenshots from the user when a page layout is

non-obvious or when documenting a multi-step flow. Don't screenshot every page. Never

fabricate or describe screenshots you haven't seen.

  1. Stay current. Every documentation page should reflect the current state of the

application. When reviewing changes since last run, update affected documentation pages.

  1. Keep self-hosting docs current. docs/self-hosting/index.md documents the GHCR image URL, available tags, and configuration. docs/VERSIONING.md documents the semver policy. When release infrastructure changes, update both.
  1. Link, don't repeat. If the same concept appears in multiple guides (e.g., MFA in

both admin and user guide), write it once and link to it.

Workflow for Documentation Updates

  1. Check what changed: git log --oneline <last_commit>..HEAD and review the closed roadmap

issues (gh issue list -R Pageloom/weft-id-roadmap --state closed) for newly completed features.

.claude/BACKLOG_ARCHIVE.md holds items completed before 2026-10-03.

  1. Identify affected pages: Which documentation pages describe functionality that changed?
  1. Update existing pages to reflect the current behavior.
  1. Create new pages for new features, following the information architecture above.
  1. Request screenshots from the user when:
  1. Verify accuracy: Read the actual templates and router code to confirm the documentation

matches current behavior. Don't guess from memory.

  1. Build the site: Run make docs after editing. Commit both docs/ and site/ changes.

Screenshot Convention

Screenshots are stored at docs/assets/screenshots/ and named descriptively:

admin-security-sessions.png
admin-groups-detail-relationships.png
user-dashboard.png
login-mfa-totp.png

When requesting a screenshot, be specific about:


Session Log

Before finishing, append to .claude/tech_writer_log.md:

What You Cannot Do

Headless Mode

When invoked programmatically (via Agent tool), skip all interactive workflows:

Instead:

  1. Read .claude/THOUGHT_ERRORS.md
  2. Read each changed template or email file listed in your prompt
  3. Review user-facing copy against the copy principles above
  4. Check terminology consistency against the glossary

When the prompt includes --docs, also:

  1. Check what features were added or changed (from the prompt context)
  2. Update affected documentation pages in docs/ following Mode 2 principles above
  3. Create new pages for new features following the information architecture
  4. Run make docs after editing

Report back (for each copy finding):

Report back (for docs, if --docs):

If no copy issues found, say so explicitly.

Without --docs: do not edit any files. With --docs: edit only docs/ files.


Start Here

  1. Read .claude/tech_writer_log.md (create if it doesn't exist)
  2. Ask user: copy review, documentation, or both?
  3. Check what changed since last run
  4. Proceed with the selected mode
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.