## Why
The repo moved from a chunk-based delivery model with `.agents/skills/`
as the canonical skill source to a plugin model. Several files retained
references to the old model that were either dead code or misleading
framing.
## Impact
- `tests/test-install.sh`: dead `.agents/skills/` test blocks removed;
suite now tests only what `install.sh` actually deploys
- `scripts/deploy-manifest.sh`: `DEPLOY_SKILLS_SRC` variable and stale
`sync.sh (Chunk 6)` comment removed
- `tests/test-git-hooks-install.sh`: fixture stub no longer declares
the removed `DEPLOY_SKILLS_SRC` variable
- `docs/VISION.md`: chunk delivery framing replaced with plugin model
language throughout; manual test plan date updated
- `tests/test-instructions-and-docs.sh`: stale test plan date flagged
as pre-refactor so readers know a re-run is needed
Refs: #15
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
## Why
The hook was treating all source values as local directory paths. Remote
sources (github/git/npm objects) have no local directory — the jq -r of
a JSON object produced garbage, causing the hook to fail on push after
adding the mattpocock-skills remote plugin.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Installing kyberforge via the holocron marketplace caches the plugin at a
specific version. After every push, the marketplace clone and plugin cache
need to be refreshed manually — otherwise new skills added since the last
install are invisible until the user runs `claude plugin update` manually.
Adds a post-push git hook that pulls the holocron marketplace clone and
updates the kyberforge cache automatically after every push, eliminating
the manual refresh step.
## Implementation Notes
- `scripts/git-hooks/post-push` is the canonical source; `install.sh` now
copies all files in `scripts/git-hooks/` into `.git/hooks/` on fresh
checkouts, making the pattern extensible for future hooks.
- Hook exits 0 on all failures (warns to stderr) — a stale cache refresh
never blocks a completed push.
- 11 bats tests cover both the hook and the install.sh copy block, using
mocked binaries and a temp-tree fixture to avoid touching real state.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P87CiC58Ru2PPWYTeXtjHT
Removed .git/hooks/pre-commit.legacy and scripts/setup-hooks.sh — fully replaced by .pre-commit-config.yaml.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add tests/run-tests.sh: discovers and runs all test-*.sh (including
plugin subdirs) and the bats suite; replaces per-script pre-push calls
- Add tests/run-tests.bats: TDD coverage for run-tests.sh behaviours
- Update setup-hooks.sh: pre-push block now calls run-tests.sh
- Fix test-install.sh: remove provider adapter symlink tests (adapter
removed in marketplace migration), guard skills loops on dir existence
- Fix test-instructions-and-docs.sh: content index checks now point to
core/AGENTS.md (where it lives), remove ard/bug dir assertions
- Fix test-setup-hooks.sh: assert pre-push hook calls run-tests.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
With the marketplace architecture, provider-manifest.sh files and the
.agents/skills/ source directory may not exist. Guard both loops so
install.sh doesn't hard-fail when they're absent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gitleaks false positive (U1, Gitea issue #2):
- 'Token routing: Haiku/Sonnet/Opus' in ai-coding-factory-session.md:90
triggers generic-api-key on entropy match of "Token". Not a credential.
- ROADMAP.md now documents this pattern and triggers the same rule.
- Both .gitleaks.toml (deployed, read by hook) and scripts/gitleaks.toml
(source for setup-gitleaks.sh deploys) updated and aligned. Previously
out of sync — deployed file had docs/research/.* already; source did not.
ROADMAP.md: governance workstream Phase 2 expanded with 7 immediately-
actionable test suite gaps and 5 Chunk 6 CI gaps, all mapped to
CONTROLS.md requirements. Housekeeping updated with audit entry.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv5iNACZxumtF2k6TsK18q
Two related fixes exposed when install.sh was first staged post-audit:
1. shellcheck invocation in setup-hooks.sh lacked -x, causing SC1091
(info) to fire for any .sh file that sources another, blocking the
pre-commit hook on legitimate scripts.
2. The shellcheck source= directive in install.sh pointed to
'deploy-manifest.sh' (bare filename). With -x, shellcheck resolves
this from CWD (repo root), where the file doesn't exist. Updated to
'scripts/deploy-manifest.sh' — the correct repo-root-relative path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv5iNACZxumtF2k6TsK18q
Adds a complete cross-cutting skill to install, configure, and manage
@neuledge/context — a local-first MCP server that delivers version-specific
library docs to AI agents via SQLite FTS5.
Includes:
- SKILL.md with 9-step process: install, global MCP registration, per-project
--libs scoping, package management, auth, custom registry, upgrade, uninstall
- setup-neuledge-context.sh: pinned version install, idempotent version check
- secure-context-config.sh: chmod 600 on ~/.context/config.json after auth
- 13-case test suite covering both scripts (all pass)
- eval.yaml with 6 trigger tests and 4 output tests
- references/: context-cli-reference.md, http-mode.md, install-notes.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
trap '...' RETURN inside a function is NOT local to that function in bash
— it persists in the calling scope and fires on every subsequent function
return. After install_shellcheck set the trap, it fired again when
ensure_tool returned with $tmp_dir unbound, causing nounset abort.
Fix: change install functions from {} to () (subshell bodies) and use
trap EXIT instead of RETURN. The trap is now scoped to the subshell and
cannot leak to callers.
Also fixes double _os() call in install_jq and removes redundant local
declarations (subshells don't need them).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
setup-hooks.sh now installs shellcheck, jq, and yq if absent rather
than warning and continuing. Follows the same install pattern as
setup-gitleaks.sh (curl + install to TOOL_INSTALL_DIR=/usr/local/bin,
OS/arch detection, pinned versions).
Pinned versions: shellcheck 0.10.0, jq 1.7.1, yq 4.44.3.
The deployed pre-commit hook retains its runtime fallbacks as a safety
net for environments where tools are removed after setup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
Two bugs in setup-hooks.sh:
1. awk+mv to replace a marker block created a 644 temp file, losing the
exec bit. chmod +x after every write_block call fixes this. Regression
test added to idempotency block.
2. set -euo pipefail in the deployed pre-commit hook caused grep to exit 1
when no files of a given type were staged, aborting the hook. Changed
all filter pipes to process substitution with || true so no-match is
handled gracefully.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
Adds setup-hooks.sh and check-manifests.sh as the deterministic
enforcement layer described in docs/research/governance_principles/CONTROLS.md.
- commit-msg: conventional commits pattern check (hard block)
- pre-commit: shellcheck on .sh, jq on .json, yq on .yaml/.yml,
SKILL.md frontmatter validation; optional tools degrade gracefully
- pre-push: full test suite + manifest cross-reference check
- check-manifests.sh: validates marketplace.json plugin sources,
plugin.json skill/hooks/mcpServers path references
- Marker-based blocks (idempotent, composable with gitleaks)
- 33 integration tests across two test scripts
Run scripts/setup-hooks.sh to install into any repo's .git/hooks/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
Create AGENTS.md at repo root and core/AGENTS.md as provider-agnostic
sources of always-on rules. Slim both CLAUDE.md files to thin adapters.
Deploy core/AGENTS.md → ~/.agents/AGENTS.md via deploy-manifest.sh.
Update three test suites to check correct locations post-refactor.
All automated tests pass (57 instructions, 106 install, 25 governance).
HITL behavioral test plan in test-instructions-and-docs.sh scenarios 9–12.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Establishes the global AI development config repo from scratch:
- Chunk 1: repo skeleton, install.sh, statusline, deploy manifest
- Chunk 2: core instructions (coding/git/testing), CLAUDE.md rewrite
(always-on + content index two-tier model), docs restructure,
6 ADRs, ROADMAP.md, .gitkeep placeholders
- Bootstrap skills in .claude/skills/ (to be catalogued and migrated
to .agents/skills/ in Chunk 3)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>