| name | waymark-maintenance |
| description | Places and maintains waymarks across a codebase, focusing on TLDR coverage and accuracy. Delegates to the waymarker agent for systematic auditing and placement. Use when adding TLDRs to files, auditing waymark coverage, updating stale waymarks, or when "add waymarks", "TLDR coverage", "waymark audit" is mentioned. |
| version | 1.0.0 |
| agent | waymark:waymarker |
| context | fork |
| allowed-tools | ["Read","Edit","Grep","Glob","Bash(*/find-waymarks *)","Bash(*/coverage-report *)"] |
Waymark Maintenance
This skill guides systematic waymark placement and maintenance across a codebase. It delegates to the waymarker agent for execution. The agent loads the waymarks skill for grammar reference and search commands.
Quick Start
Check current TLDR coverage:
!.agents/skills/waymark-maintenance/scripts/coverage-report --stats
Priority: TLDR Coverage
TLDRs are the foundation of waymark coverage. Every source file should have a TLDR describing what it does. Without TLDRs, codebase navigation is impaired for both humans and agents.
Coverage Workflow
- Audit: Run
coverage-report --missing-tldr to find gaps
- Prioritize: Start with entry points, core modules, then utilities
- Write: Add TLDRs following the patterns below
- Verify: Re-run coverage to confirm improvement
Writing TLDRs
The Rules
- One per file: Exactly one
tldr ::: per file
- First waymark: Place after shebang/frontmatter, before code
- 8-14 words: Concise, active voice, capability-first
- No filler: Avoid "This file contains...", "Module for...", "Utilities..."
Placement by File Type
TypeScript/JavaScript:
import { sign, verify } from 'jsonwebtoken';
Python:
import sqlite3
Markdown:
---
title: API Guide
---
<!-- tldr ::: REST API reference with authentication examples #docs -->
# API Guide
Shell:
#!/bin/bash
set -euo pipefail
Sentence Patterns
Write one sentence describing what the file delivers:
| Pattern | Template | Example |
|---|
| Action | [verb] [domain] [method] | validates payment webhooks using Stripe signatures |
| Component | [component] [action] [scope] | React hooks exposing authentication state |
| Purpose | [capability] for [purpose] | rate limiting middleware for API endpoints |
| Integration | [integration] [domain] with [tech] | Stripe webhook handler with signature verification |
Strong Verbs
Use active, specific verbs:
- validates, processes, transforms, parses
- renders, displays, presents
- manages, orchestrates, coordinates
- fetches, retrieves, queries
- generates, creates, builds
- handles, routes, dispatches
Starred TLDRs
Use *tldr for critical files that must be read first:
Reserve for: entry points, core infrastructure, security-critical modules.
Documentation TLDRs
Documentation files must include #docs tag:
<!-- tldr ::: API authentication guide using JWT tokens #docs/guide -->
<!-- tldr ::: database schema migration reference #docs/reference -->
Writing About Waymarks
about ::: markers describe the code section immediately following them.
Placement
Place directly above the construct (6-12 words):
export function validateToken(token: string): Claims {
Patterns by Construct
| Construct | Pattern | Example |
|---|
| Class | encapsulates/manages [domain] [behavior] | encapsulates session lifecycle state |
| Function | validates/transforms/fetches [input] [action] | validates webhook signatures before processing |
| Component | renders [element] with [feature] | renders account overview with metrics |
Scope Rule
Focus on the section, not the file. Don't restate the TLDR:
function validatePassword(password: string) {}
function validatePassword(password: string) {}
Maintaining Waymarks
Stale Waymark Detection
Waymarks become stale when code changes but waymarks don't. Look for:
- Completed todos:
todo ::: for work that's done
- Fixed bugs:
fix ::: for bugs that are resolved
- Inaccurate descriptions: TLDRs/abouts that don't match current behavior
- Orphaned references:
see:#token pointing to removed code
Update Process
- Read the code to understand current behavior
- Compare against existing waymark content
- Update waymark to match reality, or delete if no longer relevant
- Never leave inaccurate waymarks—they're worse than none
Pre-Merge Audit
Before merging, check for items that should be cleared:
find-waymarks -F
find-waymarks -S
find-waymarks -t wip
See the waymarks skill for full search options.
Files to Skip
Don't add waymarks to:
- Generated files:
*.d.ts, *.generated.*, @generated headers
- Index/barrel files: TLDR optional if only re-exports
- Test fixtures: Skip unless complex logic exists
- Lock files:
package-lock.json, bun.lockb, etc.
- Build artifacts:
dist/, build/, .next/
- Empty files: Flag for removal rather than adding waymarks
Files That Need TLDRs
Prioritize in this order:
- Entry points:
index.ts, main.ts, app.ts
- Core services: Authentication, database, API handlers
- Utilities: Shared helpers, formatters, validators
- Configuration: Non-trivial config files
- Documentation: All markdown files (with
#docs tag)
- Tests: Test files with complex setup
Common Mistakes
Too Vague
Too Long
Wrong Placement
import { hash } from 'bcrypt';
import { hash } from 'bcrypt';
Missing Required Tag
<!-- Bad: tldr ::: API documentation for user endpoints -->
<!-- Good: tldr ::: API documentation for user endpoints #docs/api -->
Coverage Script
coverage-report
coverage-report --stats
coverage-report --all
coverage-report --json
coverage-report --help
Script location: .agents/skills/waymark-maintenance/scripts/coverage-report
Delegation
This skill delegates to the waymarker agent which operates in two modes:
- Conservative (default): Reports findings, suggests waymarks, doesn't modify files
- Autonomous: Adds waymarks directly when instructed with "go ahead", "add them", etc.
Always start with conservative mode to review suggestions before bulk changes.