Skip to content

straymark charter list/audit/close: hardcoded docs/charters/ path breaks .straymark/charters/ layout #119

@montfort

Description

@montfort

Summary

straymark charter list, straymark charter audit, and (by inference) straymark charter close (CLI v3.11.0) hardcode docs/charters/ as the Charter discovery path. Projects whose Charter files live under .straymark/charters/ — the layout this project (straylight, fw-4.11.0 / cli-3.11.0) carries — are silently invisible to those subcommands, even though the same .straymark/charters/ path is validated by straymark status as part of the canonical structure.

Hit while running /straymark-audit-review CHARTER-02: the Charter file exists, validates against charter.schema.v0.json, is referenced from active workflows, and yet straymark charter audit CHARTER-02 --merge-reports fails with error: Charter CHARTER-02 not found in docs/charters/, and straymark charter list returns No Charters in this project.

Reproduction

From this project's clean working tree:

$ ls .straymark/charters/
CHARTER-01.md  CHARTER-01.telemetry.yaml  CHARTER-02.md

$ straymark charter list
No Charters in this project. Run `straymark charter new` to create one.

$ straymark charter audit CHARTER-02 --merge-reports
error: Charter CHARTER-02 not found in docs/charters/

$ straymark --version
straymark 3.11.0

$ straymark status | sed -n '/Project/,/Structure/p'
Project
┌───────────┬─────────────────────────────────────────┐
│ Path      │ /E/Proyectos/StrangeDaysTech/straylight │
│ Framework │ fw-4.11.0                               │
│ CLI       │ cli-3.11.0                              │
│ Language  │ en                                      │
└───────────┴─────────────────────────────────────────┘

Structure
✓ All 17 items present

straymark status reports the structure as fully OK, indicating the framework treats .straymark/charters/ as canonical, but the charter subcommand uses a different (docs/charters/) discovery root.

Impact

  • Blocks the v1 audit-skills flow. /straymark-audit-execute writes reports to .straymark/audits/CHARTER-NN/ correctly (the audits/ subtree the CLI does honor), but /straymark-audit-review cannot then run straymark charter audit CHARTER-NN --merge-reports for schema validation + external_audit: YAML emission. The calibrator agent has to construct the YAML by hand against audit-output.schema.v0.json (frontmatter validation of source reports) and charter-telemetry.schema.v0.json (external_audit array shape). It works, but it bypasses the CLI's validator path and is invisible to telemetry tooling that may expect the CLI as the canonical emitter.
  • Blocks straymark charter close for these Charters under the same path mismatch — telemetry can never be persisted by the CLI; only hand-edited.
  • Misleading error message (not found in docs/charters/) doesn't suggest the actual problem (path lookup convention mismatch) or any workaround.

Workaround applied

Constructed the external_audit: block manually following the schemas, then wrote it to .straymark/audits/CHARTER-02/external-audit-pending.yaml for the operator to paste during straymark charter close. Documented inline in the review document. Works for one Charter, doesn't scale, doesn't exercise the validator.

Discussion / recommended fix

Two design questions worth resolving in the same patch:

  1. What is the canonical Charter location post-rebrand?

    The framework appears to have picked (b) but the CLI still implements (a). Aligning the two — or formally documenting (c) — is the root fix.

  2. Should straymark repair offer a migration path? If the canonical answer is (a), projects already on (b) need straymark repair --migrate-charters (or equivalent) to relocate .straymark/charters/*.{md,telemetry.yaml}docs/charters/.

A cheap partial fix in the meantime: have charter list/audit/close enumerate the paths searched in the error, e.g.:

error: Charter CHARTER-02 not found
  searched: docs/charters/, .straymark/charters/
  hint: run `straymark charter list` to see discovered Charters

That alone would have saved the round-trip diagnosis here.

Versions

  • cli-3.11.0
  • fw-4.11.0
  • Linux (Fedora 44, kernel 6.19)

References

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions