-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtechpack.yaml
More file actions
102 lines (89 loc) · 4.15 KB
/
techpack.yaml
File metadata and controls
102 lines (89 loc) · 4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
schemaVersion: 1
identifier: shared-memories
displayName: "Shared Memories"
description: Team-shared Claude Code memories via a dedicated git repo
author: Bruno Guidolim
minMCSVersion: "2026.4.12"
# Doctor-check scripts are wired via `supplementaryDoctorChecks.command`, which
# the unreferenced-file heuristic doesn't inspect. Silence those warnings.
ignore:
- scripts/doctor-memories.sh
- scripts/doctor-memories-remote.sh
prompts:
- key: MEMORIES_REPO_URL
type: input
label: "Clone URL for the shared memories repo (e.g. git@github.com:org/memories.git)"
- key: MEMORIES_BRANCH
type: input
label: "Branch name on the shared repo that holds memory files and this pack (e.g. main)"
default: "main"
- key: MEMORIES_AUTOPUSH_MODE
type: select
label: "Stop-hook auto-push behavior"
options:
- value: auto
label: "auto — writes auto-pushed, deletions parked (default)"
- value: full
label: "full — writes AND deletions auto-pushed"
- value: review
label: "review — nothing auto, per-turn pending-changes report"
default: auto
components:
# ── Dependencies ──────────────────────────────────────────
- id: jq
description: JSON processor required by hook scripts
brew: jq
# ── Hooks ─────────────────────────────────────────────────
- id: hook-memories-pull
displayName: Pull shared memories and flag stuck state
description: Fast-forwards the shared memories checkout on SessionStart. If a previous Stop hook's auto-push left uncommitted or unpushed work behind, emits a system-reminder warning so the engineer knows.
dependencies: [jq]
hookEvent: SessionStart
hookTimeout: 15
hook:
source: hooks/memories_pull.sh
destination: memories_pull.sh
- id: hook-memories-autopush
displayName: Sync shared memories
description: After Claude stops, handles new/modified memory files according to MEMORIES_AUTOPUSH_MODE (auto/full/review). Default auto matches today — writes auto-pushed, deletions parked for manual review. Unconventional filenames halt everything until fixed in all modes. See README for the mode reference.
dependencies: [jq]
hookEvent: Stop
hookTimeout: 30
hookAsync: true
hook:
source: hooks/memories_autopush.sh
destination: memories_autopush.sh
- id: hook-memories-announce
displayName: Surface review-mode memory writes to Claude
description: PostToolUse hook that injects additionalContext after a memory file is written, only when MEMORIES_AUTOPUSH_MODE=review. Lets Claude proactively mention pending memory review in conversation. Silent in auto/full modes.
dependencies: [jq]
hookEvent: PostToolUse
hookMatcher: Write|Edit|MultiEdit
hookTimeout: 5
hook:
source: hooks/memories_announce.sh
destination: memories_announce.sh
# ── Configuration ─────────────────────────────────────────
- id: settings
displayName: Default auto-push mode
description: Writes the chosen MEMORIES_AUTOPUSH_MODE value into .claude/settings.local.json so the Stop hook reads it. Re-run `mcs sync` to change modes, or edit settings.local.json directly.
settingsFile: config/settings.json
- id: gitignore
description: Globally ignore the memories symlink, the backing sparse checkout, and any migration backup dirs so they're never tracked by parent repos
isRequired: true
gitignore:
- .claude/memories
- .claude/.memories-repo
- .claude/.memories-migration-*
configureProject:
script: scripts/configure-memories.sh
supplementaryDoctorChecks:
- type: shellScript
name: Shared memories setup (checkout + symlink)
section: Shared Memories
command: scripts/doctor-memories.sh
fixScript: scripts/configure-memories.sh
- type: shellScript
name: Shared memories remote access (auth + reachability)
section: Shared Memories
command: scripts/doctor-memories-remote.sh