Skip to content

feat: ADF metrics recalibration, CI hardening, and release workflow - #1

Merged
SmartBrandStrategies merged 12 commits into
mainfrom
feat/adf-metrics-recalibration
Feb 28, 2026
Merged

SmartBrandStrategies merged 12 commits into
mainfrom
feat/adf-metrics-recalibration

Conversation

@SmartBrandStrategies

@SmartBrandStrategies SmartBrandStrategies commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • charter adf metrics recalibrate — new subcommand to re-measure LOC from manifest metric sources, propose new ceilings with configurable headroom, and update baselines/ceilings with required rationale (--reason or --auto-rationale).
  • Stale baseline detection — charter adf evidence now detects stale metric baselines, emits structured staleBaselines warnings, and suggests recalibration actions.
  • Release workflow — new .github/workflows/release.yml supports automatic GitHub Releases on v* tag push and manual workflow_dispatch backfill for historical tags.
  • CI fixes — resolved 5 pre-existing CI failures: pnpm version conflict, build/typecheck ordering, npm→pnpm in governance workflow, missing file guards for docs:check and drift scan.
  • README update — removed large ADF architecture PNG, updated SDLC status callout.

Scope

  • @stackbilt/cli
  • Docs only

Validation

  • ADF verification passed (pnpm run verify:adf)
  • All 4 CI checks green (CI, Governance Check x2, Governance Scorecard)

Compatibility

  • No breaking changes

Agent Contract Impact

  • JSON output/exit-code behavior changed (documented in README.md + CHANGELOG.md)

Details: adf evidence now includes staleBaselines in JSON output. New adf metrics recalibrate command added.

Screenshots / Output Samples

Constraints:
  [ok] adf_commands_loc: 581 / 650 [lines] -- PASS
  [ok] adf_bundle_loc: 185 / 200 [lines] -- PASS
  [ok] adf_sync_loc: 219 / 250 [lines] -- PASS
  [ok] adf_evidence_loc: 328 / 380 [lines] -- PASS
  [ok] adf_migrate_loc: 453 / 500 [lines] -- PASS
  [ok] bundler_loc: 415 / 500 [lines] -- PASS
  [ok] parser_loc: 214 / 300 [lines] -- PASS
  [ok] cli_entry_loc: 197 / 200 [lines] -- PASS

Verdict: PASS

stackbilt-admin and others added 12 commits February 27, 2026 07:09
Shows live release version from npm instead of stale GitHub Releases tag.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Supports both automatic releases on v* tag push and manual
workflow_dispatch backfill for historical tags. Extracts release
notes from CHANGELOG.md automatically.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Remove large ADF_1.png embed and update callout to reflect completion
of the inaugural SDLC cycle with ongoing iterative improvement.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
pnpm/action-setup@v4 now errors when both `version` param and
package.json `packageManager` field are set. Let the action auto-detect
from packageManager instead.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- CI: move `build` before `typecheck` so cross-package .d.ts files
  exist when tsc --noEmit runs against the root tsconfig.
- Governance: detect pnpm-lock.yaml and use pnpm install when present,
  fixing workspace:^ protocol failures in this repo.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- CI: skip docs:check when .docsync.json is absent
- charter-governance: skip drift scan when no pattern files exist,
  matching the guard already present in governance.yml

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@SmartBrandStrategies SmartBrandStrategies changed the title Feat/adf metrics recalibration feat: ADF metrics recalibration, CI hardening, and release workflow Feb 28, 2026
@SmartBrandStrategies
SmartBrandStrategies merged commit febca14 into main Feb 28, 2026
4 checks passed
@SmartBrandStrategies
SmartBrandStrategies deleted the feat/adf-metrics-recalibration branch March 2, 2026 12:56
SmartBrandStrategies pushed a commit that referenced this pull request Mar 2, 2026
Move [Unreleased] to [0.5.0] with cross-platform fixes, git-helpers
consolidation, ADX-005 findings, papers restructure, and metrics
recalibration from PR #1 and PR #2.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
stackbilt-admin pushed a commit that referenced this pull request Nov 28, 2026
Round-2 review of #464:
- Find an in-repo message file with git rev-parse (--show-toplevel and --show-prefix) instead of comparing pwd strings, whose spelling can differ from git's top level on Windows (Temp paths, case), which let the file leak into the commit.
- Run interpret-trailers with an unused core.commentChar so body lines such as '#459 caused this' are not treated as comments and the trailers stay after the body.
- A failing hook on the grouped path now says that earlier group commits were kept.
- Tests: '#' body lines, 'Refs:#1', -F relative to a subdirectory, a differently spelled cwd (Windows), a pre-staged index, a failing hook on the grouped path, no --dry-run feat warning.

Refs: #459
Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin added a commit that referenced this pull request Nov 28, 2026
…464)

* fix(scripts): let smart-commit.sh take a message, body and trailers

core.adf requires commits via scripts/smart-commit.sh, but the script took only --dry-run and --merge and generated every subject itself (any package change became "feat(<scope>): apply logical updates"), with no body or trailers. Agents could not follow the rule, so every commit bypassed it.

Add -m (repeatable, one paragraph each), -F <file> and --trailer 'Key: value' (placed by git interpret-trailers). With a message, all substantive changes go into one commit; without one, the grouped default is unchanged. --merge and --dry-run honor the message. Bad input exits 2 before anything is staged. The pre-commit hook still runs on every path.

Tests run the real script in a throwaway repo (Git's bash on Windows, since plain bash can be WSL).

Closes: #459
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(scripts): give the smart-commit script tests a spawn timeout

Each case spawns bash and several git processes; under load on Windows they exceeded vitest's 5s default. Use 60s for the tests and the setup hook, matching the repo's other process-spawning tests.

Refs: #459
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(scripts): harden smart-commit.sh per review of #464

- Set core.hooksPath and check the hook before every path, --merge included; before, --merge could commit without the hook.
- Pass --no-divider to git interpret-trailers so a '---' line in the body is not read as a patch divider.
- Reject multi-line --trailer values (one flag could forge a second trailer); allow 'Key:value' like git.
- -F - reads the message from stdin.
- Never commit a -F message file that lives inside the repo.
- If a commit fails (e.g. the hook), unstage its files so the script can be rerun.
- List paths with core.quotePath=false so non-ASCII files are committed, not skipped.
- No 'feat: commit created' warning under --dry-run.

Tests cover each case, including --merge with an unset hooksPath and a failing hook; the new cases fail against the previous script.

Refs: #459
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(scripts): locate -F files via git and keep '#' body lines

Round-2 review of #464:
- Find an in-repo message file with git rev-parse (--show-toplevel and --show-prefix) instead of comparing pwd strings, whose spelling can differ from git's top level on Windows (Temp paths, case), which let the file leak into the commit.
- Run interpret-trailers with an unused core.commentChar so body lines such as '#459 caused this' are not treated as comments and the trailers stay after the body.
- A failing hook on the grouped path now says that earlier group commits were kept.
- Tests: '#' body lines, 'Refs:#1', -F relative to a subdirectory, a differently spelled cwd (Windows), a pre-staged index, a failing hook on the grouped path, no --dry-run feat warning.

Refs: #459
Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Kurt Overmier <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants