Skip to content

RFC: TDE document type has no activation trigger — formalize when to file TDE vs in-charter R<N> (emerged from Sentinel CHARTER-13 retrospective) #128

@montfort

Description

@montfort

Context

StrayMark defines the TDE (Technical Debt) document type with:

  • Template at .straymark/templates/TEMPLATE-TDE.md
  • Destination .straymark/06-evolution/technical-debt/
  • Agent autonomy: Identify (agent creates; human prioritizes/assigns)
  • Frontmatter with type, impact, effort, priority: null, assigned_to: null

This is the right shape for transversal technical debt that needs human prioritization. But in Sentinel (primary adopter, fw v4.12.0), the TDE type has never been activated — zero TDEs in .straymark/06-evolution/technical-debt/ after 13 closed Charters covering two specs.

This RFC argues the cause is missing activation trigger in the framework guidance, and proposes how to fix it.

Empirical observation

Across CHARTER-01 → CHARTER-13 (Sentinel), at least 7 instances of cross-charter technical debt were identified but routed via parallel mechanisms instead of TDE:

Mechanism Used where Coverage
R<N> (new, not in Charter) in AILOG §Risk Charter-scoped, emergent risks (CHARTER-07 R6-R11, CHARTER-08 R6-R9, CHARTER-13 R6-R8) Ágil, lives where decisions are made; no priority, no assigned_to, scoped to one Charter
.straymark/follow-ups-backlog.md + scripts/check-followups-drift.sh (RFC #111 — closed) Cross-charter pending items extracted from §Follow-ups + R<N>(new) blocks Solves the aggregation gap but not the formalization gap (freeform text, not typed governance documents, no impact/effort matrix)
Inline legends in tasks.md → CHARTER-14 / → T103 polish per-task arrows Trace-only; no governance metadata

None of these produces a TDE document, so:

  • No queryable "all open technical debts" view at the document level.
  • No impact × effort prioritization matrix per item.
  • No assigned_to / priority fields surfaced to the human reviewer.
  • Architectural debt that legitimately spans multiple charters (e.g., scope authorization gap heritage across modules) gets fragmented into per-charter R-numbers instead of consolidated into a single TDE.

Concrete examples from CHARTER-13 (just closed)

Three findings from the CHARTER-13 audit cycle (gemini-2-5-pro + gpt-5.3-codex cross-family pair) that should have been TDEs but were filed as R-numbers + follow-ups:

  1. R7 — RequireScope architectural gap (heritage from CHARTER-08).
    middleware/scopes.go RequireScope is a helper handlers must call explicitly; neither US1 (CHARTER-08) nor US2a (CHARTER-13) handlers call it. Heading-level comments claim "gated by scope" but enforcement is 0% at HTTP layer; only RLS provides tenant isolation, NOT scope authorization. Type: architecture. Impact: high. Effort: medium (~2h dedicated charter touching US1 + US2a in one PR). Risk if unresolved: medium-high. This is exactly the TDE shape — transversal, requires dedicated charter, requires human prioritization. It was routed as "follow-up to a dedicated auth-hardening charter" in AILOG-041 §Risk R7.

  2. HTTP layer test coverage gap (calibrator-discovered, missed by both auditors). Integration tests T040/T041/FR-005 sub-tests call env.svc directly, not through HTTP handlers. The 7 huma operations registered are not exercised end-to-end with real middleware. Type: testing. Impact: medium. Effort: medium (~1-2h httptest scaffolding + sub-tests). Cross-module testing debt — applies to US1 + US2a today and will apply to every future US.

  3. Legacy AILOGs with risk_level: high + review_required: false (CHARTER-04 explicitly deferred 8 sensitive docs to "human review case-by-case"; 2 of those just surfaced via PR fix(cli): code-block bg fragments on narrow panels (cli-3.4.1) #58 CI gate during a rebrand). Type: documentation/governance. Impact: medium. Effort: medium (real security audit per doc). Documentation debt that has lived in the repo since April 2026 without a queryable surface.

Why the trigger didn't fire

Reading the adopter-facing docs (AGENT-RULES.md, DOCUMENTATION-POLICY.md, QUICK-REFERENCE.md, CLAUDE.md autonomous rules), there is no clear trigger that says "create a TDE now". The trigger language exists for AILOG (creation freely), AIDEC (when alternatives considered), ETH (high risk PII), ADR (architectural decisions), but TDE is just listed as "agent can Identify".

When an agent (or human) encounters technical debt during Charter execution, the path of least resistance is:

  1. Add an R<N> (new, not in Charter) in the AILOG §Risk (already part of the Charter flow)
  2. Or add a §Follow-ups entry (auto-extracted to .straymark/follow-ups-backlog.md)

Both are lighter-weight than opening a new TDE document. So TDE never fires.

Proposed resolution

1. Document the heuristic explicitly in AGENT-RULES.md / DOCUMENTATION-POLICY.md

Add a "When to file TDE vs R" decision table. Suggested wording:

R in AILOG §Risk: emergent risk scoped to the Charter currently in execution or the next Charter. Resolvable as a documented deferral, a small atomic fix, or a forward-pointer to a charter that already exists. Low-medium impact.

TDE: technical debt transversal to multiple Charters or modules, requires dedicated effort outside the current Charter's scope envelope, medium-high impact, OR requires human prioritization/assignment that the agent cannot decide alone (e.g., "Which team owns this?"). Architectural gaps, cross-module testing gaps, legacy documentation debt all fit here.

Concrete trigger phrases that should result in a TDE rather than an R:

  • "…heritage from CHARTER-XX" (the debt predates the current Charter)
  • "…routed to a dedicated charter" (resolution requires a new Charter, not the next one in flow)
  • "…applies to multiple modules" (transversal)
  • "…requires human prioritization" (impact/effort matrix needs human judgment)

2. Cross-link TDE from follow-ups-backlog.md

The follow-ups-backlog.md workflow (RFC #111) is designed for the aggregation layer. TDE is designed for the formalization layer. They should co-exist:

  • A follow-up entry under bucket charter-triggered can be promoted to a TDE when the agent (or human reviewing the backlog) determines it meets the transversal threshold.
  • The TDE frontmatter could carry a promoted_from_followup: FU-NNN field for traceability.
  • The drift script (scripts/check-followups-drift.sh) could optionally suggest TDE promotion candidates by flagging entries that have lived in the backlog through ≥2 Charters without resolution.

3. Add TDE creation to straymark-new / straymark-status skill prompts

Currently the skills surface AILOG, AIDEC, ETH, ADR, etc. but not TDE explicitly. Adding TDE to the skill prompt's "consider creating" list (with the trigger heuristic above) would surface the option to agents during Charter execution.

4. Optional: straymark debt list CLI

If the adopter usage justifies it, a straymark debt list/status/close CLI trio (mirroring straymark followups list/close/drift from RFC #111) would let adopters query open TDEs by impact × effort matrix without grepping .straymark/06-evolution/technical-debt/.

Adoption plan (post-acceptance)

Sentinel will create the 3 TDEs identified above in a follow-up PR after framework guidance lands. We're happy to be the empirical validation testbed for the trigger heuristic — same role Sentinel played for the audit-skills v1 cycle (issue #102) and the follow-ups backlog (issue #111).

Acknowledgements

Surfaced during Sentinel CHARTER-13 close ceremony retrospective (operator question: "hay un documento técnico especializado de StrayMark para reportar deuda técnica? por qué no lo hemos usado?"). The honest answer was: "yes, but the trigger never fired." This RFC is the fix.


🤖 Issue body co-authored with Claude Code (Sentinel adopter agent).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions