@esoteric-logic/praxis-harness 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/base/CLAUDE.md +17 -15
  2. package/base/hooks/auto-format.sh +40 -0
  3. package/base/hooks/identity-check.sh +55 -0
  4. package/base/hooks/secret-scan.sh +1 -1
  5. package/base/hooks/settings-hooks.json +61 -0
  6. package/base/rules/git-workflow.md +7 -7
  7. package/base/rules/profile.md +10 -7
  8. package/base/rules/vault.md +12 -3
  9. package/base/{rules/architecture.md → skills/architecture-patterns/SKILL.md} +6 -14
  10. package/base/skills/code-gc/SKILL.md +1 -5
  11. package/base/{rules/communication.md → skills/communication-standards/SKILL.md} +7 -12
  12. package/base/{commands/context-reset.md → skills/context-reset/SKILL.md} +2 -0
  13. package/base/skills/context7-lookup/SKILL.md +49 -0
  14. package/base/{commands/debug.md → skills/debug/SKILL.md} +2 -0
  15. package/base/{commands/discover.md → skills/discover/SKILL.md} +2 -0
  16. package/base/{commands/discuss.md → skills/discuss/SKILL.md} +2 -0
  17. package/base/{commands/execute.md → skills/execute/SKILL.md} +2 -1
  18. package/base/{commands/fast.md → skills/fast/SKILL.md} +2 -0
  19. package/base/{commands/kit.md → skills/kit/SKILL.md} +2 -1
  20. package/base/skills/managing-git-identities/SKILL.md +94 -0
  21. package/base/{commands/next.md → skills/next/SKILL.md} +2 -0
  22. package/base/{commands/plan.md → skills/plan/SKILL.md} +2 -0
  23. package/base/skills/plan-writer/SKILL.md +69 -0
  24. package/base/skills/pre-commit-lint/SKILL.md +1 -5
  25. package/base/{commands/quick.md → skills/quick/SKILL.md} +2 -0
  26. package/base/{commands/review.md → skills/review/SKILL.md} +32 -9
  27. package/base/{commands/risk.md → skills/risk/SKILL.md} +2 -0
  28. package/base/skills/scaffold-exist/SKILL.md +1 -3
  29. package/base/skills/scaffold-new/SKILL.md +1 -4
  30. package/base/skills/secret-scan/SKILL.md +55 -0
  31. package/base/skills/session-retro/SKILL.md +1 -4
  32. package/base/{commands/ship.md → skills/ship/SKILL.md} +3 -1
  33. package/base/skills/{code-simplifier → simplify}/SKILL.md +3 -6
  34. package/base/{commands/spec.md → skills/spec/SKILL.md} +2 -0
  35. package/base/{commands/standup.md → skills/standup/SKILL.md} +2 -0
  36. package/base/skills/status-update/SKILL.md +47 -0
  37. package/base/skills/vault-gc/SKILL.md +1 -4
  38. package/base/{commands/verify.md → skills/verify/SKILL.md} +2 -0
  39. package/base/skills/verify-app/SKILL.md +1 -5
  40. package/package.json +1 -1
  41. package/scripts/lint-harness.sh +7 -3
  42. package/base/commands/simplify.md +0 -15
  43. package/base/rules/code-quality.md +0 -65
  44. package/base/rules/security.md +0 -40
  45. package/base/skills/subagent-review/SKILL.md +0 -127
package/base/CLAUDE.md CHANGED
@@ -43,9 +43,8 @@ permanent institutional memory. Don't wait for session-retro — fix the rule im
43
43
  If cannot fix in 3 attempts: STOP. Report What / So What / Now What.
44
44
 
45
45
  **Before every commit:**
46
- 1. Secret scan: `rg "(sk-|ghp_|pplx-|AKIA|Bearer [A-Za-z0-9+/]{20,})" $(git diff --staged --name-only)`
47
- 2. Lint + typecheckno commits with warnings or errors.
48
- 3. `git --no-pager config user.email` → must match expected identity. If mismatch: STOP.
46
+ See `~/.claude/rules/git-workflow.md` § Pre-Commit Invariants. These are also enforced
47
+ by hooks (secret-scan, identity-check)see `~/.claude/settings.json`.
49
48
 
