Skip to content

feat(framework): fw-4.13.0 — TDE activation trigger (closes #128)#129

Merged
montfort merged 2 commits into
mainfrom
feat/tde-activation-trigger
May 11, 2026
Merged

feat(framework): fw-4.13.0 — TDE activation trigger (closes #128)#129
montfort merged 2 commits into
mainfrom
feat/tde-activation-trigger

Conversation

@montfort
Copy link
Copy Markdown
Contributor

Summary

Closes #128. Adds the operational activation trigger that TDE was missing in fw-4.12.0, plus the R<N> (new, not in Charter) vs TDE disambiguation, plus a promotion path from follow-ups-backlog.md to TDE. Governance-docs-only — no CLI changes (the straymark debt list/status/close subcommand trio is deferred to v1, same gate as the follow-ups CLI per FOLLOW-UPS-BACKLOG-PATTERN.md).

Empirical motivation from the issue: Sentinel adopter (primary, fw-4.12.0) created zero TDEs across 13 closed Charters despite ≥7 instances of transversal debt routed through parallel mechanisms (R<N> (new, not in Charter) in AILOG §Risk, or follow-ups in follow-ups-backlog.md). Diagnosis: the framework documented TDE's shape (template, folder, autonomy boundary) but never the trigger. This PR adds the trigger.

What's in

Governance (EN + ES + zh-CN — full tri-lingual coverage)

  • AGENT-RULES.md §2 "When to Document" — new TDE trigger row
  • AGENT-RULES.md §3 — new "TDE vs `R` (new, not in Charter)" section with the four canonical criteria: heritage from a prior Charter, applies to multiple modules/Charters, requires a dedicated Charter outside the current scope envelope, requires human prioritization/assignment
  • QUICK-REFERENCE.md "When to Document" — TDE row surfacing the trigger
  • STRAYMARK.md §6 — TDE row in the every-session governance entry
  • FOLLOW-UPS-BACKLOG-PATTERN.md — new `promoted` status, new `TDE-YYYY-MM-DD-NNN` destination, new `Promoted to:` entry field, full "Promotion to TDE" section with the four promotion criteria + operator-driven workflow (periodic review / Charter close / pre-Charter declaration)

Templates + skills

  • TEMPLATE-TDE.md (EN + ES + zh-CN) — `promoted_from_followup: FU-NNN | null` frontmatter field, inline activation-triggers note pointing to AGENT-RULES.md §3
  • `/straymark-new` (3 surfaces — `.claude/`, `.gemini/`, `.agent/`) — TDE suggestion split into code-smell trigger (`TODO`/`FIXME`/`HACK`) and architectural trigger (transversal debt)

Fixed — stale paths

While verifying the TDE flow, the `/straymark-status` skill turned out to have five doc types with stale paths that diverged from the canonical layout in AGENT-RULES.md §5 and STRAYMARK.md §10. The TDE bug was load-bearing for #128 — even if someone created a TDE, status would never find it. The other four (ADR, REQ, TES, INC) are pre-existing drift fixed in the same pass since they share the cause:

Type Was Now
ADR `.straymark/04-architecture/decisions/` `.straymark/02-design/decisions/`
REQ `.straymark/03-requirements/` `.straymark/01-requirements/`
TES `.straymark/05-testing/` `.straymark/04-testing/`
INC `.straymark/06-operations/incidents/` `.straymark/05-operations/incidents/`
TDE `.straymark/06-operations/tech-debt/` `.straymark/06-evolution/technical-debt/`

Applied to all three skill surfaces (`.claude/`, `.gemini/`, `.agent/`) and to `/straymark-adr` in CLI-REFERENCE.md (EN + ES + zh-CN).

Version bump

`fw-4.12.0` → `fw-4.13.0` in `dist-manifest.yml`, 14 governance-doc footers (8 docs × ~3 langs), and 7 versioning-table/example-output locations in README + CLI-REFERENCE + ADOPTION-GUIDE (3 langs).

What's deliberately out

  • `straymark debt list/status/close` CLI: deferred to v1, mirroring the follow-ups CLI gate per `FOLLOW-UPS-BACKLOG-PATTERN.md:179` (wait for a second adopter to validate the trigger heuristic empirically).
  • `check-followups-drift.sh` enhancement to flag TDE promotion candidates: adopter-side first, framework after empirical validation.
  • Backfill of TDEs in adopters: Sentinel will create the three TDEs surfaced in CHARTER-13 close ceremony retrospective (RequireScope architectural gap, HTTP layer test coverage, legacy AILOGs with `review_required: false`) as empirical validation, in a separate follow-up PR.

Pre-existing issue surfaced (not in scope here)

Validator rejects `status: identified` on TDE with `META-003`, even though `identified` is the canonical default per `DOCUMENTATION-POLICY.md §6`. Verified this exact error reproduces against `main` without these changes — so it's pre-existing and out of scope. Should be opened as a separate issue.

Test plan

  • `cargo test` — ~170 tests passing, no regressions
  • `cargo build --release` — ok
  • `straymark new --doc-type tde` writes to `.straymark/06-evolution/technical-debt/` (canonical) — verified in a temp project
  • Generated TDE frontmatter includes `promoted_from_followup: null` — verified
  • Generated TDE body shows the four activation triggers + pointer to `AGENT-RULES.md §3` — verified
  • `straymark status` counts the new TDE — verified
  • `git grep "06-operations/tech-debt"` returns 0 hits outside CHANGELOG (intentional record of the fix) — verified
  • `git grep "StrayMark v4.12.0"` returns 0 hits in footers — verified
  • Sentinel adopter validates the trigger heuristic by creating the 3 CHARTER-13 TDEs (gate before tagging fw-4.13.0 stable)

🤖 Generated with Claude Code

montfort and others added 2 commits May 10, 2026 12:57
…sals + private notes

The `Propuesta/` directory mixed canonical docs, implemented proposals,
internal notes and competitive analysis. This commit splits them along
purpose lines, so a contributor opening the repo finds public docs
immediately and isn't exposed to material that should not be public.

Public, atemporal — moved to `docs/contributors/` with full i18n:
- `DESIGN-PRINCIPLES.md` (12 hierarchical principles, with v0.2 empirical
  annotations from Sentinel validation cycles) — EN translated, ES
  preserved as the original, zh-CN translated.
- `WHAT-IS-A-CHARTER.md` (conceptual scope of the Charter artifact and
  its boundary with GitHub SpecKit's `plan.md`) — same i18n treatment.
- New `docs/contributors/README.md` (×3 langs) is a categorized index
  with a one-line summary per document.

Public, archival — moved to `docs/decisions/proposals/` with date prefix
(no translation, these are historical artifacts):
- `2026-04-30-thesis-validation.md`
- `2026-04-30-charter-telemetry.md`
- `2026-05-03-cli-roadmap.md` (Phases 1-3 shipped in cli-3.x)
- `2026-05-03-audit-skills-design.md` (implemented in fw-4.8.0)
- `2026-05-03-audit-skills-rollout.md`
- `2026-05-04-audit-cli-flow.md` (implemented in cli-3.10+)

Moved out of the repo (to ~/Documents/StrangeDaysTech/internal-notes/),
not gitignored — internal-only material should not be in the public
working tree at all (leak-by-mistake risk):
- straymark-studio-vision.md (speculative product vision)
- straymark-mapa-cognitivo.md (internal brainstorm + qualitative diagnosis)
- straymark-telemetria-etapa2-sentinel.md (operational deliverable to
  one specific adopter)
- sentinel-skill-prompt-audit.md, sentinel-skill-prompt-audit-review.md
  (Sentinel's pre-StrayMark methodology)
- straymark-cloud-proposal.md (competitive analysis, monetization
  hypotheses — explicitly sensitive)

Also fixes the broken link in all three READMEs line 90 — pointed at
`Propuesta/straymark-design-principles.md` which was untracked, hence 404
on GitHub. Now points at `docs/contributors/DESIGN-PRINCIPLES.md` and
its localized siblings.

Finalizes the dangling deletes of the legacy `Propuesta/devtrail-*`
files left over from the rebrand. `Propuesta/` directory is now removed.
Adds the operational trigger and TDE vs R<N> disambiguation that were
missing in fw-4.12.0. Empirically motivated: Sentinel adopter created
zero TDEs across 13 closed Charters despite ≥7 instances of transversal
debt routed through parallel mechanisms.

Governance (EN + ES + zh-CN):
- AGENT-RULES.md §2 — new TDE trigger row; §3 — "TDE vs R<N>" with the
  four canonical criteria (heritage from prior Charter, multi-module
  scope, requires dedicated Charter, requires human prioritization)
- QUICK-REFERENCE.md and STRAYMARK.md §6 — surface the trigger
- FOLLOW-UPS-BACKLOG-PATTERN.md — new status `promoted`, new
  destination `TDE-YYYY-MM-DD-NNN`, new `Promoted to:` field, full
  "Promotion to TDE" section with criteria + workflow

Templates + skills:
- TEMPLATE-TDE.md (EN + ES + zh-CN) — `promoted_from_followup: null`
  frontmatter, inline activation-triggers note
- /straymark-new (3 surfaces) — split the TDE suggestion into
  code-smell trigger (TODO/FIXME/HACK) and architectural trigger

Fixed — stale paths in /straymark-status (3 surfaces) and CLI-REFERENCE
(3 langs). The TDE path bug (`06-operations/tech-debt/` →
`06-evolution/technical-debt/`) was surfaced verifying #128: status
would never have found TDEs that `new` was writing. Four sibling bugs
(ADR/REQ/TES/INC) fixed in the same pass since they share the cause.

Version bump fw-4.12.0 → fw-4.13.0 across manifest, footers (8
governance docs × 3 langs), README/CLI-REFERENCE/ADOPTION-GUIDE
versioning tables (3 langs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@montfort montfort merged commit 2ae3802 into main May 11, 2026
1 check passed
montfort added a commit that referenced this pull request May 11, 2026
 #130) (#131)

Latent bug exposed by #129's TDE activation trigger: `straymark new
--doc-type tde` shipped documents with the canonical `status: identified`
(per TEMPLATE-TDE.md and DOCUMENTATION-POLICY.md §6), but `straymark
validate` rejected them with META-003. The validator's hardcoded
VALID_STATUSES was missing the only non-`draft`/non-`accepted` default
in the type matrix.

Fixed (CLI):
- validation.rs:45 — VALID_STATUSES now includes `identified` alongside
  draft/review/accepted/superseded/deprecated. Flat enum still applies
  to all 12+ doc types; per-type validation sets deferred to v1 against
  the same second-adopter gate as the follow-ups CLI.
- cli/tests/validate_test.rs — new regression test
  `test_validate_tde_document_valid()` exercises `status: identified`.
  TDD red→green verified: test fails on unpatched validator, passes
  after the fix.

Changed (Framework, no separate version bump — ships with fw-4.13.0):
- DOCUMENTATION-POLICY.md §3 "Document Statuses" (EN + ES + zh-CN):
  lifecycle diagram extended to show `identified` as a TDE-only entry
  state. Reconciles §3 prose with the §6 per-type defaults table that
  already declared TDE → `identified`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
montfort added a commit that referenced this pull request May 11, 2026
 #130) (#131) (#133)

Latent bug exposed by #129's TDE activation trigger: `straymark new
--doc-type tde` shipped documents with the canonical `status: identified`
(per TEMPLATE-TDE.md and DOCUMENTATION-POLICY.md §6), but `straymark
validate` rejected them with META-003. The validator's hardcoded
VALID_STATUSES was missing the only non-`draft`/non-`accepted` default
in the type matrix.

Fixed (CLI):
- validation.rs:45 — VALID_STATUSES now includes `identified` alongside
  draft/review/accepted/superseded/deprecated. Flat enum still applies
  to all 12+ doc types; per-type validation sets deferred to v1 against
  the same second-adopter gate as the follow-ups CLI.
- cli/tests/validate_test.rs — new regression test
  `test_validate_tde_document_valid()` exercises `status: identified`.
  TDD red→green verified: test fails on unpatched validator, passes
  after the fix.

Changed (Framework, no separate version bump — ships with fw-4.13.0):
- DOCUMENTATION-POLICY.md §3 "Document Statuses" (EN + ES + zh-CN):
  lifecycle diagram extended to show `identified` as a TDE-only entry
  state. Reconciles §3 prose with the §6 per-type defaults table that
  already declared TDE → `identified`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
montfort added a commit that referenced this pull request May 12, 2026
Records the rule "never commit directly to main" (mirroring
dist/STRAYMARK.md §5 for adopters), branch/commit conventions, the
project's squash-merge default, and the stacked-PR incident from
#129/#131/#133 (2026-05-11) — including prevention strategies and a
cherry-pick recovery recipe.

Also documents when --admin merge is acceptable (procedural sync PRs
where content was already reviewed elsewhere) and the tag-time
version-match check that release-{cli,framework}.yml enforce.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant