@esoteric-logic/praxis-harness 2.0.0 → 2.0.1
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.
- package/base/CLAUDE.md +17 -15
- package/base/hooks/auto-format.sh +40 -0
- package/base/hooks/identity-check.sh +55 -0
- package/base/hooks/secret-scan.sh +1 -1
- package/base/hooks/settings-hooks.json +61 -0
- package/base/rules/git-workflow.md +7 -7
- package/base/rules/profile.md +10 -7
- package/base/rules/vault.md +12 -3
- package/base/{rules/architecture.md → skills/architecture-patterns/SKILL.md} +12 -14
- package/base/skills/code-gc/SKILL.md +0 -1
- package/base/{rules/communication.md → skills/communication-standards/SKILL.md} +13 -12
- package/base/{commands/context-reset.md → skills/context-reset/SKILL.md} +2 -0
- package/base/skills/context7-lookup/SKILL.md +53 -0
- package/base/{commands/debug.md → skills/debug/SKILL.md} +2 -0
- package/base/{commands/discover.md → skills/discover/SKILL.md} +2 -0
- package/base/{commands/discuss.md → skills/discuss/SKILL.md} +2 -0
- package/base/{commands/execute.md → skills/execute/SKILL.md} +2 -1
- package/base/{commands/fast.md → skills/fast/SKILL.md} +2 -0
- package/base/{commands/kit.md → skills/kit/SKILL.md} +2 -1
- package/base/skills/managing-git-identities/SKILL.md +98 -0
- package/base/{commands/next.md → skills/next/SKILL.md} +2 -0
- package/base/{commands/plan.md → skills/plan/SKILL.md} +2 -0
- package/base/skills/plan-writer/SKILL.md +72 -0
- package/base/skills/pre-commit-lint/SKILL.md +0 -1
- package/base/{commands/quick.md → skills/quick/SKILL.md} +2 -0
- package/base/{commands/review.md → skills/review/SKILL.md} +33 -9
- package/base/{commands/risk.md → skills/risk/SKILL.md} +2 -0
- package/base/skills/scaffold-new/SKILL.md +0 -1
- package/base/skills/secret-scan/SKILL.md +59 -0
- package/base/skills/session-retro/SKILL.md +0 -1
- package/base/{commands/ship.md → skills/ship/SKILL.md} +3 -1
- package/base/skills/{code-simplifier → simplify}/SKILL.md +2 -3
- package/base/{commands/spec.md → skills/spec/SKILL.md} +2 -0
- package/base/{commands/standup.md → skills/standup/SKILL.md} +2 -0
- package/base/skills/status-update/SKILL.md +50 -0
- package/base/skills/vault-gc/SKILL.md +0 -1
- package/base/{commands/verify.md → skills/verify/SKILL.md} +2 -0
- package/base/skills/verify-app/SKILL.md +0 -1
- package/package.json +1 -1
- package/scripts/lint-harness.sh +7 -3
- package/base/commands/simplify.md +0 -15
- package/base/rules/code-quality.md +0 -65
- package/base/rules/security.md +0 -40
- 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
|
-
|
|
47
|
-
|
|
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
|
-
-
|
|
98
|
+
- Client-facing writing → auto-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,
|
|
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` |
|
|
130
|
-
| `~/.claude/rules/
|
|
131
|
-
| `~/.claude/rules/
|
|
132
|
-
| `~/.claude/rules/
|
|
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
|
-
<!--
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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.
|
package/base/rules/profile.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# Profile
|
|
2
2
|
# Universal — loads every session. Static context foundation.
|
|
3
|
-
#
|
|
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 "
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
33
|
+
- Every option presented MUST include a recommendation and why.
|
|
34
|
+
- Scale response length to question complexity — short question, short answer.
|
package/base/rules/vault.md
CHANGED
|
@@ -5,10 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
## Vault Backend
|
|
7
7
|
|
|
8
|
-
|
|
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
|
-
|
|
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,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
name: architecture-patterns
|
|
3
|
+
description: >
|
|
4
|
+
Architecture decision and design documentation standards. Auto-triggers when
|
|
5
|
+
writing ADRs, technical specs, risk register entries, system design documents,
|
|
6
|
+
or any decision that affects system design, network topology, identity model,
|
|
7
|
+
data residency, security posture, or compliance scope. Also triggers when
|
|
8
|
+
writing status updates, blocker reports, or spec summaries that require
|
|
9
|
+
What/So What/Now What structure.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Architecture Patterns
|
|
3
13
|
|
|
4
14
|
## Invariants — BLOCK on violation
|
|
5
15
|
|
|
@@ -22,8 +32,6 @@
|
|
|
22
32
|
- If in doubt: repo = what runs, vault = why it runs that way.
|
|
23
33
|
- Never put credentials, client-specific data, or engagement PII in the repo.
|
|
24
34
|
|
|
25
|
-
---
|
|
26
|
-
|
|
27
35
|
## Conventions — WARN on violation
|
|
28
36
|
|
|
29
37
|
### Specs before implementation
|
|
@@ -34,18 +42,8 @@
|
|
|
34
42
|
- Phase completion criteria documented before the phase begins — not retroactively.
|
|
35
43
|
- 99% complete is not complete. One remaining blocker = log it, don't round to done.
|
|
36
44
|
|
|
37
|
-
---
|
|
38
|
-
|
|
39
45
|
## Verification Commands
|
|
40
46
|
```bash
|
|
41
|
-
# Check for ADRs missing required sections
|
|
42
47
|
grep -rL "## Decision\|## Context\|## Consequences" {vault_path}/specs/ 2>/dev/null
|
|
43
|
-
|
|
44
|
-
# Find specs older than 90 days that may be stale
|
|
45
48
|
find {vault_path}/specs/ -name "*.md" -mtime +90 -ls 2>/dev/null
|
|
46
49
|
```
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## Removal Condition
|
|
51
|
-
Permanent. These are workflow guardrails, not project-specific.
|
|
@@ -5,7 +5,6 @@ description: Detect code entropy in the current repo. Dead code, test debt, stal
|
|
|
5
5
|
TODOs, oversized functions, commented-out blocks, unused deps. Two modes:
|
|
6
6
|
lightweight (called by session-retro) and full audit (manual /code-gc).
|
|
7
7
|
Never auto-deletes or auto-fixes. Side-effect skill — never auto-triggers.
|
|
8
|
-
allowed-tools: Bash, Read, Write
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# code-gc Skill
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
name: communication-standards
|
|
3
|
+
description: >
|
|
4
|
+
Client-facing writing standards. Auto-triggers when writing proposals,
|
|
5
|
+
status reports, executive summaries, SOWs, deliverable documents, or any
|
|
6
|
+
content targeting a non-technical audience. Also triggers when writing
|
|
7
|
+
git commit messages, PR descriptions, or any text where AI attribution
|
|
8
|
+
must be avoided. Covers executive-summary-first rule, What/So What/Now What
|
|
9
|
+
structure, proposal format, audience calibration, and no-AI-attribution policy.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Communication Standards
|
|
3
13
|
|
|
4
14
|
## Invariants — BLOCK on violation
|
|
5
15
|
|
|
@@ -19,8 +29,6 @@
|
|
|
19
29
|
"It's worth noting that", "In conclusion", "To summarize the above".
|
|
20
30
|
- Never open with "In today's rapidly evolving landscape" or equivalent.
|
|
21
31
|
|
|
22
|
-
---
|
|
23
|
-
|
|
24
32
|
## Conventions — WARN on violation
|
|
25
33
|
|
|
26
34
|
### Proposal structure
|
|
@@ -54,16 +62,9 @@ agent-memory.jsonl
|
|
|
54
62
|
.vault-path
|
|
55
63
|
```
|
|
56
64
|
|
|
57
|
-
---
|
|
58
|
-
|
|
59
65
|
## Verification Commands
|
|
60
66
|
```bash
|
|
61
|
-
# Check commit messages for AI attribution
|
|
62
67
|
git log --oneline -20 | grep -iE "(claude|ai-generated|co-authored by ai)"
|
|
63
|
-
|
|
64
|
-
# Check staged markdown for AI filler phrases
|
|
65
68
|
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"
|
|
69
|
+
grep -q "CLAUDE.md" .gitignore && echo "✓" || echo "✗ CLAUDE.md NOT in .gitignore"
|
|
69
70
|
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context7-lookup
|
|
3
|
+
description: >
|
|
4
|
+
Enforces the docs-first mandate from coding.md. Before implementing with
|
|
5
|
+
any external library, framework, or API, use Context7 to retrieve current
|
|
6
|
+
documentation. Activates when code references an external package, imports
|
|
7
|
+
a third-party library, or calls an API that releases frequently.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# context7-lookup Skill
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Before writing code that uses an external library, framework, or API:
|
|
15
|
+
1. Resolve the library ID: `resolve-library-id` with the package name
|
|
16
|
+
2. Query docs: `query-docs` with the resolved ID and your specific question
|
|
17
|
+
3. Proceed with implementation using verified signatures
|
|
18
|
+
|
|
19
|
+
## Flow
|
|
20
|
+
|
|
21
|
+
**Step 1 — Identify the library**
|
|
22
|
+
From the user's request or the code context, determine which library/API
|
|
23
|
+
needs documentation lookup.
|
|
24
|
+
|
|
25
|
+
**Step 2 — Resolve library ID**
|
|
26
|
+
Use the Context7 MCP tool `resolve-library-id`:
|
|
27
|
+
- Input: library name (e.g., "react", "express", "terraform azurerm")
|
|
28
|
+
- Output: resolved library ID for querying
|
|
29
|
+
|
|
30
|
+
**Step 3 — Query documentation**
|
|
31
|
+
Use the Context7 MCP tool `query-docs`:
|
|
32
|
+
- Input: resolved library ID + specific question about the method/API
|
|
33
|
+
- Output: current documentation with code examples
|
|
34
|
+
|
|
35
|
+
**Step 4 — Implement with verified signatures**
|
|
36
|
+
Use the documentation output as the authoritative source for:
|
|
37
|
+
- Method signatures and parameter types
|
|
38
|
+
- Constructor arguments
|
|
39
|
+
- Configuration options
|
|
40
|
+
- Return types and error cases
|
|
41
|
+
|
|
42
|
+
## When Context7 Is Unavailable
|
|
43
|
+
|
|
44
|
+
If the MCP server is not running or returns an error:
|
|
45
|
+
1. State that docs could not be verified
|
|
46
|
+
2. Flag the specific method/API as "unverified against current version"
|
|
47
|
+
3. Proceed with best-knowledge implementation but mark it for review
|
|
48
|
+
|
|
49
|
+
## What NOT to Look Up
|
|
50
|
+
|
|
51
|
+
- Standard library functions (built into the language)
|
|
52
|
+
- Patterns you've already verified in this session
|
|
53
|
+
- Internal project code (use `rg` instead)
|
|
@@ -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,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,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: managing-git-identities
|
|
3
|
+
description: >
|
|
4
|
+
Guides setup and troubleshooting of multiple Git identities
|
|
5
|
+
(SSH keys, commit author, GitHub CLI auth, includeIf directory
|
|
6
|
+
routing). Activates when user discusses git accounts, commit
|
|
7
|
+
identity mismatch, SSH key management, or gh auth switching.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Two Independent Problems
|
|
11
|
+
|
|
12
|
+
Every commit stamps `user.name` and `user.email` into metadata.
|
|
13
|
+
This is separate from which credentials authenticate to the remote.
|
|
14
|
+
Solve both layers independently.
|
|
15
|
+
|
|
16
|
+
## Methods (ranked simplest → most flexible)
|
|
17
|
+
|
|
18
|
+
### 1. GitHub CLI (`gh auth switch`)
|
|
19
|
+
Requires gh >= 2.40.0. Stores OAuth tokens per account.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
gh auth login # first account
|
|
23
|
+
gh auth login --hostname github.com # second account
|
|
24
|
+
gh auth switch -u <username>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Set commit identity locally after clone:
|
|
28
|
+
```bash
|
|
29
|
+
git config --local user.name "Work Name"
|
|
30
|
+
git config --local user.email "work@company.com"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. SSH Key Per Account
|
|
34
|
+
Map keys to host aliases in `~/.ssh/config`:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Host github.com-personal
|
|
38
|
+
HostName github.com
|
|
39
|
+
User git
|
|
40
|
+
IdentityFile ~/.ssh/id_personal
|
|
41
|
+
IdentitiesOnly yes
|
|
42
|
+
|
|
43
|
+
Host github.com-work
|
|
44
|
+
HostName github.com
|
|
45
|
+
User git
|
|
46
|
+
IdentityFile ~/.ssh/id_work
|
|
47
|
+
IdentitiesOnly yes
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Clone with alias: `git clone git@github.com-work:org/repo.git`
|
|
51
|
+
|
|
52
|
+
### 3. `includeIf` — Auto-Switch by Directory
|
|
53
|
+
Best when repos are organized by directory tree.
|
|
54
|
+
|
|
55
|
+
```gitconfig
|
|
56
|
+
# ~/.gitconfig
|
|
57
|
+
[user]
|
|
58
|
+
name = Personal Name
|
|
59
|
+
email = personal@gmail.com
|
|
60
|
+
|
|
61
|
+
[includeIf "gitdir:~/work/"]
|
|
62
|
+
path = ~/work/.gitconfig
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```gitconfig
|
|
66
|
+
# ~/work/.gitconfig
|
|
67
|
+
[user]
|
|
68
|
+
name = Work Name
|
|
69
|
+
email = work@company.com
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 4. HTTPS + Credential Manager + `useHttpPath`
|
|
73
|
+
For corporate proxy environments:
|
|
74
|
+
|
|
75
|
+
```gitconfig
|
|
76
|
+
[credential "https://github.com"]
|
|
77
|
+
useHttpPath = true
|
|
78
|
+
helper = manager
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Decision Matrix
|
|
82
|
+
|
|
83
|
+
| Scenario | Method |
|
|
84
|
+
|---|---|
|
|
85
|
+
| GitHub-only, minimal config | `gh auth switch` |
|
|
86
|
+
| Multi-platform (GitHub + GitLab) | SSH aliases |
|
|
87
|
+
| Directory-organized repos | `includeIf` + SSH or HTTPS |
|
|
88
|
+
| Corporate HTTPS-only | Credential Manager + `useHttpPath` |
|
|
89
|
+
|
|
90
|
+
## Praxis Integration
|
|
91
|
+
|
|
92
|
+
Praxis enforces identity at commit time via:
|
|
93
|
+
- `git-workflow.md` identity table (expected email per path)
|
|
94
|
+
- `identity-check.sh` hook (hard blocks on mismatch)
|
|
95
|
+
- `praxis.config.json` identity section (machine-local, never committed)
|
|
96
|
+
|
|
97
|
+
When setting up a new machine, run `install.sh` — it prompts for identity
|
|
98
|
+
details and generates `profile.md` and `git-workflow.md` from templates.
|