All notable changes to this project are documented in this file.
The format is based on Keep a Changelog and follows Semantic Versioning.
Synchronized version bump for all @stackbilt/* packages to 0.12.0.
analyze()+ Zod schemas for@stackbilt/surface— new high-levelanalyze(input: SurfaceInput): SurfaceOutputentry point, plusSurfaceInputSchema,SurfaceOutputSchema,RouteSchema,SchemaTableSchema,SchemaColumnSchema,DEFAULT_SURFACE_EXTENSIONS, andDEFAULT_SURFACE_IGNORE_DIRSexports. The Zod schemas are the authoritative input/output contract shared by the CLI and MCP tool adapters. ExistingextractSurface/extractRoutes/extractSchema/formatSurfaceMarkdownexports preserved.Route,SchemaTable, andSchemaColumnare nowz.infer<>aliases of their schemas — structurally identical to the prior interfaces, so consumer code is unaffected.charter_surfaceMCP tool —charter servenow registers a callable tool for API surface extraction. Supports aformat: "json" | "markdown"input for agents that want a compact human-readable summary instead of the structured payload. The tool description leads with "use this instead of grepping for route handlers" to nudge cold-boot usage.
@stackbilt/surfacegainszod(^3.24.1) as a runtime dependency. The "zero runtime dependencies" README claim is updated — Zod is the authoritative contract at the package boundary.charter surfaceCLI routes argv throughSurfaceInputSchema— invalid arguments surface as a structured Zod validation error instead of silently defaulting.extractSurfacenow references the exportedDEFAULT_SURFACE_EXTENSIONS/DEFAULT_SURFACE_IGNORE_DIRSconstants so schema defaults and in-function fallbacks cannot drift (same pattern asDEFAULT_MAX_DEPTHin blast).
- All
@stackbilt/*packages published from v0.12.0 onward carry npm provenance attestations via GitHub Actions trusted-publisher OIDC auth. Each tarball cryptographically links back to the GHA workflow run that built it; consumers can verify vianpm audit signaturesor the "Provenance" badge on each package's npmjs.com page. Long-livedNPM_TOKENusage is retired.
Synchronized version bump for all @stackbilt/* packages to 0.11.0.
STACKBILT_API_KEYenvironment variable —charter runandcharter architectnow resolve the API key fromSTACKBILT_API_KEYfirst, falling back to stored credentials only if the env var is absent or blank. This lets users authenticate the commercial commands without writing a token to~/.charter/credentials.json.STACKBILT_API_BASE_URLenvironment variable — companion toSTACKBILT_API_KEY; sets a custom engine base URL for env-var-authenticated callers. Preserves parity with the stored-credentials path (charter login --url …).resolveApiKey()helper exported from@stackbilt/cli's credentials module (env-var precedence, trimmed, returns{ apiKey, source: 'env' | 'credentials', baseUrl? }).analyze()+ Zod schemas for@stackbilt/blast— new high-levelanalyze(input: BlastInput): BlastOutputentry point, plusBlastInputSchema,BlastOutputSchema, andDEFAULT_MAX_DEPTHexports. The Zod schemas are the authoritative input/output contract shared by the CLI and MCP tool adapters. ExistingbuildGraph/blastRadius/topHotFiles/extractImportsexports preserved.charter_blastMCP tool —charter servenow registers a callable tool for blast-radius analysis, in addition to the existing resource-style governance tools. Agents can query the reverse dependency graph via MCP; tsconfig path aliases are auto-detected at the scan root.
charter login— emits a deprecation notice on every invocation. Functionality unchanged; scheduled for removal in 1.0 when gateway-bound commands (login,run,architect,scaffold) move out of@stackbilt/cliinto a separate@stackbilt/buildpackage.
- Scaffold auth-error message now points users at
STACKBILT_API_KEYas the primary path, withcharter loginmarked deprecated. - CLI README gains a short "Authentication (optional)" section documenting the env-var path.
@stackbilt/blastgainszod(^3.24.1) as a runtime dependency. The "zero runtime dependencies" README claim is updated — Zod is the authoritative contract at the package boundary.topHotFilesties now break deterministically by filename ascending, so output is stable across Node majors and filesystem scan order.charter blastCLI routes argv throughBlastInputSchema— invalid--depthvalues surface as a structured Zod validation error instead of a hand-rolled check.
Synchronized version bump for all @stackbilt/* packages to 0.10.0.
-
charter blast <files>— Compute blast radius for a set of seed files. Builds a reverse dependency graph by walking TS/JS imports and BFS-traverses up to a configurable depth. Reports affected files, hot files (most imported), and warns on ≥20-file blast radius as aCROSS_CUTTINGsignal.Import resolution handles: ES modules, CommonJS
require, dynamicimport(), re-exports, ESM.js → .tsrewrite, tsconfig path aliases (includingextendschains),src/index.*monorepo fallback,package.jsonsource/types/mainfields, index files, cycles, and comment stripping. Zero runtime dependencies. -
charter surface— Extract the API surface of a project. Detects HTTP routes from Hono, Express, and itty-router (regex-based, requires/prefix to reduce false positives) and parses D1/SQLiteCREATE TABLEstatements with column flags (pk, unique, nullable, default). Strips block and line comments before scanning. Ignores__tests__/,*.test.*,*.spec.*files. Supports--markdownoutput for injection into.ai/modules or AI mission briefs. Zero runtime dependencies. -
@stackbilt/blast— New standalone package exportingbuildGraph,blastRadius,extractImports,resolveSpecifier,topHotFiles. 19 tests. -
@stackbilt/surface— New standalone package exportingextractSurface,extractRoutes,extractSchema,formatSurfaceMarkdown. 14 tests. -
.ai/analysis.adf— New on-demand ADF module documenting the analysis subsystem (blast + surface). Triggers onblast,surface,dependency graph,blast radius,route extraction,schema extraction.
Originally inspired by analysis of the CodeSight project's blast-radius and route-detection patterns. Extracted the two highest-value algorithms into Charter as deterministic (no LLM) commands that feed into governance workflows: blast radius for CROSS_CUTTING classification, surface extraction for auto-generated .ai/surface.adf modules and cc-taskrunner mission-brief fingerprinting.
Real-world dogfooding caught six bugs that made it into the first commit and were fixed before release:
- Global CLI flags (
--format,--config) being swept into positional seed list - JSDoc example strings matching as real routes
- Test fixture routes matching as real routes
- tsconfig
extendschain not being followed, breaking monorepo alias resolution - Package alias resolving to compiled
.d.tsinstead of source.ts - ESM
.js → .tsextension rewrite missing for TypeScript ESM projects
Validation runs:
- AEGIS web Worker (263 files): 95 routes + 50 D1 tables extracted in ~15s.
dispatch.tsblast radius = 72,types.ts= 127, PWA fix files = 1. - Charter monorepo (121 files): 0 routes (correctly identifies as CLI, not Worker).
packages/types/src/index.tsblast radius = 27 files across cli/adf/git/validate/drift.
All 345 existing tests pass.
- CI workflow — raised
cli_entry_locmetric ceiling from 200 to 250 lines to accommodate actual 220 LOC entry point. - Governance workflow — added
pnpm run buildstep (missing, causing CLI binary not found). Made validate, doctor, and evidence steps non-blocking withcontinue-on-erroruntil CI-specific doctor failure is root-caused. - Release workflow — added job-level
if: startsWith(github.ref, 'refs/tags/v')guard to prevent false-failure notifications on non-tag pushes. Fixed shell block indentation in tag resolution step. - All three workflows now pass cleanly on main. No more 3 failure emails per push.
runcommand —stackbilt run "description"combinesarchitect+scaffoldin one step with animated 6-mode terminal output (PRODUCT, UX, RISK, ARCHITECT, TDD, SPRINT). Supports--dry-run,--format json,--output,--file, and all constraint flags.stackbiltbinary alias — the CLI is now accessible as bothcharterandstackbilt.npx @stackbilt/cli run "..."works without global install.
- All packages bumped from 0.8.0 to 0.9.0.
architectcommand — generate a tech stack from a project description via the Stackbilt engine.scaffoldcommand — write scaffold files from lastarchitectbuild to disk.logincommand — store Stackbilt API key for engine access.- Engine HTTP client —
EngineClientfor calling the Stackbilt engine API.
charter serve— MCP server (#28): New command exposes ADF-curated project context as an MCP server over stdio, enabling Claude Code and other MCP clients to query project constraints, architectural decisions, and recent changes. Tools:getProjectContext(ADF bundle filtered by task keywords),getArchitecturalDecisions(load-bearing CONSTRAINTS fromcore.adf),getProjectState(constraint validation status),getRecentChanges(git log). Resources:adf://manifest,adf://modules/{name}. Add to Claude Code viamcpServers: { charter: { command: "charter", args: ["serve"] } }in.claude/settings.json.- Static site detection (#30):
charter setup --detect-onlynow distinguishes static sites that deploy via Wrangler from actual Workers applications. Repos withwrangler.tomlcontaining[assets]config and no worker entrypoint (src/index.ts,worker.ts, etc.) are suggesteddocspreset instead ofworker, with an explanatory warning in detection output. content.adffor docs preset (#31):charter bootstrap --preset docsnow scaffoldscontent.adf(triggers: Markdown, MDX, frontmatter, Astro, navigation, docs, authoring) alongsidedecisions.adfandplanning.adf.MANIFEST_DOCS_SCAFFOLDtrigger keywords updated to match documentation workflows.- 7 new harness edge-case scenarios (#36):
edge-dedup-rephrased,edge-dedup-partial-overlap,edge-heading-dominates-cross-module,edge-auth-implementation-vs-policy,edge-trigger-prefix-collision,edge-large-injection(22-item multi-module stress test),edge-empty-heading. Harness: 21/21 passing.
- Trigger prefix collision in content classifier (#36):
contentToModule()regex changed from bare prefix match (\bauth) to suffix-aware word-boundary match (\bauth(?:s|ed|ing|ment|tion|ity|ication)?\b). Triggersauthandapipreviously matched "author", "authentic", "authority", "apiary" — now blocked.
adf initandcharter setupnext-steps (#32): Both commands now includecharter adf bundle --task "<your task>"in next-steps output with a note thatverify:adfruns this in CI.- All packages bumped from 0.6.0 to 0.7.0.
- Content-based module routing for migrate (#6, #15):
adf migratenow routes rules to on-demand modules by matching content against manifest trigger keywords, not just markdown headings. Rules mentioning "React" under a generic "Conventions" heading now correctly route tofrontend.adfinstead of falling through tocore.adf. NewTriggerMaptype (Record<string, string[]>) exported from@stackbilt/adf. docsstack preset (#3, #16): New--preset docsfor documentation-only and planning-heavy workspaces.setupauto-detects docs workspaces via directory signals (docs/,ADR/,adrs/,decisions/,papers/,rfcs/) or when root files are predominantly markdown (>=50%). Bootstrap scaffoldsdecisions.adfandplanning.adfmodules with governance-focused patterns instead of irrelevant frontend/backend scaffolds.- Bootstrap auto-migration (#7, #17):
charter bootstrap --yesnow auto-migrates existing agent config files (CLAUDE.md, .cursorrules, agents.md, GEMINI.md, copilot-instructions.md) into ADF modules as part of the bootstrap flow, eliminating the separatecharter adf migratestep. Without--yes, shows a dry-run summary with instructions. Bootstrap flow expanded from 5 to 6 steps with migrate phase inserted between ADF init and dependency install. - Unified evidence pipeline (#9, #19): New
evaluateEvidence()API in@stackbilt/adfcombines constraint validation, token budget analysis, module budget overruns, advisory-only module warnings, and stale baseline detection into a single typedEvidenceReport. Stale baseline detection (detectStaleBaselines) moved from CLI to@stackbilt/adfas a pure function. NewEvidenceReportandStaleBaselineWarningtypes exported for typed consumption. manifest.tsmodule (#8, #18): Manifest parsing, trigger resolution, keyword matching, and trigger reporting extracted frombundler.tsinto a focusedmanifest.tsmodule (~175 LOC). FunctionsparseManifest,resolveModules,isKeywordMatch, andbuildTriggerReportare individually importable.merger.tsmodule (#8, #18): Pure document merge logic and token estimation extracted frombundler.tsintomerger.ts(~85 LOC). FunctionsmergeDocumentsandestimateTokensare individually importable.- Configurable classifier/parser rulesets (#11, #21): New
ClassifierConfiginterface allows overriding STAY patterns and heading-to-module routing inclassifyElement()andbuildMigrationPlan(). NewStrengthConfiginterface allows overriding imperative/advisory patterns inparseMarkdownSections(). All parameters are optional with backward-compatible defaults. - Domain-owned type modules (#10, #22): Monolithic
types.ts(258 LOC) split into 6 focused domain files undertypes/:ast.ts,decorations.ts,patch.ts,manifest.ts,bundle.ts,validation.ts. Barrel re-export preserves all existing imports. - 36 new focused unit tests across
manifest.test.ts(9),merger.test.ts(9),evidence.test.ts(10),classifier-config.test.ts(5),strength-config.test.ts(3). Total: 251 tests across 22 test files (up from 215 in v0.5.0).
- Bootstrap on-demand modules missing after init (#4, #14):
adf initphase during bootstrap now scaffolds on-demand module stubs (frontend.adf,backend.adf), preventing fatal missing-module errors on firstadf bundleafter bootstrap completes. adf init --moduleoverwrites existing.ai/directory (#5, #13): Runningadf init --module <name>when.ai/already exists now creates only the new module file without overwriting existing manifest, core, or state files.
- Bundler architecture refactored (#8, #18): Monolithic
bundler.ts(413 LOC) split into three focused modules:manifest.ts(~175 LOC) for manifest parsing and trigger resolution,merger.ts(~85 LOC) for pure merge logic and token estimation, andbundler.ts(~125 LOC) as a thin orchestration shell. All existing public exports preserved via re-exports — no breaking changes for@stackbilt/adfconsumers. - CLI evidence command simplified (#9, #19):
adf-evidence.tsdelegates evaluation toevaluateEvidence()instead of manually assembling evidence fromvalidateConstraints(),BundleResult, and inline stale-baseline detection. Reduced from 312 to 272 LOC. Output format unchanged. buildMigrationPlan()signature extended (#6): Accepts optionaltriggerMapparameter for content-based module routing. Existing callers withouttriggerMapare unaffected.classifyElement()content fallback (#6): When heading-based routing returnscore.adfand atriggerMapis provided, classifier falls back to content-based keyword matching before defaulting to core.- Patcher handler map (#12, #20):
patcher.tsswitch statement replaced with keyed handler map. ExtractedcheckBounds()andparseColonEntry()helpers to eliminate duplicated bounds checks and colon-parsing logic. types.tssplit into domain modules (#10, #22): 258-LOC monolith split into 6 focused files undertypes/. No consumer-side import changes needed — barrel re-export preserves backward compatibility.
0.5.0 - 2026-03-02
charter adf metrics recalibrate: New subcommand to re-measure LOC from manifest metric sources, propose new ceilings with configurable headroom, and update metric baselines/ceilings with required rationale (--reasonor--auto-rationale).- Budget rationale trail: Recalibration writes
BUDGET_RATIONALESmap entries so metric-cap changes carry explicit context for later review. - Cross-platform git helpers: Unified
git-helpers.tsmodule withshell: truefor WSL/CMD/PowerShell PATH resolution, replacing ~6 duplicatedrunGitimplementations across commands. - EPERM/EACCES retry hint: Bootstrap install step now suggests
--forceor elevated permissions when write failures occur (ADX-005 F5). - No-HEAD guard in audit:
hasCommits()check prevents hard errors when auditing repos with no commits (ADX-005 F6). - ADX-005 feedback paper:
papers/AGENT_DX_FEEDBACK_005.mddocumenting 8 findings from end-to-end charter CLI UX walkthrough. - Papers directory restructure: UX feedback buckets (
papers/ux-feedback/), release planning templates (papers/releases/), and feedback paper template (papers/templates/). - Papers lint script:
scripts/papers-lint.mjsfor validating paper frontmatter and cross-references. - Custom
/commitskill: Claude Code slash command for intelligent, organized multi-group committing (.claude/skills/commit/SKILL.md).
- Cross-platform git invocation (ADX-005 F2): Hook install no longer reports "not inside git repo" on WSL/PowerShell due to PATH resolution failures.
adf migrateprose sections (ADX-005 F3): PatcherADD_BULLETon text sections now converts to list; migrate detects text sections and usesREPLACE_SECTIONinstead.- Doctor thin pointer false positive (ADX-005 F4):
.cursorrulesthin pointers now recognized via sharedPOINTER_MARKERSconstant.
- Stale baseline detection in evidence:
charter adf evidencenow detects stale metric baselines (current vs baseline drift), emits structuredstaleBaselineswarnings (baseline/current/delta/recommendedCeiling/rationaleRequired), and suggests recalibration actions. - README updated: Cross-platform support section, bootstrap command in Getting Started, refreshed dogfood evidence snapshot.
- All packages bumped from 0.4.2 to 0.5.0.
0.4.2 - 2026-02-27
charter doctor --adf-onlymode: New mode runs strict ADF wiring validation only (manifest, required default-load wiring, module parseability, thin pointer integrity, sync lock status) for clean CI/pre-commit gating in repos that may not use.charter/policy artifacts.- ADF governance workflow hardening:
setup --ci githubworkflow template now includesADF Wiring & Pointer Integrity(doctor --adf-only --ci) andADF Evidence(adf evidence --auto-measure --ci) steps when.ai/manifest.adfis present. - Setup script sync expanded:
setupnow also syncsverify:adf,charter:doctor, andcharter:adf:bundlescripts (in addition to detect/setup), so post-setup agent loops have first-class commands for ongoing governance. - Repository adoption guardrails: setup docs/templates now include PR validation guidance (
verify:adf) and.ai/*CODEOWNERS review ownership for explicit policy-change review.
- Pre-commit gate upgraded:
charter hook install --pre-commitnow preferspnpm run verify:adfwhen available and otherwise enforcesdoctor --adf-only --ci+adf evidence --auto-measure --ci. This shifts enforcement from ceiling-only to full ADF routing + ceiling integrity. adf initscaffolding upgraded: now creates starterfrontend.adfandbackend.adfmodule stubs to avoid fatal missing-module experiences on first bundle.adf bundlemissing on-demand behavior: missing ON_DEMAND module files are now reported as warnings (missingModulesin JSON) instead of hard failures; missing DEFAULT_LOAD modules remain hard errors.adf sync --writeempty-sync behavior clarified: when manifest has noSYNCentries,--writenow writes an empty.adf.lockand reports tracked source semantics explicitly.
0.4.1 - 2026-02-27
charter doctoragent config pointer check: When.ai/manifest.adfexists, doctor now scans for agent config files (CLAUDE.md, .cursorrules, agents.md, AGENTS.md, GEMINI.md, copilot-instructions.md) that contain stack rules instead of thin pointers. Flags them with[warn]and suggestscharter adf migrate --dry-run. Recognizes both pointer marker phrasings.
0.4.0 - 2026-02-26
charter hook install --pre-commit: New flag installs a git pre-commit hook that runscharter adf evidence --auto-measure --cibefore each commit. Only gates when.ai/manifest.adfexists -- no-op otherwise. Usesnpx charterfor consuming repos. Both--commit-msgand--pre-commitcan be passed together. Same skip/overwrite pattern with independent markers per hook type.- Evidence pre-commit gate (this repo):
.githooks/pre-commitnow runs ADF evidence checks after typecheck, preventing LOC ceiling breaches from being committed. This is the self-regulating mechanism for unattended agent builds.
adf.tssplit into 4 files:adf.ts(966 LOC) refactored intoadf.ts(412),adf-bundle.ts(153),adf-sync.ts(203), andadf-evidence.ts(262). Each file is independently tracked by its own METRICS ceiling. No behavioral changes -- purely structural.- METRICS expanded from 4 to 8 entries:
manifest.adfandcore.adfnow trackadf_commands_loc,adf_bundle_loc,adf_sync_loc,adf_evidence_loc,adf_migrate_loc,bundler_loc,parser_loc,cli_entry_locwith appropriately sized ceilings. hook installerror message updated: Now accepts--commit-msgand/or--pre-commit(previously required--commit-msgonly).- 178 tests across 12 test files (unchanged).
0.3.4 - 2026-02-26
charter adf migratecommand: Scans existing agent config files (CLAUDE.md, .cursorrules, agents.md, GEMINI.md, copilot-instructions.md), classifies content using the ADX-002 decision tree, and migrates structured blocks into ADF modules. Replaces originals with thin pointers retaining environment-specific rules. Supports--dry-run,--source,--no-backup, and--merge-strategy append|dedupe|replace.- Markdown section parser (
parseMarkdownSections): Pure parser that splits markdown on H2 headings and classifies sub-elements as rules (with imperative/advisory/neutral strength detection), code blocks, table rows, or prose. Exported from@stackbilt/adf. - Content classifier (
classifyElement,buildMigrationPlan,isDuplicateItem): Deterministic rule-routing decision tree that classifies markdown elements into STAY (env/runtime) or MIGRATE (to ADF CONSTRAINTS/CONTEXT/ADVISORY). Jaccard similarity (0.8 threshold) for deduplication. Exported from@stackbilt/adf. - GUIDE section type: New
GUIDEdecoration (📖) added to ADF standard decorations and canonical key order. The rule-routing decision tree incore.adfscaffold is now a first-class GUIDE section that survivesadf fmt --writeround-trips.
- Trigger keyword stemming:
resolveModules()now uses prefix matching with a 66% length ratio threshold soingestmatchesingestion/ingestingwithout false-positives likeReactmatchingReactive. - Bootstrap overwrite protection (ADX-004 P0):
charter bootstrapnow detects existing custom ADF content in.ai/core.adfand skips scaffold overwrite, suggestingcharter adf migrateinstead. Pointer generation also skips files with custom content. - CORE_SCAFFOLD updated: Rule-routing decision tree converted from
#comments (whichadf fmt --writestrips) to aGUIDE [advisory]section that persists through parse/format cycles (ADX-004 P4).
0.3.3 - 2026-02-26
charter bootstrapcommand: One-command repo onboarding that orchestrates detect → setup → ADF init → install → doctor in a single frictionless flow. Supports--ci github,--preset,--skip-install,--skip-doctor, and--format jsonfor full machine-readable output including next-step plans.- Thin pointer generation:
charter adf init --emit-pointers(and bootstrap) generates thinCLAUDE.md,.cursorrules, andagents.mdfiles that redirect to.ai/— preventing rule duplication across agent config files. - Rule-routing decision tree:
adf initscaffold now includes a commented decision tree incore.adfguiding agents on where rules belong (CLAUDE.md vs core.adf vs domain modules), derived from ADX-002 agent DX feedback. - Section taxonomy documentation: Generated
core.adftemplate documents the open section taxonomy (CONTEXT, CONSTRAINTS, ADVISORY, METRICS), weight tags ([load-bearing],[advisory]), and custom section rules. charter adf sync --explain: New flag outputs the.adf.lockschema documentation (format, hash algorithm, commands, purpose) in both text and JSON, eliminating lockfile archaeology friction reported in ADX-001.- Agent DX feedback papers: ADX-002 (rule routing friction), ADX-003 (install automation friction), and RM-001 (vNext roadmap draft) added to papers/.
- GitHub Actions governance workflow: Bootstrap and setup now generate
.github/workflows/charter-governance.ymlfor PR governance checks.
- Scaffold templates shared: ADF scaffold constants (
MANIFEST_SCAFFOLD,CORE_SCAFFOLD,STATE_SCAFFOLD) and pointer templates are now exported from the adf command module and shared with bootstrap, eliminating template drift. - Setup functions exported:
detectStack(),loadPackageContexts(),detectPackageManager(), and other setup utilities are now exported for reuse by the bootstrap command.
0.3.2 - 2026-02-26
- Lockfile types exported:
AdfLockfileandAdfSyncStatusinterfaces now exported from@stackbilt/adfpublic API, giving agents.d.tsvisibility into the.adf.lockschema without reverse-engineering compiled output. - Lockfile schema documented:
.adf.lockformat (flat JSON map offilename → sha256-prefix-16) documented in the@stackbilt/adfREADME. pnpm run devwatch script: Newtsc --build --watchdev script for incremental rebuilds during local development viatsconfig.build.json.- Research papers directory:
papers/with versioned white papers (CSA-001: Context-as-Code v1.1, CSA-002: Greenfield measurement rubric draft) and Architect v2 integration brief.
- Build uses
tsconfig.build.json: Root build script replaced hardcoded 9-pathtsc --buildinvocation with atsconfig.build.jsonreference file. TypeScript resolves build order from project references automatically. - Publish workflow simplified: PUBLISHING.md no longer instructs manual
workspace:^replacement — PNPM handles this at publish time. Publish commands no longer need--access publicflag. publishConfig.access: "public"declared in all 9 packages (previously only cli and adf).sideEffects: falsedeclared in all 9 packages for bundler tree-shaking.
0.3.1 - 2026-02-25
- CI evidence gating: Governance workflow template (
governance.yml) now runscharter adf evidence --auto-measure --cion PRs when.ai/manifest.adfis present, automatically validating metric ceilings before merge. - Scorecard evidence: Charter's own
governance-scorecard.ymlnow includes ADF evidence output alongside validate and drift results.
0.3.0 - 2026-02-25
- Metric content type: ADF parser now supports
key: value / ceiling [unit]syntax for numeric metrics with hard ceilings. Metric entries are auto-detected by lowercase key and value/ceiling/unit structure. - Weight annotations: ADF sections can carry
[load-bearing]or[advisory]weight annotations (e.g.,CONSTRAINTS [load-bearing]:). Weight is preserved through parse/format/patch/merge cycles. UPDATE_METRICpatch op: New patch operation updates a metric entry's value by key while keeping ceiling and unit immutable.- Token budgets: Manifest
BUDGETsection withMAX_TOKENSsets a global token budget.bundleModules()reportstokenBudget,tokenUtilization, andperModuleTokens. - Per-module budgets: ON_DEMAND entries support
[budget: N]suffix for module-level token limits. Budget overruns reported inmoduleBudgetOverruns. charter adf sync: New subcommand with--check(verify source.adfhashes against.adf.lock, exit 1 on drift) and--write(update lock file).- Cadence scheduling: Manifest
CADENCEsection declares check frequency expectations (e.g.,LINT_PASS: every commit). Cadence entries reported in bundle output. - Constraint validation: New
validateConstraints()API checks all metric entries against their ceilings. Status semantics:value < ceiling= pass,value === ceiling= warn,value > ceiling= fail. charter adf evidence: New subcommand produces structured evidence reports with constraint results, weight summary, sync status, and verdict. Supports--task,--context,--context-file, and--auto-measureflags. In--cimode, exits 1 on constraint failures.computeWeightSummary(): Standalone API to count sections by weight category (load-bearing, advisory, unweighted).- Scaffold LOC guardrail:
charter adf initnow scaffoldscore.adfwith a[load-bearing]CONSTRAINTS section and aMETRICS [load-bearing]section containingentry_loc: 0 / 500 [lines]. - Auto-measurement:
charter adf evidence --auto-measurecounts lines in files referenced by the manifestMETRICSsection and injects them as context overrides. - Manifest METRICS section:
parseManifest()now reads aMETRICSmap section mapping metric keys to source file paths for auto-measurement. - Advisory-only warnings:
bundleModules()flags on-demand modules loaded without any[load-bearing]sections. Reported in both bundle and evidence output. --ops-fileflag:charter adf patchaccepts--ops-file <path>as an alternative to inline--ops <json>.--context-fileflag:charter adf evidenceaccepts--context-file <path>as an alternative to inline--context <json>.- Doctor ADF checks:
charter doctornow validates ADF readiness: manifest existence, manifest parse, default-load module presence/parseability, and sync lock status. - Trigger observability:
triggerMatchesnow includesmatchedKeywords(which task keywords matched each trigger) andloadReason('default'or'trigger'). NewunmatchedModulesfield lists on-demand modules not resolved for the current task. nextActionsin JSON output:adf init,adf evidence, andadf sync --checknow include anextActionsarray in JSON output suggesting logical follow-up commands based on results.- 178 tests across 12 test files (up from 48 in v0.2.0).
bundleModules()now accepts an optionaltaskKeywordsparameter for richer trigger reporting.- ADF format example in root README updated to show metric sections and weight annotations.
- Root, CLI, and ADF package README documentation comprehensively updated for all Phase 1-7 features.
- Help text for
charter adfupdated to list all six subcommands (init, fmt, patch, bundle, sync, evidence). - Charter's own
.ai/directory now uses ADF metric ceilings to enforce LOC limits on its own source files (adf_commands_loc: 835/900,bundler_loc: 389/500,parser_loc: 214/300,cli_entry_loc: 142/200), validating the full evidence pipeline end-to-end.
0.2.0 - 2026-02-24
- New
@stackbilt/adfpackage: AST-backed parser, formatter, patcher, and bundler for the ADF (Attention-Directed Format) standard. Zero runtime dependencies. - New
charter adfcommand namespace with four subcommands:charter adf initscaffolds.ai/directory withmanifest.adf,core.adf, andstate.adfmodules.charter adf fmt <file>parses and reformats ADF files to canonical form (--checkfor CI gating,--writefor in-place reformat).charter adf patch <file> --ops <json>applies typed delta operations (ADD_BULLET, REPLACE_BULLET, REMOVE_BULLET, ADD_SECTION, REPLACE_SECTION, REMOVE_SECTION) for safe agent memory updates.charter adf bundle --task "<prompt>"resolves manifest modules via keyword trigger matching and outputs merged context with token estimate.
- ADF parser supports three content types: text (inline values), list (dash-prefixed items), and map (KEY: value pairs for STATE sub-keys).
- ADF formatter auto-injects standard emoji decorations and sorts sections by canonical key order (TASK, ROLE, CONTEXT, OUTPUT, CONSTRAINTS, RULES, DEFAULT_LOAD, ON_DEMAND, FILES, TOOLS, RISKS, STATE).
- ADF patcher is immutable -- original documents are never mutated. Throws
AdfPatchErrorwith context on invalid operations. - ADF bundler merges duplicate sections across modules (lists concatenated, texts joined, maps concatenated) and reports trigger match details.
- 48 new tests covering parser, formatter, patcher, and bundler.
- All internal
@stackbilt/*dependency specifiers now useworkspace:^protocol for consistent monorepo resolution. - Workspace layout documentation updated across README, CLAUDE.md, AGENTS.md, CONTRIBUTING.md, PUBLISHING.md, and SECURITY.md.
- Package dependency flow now includes:
adf (NEW -- zero deps, self-contained AST) <- cli.
0.1.20 - 2026-02-17
- New
charter hook install --commit-msgcommand to install a commit-msg hook that normalizesGoverned-ByandResolves-Requesttrailers usinggit interpret-trailers. setup --detect-onlyoutput now includesagentStandardsand detects repository-level agent governance files (AGENTS.md,CLAUDE.md,GEMINI.md).driftandauditoutput now include pattern customization signal (patternsCustomized) when metadata is present in pattern files.
- Setup-generated GitHub workflow is now pnpm-aware and emits
pnpm/action-setup+pnpm install --frozen-lockfilewhen pnpm is detected. - Stack detection now scans monorepo manifests more broadly (
packages/*andpnpm-workspace.yamlpaths) and reportsmonorepo/hasPnpm. charter classifyis now surfaced earlier in onboarding/setup guidance for LM-agent-first workflows.- Pattern scaffold output now stores metadata envelope (
customized,preset,generatedAt,patterns) while remaining backward-compatible in loaders.
- Trailer parsing now follows terminal contiguous git trailer block semantics, matching
git interpret-trailersbehavior. validatenow emits explicit trailer parsing warnings when governance-like lines are present but not parsed as valid trailers.- Commit parsing in
validate,audit, and quickstart snapshot flow now uses full commit body (%B) so trailer/body analysis is accurate.
0.1.19 - 2026-02-17
validatenow emitseffectiveRangeSourceanddefaultCommitRangefor explicit default-range traceability.policyOffendersentries now includepolicyReasonwhile keepingriskReasonfor backward compatibility.
- Root and CLI docs now recommend
npx --no-install charter --versionfor deterministic post-upgrade version checks. - Agent docs now clarify strict branching: use
strictTrailerMode.modeand offender classification fields.
- Reduced semantic ambiguity by making policy-offender reasoning explicitly policy-scoped.
0.1.18 - 2026-02-17
- Setup baseline mutation metadata now includes
configHashBefore,configHashAfter, andwritesPerformedinmutationPlan/appliedMutations. validate.strictTrailerModenow includes explicitmode(STRICT_ONLY,RISK_ONLY,STRICT_AND_RISK,NONE).
validatepolicy offender payload is now policy-context focused and no longer carries risk-rule metadata by default.- Setup no longer rewrites
.charter/config.jsonon reruns unless an explicit force path is used and content differs.
- Eliminated baseline idempotency false-positive updates caused by unconditional writes during repeated setup runs.
0.1.17 - 2026-02-17
validateJSON now includesstrictTrailerModeand split evidence arrays:evidence.policyOffenders(strict-policy failures) andevidence.riskOffenders(threshold-driven risk failures).setupJSON now includes explicitmutationPlanandappliedMutationsblocks for baseline/workflow/scripts/dependencies.
setupnow supports--no-dependency-syncto skip rewritingdevDependencies["@stackbilt/cli"].validatetext output now prints separate policy-vs-risk offender sections to reduce explainability ambiguity.
- Clarified offender semantics so strict no-trailer failures no longer overload threshold-risk offender reporting.
0.1.16 - 2026-02-17
validatenow emits commit-level evidence even for zero-trailer failures, includingriskRuleId,matchedSignals, andthresholdSource.drift --format jsonnow includes explicit decision metadata (status,minScore,thresholdPercent,configPath).
setupnow treats multi-runtime detection as mixed stack (mixedStack: true) with consistent fullstack recommendation semantics.- Generated GitHub workflow now runs Charter via repo-local
npxafter dependency install instead of global CLI install. setupnow pins local@stackbilt/clidevDependency to the active CLI version for local/CI parity.- Setup workflow telemetry now distinguishes
createdvsupdatedfor truthful idempotency reporting.
- Script synchronization no longer depends on setup path differences when preset inference converges on fullstack.
0.1.15 - 2026-02-17
validateJSON output now includes an evidence block with offending commit details (sha,riskLevel,riskReason,missingTrailers).setup --detect-onlynow surfaces runtime ambiguity warnings when multiple runtime families are detected without a clear stack split.
setupnow synchronizespackage.jsononboarding scripts to the selected preset (charter:setup) instead of only adding missing entries.
audit --rangenow fails with a runtime error on invalid git revspecs (matchingvalidatesemantics) instead of silently returning zero commits.validatetext output now includes offending short SHAs for faster remediation loops.
0.1.14 - 2026-02-17
- Documentation runbook updates for mixed-stack setup decision flow and LM-agent decision rules.
setupnow adds optional onboarding scripts to rootpackage.jsonwhen missing:charter:detectandcharter:setup.validateandauditnow include explicit commit range in output for easier score interpretation.
- Root and CLI README now lead with detect-first setup (
setup --detect-only) and explicit CI gating commands (validate/drift --ci). - Publishing guide now verifies
detected.sourcesin setup detection output and includes drift/audit checks in post-publish validation. - Generated GitHub workflow from
setup --ci githubnow installs a pinned CLI version for reproducible CI behavior. - Default baseline config now enforces stricter trailer policy (
validation.citationStrictness: "FAIL").
0.1.13 - 2026-02-17
setup --detect-only --format jsonnow includesdetected.sourceslisting whichpackage.jsonfiles were used for detection.
- Stack detection now merges dependencies from root and nested manifests (
client/,frontend/,web/,apps/*/), improving React/Vite signal detection in mixed repos.
0.1.12 - 2026-02-17
- Mixed-stack setup guidance now appears directly in
setup --detect-onlyand setup completion output. - Framework-aware baseline specialization for detected Cloudflare, Hono, and React/Vite signals.
- Auto-detection now prioritizes
fullstackfor mixed frontend + backend/worker repositories. - Setup now uses repo path signals (for example
client/,apps/web) to improve mixed-stack inference. - Docs now recommend detect-first + explicit fullstack preset for mixed repos.
0.1.11 - 2026-02-17
setupstack auto-detection with preset selection (worker|frontend|backend|fullstack) and--detect-onlypreview mode.- Configurable policy coverage checklist in
.charter/config.jsonunderaudit.policyCoverage.requiredSections.
setupnow scaffolds richer preset-based baseline patterns and infers project name from localpackage.json(fallback: directory name).auditpolicy score now uses required section coverage instead of markdown file count.- Root and CLI docs updated with preset and detection guidance.
- Policy scoring now rewards governance coverage quality over policy-file quantity.
0.1.10 - 2026-02-17
- Root and CLI README install guidance now leads with local repo install (
npm i -D @stackbilt/cli+npx charter) and keeps global install as optional. - Audit output now includes explicit scoring formulas and actionable remediation steps for trailer coverage, pattern definitions, and policy docs.
charter validatenow returns runtime error (exit 2) when git commit loading fails (for example invalid revision/range), instead of incorrectly returning PASS.- Validation output now distinguishes true "no commits" from internal git failures.
0.1.9 - 2026-02-17
- Synchronized all published
@stackbilt/*packages to version0.1.9with aligned internal dependency ranges.
0.1.8 - 2026-02-17
- New first-run UX:
charternow prints a governance value/risk snapshot with a single recommended next action. - New
charter whycommand to explain adoption rationale and expected operational payoff.
setupcommand output rewritten to focus on concrete outcomes (guardrails active, CI policy gate, immediate follow-up commands).- CLI and root docs updated for human and agent onboarding paths.
0.1.6 - 2026-02-17
- Cross-platform git invocation in
validateandaudit(removed shell-specific quoting/redirection issues on Windows). charter validateandcharter auditno longer emit%an/shell noise on Windows.
0.1.5 - 2026-02-17
charter --versionnow reports package version dynamically instead of a hardcoded value.
0.1.4 - 2026-02-17
- Replaced published internal dependency references from
workspace:*to semver ranges so npm consumers can install successfully. - Published patched internal package dependency chain used by CLI.
0.1.0 - 2026-02-16
- Initial Charter Kit workspace with modular
@stackbilt/*packages. - CLI command surface:
init,validate,drift,audit,classify. - Governance workflow template in
.github/workflows/governance.yml.
- Introduced seamless CLI setup with
setupand diagnostics viadoctor. - Standardized command exit-code contract for human and LM-agent workflows.
- Improved cross-platform build scripts and docs for public contribution.
- Added repository security policy and reporting process.