Commit Graph

59 Commits

Author SHA1 Message Date
75c6ea1dd5 feat(skills): add neuledge-context skill for @neuledge/context MCP server
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
2026-06-20 23:16:27 +00:00
8f5e4eeaa5 fix(hooks): scope install traps to subshells to prevent RETURN trap leak
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
2026-06-20 22:16:49 +00:00
7323aec740 feat(hooks): install missing tools instead of warning
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
2026-06-20 22:08:39 +00:00
e5a08ebb45 fix(hooks): preserve exec bit on re-run and fix pipefail on empty grep
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
2026-06-20 21:53:24 +00:00
ce673ca5e2 feat(hooks): add deterministic validation layer via git hooks
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
2026-06-20 21:50:08 +00:00
25a6a454b9 feat: add gitleaks secret scanning setup and skill
- scripts/setup-gitleaks.sh — installs gitleaks v8.24.2, seeds
  .gitleaks.toml on first run, writes managed pre-commit hook block;
  re-run replaces block in place without disturbing other hook content
- scripts/gitleaks.toml — base config template extending default ruleset
- .gitleaks.toml — repo config with docs/research/ path allowlist
  (high-entropy terminal captures; v8.24.2 [allowlist] syntax)
- tests/test-setup-gitleaks.sh — 6 behavior tests including stale-block
  replacement and idempotency
- .agents/skills/gitleaks/ — cross-cutting skill covering install,
  update, allowlist tuning, scan modes, and real-finding remediation
- .agents/evals/cross-cutting/gitleaks/eval.yaml — 7 trigger + 3 output
  tests including version-aware allowlist guidance case
- docs/spec/overview.md — updated to reflect new tooling and skill

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 11:29:10 +00:00
a1f1f9ded8 feat: implement ADR-0012 — AGENTS.md refactor (issue 0015)
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>
2026-05-17 16:32:03 +00:00
15a4387eb2 feat: deploy skills pipeline with provider adapter pattern 2026-05-15 08:55:11 +00:00
a3bb708bff chore: bootstrap repo with chunks 1 and 2
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>
2026-05-10 19:29:58 +00:00