50
49
  **Before writing any templated file:** Scan for unreplaced `{placeholder}` patterns. Zero must remain.
51
50
 
@@ -92,11 +91,12 @@ Missing servers are non-blocking — features degrade gracefully.
92
91
  2. Active task? → read active plan current milestone only
93
92
  No active task? → read `status.md`
94
93
  4. Load rules only for what the current task touches:
95
- - Terraform/Azure → `~/.claude/rules/terraform.md`
94
+ - Terraform/Azure → `~/.claude/rules/terraform.md`, `~/.claude/rules/azure.md`
96
95
  - GitHub Actions → `~/.claude/rules/github-actions.md`
97
96
  - PowerShell scripts → `~/.claude/rules/powershell.md`
98
97
  - Git operation → `~/.claude/rules/git-workflow.md`
99
- - Security concern`~/.claude/rules/security.md`
98
+ - Client-facing writingauto-loaded by `communication-standards` skill
99
+ - Architecture/specs → auto-loaded by `architecture-patterns` skill
100
100
 
101
101
  ## Core Anti-Patterns (NEVER)
102
102
  - Silently swallow errors or use empty catch blocks
@@ -121,19 +121,15 @@ Kit manifests live in `~/.claude/kits/<name>/KIT.md`.
121
121
 
122
122
  ## Rules Registry — Load on Demand Only
123
123
 
124
- ### Universal — always active
124
+ ### Universal — always active (6 rules)
125
125
  | File | Purpose |
126
126
  |------|---------|
127
- | `~/.claude/rules/profile.md` | Who the user is, active projects, identities |
127
+ | `~/.claude/rules/profile.md` | Who the user is, identities, working style |
128
128
  | `~/.claude/rules/execution-loop.md` | SPEC/PLAN/VALIDATE loop enforcement |
129
- | `~/.claude/rules/coding.md` | Context7 mandate, error handling, no hardcodes |
130
- | `~/.claude/rules/code-quality.md` | Language-agnostic quality standards |
131
- | `~/.claude/rules/git-workflow.md` | Commits, branches, identity verification |
132
- | `~/.claude/rules/security.md` | Secrets, credentials, auth patterns |
133
- | `~/.claude/rules/communication.md` | Client writing, no AI attribution |
134
- | `~/.claude/rules/vault.md` | Second brain integration — Obsidian vault |
135
- | `~/.claude/rules/architecture.md` | ADR format, What/So What/Now What, risk docs |
136
- | `~/.claude/rules/context-management.md` | Context anti-rot, context reset protocol |
129
+ | `~/.claude/rules/coding.md` | Code quality, security, complexity thresholds, Context7 mandate |
130
+ | `~/.claude/rules/git-workflow.md` | Commits, branches, identity verification, pre-commit checks |
131
+ | `~/.claude/rules/vault.md` | Second brain integration — vault backend, file purposes |
132
+ | `~/.claude/rules/context-management.md` | Context anti-rot, phase scoping, context reset protocol |
137
133
 
138
134
  ### Scoped — load only when paths match
139
135
  | File | Loads when |
@@ -142,3 +138,9 @@ Kit manifests live in `~/.claude/kits/<name>/KIT.md`.
142
138
  | `~/.claude/rules/terraform.md` | `**/*.tf`, `**/*.tfvars` |
143
139
  | `~/.claude/rules/github-actions.md` | `.github/workflows/**` |
144
140
  | `~/.claude/rules/powershell.md` | `**/*.ps1`, `**/*.psm1` |
