WikifitaGitHub live67e8de5
diretiva · diretivas/editorial-workflow

Editorial Workflow — Wikifita

Mandatory editorial front for all wikifita content operations. Phases, rules, failure modes, content taxonomy, quality gates. Approved 2026-07-20.

Baixar raw

Editorial Workflow — Wikifita

Mandatory editorial front for all wikifita content operations. Derived from empirical analysis of 70+ pages across 9 major operations. Every rule here was validated through practice — failures are documented, fixes are permanent.


Authority

This directive sits under the wikifita authority contract:

  1. Alefita's current instruction
  2. Higher environment policies
  3. CLAUDE.md / AGENTS.md
  4. This directive + other directives
  5. Verified project memory
  6. Global profile and feedback

When this directive conflicts with agent defaults, this directive wins.


Content Taxonomy

Every page belongs to one type. Type determines density, structure, and cross-reference patterns.

TypeExamplesOKF typeDensityStructure
Technical Referencepacket-protocol, native-modulesreferenceHigh — tables dominate, code samples, every line carries informationAPI-level detail, method signatures, data formats
Architecturearchitecture, skia-renderingreferenceHigh — diagrams + proseSystem design, component topology, data flow
Post-Mortemcode-quality, debugging-storiesanalysisMedium-high — metrics + narrativeWhat went wrong, what was learned, quantitative
Narrativedevelopment-timeline, store-review-saganarrativeMedium — flowing prose with structureChronological, human, pressure-driven
Peoplecamdom-people, mikael-partnerprofileLow-medium — contextual, relationalRelationships, trust, personality, dynamics
Forensicclickfix-attack-chain, clickfix-bddranalysisHigh — evidence-based, structured IOCsMITRE mapping, detection rules, indicators
Infrastructurefitalabs-infra, litellm-gatewayreferenceHigh — config, stack, deploymentArchitecture, env vars, containers
Profile/Careercamdom-career-profile, user_alefitaprofileLow-medium — identity, positioningSkills, experience, market position

Rule: Do not force uniform density across types. A profile page should not read like an API reference. A forensic page should not read like a narrative.


Phase 0: Pre-Conditions

Before any editorial work begins.

CheckHowBlock?
Branch awarenessgit branch --show-currentYES — confirm correct branch (main for public, personal for sensitive)
Source material identifiedUser specifies the authorized source and scopeYES — agents may discover and maintain material within that scope, with provenance
Canonical project identityVerify the user-designated path with pwd, repository root, branch, remotes, and inventoryYES — do not edit a different checkout
Scope boundedUser says "integrate X" or "document Y"SOFT — agent proposes, user confirms
pessoas/index.md consultedRead before creating any person pageYES — prevents identity confusion (Mikael/Maso failure)
Existing wiki scannedCheck index.md for overlap/dedupYES — prevents duplicate pages

Phase 1: Source Analysis

Inventory → Conceptual Atoms → Page Design

StepActionOutput
1.1Read source material completelyMental model of the domain
1.2Identify conceptual atoms (discrete topics)List of page candidates
1.3Classify each atom by typeType assignment per page
1.4Map cross-references between atomsLink graph
1.5Identify hub page (domain overview)Hub designation
1.6Check existing wiki for overlapConflict resolution plan

The Monolithic Page Rule

Never create a monolithic page. If the source has 5+ distinct topics, it must become 5+ pages. The threshold test: if you can remove one topic without affecting the others, it's a separate page.

The fundamental unit is: one concept, one page, dense with cross-references. Not summaries. Not catch-all documents. Each page is a node in a knowledge graph.


Phase 2: Generation

Parallel vs Sequential

DecisionCriteriaApproach
Sequential< 5 pages, simple topicsOne agent, one page at a time
Parallel> 5 pages, independent topicsSubagents, one per page or cluster
HybridSome pages depend on othersCreate dependencies first, then parallel

Per-Page Checklist

  • OKF frontmatter: type, title, description (English), tags, timestamp
  • Content density appropriate to type (see Content Taxonomy)
  • Cross-references to related pages using double-bracket bare filename format (NEVER path-based)
  • Mermaid diagrams for topology, sequences, state machines
  • Source attribution where relevant
  • No secrets, no PII, no credentials
  • snake_case filenames, no dates in names (unless contract-specific)

Phase 3: Integration

Weaving pages into the knowledge graph.

StepActionFile
3.1Update domain index or create section in root indexindex.md
3.2Add tags to tag index tableindex.md
3.3Cross-link with existing content in other domainsExisting + new pages
3.4Log entry with semantic formatlog.md
3.5Update master memory index if applicablememorias/MEMORY.md
3.6Update people catalog if people were addedpessoas/index.md

Log Entry Format

## [YYYY-MM-DD] <type> | <Title>

<One-line summary>

### Pages Created
- `page-name` — description

### Sources
- Source description

### Metrics
- Lines, page count, coverage

Type values: feat, fix, refactor, ingest, update, create


Phase 4: Quality Gate

Audit → Fix → Audit → Commit

StepActionOutcome
4.1uv run scripts/wikifita_audit.pyFirst audit — expect some issues
4.2Fix any issuesCorrections applied
4.3Run audit again (no --fix)Confirm PASS
4.4git add -A && git commitPre-commit hook runs blocking audit
4.5Confirm post-commit hook passedFinal verification

Rule: Never commit until the audit passes twice (once with --fix, once without). The pre-commit hook is the final gate.


