Note Conventions
Note Conventions
How to name, type, tag, and link notes in pal-e-docs. This is the canonical reference for the note system's conventions. Supersedes
tagging-conventions (deprecated).Note Types
Every note has a
note_type that defines what the note IS. This is (or will be) a database column, not a tag. Until the column exists, type is tracked via tags using the same values below.| note_type | Description | Slug pattern | Example | Enforcement Chain |
|---|---|---|---|---|
| <code>board</code> | Kanban board note. Project-level boards via <code>template-project-page</code>. Ticket decomposition boards via <code>template-board</code> when a ticket exceeds the 5-minute agent rule. Carries scoped user stories, architecture references, and acceptance criteria. | <code>board-{project}</code> or <code>board-{issue}-{desc}</code> | <code>board-pal-e-platform</code>, <code>board-201-app-migration</code> | template + SOP + hook |
| <code>project-page</code> | Living project overview. Vision, status, architecture, roadmap, repos, issues. | <code>project-{project-slug}</code> | <code>project-pal-e-docs</code> | template + hook |
| <code>sop</code> | Standard operating procedure. "How to do things" — step-by-step processes. | <code>{descriptive-name}</code> or <code>sop-{name}</code> | <code>pr-review-loop</code>, <code>sop-litestream-restore</code> | template + hook |
| <code>convention</code> | Naming/style/process rule. "How to name things" — standards and constraints. | <code>{descriptive-name}</code> | <code>note-conventions</code>, <code>ci-rules</code> | template + hook |
| <code>template</code> | Template for creating notes of a specific type. Contains required sections. | <code>template-{type}</code> | <code>template-board</code>, <code>template-sop</code> | template only |
| <code>skill</code> | Claude Code skill definition. Defines a slash command workflow. | <code>skill-{name}</code> | <code>skill-review-pr</code> | template only |
| <code>agent</code> | Agent personality/profile definition. Defines a spawnable agent's role and constraints. | <code>agent-{name}</code> | <code>agent-betty-sue</code>, <code>agent-dev</code> | template only |
| <code>doc</code> | General documentation. Reference, guide, insight, lesson, research, audit, assessment, inventory. Catch-all for notes that aren't one of the above. | <code>{descriptive-name}</code> | <code>hook-events-reference</code>, <code>platform-inventory</code> | none (catch-all) |
| <code>review</code> | PR review, code review, or design review artifact. Captures review findings, decisions, and follow-up items. | <code>review-{repo}-{pr-number}</code> or <code>review-{topic}</code> | <code>review-pal-e-app-142</code> | template + hook |
| <code>architecture</code> | Architecture decision record or system design document. Captures structural decisions, component boundaries, and integration patterns. | <code>arch-{system}-{topic}</code> | <code>arch-enforcement-pipeline</code>, <code>arch-note-type-system</code> | template + hook |
| <code>validation</code> | Validation or verification record. Documents test results, acceptance criteria outcomes, or deployment verification. | <code>validation-{topic}</code> | <code>validation-seven-pillar</code> | template + hook |
| <code>user-story</code> | User story definition. Captures who/what/why, acceptance criteria, and traceability labels (story:X, arch:X). | <code>story-{short-desc}</code> | <code>story-coach-views-roster</code> | template + hook |
| <code>plan</code> | <strong>FROZEN.</strong> Structured work plan with phases. Superseded by kanban boards (<code>convention-kanban-over-plans</code>). Existing plans are live infrastructure — do not create new ones. | <code>plan-YYYY-MM-DD-short-title</code> | <code>plan-2026-02-28-knowledge-system-consolidation</code> | template only (legacy) |
| <code>phase</code> | <strong>FROZEN.</strong> A phase within a plan. Child note linked to parent plan via <code>parent_note_id</code>. Existing phases are live infrastructure — do not create new ones. | <code>phase-{plan-date}-{n}-{short-description}</code> | <code>phase-2026-02-26-1-kustomize-base-migrate-first</code> | template only (legacy) |
Key decisions: The axiom is type → template → SOP → hook. Every note type has a template. Types with process complexity get an SOP. Types with enforcement needs get a hook. The Enforcement Chain column above shows each type's current coverage.
boardis a first-class note_type. Board notes serve two roles: project-level kanban (one per project, permanent, viatemplate-project-page) and ticket decomposition kanban (created when a ticket exceeds the 5-minute rule, archived when parent completes, viatemplate-board). The fractal unit of work decomposition.- Active types (8):
board,project-page,sop,convention,template,skill,agent,doc. These are the established types used for new notes. - New types (4):
review,architecture,validation,user-story. Promoted fromdoccatch-all because they have distinct templates, enforcement needs, and traceability requirements. - Frozen types (2):
plan,phase. Remain in the enum. Existing notes are live infrastructure (parent-child links, status tracking). Do not create new notes with these types. See Frozen Types section below. - Removed types:
todo,issue,reference,journal,incident,post,milestone,sprint. These are removed from the enum entirely.todo/issuework items belong in Forgejo. The rest were never instantiated or are covered bydoc. conventionstays separate fromsop. Conventions are rules/standards ("how to name things"). SOPs are procedures ("how to do things"). Merging would obscure a real distinction.docis the catch-all. Insights, lessons, research, assessments, inventories, guides, audits, roadmaps — all becomenote_type: docwith topic tags providing sub-classification. Architecture, review, validation, and user-story have graduated out of doc into their own types.
Frozen Types
plan and phase are frozen — they remain in the note_type enum and their existing notes are live infrastructure, but no new notes should be created with these types. Frozen means:- Existing plan/phase notes stay queryable. Parent-child links, status fields, and block content remain intact. Agents can still read them, update their status, and reference them.
- No new plans or phases. New work decomposition uses boards (kanban) and Forgejo issues. See
convention-kanban-over-plans. - Templates retained but not offered.
template-planandtemplate-phaseremain for reference butcreate_note_from_templateshould not suggest them for new work. - Status transitions still valid. An active plan can be moved to
completedordeferred. A phase can move throughnot-startedtocompleted. Frozen applies to creation, not lifecycle. - Distinct from removed types. Removed types (
todo,issue, etc.) are deleted from the enum entirely. Frozen types stay in the enum because existing data depends on them.
Status Values
Every note has a
status that tracks where it is in its lifecycle. Valid values depend on note_type.| note_type | Valid statuses | Notes |
|---|---|---|
| <code>board</code> | <code>active</code>, <code>archived</code> | Project boards stay active. Decomposition boards archive when parent ticket completes. |
| <code>project-page</code> | <code>active</code>, <code>archived</code> | Archived projects are dead, not deprecated |
| <code>sop</code> | <code>active</code>, <code>deprecated</code> | Deprecated SOPs are superseded, not deleted |
| <code>convention</code> | <code>active</code>, <code>deprecated</code> | Same as SOP |
| <code>template</code> | <code>active</code>, <code>deprecated</code> | Same as SOP |
| <code>skill</code> | <code>active</code>, <code>deprecated</code> | Deprecated skills may still exist in ~/.claude/ |
| <code>agent</code> | <code>active</code>, <code>deprecated</code> | Deprecated agents may still exist as frontmatter |
| <code>doc</code> | <code>active</code>, <code>archived</code>, <code>draft</code> | Draft for WIP docs; archived for outdated references |
| <code>review</code> | <code>active</code>, <code>archived</code> | Active during review cycle; archived when PR merges or review concludes |
| <code>architecture</code> | <code>active</code>, <code>deprecated</code>, <code>draft</code> | Draft for proposals; deprecated when superseded by a newer arch note |
| <code>validation</code> | <code>active</code>, <code>archived</code> | Active during validation; archived when results are captured |
| <code>user-story</code> | <code>active</code>, <code>completed</code>, <code>deferred</code> | Tracks story lifecycle. Completed when acceptance criteria met. |
| <code>plan</code> | <code>active</code>, <code>completed</code>, <code>deferred</code> | <strong>FROZEN.</strong> Canonical term is <code>completed</code> (not <code>complete</code>) |
| <code>phase</code> | <code>not-started</code>, <code>in-progress</code>, <code>completed</code>, <code>deferred</code> | <strong>FROZEN.</strong> Tracks phase lifecycle independently from parent plan |
Note Decomposition
Plans decompose into child phase notes. Each phase is its own note with
note_type: phase, linked to the parent plan via parent_note_id. The browse frontend composes them into one rendered page. MCP tools target individual phases. This eliminates the monolithic HTML blob problem.Schema
| Column | Type | Purpose |
|---|---|---|
| <code>note_type</code> | varchar, nullable | Replaces type tags. Enables <code>list_notes(note_type="phase")</code>. |
| <code>status</code> | varchar, nullable | Replaces lifecycle tags. Enables status-only updates without rewriting content. |
| <code>parent_note_id</code> | FK to notes.id, nullable | Self-referential. Links a phase to its parent plan. |
| <code>position</code> | integer, nullable | Ordering of children within a parent. Phase 1 = position 1, etc. |
What stays in the parent plan
- Vision, Context, Previous Plan, Depends On, Decisions Made
- Key Files table, Verification checklist, Next Plan Seeds, Related
- Projects & Repos Touched table
- Any plan-level context that applies to all phases
What becomes a child phase note
- Phase title, goal, owner, status
- Steps (the detailed work)
- Issue slug reference
- Deliverables (added on completion)
- Phase-specific verification criteria
Rules
- Phase slug convention:
phase-{plan-date}-{n}-{short-description}(unchanged) - Phases MUST have
note_type: phaseandparent_note_idset - Phases MUST belong to the same project as the parent plan
- Position determines rendering order in the browse frontend
- Old monolithic plans render as-is — decomposition is opt-in per plan
- The "promote phase to plan" pattern is retired — phases grow in place
Baseline Measurements (2026-03-02)
Measured on 3 representative plans (Consolidation 19.8 KB, Kustomize 18.7 KB, MCP Gateway 15.1 KB):
| Story | Today (bytes) | Today (calls) | Target (bytes) | Target (calls) | Reduction |
|---|---|---|---|---|---|
| 1. Update phase status | 39,037 | 2 | < 2,000 | 1 | 95% |
| 2. Spawn agent for phase | 19,143 (82% waste) | 1 | < 5,000 (< 20% waste) | 1 | 75% |
| 3. Query in-progress phases | 193,286 | 12 | < 5,000 | 1 | 97% |
| 4. Create plan from template | 23,719 | 2 | < 8,000 | 4 (parent + 3 phases) | 66% |
| 5. Elaborate a phase | 39,537 | 2 | < 10,000 | 2 | 75% |
| 6. View in browse | N/A | N/A | Visual parity | N/A | — |
Slug Naming
Slugs are human-readable AND machine-guessable. An agent should be able to guess the slug from context without needing an index.
Rules:
- All lowercase, hyphens only (no underscores, no spaces)
- Descriptive over terse —
pr-review-loopnotprl - Plans get date prefixes because multiple plans can share a title over time
- Project pages, templates, skills, and agents get type prefixes because they're structurally distinct
- Issues use Forgejo as the canonical tracker. Legacy
issue-{repo-slug}-{description}andbug-{description}slug patterns exist in pal-e-docs but new work items should be Forgejo issues, not notes. - SOPs and conventions use descriptive names without type prefix (historical, may add
sop-prefix convention later)
Tag Taxonomy
Tags are for topic/domain classification only. They are NOT for type (use
note_type) or lifecycle (use status) or scope (use project FK).Transition State
Until the
note_type and status columns exist in the database, type and lifecycle tags remain in use for querying. The tag values below in the "Retiring" section match the note_type and status enum values above. Once the schema migration is complete and data is backfilled, these tags will be stripped from all notes.Tags to Keep (topic/domain)
| Tag | Domain |
|---|---|
| <code>terraform</code> | Terraform, IaC |
| <code>ci-cd</code> | Woodpecker CI, build processes |
| <code>monitoring</code> | Observability, metrics, Prometheus |
| <code>deployment</code> | Deploy pipelines, k8s manifests |
| <code>onboarding</code> | New service/project setup |
| <code>mermaid</code> | Note contains mermaid diagrams |
| <code>sre</code> | Site reliability, operations |
| <code>postgres</code> | PostgreSQL |
| <code>argocd</code> | ArgoCD, GitOps |
| <code>dora</code> | DORA metrics, engineering excellence |
| <code>workflow</code> | Multi-step procedure (topic modifier, often on SOPs) |
| <code>private</code> | Marks sensitive content (redundant with is_public, may retire later) |
| <code>agent</code> | AI agent behavior and design (topic, distinct from note_type agent) |
Note on
agent tag: This tag does double duty. For agent profile notes (agent-betty-sue), it's a type tag that will be replaced by note_type: agent. For notes about agent architecture (agent-workflow, agent-paradigm), it's a legitimate topic tag and should be kept.Tags Retiring (replaced by note_type)
These tags will be stripped once
note_type column exists and is backfilled. Tags matching active types (14 types): board, project-page, sop, convention, template, skill, agent, doc, review, architecture, validation, user-story, plan, phase. Tags matching removed types (deleted from enum, reclassify existing notes to doc or delete): issue, todo, reference, journal, incident, post, milestone, sprint.Former doc-subtypes that remain as topic tags (not note_types):
insight, lesson, inventory, research, assessment, guide, audit, roadmap. These describe content within a doc note, not a distinct note_type. Also retiring: bug (use Forgejo labels), repo-page (use project-page), personality (unused, delete).Tags Retiring (replaced by status)
These 9 tags will be stripped once
status column exists and is backfilled:active, completed, complete (duplicate, merge into completed), deferred, resolved, open, in-progress, done, draftTags Retiring (redundant with project FK)
These 4 tags are redundant with the existing project FK and can be stripped immediately:
pal-e-docs (5 notes), pal-e-platform (4 notes), pal-e-services (3 notes), claude-config (1 note)Tagging Rules (Transition Period)
- Until schema migration: every note MUST have at least one type tag and one lifecycle tag (matching the
note_typeandstatusvalues above) - After schema migration: tags are topic/domain only. Type and lifecycle come from columns.
- Scope tags are immediately redundant — stop using them on new notes. Use the project FK instead.
- Prefer existing topic tags over creating new ones. Check
list_tags()first. - Tag intersection is the current query pattern:
?tags=sop,activefinds all current SOPs. This will be replaced by?note_type=sop&status=activeafter migration.
Project Assignment
Every note MUST belong to a project. No orphans.
- Notes about a specific project belong to that project
- Cross-cutting SOPs and conventions belong to the project that owns the concept (usually
pal-e-docsorai-agency) - Agent profiles and skills belong to
ai-agency(Claude Config project) - Platform-wide architecture docs belong to their primary project
README Convention
Repos contain code + PRs only. All documentation, issues, and project context live in pal-e-docs.
Repo READMEs are one-line pointers to their pal-e-docs page note:
This convention will be implemented in
plan-2026-02-28-knowledge-system-consolidation Phase 6, after repo page notes exist and page_note_id is wired on repos.Linking
Two linking mechanisms serve different purposes:
| Mechanism | When to use | Example |
|---|---|---|
| <code>note_links</code> (API) | Formal relationships — shows in the Related Notes section of the browse frontend. | <code>update_note_links(slug, target_slugs="enforcement-architecture,hook-events-reference")</code> |
| Inline <code><code>slug</code></code> | Inline references in prose — readable by both humans and agents. Auto-linked in browse frontend. | <code>See <code>enforcement-architecture</code> for the full design.</code> |
Rules:
- If you reference a note by slug in prose, ALSO add it as a
note_link - Project pages should link to their active plan and all relevant SOPs
- Plans should link to their previous plan and any referenced notes
- Architecture notes should link to related SOPs and reference docs
Related
tagging-conventions— deprecated, superseded by this notehtml-style-guide— HTML authoring convention for note contentmermaid-authoring— mermaid diagram conventionplan-2026-02-28-knowledge-system-consolidation— the plan implementing schema changes for note_type/statusplan-2026-02-28-schema-api-mcp— the promoted schema plan (absorbed into decomposition plan)plan-2026-03-01-note-decomposition— the active plan. Implements note decomposition; will add phase to note_type enum.