141
+
142
+ ### Auto-invocable skills (replace former universal rules)
143
+ | Skill | Triggers when |
144
+ |-------|--------------|
145
+ | `communication-standards` | Writing client-facing docs, proposals, status reports, commits, PRs |
146
+ | `architecture-patterns` | Writing ADRs, specs, system design, risk docs, blocker reports |
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+ # PostToolUse hook — auto-formats files after edit.
3
+ # Always exits 0 (advisory, never blocks).
4
+ set -uo pipefail
5
+
6
+ INPUT=$(cat)
7
+ FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // empty' 2>/dev/null)
8
+
9
+ if [[ -z "$FILE_PATH" || ! -f "$FILE_PATH" ]]; then
10
+ exit 0
11
+ fi
12
+
13
+ EXT="${FILE_PATH##*.}"
14
+
15
+ case "$EXT" in
16
+ tf|tfvars)
17
+ if command -v terraform &>/dev/null; then
18
+ terraform fmt "$FILE_PATH" 2>/dev/null
19
+ fi
20
+ ;;
21
+ py)
22
+ if command -v ruff &>/dev/null; then
23
+ ruff format --quiet "$FILE_PATH" 2>/dev/null
24
+ elif command -v black &>/dev/null; then
25
+ black --quiet "$FILE_PATH" 2>/dev/null
26
+ fi
27
+ ;;
28
+ ts|tsx|js|jsx|json|css)
29
+ if command -v prettier &>/dev/null; then
30
+ prettier --write "$FILE_PATH" 2>/dev/null
31
+ fi
32
+ ;;
33
+ go)
34
+ if command -v gofmt &>/dev/null; then
35
+ gofmt -w "$FILE_PATH" 2>/dev/null
36
+ fi
37
+ ;;
38
+ esac
39
+
40
+ exit 0
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+ # PreToolUse hook — blocks git commit if email doesn't match expected identity.
3
+ # Reads expected emails from praxis.config.json identity section.
4
+ # Exit 0 = allow, Exit 2 = block with message.
5
+ set -euo pipefail
6
+
7
+ INPUT=$(cat)
8
+
9
+ # Only fire on Bash tool calls that contain "git commit"
10
+ COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // empty' 2>/dev/null)
11
+ if [[ -z "$COMMAND" ]] || ! echo "$COMMAND" | grep -q "git commit"; then
12
+ exit 0
13
+ fi
14
+
15
+ # Read identity config
16
+ CONFIG="$HOME/.claude/praxis.config.json"
17
+ if [[ ! -f "$CONFIG" ]]; then
18
+ exit 0
19
+ fi
20
+
21
+ CWD=$(pwd)
22
+ ACTUAL_EMAIL=$(git --no-pager config user.email 2>/dev/null || echo "")
23
+
24
+ # Check work path match
25
+ WORK_PATH=$(jq -r '.identity.work.path_match // empty' "$CONFIG" 2>/dev/null)
26
+ WORK_EMAIL=$(jq -r '.identity.work.email // empty' "$CONFIG" 2>/dev/null)
27
+ PERSONAL_PATH=$(jq -r '.identity.personal.path_match // empty' "$CONFIG" 2>/dev/null)
28
+ PERSONAL_EMAIL=$(jq -r '.identity.personal.email // empty' "$CONFIG" 2>/dev/null)
29
+
30
+ EXPECTED_EMAIL=""
31
+ if [[ -n "$WORK_PATH" ]] && echo "$CWD" | grep -q "$WORK_PATH"; then
32
+ EXPECTED_EMAIL="$WORK_EMAIL"
33
+ elif [[ -n "$PERSONAL_PATH" ]] && echo "$CWD" | grep -q "$PERSONAL_PATH"; then
34
+ EXPECTED_EMAIL="$PERSONAL_EMAIL"
35
+ else
36
+ # Unknown path — allow but warn
37
+ echo "WARNING: CWD $CWD does not match known identity paths." >&2
38
+ exit 0
39
+ fi
40
+
41
+ if [[ -n "$EXPECTED_EMAIL" && "$ACTUAL_EMAIL" != "$EXPECTED_EMAIL" ]]; then
42
+ echo "BLOCKED: Git identity mismatch." >&2
43
+ echo " Expected: $EXPECTED_EMAIL" >&2
44
+ echo " Actual: $ACTUAL_EMAIL" >&2
45
+ echo " CWD: $CWD" >&2
46
+ # Check if includeIf is configured and suggest fix
47
+ if git config --global --get-regexp 'includeIf' &>/dev/null; then
48
+ echo " Note: includeIf is configured in ~/.gitconfig — verify CWD matches an includeIf path." >&2
49
+ else
50
+ echo " Fix: git config --local user.email \"$EXPECTED_EMAIL\"" >&2
51
+ fi
52
+ exit 2
53
+ fi
54
+
55
+ exit 0
@@ -14,7 +14,7 @@ if [[ -z "$FILE_PATH" || ! -f "$FILE_PATH" ]]; then
14
14
  fi