Phase 5: Presentation (Optional)

When artifacts (HTML, documents) are needed.

  • Visual identity from diretivas/identidade-visual.md (Anthropic dark mode)
  • Use mcp__cowork__create_artifact for persistent artifacts
  • Use mcp__cowork__present_files for one-off files
  • Artifacts are derived from wiki content — wiki is source of truth
  • Never maintain content in artifacts that should live in wiki pages
  • Location: session outputs directory by default, project folder only if user requests

Artifact Visual Identity

When creating HTML artifacts, apply the Anthropic dark mode system:

  • Palette: bg #171717, surface #232329, warm #d4a574, green #66bfa2, red #e8706a
  • Typography: Source Serif 4 (headings), Inter (body), JetBrains Mono (code)
  • Tables: uppercase headers, letter-spacing 0.4px, --text3 color, row hover rgba(212,165,116,.04)
  • Callouts: border-left: 3px solid var(--warm), background rgba(212,165,116,.06)
  • Metadata header: Project, Author, Engine, Version, Date, Status
  • Footer: Project name + version + date
  • Never: neon gradients, AI slop, decorative animations, glowing borders

Editorial Rules (Validated)

These rules proved themselves through practice across 70+ pages.

#RuleOriginStatus
1One concept per page. If you can remove a topic without affecting the rest, it's a separate page.monolithic page rejectionVALIDATED
2Dense with cross-references. Every page links to related pages. The wiki is a graph, not a list.camdom section patternVALIDATED
3OKF frontmatter on every page. type, title, description (EN), tags, timestamp. No exceptions.audit enforcementVALIDATED
4Authorized-scope, provenance-bound maintenance. Agents may create or update content inside the scope Alefita authorized; they must not invent facts, fill gaps, or cross into another project or checkout.autonomous-maintenance correctionVALIDATED
5Consult pessoas/index.md before creating person pages. Prevents identity confusion.Mikael/Maso failureVALIDATED
6English for technical, Portuguese for personal. Clear, no ambiguity.translation sessionVALIDATED
7Audit twice before committing. Once with --fix, once without.orphaned file experienceVALIDATED
8Check branch before writing. Subagents don't inherit branch state.branch contaminationVALIDATED
9Bare filename wikilink format only. Path-based wikilinks break the auditor.broken linksVALIDATED
10Each content type gets its own density. Don't force uniformity across types.density gradient analysisPROPOSED
11Hub page per domain. Every major section has a clear overview page that links outward.topology analysisPROPOSED
12Wiki is source of truth. Artifacts are derived. Never maintain content in artifacts that should live in pages.skill overlap analysisPROPOSED
13Artifacts do not communicate with their author. Public prose addresses its intended reader; status, questions, review requests and operational warnings stay in the active conversation.fourth-wall artifact auditVALIDATED
14Corrections produce final prose, not public errata. Replace every affected claim and remove the invalid narrative unless claim evolution is the explicit research object.ClickFix prediction-score refactorVALIDATED
15Prefer structured sentences to Unicode dashes. Use paragraphs and punctuation that preserve the actual semantic relationship.final forensic editorial reviewVALIDATED
16Significant authorized changes end in a validated semantic commit. Report completion only after the commit exists; pushing remains separately authorized.cross-turn Git-flow correctionVALIDATED

Failure Mode Taxonomy

Failure ModeExampleDefense
Monolithic pagecamdom-development-context.mdRule #1 + human review of page plan
Identity confusionMikael/Maso mix-upRule #5 + pessoas/index.md consultation
Branch contaminationFiles on personal instead of mainRule #8 + branch validation pre-step
Link format mismatchPath-based wikilinksRule #9 + audit warning
Orphaned filesmikael-camdom.md (replaced but not deleted)Audit orphan detection + cleanup step
Out-of-scope or unsupported maintenanceAgent creates or updates content outside the authorized scope, from the wrong checkout, or without inspectable provenanceAuthority/scope check + live path verification + Rule #4
Secret leakageCredentials in wiki pagePhase 4 quality gate + manual review
Index driftPages exist but index doesn't list themAudit index coverage check
Frontmatter inconsistencyDescription in PortugueseAudit validation + translation pass
Density mismatchProfile with API-level detailRule #10 + type-based guidance
Fourth-wall artifact textREADME asks its author to review, decide, revise or publish somethingRule #13 + explicit artifact-audience audit
Public correction theaterFinal report explains an earlier wrong score instead of replacing itRule #14 + repository-wide claim refactor
Untracked completion stateAgent reports a finished change without a semantic commitRule #16 + pre-handoff Git verification

Wikilink Convention

All internal links use the bare filename format wrapped in double brackets, where the name matches the filename without extension.

Valid: double brackets around the bare filename, no paths, no directories.

Invalid: double brackets with path prefixes like camdom/, wikifita/diretivas/, or pessoas/conexoes/.


Open Questions (Future Iteration)

Design decisions pending Alefita's input:

  1. Should every page have a mandatory source attribution section?
  2. Should domain indexes be separate files (camdom/index.md) or sections in root index.md?
  3. Should stale content detection (timestamp-based) be added to the audit script?
  4. Should personal branch content follow the same OKF standard or relaxed?
  5. Should there be a "maximum pages per domain" heuristic before suggesting a split?

This directive is alive. It evolves as the editorial practice evolves. Challenge it. Improve it. That is the protocol.