From 7070ef0f1e4ac52bf878ee4ae45f75a73ad375eb Mon Sep 17 00:00:00 2001 From: galimba Date: Wed, 8 Jul 2026 19:41:20 +0200 Subject: [PATCH 1/2] chore(release): v0.6.0 Cuts the release covering the full backlog batch closed today (#7, #8, #9, #10, #11, #12, #13, #14, #15, #16): incremental index maintenance (index-update, index-split), verify-sources, blame, consolidate, the MEMORY.md root pointer with memory-refresh, SR-016 multi-agent namespacing, an RFC 2119 language pass over the rule files, and the freshness-model decision record closing decay scoring and lifecycle tier tags as documented adopter customizations. - CHANGELOG.md: [Unreleased] rolled into [0.6.0] - 2026-07-08, fresh empty [Unreleased] added, compare links updated - CLAUDE.md, AGENTS.md, README.md: version bumped to 0.6.0 - docs/roadmap.md: v0.6.0 row added to "What Already Shipped" Co-Authored-By: Claude Sonnet 5 --- AGENTS.md | 2 +- CHANGELOG.md | 5 ++++- CLAUDE.md | 2 +- README.md | 2 +- docs/roadmap.md | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d6ad4d3..b7fa2c9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ - **Vault Name**: `{{VAULT_NAME}}` - **Organization**: `{{ORG_NAME}}` -- **Vault Version**: `0.5.0` +- **Vault Version**: `0.6.0` - **Initialized**: `{{INIT_DATE}}` ## Architecture diff --git a/CHANGELOG.md b/CHANGELOG.md index e00ba94..cafc125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.0] - 2026-07-08 + ### Added - `vault-tools.sh index-update` — incremental index maintenance: parses the @@ -321,7 +323,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `docs/rules-customization.md` — creating new rules, industry-specific templates - Architecture diagrams embedded in README (`docs/architecture.png`, `docs/vaults.png`) -[Unreleased]: https://github.com/galimba/agentic-memory-vault/compare/v0.5.0...HEAD +[Unreleased]: https://github.com/galimba/agentic-memory-vault/compare/v0.6.0...HEAD +[0.6.0]: https://github.com/galimba/agentic-memory-vault/compare/v0.5.0...v0.6.0 [0.5.0]: https://github.com/galimba/agentic-memory-vault/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/galimba/agentic-memory-vault/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/galimba/agentic-memory-vault/compare/v0.2.0...v0.3.0 diff --git a/CLAUDE.md b/CLAUDE.md index eb5990e..6fbd97d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ - **Vault Name**: `{{VAULT_NAME}}` - **Organization**: `{{ORG_NAME}}` -- **Vault Version**: `0.5.0` +- **Vault Version**: `0.6.0` - **Initialized**: `{{INIT_DATE}}` - **Primary Agent Platform**: `{{PLATFORM}}` diff --git a/README.md b/README.md index 9779e91..1ff3ec3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A structured, agent-first knowledge base template for organizations using AI agents alongside human teams. [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) -![Version](https://img.shields.io/badge/version-0.5.0-green) +![Version](https://img.shields.io/badge/version-0.6.0-green) ## What Is This diff --git a/docs/roadmap.md b/docs/roadmap.md index eaea387..95e4582 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -43,6 +43,7 @@ community input on design questions before implementation begins. | Version | Highlights | |---------|-----------| +| v0.6.0 | Index maintenance (`index-update`, `index-split`), `verify-sources`, `blame`, `consolidate`, the `MEMORY.md` root pointer with `memory-refresh`, SR-016 multi-agent namespacing, RFC 2119 rule-language pass, and a freshness-model decision record closing decay scoring and lifecycle tiers as adopter customizations | | v0.5.0 | Working CI (fixed a workflow that failed GitHub's validation and had failed every run since v0.4.0), honest `doctor` exit codes, a script test suite wired into CI, the `index-rebuild` "Other" section fix, `evaluation` type schema alignment, a documentation drift sweep, and the first shipped agent skill (`vault-ops`) with its `skill-manifest` generator | | v0.4.0 | Instance scaffolding: `init.sh` instance phase, instance README and onboarding templates, 7 init placeholders, `.vault/.initialized` idempotency guard | | v0.3.0 | HR-014: No file deletion — agents must archive instead of delete | From cb479e78af42660cd4764533ce5936eba0be7e5d Mon Sep 17 00:00:00 2001 From: galimba Date: Wed, 8 Jul 2026 19:53:15 +0200 Subject: [PATCH 2/2] fix(hooks): recognize hyphenated tag prefixes; fix inflated tag-audit count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get_approved_tags() in lib-hook-utils.sh required the tag prefix to match [a-z]+ (letters only), so HR-003 silently rejected every tag in the source-type/ category — the only hyphenated prefix in the taxonomy — despite the tags being fully documented and passing HR-009's own notation check. A page tagged only source-type/article was blocked with "No approved tags found." The prefix pattern now allows hyphens, matching HR-009's regex. Also fixes audit-tags.sh: its approved-tag extraction was an unanchored grep across the whole tags.md file, so it matched the `prefix/value` example in the file's own descriptive prose as if it were a real tag, inflating the reported count by one (231 instead of 230). Adds tests/test-tag-regex.sh: asserts a source-type/*-tagged page commits through the real pre-commit hook, get_approved_tags() recognizes the tag, and tag-audit's count matches a hand count of taxonomy bullets. Closes #39 Co-Authored-By: Claude Sonnet 5 --- .vault/hooks/lib-hook-utils.sh | 2 +- .vault/scripts/audits/audit-tags.sh | 6 +- .vault/scripts/tests/test-tag-regex.sh | 114 +++++++++++++++++++++++++ CHANGELOG.md | 9 ++ 4 files changed, 129 insertions(+), 2 deletions(-) create mode 100755 .vault/scripts/tests/test-tag-regex.sh diff --git a/.vault/hooks/lib-hook-utils.sh b/.vault/hooks/lib-hook-utils.sh index 7b2abaa..e5a8244 100644 --- a/.vault/hooks/lib-hook-utils.sh +++ b/.vault/hooks/lib-hook-utils.sh @@ -212,7 +212,7 @@ get_approved_tags() { warn "Tags file not found at ${TAGS_FILE}. Skipping tag validation." return fi - grep -E '^\- `[a-z]+/[a-z0-9-]+`' "${VAULT_ROOT}/${TAGS_FILE}" | sed 's/^- `//' | sed 's/`.*//' + grep -E '^\- `[a-z][a-z0-9-]*/[a-z0-9-]+`' "${VAULT_ROOT}/${TAGS_FILE}" | sed 's/^- `//' | sed 's/`.*//' } # ============================================================================== diff --git a/.vault/scripts/audits/audit-tags.sh b/.vault/scripts/audits/audit-tags.sh index f71ebd7..a5e0493 100644 --- a/.vault/scripts/audits/audit-tags.sh +++ b/.vault/scripts/audits/audit-tags.sh @@ -19,7 +19,11 @@ cmd_tag_audit() { local approved_tags_file approved_tags_file=$(mktemp) if [[ -f "${TAGS_FILE}" ]]; then - grep -oE '`[a-z][a-z0-9-]*/[a-z][a-z0-9-]*`' "${TAGS_FILE}" | sed 's/`//g' | sort -u > "$approved_tags_file" + # Anchored to bullet-list lines only, matching the hook's loader — + # an unanchored grep also picks up `prefix/value` in this file's + # own descriptive prose as if it were a real approved tag. + grep -E '^\- `[a-z][a-z0-9-]*/[a-z0-9-]+`' "${TAGS_FILE}" \ + | sed 's/^- `//' | sed 's/`.*//' | sort -u > "$approved_tags_file" local approved_count approved_count=$(wc -l < "$approved_tags_file" | tr -d ' ') ok "Loaded ${approved_count} approved tags" diff --git a/.vault/scripts/tests/test-tag-regex.sh b/.vault/scripts/tests/test-tag-regex.sh new file mode 100755 index 0000000..fef79e7 --- /dev/null +++ b/.vault/scripts/tests/test-tag-regex.sh @@ -0,0 +1,114 @@ +#!/usr/bin/env bash +# Regression test for HR-003 rejecting the entire source-type/ tag category. +# +# get_approved_tags() in .vault/hooks/lib-hook-utils.sh required the tag +# prefix to match [a-z]+ (letters only), so no bullet under a hyphenated +# prefix heading (source-type/ is the only one in the taxonomy) ever +# entered the approved set. A page tagged only source-type/article was +# rejected by the pre-commit hook with "No approved tags found", despite +# the tag being documented in tags.md and passing HR-009's own notation +# check (issue #39). +# +# Also covers the secondary bug: audit-tags.sh's approved-tag count was +# inflated by an unanchored grep matching the `prefix/value` example in +# this file's own descriptive prose. +# +# Run: bash .vault/scripts/tests/test-tag-regex.sh +# Exit: 0 on PASS, non-zero on any FAIL. + +set -euo pipefail + +VAULT_ROOT="$(git rev-parse --show-toplevel)" +FIXTURE_DIR="$(mktemp -d)" +trap 'rm -rf "$FIXTURE_DIR"' EXIT + +fail() { + echo "FAIL: $*" >&2 + exit 1 +} + +TODAY="$(date +%Y-%m-%d)" + +# ------------------------------------------------------------------ +# Build a minimal vault clone with its own git repo and the real +# pre-commit hook installed. +# ------------------------------------------------------------------ +mkdir -p "$FIXTURE_DIR/wiki/concepts" "$FIXTURE_DIR/memory/notes" \ + "$FIXTURE_DIR/memory/logs" "$FIXTURE_DIR/memory/decisions" +cp -r "$VAULT_ROOT/.vault" "$FIXTURE_DIR/.vault" + +cat > "$FIXTURE_DIR/wiki/index.md" < "$FIXTURE_DIR/wiki/log.md" + +git -C "$FIXTURE_DIR" init -q +git -C "$FIXTURE_DIR" config user.name "Tag Regex Tester" +git -C "$FIXTURE_DIR" config user.email "tag-regex-tester@example.com" +git -C "$FIXTURE_DIR" add -A +git -C "$FIXTURE_DIR" -c core.hooksPath=/dev/null commit -q -m seed +bash "$FIXTURE_DIR/.vault/scripts/vault-tools.sh" init-hooks >/dev/null + +# ------------------------------------------------------------------ +# Assert: a page tagged only source-type/article commits successfully +# through the real pre-commit hook. +# ------------------------------------------------------------------ +cat > "$FIXTURE_DIR/wiki/concepts/hyphen-prefix.md" </dev/null +) + +rc=0 +output="$(cd "$FIXTURE_DIR" && git add -A && git commit -m "test: source-type tag" 2>&1)" || rc=$? +[[ "$rc" -eq 0 ]] || fail "commit with only a source-type/* tag was blocked (rc=${rc}): ${output}" +echo "$output" | grep -qE '\[HR-003\]|No approved tags found' \ + && fail "HR-003 violation reported for an approved source-type/* tag" + +# ------------------------------------------------------------------ +# Assert: get_approved_tags() in the real vault recognizes every +# documented source-type/* tag. +# ------------------------------------------------------------------ +approved="$( + cd "$VAULT_ROOT" || exit 1 + VAULT_ROOT="$VAULT_ROOT" TAGS_FILE=".vault/rules/tags.md" bash -c ' + source .vault/hooks/lib-hook-utils.sh + get_approved_tags + ' +)" +echo "$approved" | grep -qx "source-type/article" \ + || fail "get_approved_tags() does not recognize source-type/article" + +# ------------------------------------------------------------------ +# Assert: tag-audit's approved count matches a hand count of taxonomy +# bullets (not inflated by the unanchored-grep prose match). +# ------------------------------------------------------------------ +hand_count="$(grep -cE '^\- `[a-z][a-z0-9-]*/[a-z0-9-]+`' "$VAULT_ROOT/.vault/rules/tags.md")" +audit_output="$(cd "$VAULT_ROOT" && bash .vault/scripts/vault-tools.sh tag-audit 2>&1)" +reported_count="$(echo "$audit_output" | grep -oE 'Loaded [0-9]+ approved tags' | grep -oE '[0-9]+')" +[[ "$reported_count" == "$hand_count" ]] \ + || fail "tag-audit reported ${reported_count} approved tags, hand count is ${hand_count}" + +echo "PASS: source-type/* tags are approved and tag-audit's count is accurate" diff --git a/CHANGELOG.md b/CHANGELOG.md index e00ba94..4bdea0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `set -o pipefail` the resulting 141 turned a successful match into a false HR-008 violation. Registration is now checked with a bash literal substring match — deterministic and fork-free. +- `get_approved_tags()` in `.vault/hooks/lib-hook-utils.sh` required the tag + prefix to be pure letters, so HR-003 rejected the entire documented + `source-type/` category — the only hyphenated prefix in the taxonomy — even + though the tags pass HR-009's own notation check. A page tagged only + `source-type/article` was blocked with "No approved tags found." The + prefix pattern now matches hyphens, consistent with HR-009. Also fixed + `audit-tags.sh`'s unanchored tag-extraction grep, which inflated its + approved-tag count by matching the `` `prefix/value` `` example in the + taxonomy file's own descriptive prose (#39). ## [0.5.0] - 2026-07-07