15
15
 
16
16
  # Scan the file for secret patterns
17
- SECRET_PATTERN='(sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]{36,}|pplx-[a-zA-Z0-9]{20,}|AKIA[0-9A-Z]{16}|Bearer [A-Za-z0-9+/]{20,})'
17
+ SECRET_PATTERN='(sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]{36,}|pplx-[a-zA-Z0-9]{20,}|AKIA[0-9A-Z]{16}|Bearer [A-Za-z0-9+/]{20,}|DefaultEndpointsProtocol|AccountKey=)'
18
18
 
19
19
  if rg -q "$SECRET_PATTERN" "$FILE_PATH" 2>/dev/null; then
20
20
  MATCHES=$(rg -n "$SECRET_PATTERN" "$FILE_PATH" 2>/dev/null | head -5)
@@ -0,0 +1,61 @@
1
+ {
2
+ "hooks": {
3
+ "PreToolUse": [
4
+ {
5
+ "matcher": "Write|Edit|MultiEdit",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash ~/.claude/hooks/secret-scan.sh"
10
+ }
11
+ ]
12
+ },
13
+ {
14
+ "matcher": "Bash",
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "bash ~/.claude/hooks/identity-check.sh"
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ "PostToolUse": [
24
+ {
25
+ "matcher": "Write|Edit|MultiEdit",
26
+ "hooks": [
27
+ {
28
+ "type": "command",
29
+ "command": "bash ~/.claude/hooks/auto-format.sh"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "Stop": [
35
+ {
36
+ "matcher": "",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "bash ~/.claude/hooks/post-session-lint.sh"
41
+ },
42
+ {
43
+ "type": "prompt",
44
+ "prompt": "Review the conversation. Did you complete all tasks the user requested? Are there uncommitted changes that should be committed? Are there vault files (status.md, plan) that should be updated? Answer yes/no for each."
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ "PreCompact": [
50
+ {
51
+ "matcher": "",
52
+ "hooks": [
53
+ {
54
+ "type": "command",
55
+ "command": "bash ~/.claude/hooks/vault-checkpoint.sh"
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ }
@@ -2,12 +2,12 @@
2
2
  # Scope: All projects with git repos
3
3
 
4
4
  ## Identity — Invariants (BLOCK on violation)
5
- <!-- CUSTOMIZE: Replace with your git identities -->
6
- <!-- Example identity table: -->
7
- <!-- | Type | gitconfig | SSH Key | Email | includeIf Path | -->
8
- <!-- |------|-----------|---------|-------|----------------| -->
9
- <!-- | Work | ~/.gitconfig-work | ~/.ssh/id_ed25519_work | you@company.com | ~/Projects/Work/ | -->
10
- <!-- | Personal | ~/.gitconfig-personal | ~/.ssh/id_ed25519_personal | you@personal.com | ~/Projects/Personal/ | -->
5
+ <!-- NOTE: This is a TEMPLATE. install.sh generates the real file with actual identities. -->
6
+
7
+ | Type | gitconfig | SSH Key | Email | Path Match |
8
+ |------|-----------|---------|-------|------------|
9
+ | Work | {identity.work.gitconfig} | {identity.work.ssh_key} | {identity.work.email} | {identity.work.path_match} |
10
+ | Personal | {identity.personal.gitconfig} | {identity.personal.ssh_key} | {identity.personal.email} | {identity.personal.path_match} |
11
11
 
12
12
  **Verification:** `git --no-pager config user.email`
13
13
  **On mismatch:** STOP. Report `expected: X, got: Y`. Do not commit.
@@ -32,7 +32,7 @@
32
32
  - Keep working tree clean — no untracked debris, no partial stages.
33
33
 
34
34
  ## Pre-Commit Invariants (BLOCK on violation)
35
- 1. Secret scan staged files: `rg "(sk-|ghp_|pplx-|AKIA|Bearer [A-Za-z0-9+/]{20,})" $(git diff --staged --name-only)`
35
+ 1. Secret scan staged files: `rg "(sk-|ghp_|pplx-|AKIA|Bearer [A-Za-z0-9+/]{20,}|DefaultEndpointsProtocol|AccountKey=)" $(git diff --staged --name-only)`
36
36
  2. Confirm `git config user.email` matches expected identity for this repo path.
37
37
  3. Run stack linter (see terraform.md, github-actions.md as applicable).
38
38
  4. Run typecheck if applicable — no commits with type errors.
@@ -1,15 +1,16 @@
1
1
  # Profile
2
2
  # Universal — loads every session. Static context foundation.
3
- # No paths: scoping always in context
3
+ # NOTE: This is a TEMPLATE. install.sh generates the real file at ~/.claude/rules/profile.md
4
4
 
5
5
  ## Setup Detection
6
- If "Your Name" or "Your Role" appears below, this file is not configured.
7
- STOP and tell the user:
8
- "profile.md is not configured. Fill in Who You Are Working With below before starting."
9
- Do NOT proceed with an empty profile — it causes silent context gaps every session.
6
+ If "{identity.name}" or "Your Name" appears below, this file was not generated.
7
+ On first interaction of a session, mention: "profile.md has placeholder values — run install.sh to configure your identity."
8
+ Continue with the task an unconfigured profile degrades calibration but does not block work.
10
9
 
11
10
  ## Who You Are Working With
12
- Your Name Your Role. Primary focus: your domains.
11
+ {identity.name}{identity.role}. Primary focus: {identity.domains}.
12
+
13
+ Operates across identities (see git-workflow.md Identity table for details).
13
14
 
14
15
  ## Active Projects
15
16
  Project context is loaded dynamically per session via /scaffold-new and /standup.
@@ -21,6 +22,7 @@ To see current project state: run /standup.
21
22
  - Writes for two audiences: technical implementers and non-technical stakeholders.
22
23
  - Communication style: direct, structured, What/So What/Now What.
23
24
  - Deliverables over discussion — prefers concrete output to long explanations.
25
+ - Single-pass intake: complete intake in single-pass messages, not sequential round-trips.
24
26
  - Vault-first: decisions, specs, and plans live in the vault, not in conversation.
25
27
  - Git identity is project-specific — always verify before committing.
26
28
 
@@ -28,4 +30,5 @@ To see current project state: run /standup.
28
30
  - Never assume a dormant project is dead — verify from status.md before deprioritizing.
29
31
  - When project context is ambiguous: check CWD against local_path in vault _index.md before asking.
30
32
  - Context7 is installed — always use it before implementing with an external library or API.
31
- - Add any project-agnostic rules or constraints here (not project-specific — those go in repo CLAUDE.md).
33
+ - Every option presented MUST include a recommendation and why.
34
+ - Scale response length to question complexity — short question, short answer.
@@ -5,10 +5,19 @@
5
5
 
6
6
  ## Vault Backend
7
7
 
8
- Vault backend is Obsidian. Search: `obsidian search query="{query}" limit=5`
9
- Scope searches with `path=` filter: `obsidian search query="{query}" path="01_Projects" limit=5`
8
+ Read `vault_backend` from `~/.claude/praxis.config.json`.
10
9
 
11
- **Note:** The Obsidian CLI requires Obsidian to be running. If Obsidian is not running, vault search will fail.
10
+ | Backend | Search command | Requires |
11
+ |---------|---------------|----------|
12
+ | obsidian | `obsidian search query="{query}" limit=5` | Obsidian running |
13
+ | ripgrep | `rg --files-with-matches "{query}" {vault_path}` | rg installed |
14
+
15
+ Scope searches:
16
+ - obsidian: `obsidian search query="{query}" path="01_Projects" limit=5`
17
+ - ripgrep: `rg --files-with-matches "{query}" {vault_path}/01_Projects`
18
+
19
+ If backend is `obsidian` and Obsidian is not running, vault search will fail.
20
+ If backend is unset, default to `obsidian`.
12
21
  Use `[[wikilinks]]` for all internal vault references.
13
22
 
14
23
  ## Vault Location
@@ -1,5 +1,9 @@
1
- # Architecture Rules
2
- <!-- Universal — applies when designing systems, documenting decisions, writing proposals -->
1
+ ---
2
+ name: architecture-patterns
3
+ description: "Architecture decision and design documentation standards. Auto-triggers when writing ADRs, technical specs, risk register entries, system design documents, or any decision that affects system design, network topology, identity model, data residency, security posture, or compliance scope. Also triggers when writing status updates, blocker reports, or spec summaries that require What/So What/Now What structure."
4
+ ---
5
+
6
+ # Architecture Patterns
3
7
 
4
8
  ## Invariants — BLOCK on violation
5
9
 
@@ -22,8 +26,6 @@
22
26
  - If in doubt: repo = what runs, vault = why it runs that way.
23
27
  - Never put credentials, client-specific data, or engagement PII in the repo.
24
28
 
25
- ---
26
-
27
29
  ## Conventions — WARN on violation
28
30
 
29
31
  ### Specs before implementation
@@ -34,18 +36,8 @@
34
36
  - Phase completion criteria documented before the phase begins — not retroactively.
35
37
  - 99% complete is not complete. One remaining blocker = log it, don't round to done.
36
38
 
37
- ---
38
-
39
39
  ## Verification Commands
40
40
  ```bash
41
- # Check for ADRs missing required sections
42
41
  grep -rL "## Decision\|## Context\|## Consequences" {vault_path}/specs/ 2>/dev/null
43
-
44
- # Find specs older than 90 days that may be stale
45
42
  find {vault_path}/specs/ -name "*.md" -mtime +90 -ls 2>/dev/null
46
43
  ```
47
-
48
- ---
49
-
50
- ## Removal Condition
51
- Permanent. These are workflow guardrails, not project-specific.
@@ -1,11 +1,7 @@
1
1
  ---
2
2
  name: code-gc
3
3
  disable-model-invocation: true
4
- description: Detect code entropy in the current repo. Dead code, test debt, stale
5
- TODOs, oversized functions, commented-out blocks, unused deps. Two modes:
6
- lightweight (called by session-retro) and full audit (manual /code-gc).
7
- Never auto-deletes or auto-fixes. Side-effect skill — never auto-triggers.
8
- allowed-tools: Bash, Read, Write
4
+ description: "Detect code entropy in the current repo: dead code, test debt, stale TODOs, oversized functions, commented-out blocks, unused deps. Two modes: lightweight (called by session-retro) and full audit (manual /code-gc). Never auto-deletes or auto-fixes."
9
5
  ---
10
6
 
11
7
  # code-gc Skill
@@ -1,5 +1,9 @@
1
- # Communication Rules
2
- <!-- Universal — applies to all client-facing writing, proposals, status reports, specs -->
1
+ ---
2
+ name: communication-standards
3
+ description: "Client-facing writing standards. Auto-triggers when writing proposals, status reports, executive summaries, SOWs, deliverable documents, or any content targeting a non-technical audience. Also triggers when writing git commit messages, PR descriptions, or any text where AI attribution must be avoided. Covers executive-summary-first rule, What/So What/Now What structure, proposal format, audience calibration, and no-AI-attribution policy."
4
+ ---
5
+
6
+ # Communication Standards
3
7
 
4
8
  ## Invariants — BLOCK on violation
5
9
 
@@ -19,8 +23,6 @@
19
23
  "It's worth noting that", "In conclusion", "To summarize the above".
20
24
  - Never open with "In today's rapidly evolving landscape" or equivalent.
21
25
 
22
- ---
23
-
24
26
  ## Conventions — WARN on violation
25
27
 
26
28
  ### Proposal structure
@@ -54,16 +56,9 @@ agent-memory.jsonl
54
56
  .vault-path
55
57
  ```
56
58
 
57
- ---
58
-
59
59
  ## Verification Commands
60
60
  ```bash
61
- # Check commit messages for AI attribution
62
61
  git log --oneline -20 | grep -iE "(claude|ai-generated|co-authored by ai)"
63
-
64
- # Check staged markdown for AI filler phrases
65
62
  git diff --staged -- "*.md" | grep -iE "(certainly|absolutely|great question|i'd be happy)"
66
-
67
- # Verify .gitignore covers CLAUDE.md
68
- grep -q "CLAUDE.md" .gitignore && echo "✓ CLAUDE.md ignored" || echo "✗ CLAUDE.md NOT in .gitignore"
63
+ grep -q "CLAUDE.md" .gitignore && echo "✓" || echo "✗ CLAUDE.md NOT in .gitignore"
69
64
  ```
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: context-reset
3
+ disable-model-invocation: true
2
4
  description: Checkpoint current session state to vault files before a context reset. Use when context degradation is detected (repeated corrections, loop behavior, instruction drift).
3
5
  ---
4
6
 
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: context7-lookup
3
+ description: "Enforces the docs-first mandate from coding.md. Before implementing with any external library, framework, or API, use Context7 to retrieve current documentation. Activates when code references an external package, imports a third-party library, or calls an API that releases frequently."
4
+ ---
5
+
6
+ # context7-lookup Skill
7
+
8
+ ## When to Use
9
+
10
+ Before writing code that uses an external library, framework, or API:
11
+ 1. Resolve the library ID: `resolve-library-id` with the package name
12
+ 2. Query docs: `query-docs` with the resolved ID and your specific question
13
+ 3. Proceed with implementation using verified signatures
14
+
15
+ ## Flow
16
+
17
+ **Step 1 — Identify the library**
18
+ From the user's request or the code context, determine which library/API
19
+ needs documentation lookup.
20
+
21
+ **Step 2 — Resolve library ID**
22
+ Use the Context7 MCP tool `resolve-library-id`:
23
+ - Input: library name (e.g., "react", "express", "terraform azurerm")
24
+ - Output: resolved library ID for querying
25
+
26
+ **Step 3 — Query documentation**
27
+ Use the Context7 MCP tool `query-docs`:
28
+ - Input: resolved library ID + specific question about the method/API
29
+ - Output: current documentation with code examples
30
+
31
+ **Step 4 — Implement with verified signatures**
32
+ Use the documentation output as the authoritative source for:
33
+ - Method signatures and parameter types
34
+ - Constructor arguments
35
+ - Configuration options
36
+ - Return types and error cases
37
+
38
+ ## When Context7 Is Unavailable
39
+
40
+ If the MCP server is not running or returns an error:
41
+ 1. State that docs could not be verified
42
+ 2. Flag the specific method/API as "unverified against current version"
43
+ 3. Proceed with best-knowledge implementation but mark it for review
44
+
45
+ ## What NOT to Look Up
46
+
47
+ - Standard library functions (built into the language)
48
+ - Patterns you've already verified in this session
49
+ - Internal project code (use `rg` instead)
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: debug
3
+ disable-model-invocation: true
2
4
  description: Structured test-first debugging. Reproduce the bug, write a failing test, isolate root cause, fix, verify. Use for pure bugfixes — skips the full loop.
3
5
  ---
4
6
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: discover
3
+ disable-model-invocation: true
2
4
  description: Structured technical discovery — evaluate options, make recommendations with confidence levels. Use before /spec when you need to research before deciding.
3
5
  ---
4
6
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: discuss
3
+ disable-model-invocation: true
2
4
  description: Entry point for all feature work. Conversational problem framing — listen first, then synthesize scope. Use before /plan.
3
5
  ---
4
6
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: execute
3
+ disable-model-invocation: true
2
4
  description: Implementation phase — loads scoped context and works one milestone at a time. Use after plan is approved.
3
5
  ---
4
6
 
@@ -18,7 +20,6 @@ Load ONLY rules relevant to files being touched in this milestone:
18
20
  - GitHub Actions → `~/.claude/rules/github-actions.md`
19
21
  - PowerShell → `~/.claude/rules/powershell.md`
20
22
  - Git operations → `~/.claude/rules/git-workflow.md`
21
- - Security-sensitive changes → `~/.claude/rules/security.md`
22
23
 
23
24
  Do NOT load all rules. Context is scarce — spend it on implementation, not instructions.
24
25
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: fast
3
+ disable-model-invocation: true
2
4
  description: Skip planning for trivial changes. Edit, verify, commit. Use for typos, config tweaks, single-line fixes, and other changes too small for a plan.
3
5
  ---
4
6
 
@@ -1,6 +1,7 @@
1
1
  ---
2
+ name: kit
3
+ disable-model-invocation: true
2
4
  description: Activate or deactivate a domain AI-Kit. Use /kit:web-designer to activate, /kit:off to deactivate, /kit:list to show installed kits.
3
- allowed-tools: Bash(ls ~/.claude/kits/*)
4
5
  ---
5
6
 
6
7
  You are managing AI-Kit activation.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: managing-git-identities
3
+ description: "Guides setup and troubleshooting of multiple Git identities (SSH keys, commit author, GitHub CLI auth, includeIf directory routing). Activates when user discusses git accounts, commit identity mismatch, SSH key management, or gh auth switching."
4
+ ---
5
+
6
+ ## Two Independent Problems
7
+
8
+ Every commit stamps `user.name` and `user.email` into metadata.
9
+ This is separate from which credentials authenticate to the remote.
10
+ Solve both layers independently.
11
+
12
+ ## Methods (ranked simplest → most flexible)
13
+
14
+ ### 1. GitHub CLI (`gh auth switch`)
15
+ Requires gh >= 2.40.0. Stores OAuth tokens per account.
16
+
17
+ ```bash
18
+ gh auth login # first account
19
+ gh auth login --hostname github.com # second account
20
+ gh auth switch -u <username>
21
+ ```
22
+
23
+ Set commit identity locally after clone:
24
+ ```bash
25
+ git config --local user.name "Work Name"
26
+ git config --local user.email "work@company.com"
27
+ ```
28
+
29
+ ### 2. SSH Key Per Account
30
+ Map keys to host aliases in `~/.ssh/config`:
31
+
32
+ ```
33
+ Host github.com-personal
34
+ HostName github.com
35
+ User git
36
+ IdentityFile ~/.ssh/id_personal
37
+ IdentitiesOnly yes
38
+
39
+ Host github.com-work
40
+ HostName github.com
41
+ User git
42
+ IdentityFile ~/.ssh/id_work
43
+ IdentitiesOnly yes
44
+ ```
45
+
46
+ Clone with alias: `git clone git@github.com-work:org/repo.git`
47
+
48
+ ### 3. `includeIf` — Auto-Switch by Directory
49
+ Best when repos are organized by directory tree.
50
+
51
+ ```gitconfig
52
+ # ~/.gitconfig
53
+ [user]
54
+ name = Personal Name
55
+ email = personal@gmail.com
56
+
57
+ [includeIf "gitdir:~/work/"]
58
+ path = ~/work/.gitconfig
59
+ ```
60
+
61
+ ```gitconfig
62
+ # ~/work/.gitconfig
63
+ [user]
64
+ name = Work Name
65
+ email = work@company.com
66
+ ```
67
+
68
+ ### 4. HTTPS + Credential Manager + `useHttpPath`
69
+ For corporate proxy environments:
70
+
71
+ ```gitconfig
72
+ [credential "https://github.com"]
73
+ useHttpPath = true
74
+ helper = manager
75
+ ```
76
+
77
+ ## Decision Matrix
78
+
79
+ | Scenario | Method |
80
+ |---|---|
81
+ | GitHub-only, minimal config | `gh auth switch` |
82
+ | Multi-platform (GitHub + GitLab) | SSH aliases |
83
+ | Directory-organized repos | `includeIf` + SSH or HTTPS |
84
+ | Corporate HTTPS-only | Credential Manager + `useHttpPath` |
85
+
86
+ ## Praxis Integration
87
+
88
+ Praxis enforces identity at commit time via:
89
+ - `git-workflow.md` identity table (expected email per path)
90
+ - `identity-check.sh` hook (hard blocks on mismatch)
91
+ - `praxis.config.json` identity section (machine-local, never committed)
92
+
93
+ When setting up a new machine, run `install.sh` — it prompts for identity
94
+ details and generates `profile.md` and `git-workflow.md` from templates.
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: next
3
+ disable-model-invocation: true
2
4
  description: Auto-advance to the next workflow phase. Reads status.md loop_position and plan state to determine what comes next. Use anytime to keep moving.
3
5
  ---
4
6
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ name: plan
3
+ disable-model-invocation: true
2
4
  description: Create a dated work plan for the current project. Writes to vault plans/ directory and updates status.md current_plan field. Use when starting any multi-step task.
3
5
  ---
4
6