Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,55 @@ and this project uses [independent versioning](README.md#versioning) for Framewo

---

## CLI 3.12.1 — Validator accepts TDE `identified` status

Closes [#130](https://github.com/StrangeDaysTech/straymark/issues/130). Latent in `cli-3.12.0` and earlier; fully exposed by the `fw-4.13.0` TDE activation trigger (which makes TDE creation likely). Surfaced empirically while verifying #128: a freshly-created TDE via `straymark new --doc-type tde` shipped with the canonical `status: identified` per `TEMPLATE-TDE.md` + `DOCUMENTATION-POLICY.md §6`, but `straymark validate` immediately rejected it with `META-003 Invalid status 'identified'`. Validator's hardcoded enumeration 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`. No per-doc-type dispatch yet — flat list still applies to all 12+ document types, but every documented default now lives in the list. A per-type validation set is deferred to v1 against a second-adopter validation gate (same gate as the follow-ups CLI per `FOLLOW-UPS-BACKLOG-PATTERN.md`).
- **`cli/tests/validate_test.rs`** — new regression test `test_validate_tde_document_valid()` exercises the canonical `status: identified` flow. The test fails against unpatched validators (proven during TDD) and would have caught the bug at `fw-4.13.0` ship time.

### Changed (Framework)

- **`DOCUMENTATION-POLICY.md §3 "Document Statuses"`** (EN + ES + zh-CN) — lifecycle diagram and table extended to document `identified` as the TDE-only entry state. Functionally equivalent to `draft` for lifecycle gating, semantically distinct so adopter analytics can distinguish "agent-discovered debt" from "human-drafted document". Reconciles §3 prose with the §6 per-type default table that already declared TDE → `identified`. Ships as part of `fw-4.13.0` — no separate framework bump.

### Adopter guidance

- Adopters on `cli-3.12.0` or earlier with one or more TDE documents in `06-evolution/technical-debt/` will see `straymark validate` start passing once they upgrade via `straymark update-cli`. No document edits required; the canonical `status: identified` is now accepted.
- Operators who manually changed TDE documents to `status: draft` to work around the bug may revert to `status: identified` for semantic clarity, but the workaround keeps working too.

---

## Framework 4.13.0 — TDE activation trigger

Closes [#128](https://github.com/StrangeDaysTech/straymark/issues/128). The TDE (Technical Debt) document type had structural shape — template, destination folder, autonomy boundary — but no operational activation trigger in the agent-facing governance. Empirical signal from the Sentinel adopter (primary, fw-4.12.0): zero TDEs created across 13 closed Charters despite ≥7 instances of transversal debt being routed through parallel mechanisms (`R<N> (new, not in Charter)` in AILOG `§Risk`, or follow-ups in `follow-ups-backlog.md`). This release adds the trigger and the `R<N>` vs TDE disambiguation, plus a promotion path from the follow-ups backlog. 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`).

### Added (Framework)

- **TDE activation trigger** in `AGENT-RULES.md §2 "When to Document"` (EN + ES + zh-CN). New row routes transversal technical debt to TDE creation.
- **TDE vs `R<N> (new, not in Charter)` disambiguation** in `AGENT-RULES.md §3` (EN + ES + zh-CN). Four canonical triggers for TDE: *heritage from prior Charter*, *applies to multiple modules/Charters*, *requires dedicated Charter outside current scope envelope*, *requires human prioritization/assignment*. If none apply, the debt is an `R<N>` row in the current Charter's AILOG; if any apply, file a TDE.
- **TDE row in "When to Document"** quick tables: `QUICK-REFERENCE.md` (EN + ES + zh-CN) and `STRAYMARK.md §6`. Surfaces the trigger at the every-session entry points.
- **Promotion path FU → TDE** in `FOLLOW-UPS-BACKLOG-PATTERN.md` (EN + ES + zh-CN). New status `promoted`, new `Destination: TDE-YYYY-MM-DD-NNN` value, new `Promoted to:` entry field, plus a "Promotion to TDE" section with criteria (mirroring the `AGENT-RULES.md §3` heuristics) and the operator-driven workflow. Post-Charter close checklist now includes "promote un-resolved transversal entries to TDE."
- **`promoted_from_followup: FU-NNN` frontmatter field** in `TEMPLATE-TDE.md` (EN + ES + zh-CN). Optional, populated when the TDE originates from a backlog entry, preserves traceability.
- **Activation-trigger note** in the TDE template body (EN + ES + zh-CN) so the agent reading the template at creation time sees the four canonical triggers + pointer to `AGENT-RULES.md §3`.

### Changed (Framework)

- **`/straymark-new` skill** (3 surfaces — `.claude/skills/`, `.gemini/skills/`, `.agent/workflows/`): the TDE suggestion row split into two — `TODO`/`FIXME`/`HACK` comments remain as a code-smell trigger, and a new row covers the architectural trigger (heritage, transversal, dedicated Charter, human prioritization) pointing to `AGENT-RULES.md §3`.

### Fixed (Framework)

- **`/straymark-status` skill paths** (3 surfaces — `.claude/skills/`, `.gemini/skills/`, `.agent/workflows/`). Five doc types had stale directory paths that diverged from the canonical layout in `AGENT-RULES.md §5` and `STRAYMARK.md §10`: ADR (`04-architecture/decisions/` → `02-design/decisions/`), REQ (`03-requirements/` → `01-requirements/`), TES (`05-testing/` → `04-testing/`), INC (`06-operations/incidents/` → `05-operations/incidents/`), TDE (`06-operations/tech-debt/` → `06-evolution/technical-debt/`). The TDE bug was surfaced while verifying #128: `/straymark-new` would have written a TDE to the correct path, but `/straymark-status` would never have found it. The other four are pre-existing drift fixed in the same pass.
- **`/straymark-adr` shortcut path in CLI-REFERENCE.md** (EN + ES + zh-CN). Same `04-architecture/decisions/` → `02-design/decisions/` correction.

### Adopter guidance

- Sentinel will create the 3 TDEs surfaced during CHARTER-13 close ceremony retrospective (R7 RequireScope architectural gap, HTTP layer test coverage gap, legacy AILOGs with `review_required: false`) as empirical validation of the trigger heuristic in a follow-up PR.
- Existing projects on `fw-4.12.0` get the new framework files via `straymark update-framework`. The trigger guidance is documentation-only — no migration is required.

---

## Framework 4.12.0 / CLI 3.12.0 — Charter discoverability + path alignment

Closes the two Charter-related gaps surfaced by real adopters in the issue tracker: **Charter were structurally invisible to the CLI** ([#119](https://github.com/StrangeDaysTech/straymark/issues/119) — `straymark charter list/audit/close` hardcoded `docs/charters/` while the framework already validated `.straymark/charters/`) and **Charter were conceptually invisible to onboarding agents** ([#113](https://github.com/StrangeDaysTech/straymark/issues/113) — agents following the canonical entry points could not discover Charter as a workflow concept).
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ StrayMark's product decisions are anchored in twelve explicit principles. They a
11. **The community takes care of the tool, not the other way around.** Contributions and feedback are taken seriously without becoming a democracy.
12. **The product's velocity is the velocity of learning.** No premature crystallization; schemas marked `v0` until validated against a second domain.

The full document, with empirical annotations from validation cycles, lives in [`Propuesta/straymark-design-principles.md`](https://github.com/StrangeDaysTech/straymark/blob/main/Propuesta/straymark-design-principles.md).
The full document, with empirical annotations from validation cycles, lives in [`docs/contributors/DESIGN-PRINCIPLES.md`](https://github.com/StrangeDaysTech/straymark/blob/main/docs/contributors/DESIGN-PRINCIPLES.md).

---

Expand Down Expand Up @@ -274,8 +274,8 @@ StrayMark uses independent version tags for each component:

| Component | Tag prefix | Example | Includes |
|-----------|-----------|---------|----------|
| Framework | `fw-` | `fw-4.12.0` | Templates (12 types), governance, directives, Charter template + schema |
| CLI | `cli-` | `cli-3.12.0` | The `straymark` binary |
| Framework | `fw-` | `fw-4.13.0` | Templates (12 types), governance, directives, Charter template + schema |
| CLI | `cli-` | `cli-3.12.1` | The `straymark` binary |

Check installed versions with `straymark status` or `straymark about`.

Expand Down Expand Up @@ -307,7 +307,7 @@ See [CLI Reference](https://github.com/StrangeDaysTech/straymark/blob/main/docs/
```bash
# Download the latest framework release ZIP from GitHub
# Go to https://github.com/StrangeDaysTech/straymark/releases
# and download the latest fw-* release (e.g., fw-4.12.0)
# and download the latest fw-* release (e.g., fw-4.13.0)

# Extract and copy to your project
unzip straymark-fw-*.zip -d your-project/
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "straymark-cli"
version = "3.12.0"
version = "3.12.1"
edition = "2021"
description = "CLI for StrayMark — the cognitive discipline your AI-assisted projects need"
license = "MIT"
Expand Down
14 changes: 12 additions & 2 deletions cli/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,18 @@ impl ValidationResult {
}
}

/// Valid status values per DOCUMENTATION-POLICY.md
const VALID_STATUSES: &[&str] = &["draft", "review", "accepted", "superseded", "deprecated"];
/// Valid status values per DOCUMENTATION-POLICY.md §3 lifecycle + §6 per-type defaults.
/// `identified` is the canonical TDE entry state (agent-driven discovery, awaits
/// human prioritization); functionally equivalent to `draft` for lifecycle gating
/// but semantically distinct in adopter analytics.
const VALID_STATUSES: &[&str] = &[
"draft",
"identified",
"review",
"accepted",
"superseded",
"deprecated",
];

/// Valid risk levels
const VALID_RISK_LEVELS: &[&str] = &["low", "medium", "high", "critical"];
Expand Down
23 changes: 23 additions & 0 deletions cli/tests/validate_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,29 @@ fn test_validate_dpia_document_valid() {
.stdout(predicate::str::contains("passed validation"));
}

/// Regression test for issue #130: TDE documents ship with `status: identified`
/// per TEMPLATE-TDE.md and DOCUMENTATION-POLICY.md §6 — the validator must accept
/// it as a valid lifecycle entry state.
#[test]
fn test_validate_tde_document_valid() {
let dir = TempDir::new().unwrap();
setup_straymark(dir.path());

create_doc(
dir.path(),
"06-evolution/technical-debt",
"TDE-2026-05-11-001-architectural-refactor.md",
"id: TDE-2026-05-11-001\ntitle: Architectural Refactor Debt\nstatus: identified\ncreated: 2026-05-11\nagent: claude-code-v1.0\nconfidence: high\nreview_required: false\nrisk_level: medium\ntype: architecture\nimpact: high\neffort: medium\ntags:\n - architecture\nrelated: []\npriority: null\nassigned_to: null",
);

let mut cmd = Command::cargo_bin("straymark").unwrap();
cmd.arg("validate")
.arg(dir.path().to_str().unwrap())
.assert()
.success()
.stdout(predicate::str::contains("passed validation"));
}

/// F2.QA.02.01 — Also verify that MCARD and DPIA fail without review_required: true
#[test]
fn test_validate_mcard_requires_review() {
Expand Down
3 changes: 2 additions & 1 deletion dist/.agent/workflows/straymark-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Based on the analysis, suggest a document type:
| Files with `auth`, `user`, `privacy`, `gdpr` | ETH (draft) |
| Test files (`*.test.*`, `*.spec.*`) | TES |
| Bug fixes, hotfixes | INC |
| `TODO`, `FIXME`, `HACK` comments added | TDE |
| `TODO`, `FIXME`, `HACK` comments added | TDE (code-smell trigger) |
| Transversal debt — heritage from prior Charter, applies to multiple modules, requires dedicated Charter, or needs human prioritization | TDE (architectural trigger — distinct from per-Charter `R<N>`; see AGENT-RULES.md §3) |
| Requirements or spec files | REQ |
| Multi-session implementation block (>1 day, >5 tasks, multi-phase) | **Charter** — redirect to `straymark-charter-new` (Charters use `straymark charter new`, not `straymark new`) |

Expand Down
10 changes: 5 additions & 5 deletions dist/.agent/workflows/straymark-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ Check these directories for each document type:
|------|--------|-----------|
| AILOG | `AILOG-` | `.straymark/07-ai-audit/agent-logs/` |
| AIDEC | `AIDEC-` | `.straymark/07-ai-audit/decisions/` |
| ADR | `ADR-` | `.straymark/04-architecture/decisions/` |
| ADR | `ADR-` | `.straymark/02-design/decisions/` |
| ETH | `ETH-` | `.straymark/07-ai-audit/ethical-reviews/` |
| REQ | `REQ-` | `.straymark/03-requirements/` |
| TES | `TES-` | `.straymark/05-testing/` |
| INC | `INC-` | `.straymark/06-operations/incidents/` |
| TDE | `TDE-` | `.straymark/06-operations/tech-debt/` |
| REQ | `REQ-` | `.straymark/01-requirements/` |
| TES | `TES-` | `.straymark/04-testing/` |
| INC | `INC-` | `.straymark/05-operations/incidents/` |
| TDE | `TDE-` | `.straymark/06-evolution/technical-debt/` |
| SEC | `SEC-` | `.straymark/08-security/` |
| MCARD | `MCARD-` | `.straymark/09-ai-models/` |
| SBOM | `SBOM-` | `.straymark/07-ai-audit/` |
Expand Down
3 changes: 2 additions & 1 deletion dist/.claude/skills/straymark-new/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Based on the analysis, suggest a document type:
| Files with `auth`, `user`, `privacy`, `gdpr` | ETH (draft) |
| Test files (`*.test.*`, `*.spec.*`) | TES |
| Bug fixes, hotfixes | INC |
| `TODO`, `FIXME`, `HACK` comments added | TDE |
| `TODO`, `FIXME`, `HACK` comments added | TDE (code-smell trigger) |
| Transversal debt — heritage from prior Charter, applies to multiple modules, requires dedicated Charter, or needs human prioritization | TDE (architectural trigger — distinct from per-Charter `R<N>`; see AGENT-RULES.md §3) |
| Requirements or spec files | REQ |
| Multi-session implementation block (>1 day, >5 tasks, multi-phase) | **Charter** — redirect to `/straymark-charter-new` (Charters use the `straymark charter new` CLI, not `straymark new`) |

Expand Down
10 changes: 5 additions & 5 deletions dist/.claude/skills/straymark-status/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Check these directories for each document type:
|------|--------|-----------|
| AILOG | `AILOG-` | `.straymark/07-ai-audit/agent-logs/` |
| AIDEC | `AIDEC-` | `.straymark/07-ai-audit/decisions/` |
| ADR | `ADR-` | `.straymark/04-architecture/decisions/` |
| ADR | `ADR-` | `.straymark/02-design/decisions/` |
| ETH | `ETH-` | `.straymark/07-ai-audit/ethical-reviews/` |
| REQ | `REQ-` | `.straymark/03-requirements/` |
| TES | `TES-` | `.straymark/05-testing/` |
| INC | `INC-` | `.straymark/06-operations/incidents/` |
| TDE | `TDE-` | `.straymark/06-operations/tech-debt/` |
| REQ | `REQ-` | `.straymark/01-requirements/` |
| TES | `TES-` | `.straymark/04-testing/` |
| INC | `INC-` | `.straymark/05-operations/incidents/` |
| TDE | `TDE-` | `.straymark/06-evolution/technical-debt/` |
| SEC | `SEC-` | `.straymark/08-security/` |
| MCARD | `MCARD-` | `.straymark/09-ai-models/` |
| SBOM | `SBOM-` | `.straymark/07-ai-audit/` |
Expand Down
3 changes: 2 additions & 1 deletion dist/.gemini/skills/straymark-new/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Based on the analysis, suggest a document type:
| Files with `auth`, `user`, `privacy`, `gdpr` | ETH (draft) |
| Test files (`*.test.*`, `*.spec.*`) | TES |
| Bug fixes, hotfixes | INC |
| `TODO`, `FIXME`, `HACK` comments added | TDE |
| `TODO`, `FIXME`, `HACK` comments added | TDE (code-smell trigger) |
| Transversal debt — heritage from prior Charter, applies to multiple modules, requires dedicated Charter, or needs human prioritization | TDE (architectural trigger — distinct from per-Charter `R<N>`; see AGENT-RULES.md §3) |
| Requirements or spec files | REQ |
| Multi-session implementation block (>1 day, >5 tasks, multi-phase) | **Charter** — redirect to `/straymark-charter-new` (Charters use `straymark charter new`, not `straymark new`) |

Expand Down
10 changes: 5 additions & 5 deletions dist/.gemini/skills/straymark-status/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Check these directories for each document type:
|------|--------|-----------|
| AILOG | `AILOG-` | `.straymark/07-ai-audit/agent-logs/` |
| AIDEC | `AIDEC-` | `.straymark/07-ai-audit/decisions/` |
| ADR | `ADR-` | `.straymark/04-architecture/decisions/` |
| ADR | `ADR-` | `.straymark/02-design/decisions/` |
| ETH | `ETH-` | `.straymark/07-ai-audit/ethical-reviews/` |
| REQ | `REQ-` | `.straymark/03-requirements/` |
| TES | `TES-` | `.straymark/05-testing/` |
| INC | `INC-` | `.straymark/06-operations/incidents/` |
| TDE | `TDE-` | `.straymark/06-operations/tech-debt/` |
| REQ | `REQ-` | `.straymark/01-requirements/` |
| TES | `TES-` | `.straymark/04-testing/` |
| INC | `INC-` | `.straymark/05-operations/incidents/` |
| TDE | `TDE-` | `.straymark/06-evolution/technical-debt/` |
| SEC | `SEC-` | `.straymark/08-security/` |
| MCARD | `MCARD-` | `.straymark/09-ai-models/` |
| SBOM | `SBOM-` | `.straymark/07-ai-audit/` |
Expand Down
22 changes: 21 additions & 1 deletion dist/.straymark/00-governance/AGENT-RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ confidence: high | medium | low
| Addition/removal/upgrade of security-critical dependencies | AILOG | Human review required |
| Changes affecting AI system lifecycle (deployment, retirement) | AILOG + ADR | Human review required |
| Changes to OTel instrumentation (spans, attributes, pipeline) | AILOG | Tag `observabilidad`, see §9 |
| Transversal technical debt discovered during implementation | TDE | See §3 "TDE vs `R<N>` (new, not in Charter)" for the disambiguation criterion |

### PROHIBITED - Do not document

Expand Down Expand Up @@ -99,6 +100,25 @@ confidence: high | medium | low
| TDE | Technical debt |
| INC | Incident conclusions |

### TDE vs `R<N> (new, not in Charter)`

Two surfaces exist for emergent debt. They are not interchangeable — pick the one whose lifecycle matches the work, not whichever is closer to hand.

**File an `R<N> (new, not in Charter)` entry in the AILOG `§Risk` section** when the debt:

- Is *scoped to the Charter currently in execution* or the next Charter in sequence.
- Resolves as a documented deferral, a small atomic fix, or a forward-pointer to a Charter that already exists.
- Carries low-to-medium impact and the agent can describe the remediation in one bullet.

**Create a TDE document** when the debt:

- Is *heritage from a prior Charter* (the gap predates the work currently in flight).
- *Applies to multiple modules or multiple Charters* — fragmenting it into per-Charter `R<N>` entries loses the architectural shape.
- *Requires a dedicated Charter outside the current scope envelope* to remediate (not the current Charter, not the next one).
- *Requires human prioritization or assignment* the agent cannot decide alone (impact × effort matrix, ownership, sprint placement).

The four triggers above are the activation criteria for TDE under §2. When the AILOG you are about to write would carry an `R<N>` matching any of them, write the TDE instead and reference it from the AILOG `§Risk` row.

---

## 4. When to Request Human Review
Expand Down Expand Up @@ -357,4 +377,4 @@ When a project accumulates a high volume of AILOGs across multiple Charters and

---

*StrayMark v4.12.0 | [Strange Days Tech](https://strangedays.tech)*
*StrayMark v4.13.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion dist/.straymark/00-governance/C4-DIAGRAM-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ Use a Level 1 (Context) diagram to illustrate:

---

*StrayMark v4.12.0 | [Strange Days Tech](https://strangedays.tech)*
*StrayMark v4.13.0 | [Strange Days Tech](https://strangedays.tech)*
Loading