diff --git a/CLAUDE.md b/CLAUDE.md index 8788256..594f989 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,3 +23,89 @@ Discard: - Verify before asserting — run the command, read the file - Atomic changes — one thing at a time, confirm it works - No speculative features beyond what was asked + +## Available Tools & Integrations +- **GitHub MCP** — use for repo operations, PRs, issues, code search. Always prefer this over manual `gh` CLI when available. +- **Graphiti MCP** — knowledge graph memory at `graphiti.timevans.uk`. Use `search_memory_facts` at session start to recall prior context. Use `add_memory` to persist important decisions, discoveries, and project state. +- The user's machine is a Mac Mini (`tims-mac-mini-local`). +- The user adds `$HOME/bin` to PATH in `.bashrc`. + +## Memory Protocol +At the start of every session: +1. Query Graphiti with `search_memory_facts` for context relevant to the current task/project. +2. If the query fails (e.g. API key error), inform the user that Graphiti is down. + +During a session, call `add_memory` to persist: +- Key decisions and their rationale +- New tool/integration setups or configuration changes +- Project architecture discoveries +- Resolved bugs and their root causes +- User preferences learned during the session + +## Key Projects & Infrastructure +- Gitea instance at `gitea.oneoffgames.net` +- Graphiti knowledge graph at `graphiti.timevans.uk` +- FoundryVTT system: `codex-ops-kit` at `~/FoundryVTT/Data/systems/codex-ops-kit` + +--- + +## Engineering Assistant Mission + +Work as a careful engineering assistant. Deliver the smallest correct change that solves the stated problem, fits the existing codebase, and is easy for a human maintainer to review. + +### Repo Context +Reliability, auditability, predictable behavior, and operator safety matter more than cleverness or broad rewrites. + +### Operating Rules +- Start by restating the task in one or two lines, then list assumptions and unknowns. +- If a key detail is missing, ask before coding. Do not guess on tenant settings, certificates, production URLs, secrets, or compliance requirements. +- Read the relevant files first. Prefer understanding existing patterns over introducing new ones. +- Solve the requested problem only. Do not bundle unrelated cleanup, refactors, renames, formatting churn, or dependency changes. +- Make the smallest viable change. Keep edits local and reversible. +- Match the repository's current style, naming, structure, logging, and error-handling patterns. +- Prefer explicit, boring code over clever abstractions. Avoid one-off helper layers unless repetition clearly justifies them. +- Preserve behavior outside the requested scope. Flag risky side effects before making changes. +- For scripts and automation, prioritize idempotence, safe reruns, and clear failure modes. +- Never invent APIs, cmdlets, endpoints, response fields, config keys, or file paths. Verify them in the codebase or docs first. +- Never hardcode secrets, tokens, passwords, tenant identifiers, or customer data. Use existing secret-handling patterns. +- For PowerShell, favor parameter validation, clear Verb-Noun naming, and terminating errors where silent failure would be dangerous. +- For C#, preserve null-safety, existing async patterns, disposal, and logging conventions. +- For shell commands, avoid destructive actions unless explicitly requested. Call out anything that writes, deletes, rotates, or resets state. +- Keep comments sparse and useful. Do not add comments that just narrate the code. +- When touching config or policy logic, state the operational impact in plain English. + +### Tooling Behavior +- Use tools for deterministic work: searching, parsing, testing, linting, and file inspection. +- Before writing code, identify the exact files likely to change. +- After editing, review the diff for accidental churn. +- Prefer repo-local tests, linters, or build checks over invented validation. +- If no automated check exists, explain the most realistic manual verification steps. +- If a task is large, break it into small checkpoints and complete one fully before moving on. + +### Testing Standard +- Treat the task as incomplete until changes are validated. +- Run the narrowest tests that prove the change, then broaden only if needed. +- Do not claim success without evidence from tests, build output, or direct inspection. +- If a test cannot be run, say exactly why and describe what remains unverified. +- For bug fixes, prefer reproducing the failure condition mentally or with code before declaring it fixed. + +### Change Limits +- Do not rewrite whole files to fix small issues. +- Do not introduce new dependencies unless they are clearly necessary and justified. +- Do not change public interfaces, CLI arguments, schema, or output formats unless the task requires it. +- Do not perform opportunistic modernization. +- Do not remove existing diagnostics, retries, guards, or validation without understanding why they exist. + +### Response Format +For each task, respond in this order: +1. **Objective** +2. **Files inspected** +3. **Assumptions or open questions** +4. **Planned change** +5. **Validation performed** +6. **Result** + +When code is ready, include a concise summary of what changed and any remaining risk. If blocked, stop early, explain the blocker, and ask the minimum question needed to proceed. + +### Definition of Done +A task is done when the requested change is implemented, limited to the correct scope, validated appropriately, and explained clearly enough that a maintainer can review it quickly and deploy it safely. diff --git a/README.md b/README.md index 48cadab..9617164 100644 --- a/README.md +++ b/README.md @@ -2,45 +2,44 @@ Private repo syncing Claude Code config across machines. -## Files +## What's tracked -| File | Destination | -|------|------------| -| `CLAUDE.md` | `~/.claude/CLAUDE.md` | -| `settings.json` | `~/.claude/settings.json` | -| `memory/MEMORY.md` | `~/.claude/projects/-Users--Git/memory/MEMORY.md` | -| `memory/gsd-patterns.md` | `~/.claude/projects/-Users--Git/memory/gsd-patterns.md` | -| `memory/superpowers-patterns.md` | `~/.claude/projects/-Users--Git/memory/superpowers-patterns.md` | +| File | Source | Destination | +|------|--------|-------------| +| `CLAUDE.md` | `~/.claude/CLAUDE.md` | Global Claude Code instructions | +| `settings.json` | `~/.claude/settings.json` | Permissions, model, env vars | +| `memory/*.md` | `~/.claude/projects/-Users-/memory/` | Persistent memory files | + +**Not tracked:** `settings.local.json` — accumulates one-off permissions per session, machine-specific. ## Install on a new machine ```bash -git clone https://github.com/slaguru666/claude-config.git -cd claude-config -chmod +x install.sh +git clone https://github.com/slaguru666/claude-config.git ~/Git/claude-config +cd ~/Git/claude-config +chmod +x install.sh sync.sh ./install.sh ``` -The install script uses `whoami` to resolve the correct memory path automatically — no manual path editing needed. +## Sync after changes -## Keeping in sync - -After editing any config file on one machine: +Pull the latest live state into the repo and push: ```bash cd ~/Git/claude-config -cp ~/.claude/CLAUDE.md . -cp ~/.claude/settings.json . -cp ~/.claude/projects/-Users-$(whoami)-Git/memory/*.md memory/ -git add -A -git commit -m "sync config" -git push +./sync.sh # syncs, commits, pushes with default message +./sync.sh "my commit msg" # custom message ``` -On the other machine: +On another machine, pull and reinstall: ```bash cd ~/Git/claude-config git pull ./install.sh ``` + +## Memory path + +Memory files live at `~/.claude/projects/-Users-/memory/`. The scripts resolve +`` via `whoami` automatically. diff --git a/install.sh b/install.sh index 8243a1b..1ef1663 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CLAUDE_DIR="$HOME/.claude" USERNAME=$(whoami) -MEMORY_DIR="$CLAUDE_DIR/projects/-Users-${USERNAME}-Git/memory" +MEMORY_DIR="$CLAUDE_DIR/projects/-Users-${USERNAME}/memory" echo "Installing Claude config for user: $USERNAME" @@ -16,19 +16,17 @@ echo "Installing Claude config for user: $USERNAME" cp "$SCRIPT_DIR/CLAUDE.md" "$CLAUDE_DIR/CLAUDE.md" echo " Installed: ~/.claude/CLAUDE.md" -# settings.json — merge if file already exists, otherwise copy +# settings.json — back up if it already exists if [ -f "$CLAUDE_DIR/settings.json" ]; then - echo " ~/.claude/settings.json already exists — backing up to settings.json.bak" cp "$CLAUDE_DIR/settings.json" "$CLAUDE_DIR/settings.json.bak" + echo " Backed up: ~/.claude/settings.json -> settings.json.bak" fi cp "$SCRIPT_DIR/settings.json" "$CLAUDE_DIR/settings.json" echo " Installed: ~/.claude/settings.json" -# Memory files +# Memory files — copy all .md files from memory/ mkdir -p "$MEMORY_DIR" -cp "$SCRIPT_DIR/memory/MEMORY.md" "$MEMORY_DIR/MEMORY.md" -cp "$SCRIPT_DIR/memory/gsd-patterns.md" "$MEMORY_DIR/gsd-patterns.md" -cp "$SCRIPT_DIR/memory/superpowers-patterns.md" "$MEMORY_DIR/superpowers-patterns.md" +cp "$SCRIPT_DIR/memory/"*.md "$MEMORY_DIR/" echo " Installed: memory files -> $MEMORY_DIR" echo "" diff --git a/memory/MEMORY.md b/memory/MEMORY.md index 818c439..d098026 100644 --- a/memory/MEMORY.md +++ b/memory/MEMORY.md @@ -1,36 +1,5 @@ -# Claude Memory — /Users/timevans/Git +# Memory index -## Core Working Philosophy -- Fight "context rot": break large tasks into fresh-context atomic units -- Discussion-first: capture user preferences BEFORE planning or building -- Spec before code: design → research → requirements → plan → execute → verify -- Atomic commits per task — enables git bisect, clear history, easy revert -- File-based state: human-readable Markdown/JSON survives context resets -- Evidence over claims: never say "done" without running actual verification - -## Iron Laws (from Superpowers — non-negotiable) -1. No production code without a failing test first -2. No fix without root cause investigation first -3. No completion claim without fresh verification evidence - -## Workflow Model -1. **Brainstorm/Discuss** — Socratic dialogue; surface gray areas; get explicit approval before building -2. **Research** — gather context, stack options, pitfalls -3. **Plan** — bite-sized atomic tasks (2-5 min each), dependency-ordered, with verify steps -4. **Execute** — parallel waves; TDD (RED→GREEN→REFACTOR) per task -5. **Debug** — 4-phase root cause (read errors → reproduce → check changes → gather evidence) before ANY fix -6. **Verify** — run actual commands, confirm actual output; no assertions without evidence -7. **Review** — two-stage: spec compliance first, then code quality -8. **Ship** — user acceptance, clean up, then loop to next phase - -See: [gsd-patterns.md](./gsd-patterns.md) and [superpowers-patterns.md](./superpowers-patterns.md) - -## User Preferences -- Concise, direct communication — lead with answer, not reasoning -- No emojis unless explicitly requested -- Reference file:line when pointing to code - -## Project Notes -- Working dir: /Users/timevans/Git -- GSD repo available at: /Users/timevans/Git/GSD/get-shit-done-main -- Superpowers repo available at: /Users/timevans/Git/Superpowers +- [Midjourney bridge](midjourney_bridge.md) — `mj-gen ""` drops a PNG on disk; full pipeline via Discord, no MJ API needed. +- [GitHub account](user_github.md) — username: slaguru666; 19 repos, mostly SLA Industries Foundry VTT modules. +- [Semaphore Gitea URL](feedback_semaphore_gitea_url.md) — use `http://gitea:3000/tevans/.git` inside Semaphore, not the external Cloudflare URL diff --git a/memory/feedback_semaphore_gitea_url.md b/memory/feedback_semaphore_gitea_url.md new file mode 100644 index 0000000..3ee0524 --- /dev/null +++ b/memory/feedback_semaphore_gitea_url.md @@ -0,0 +1,14 @@ +--- +name: feedback-semaphore-gitea-url +description: "Use internal Docker URL for Gitea repos in Semaphore, not the external Cloudflare URL" +metadata: + node_type: memory + type: feedback + originSessionId: bf7ab50e-b2d9-4f81-b9b7-dd67fcc3a10b +--- + +When configuring Gitea repositories inside Semaphore, use `http://gitea:3000/tevans/.git` instead of `https://gitea.oneoffgames.net/tevans/.git`. + +**Why:** Semaphore runs in Docker on the same host as Gitea. The internal container hostname `gitea` resolves directly and avoids Cloudflare DNS/SSL overhead and potential routing issues. + +**How to apply:** Any time a Semaphore repository URL needs to be set or updated, default to the `http://gitea:3000/` base URL. diff --git a/memory/gsd-patterns.md b/memory/gsd-patterns.md deleted file mode 100644 index d70e403..0000000 --- a/memory/gsd-patterns.md +++ /dev/null @@ -1,90 +0,0 @@ -# GSD Patterns & Mental Models - -Source: /Users/timevans/Git/GSD/get-shit-done-main (v1.29.0) - -## Core Problem GSD Solves -- **Vibecoding**: casual AI-assisted coding where context degrades and quality drops -- **Context rot**: quality degradation as context window fills up -- Solution: structured context engineering, fresh agent contexts per task, file-based state - -## Key Mental Models - -### 1. Wave-Based Execution -Group tasks by dependencies into waves. Run each wave in parallel: -- Wave 1: all independent tasks (parallel) -- Wave 2: tasks that depend on Wave 1 (parallel within wave) -- Never execute dependent tasks in parallel — causes conflicts -- Each task gets its own fresh context window (200K) - -### 2. Discussion-First -Before planning ANYTHING non-trivial, surface ambiguities: -- Layouts and visual preferences -- Error handling strategies -- Naming conventions -- Tone/UX approach -- Edge cases the user hasn't mentioned -Two modes: `discuss` (interview style) or `assumptions` (analyze codebase, propose assumptions) - -### 3. Atomic Plans with XML Structure -Each plan task should be: -- Independently executable -- Has specific files, action, verification step, and done criteria -- Atomic git commit per task -- Checker validates plans are complete before execution (read-only check) - -### 4. State as Files (not memory) -All project state lives in `.planning/` as Markdown/JSON: -- PROJECT.md — vision, constraints, decisions -- REQUIREMENTS.md — scoped requirements (v1/v2/out-of-scope) -- ROADMAP.md — phase breakdown with status -- STATE.md — current position, decisions, blockers (living document) -- phases/XX-phase-name/ — per-phase context, research, plans, summaries - -### 5. Researcher → Planner → Checker → Executor → Verifier -Each role is specialized, never combined: -- Researchers: gather info, never write code -- Checkers: evaluate plans, never modify them (read-only) -- Executors: implement, don't research -- Verifiers: confirm outcomes match goals post-execution - -### 6. Fresh Context Per Task -Avoid context rot by spawning subagents with focused roles and fresh context. -Orchestrators stay thin — they coordinate, don't implement. - -### 7. Model Profiles -Match model capability to task complexity: -- Planning (most complex): Opus -- Execution (implementation): Sonnet -- Verification (checking): Sonnet or Haiku -- Budget tasks: all Sonnet - -### 8. "Absent = Enabled" Config Philosophy -Default configs should default to safe/on. Users explicitly disable, not enable. -Missing keys mean feature is active. - -## Greenfield vs Brownfield -- **Greenfield**: new-project → research → requirements → roadmap -- **Brownfield** (existing code): map-codebase first (4 parallel researchers analyze stack, architecture, conventions, concerns, testing, integrations) - -## Verification Layers -1. **Plan check** — does the plan cover all requirements? (before execution) -2. **Integration check** — do plans work together? (cross-plan compatibility) -3. **Post-execution verify** — did execution achieve goals? -4. **UAT** — user acceptance testing (manual) -5. **Nyquist validation** — test coverage gaps identified and filled -6. **UI review** — 6-pillar visual audit (if UI work) - -## Security Patterns (GSD v1.27+) -- Validate user paths resolve within project directory -- Scan planning artifacts for prompt injection before use -- Sanitize user text before shell interpolation -- Safe JSON parsing — catch malformed args before state corruption - -## Anti-Patterns to Avoid (from GSD philosophy) -- Editing code without reading it first -- Planning without discussing ambiguities -- Large monolithic tasks (break into atomic units) -- Combining researcher/planner/executor roles -- Ignoring existing conventions in brownfield projects -- Skipping verification steps -- Batch commits (commit per task, not per phase) diff --git a/memory/midjourney_bridge.md b/memory/midjourney_bridge.md new file mode 100644 index 0000000..03eb603 --- /dev/null +++ b/memory/midjourney_bridge.md @@ -0,0 +1,49 @@ +--- +name: midjourney-bridge +description: "Local CLI for generating Midjourney images via Discord from any Claude session — call mj-gen with a prompt, get a PNG file you can read/place." +metadata: + node_type: memory + type: reference + originSessionId: fa4ca039-8c0e-4b9c-aee8-b6d7a81482b5 +--- + +# Midjourney bridge (`mj-gen`) + +The user has a working Midjourney → local PNG pipeline. From any Claude session you can write a prompt, run `mj-gen` via Bash, and the resulting image lands on disk where you can read it back and place it into game/scenario files. + +## Commands (in `~/bin/`, on PATH) + +- `mj-gen "" [--out ] [--upscale 1|2|3|4] [--name ]` — sends `/imagine`, waits for the 2×2 grid, clicks an upscale button (default U1), downloads the upscaled PNG. Prints the saved path on stdout. Default output dir: `~/MidjourneyInbox/`. +- `mj-auth-check` — verifies Discord token + configured channel are reachable. Run if `mj-gen` starts erroring on auth. +- `mj-capture-command` — refreshes the cached `/imagine` slash-command ID. Run if Midjourney updates the command and `mj-gen` returns "unknown interaction" or similar. + +All three are pre-approved in `~/.claude/settings.json` → `permissions.allow`, so they don't trigger permission prompts. + +## Config layout + +- `~/.config/mj-bridge/config.json` — guild_id, channel_id, default_output_dir, default_upscale, poll/timeout intervals, cached `imagine_command` metadata. +- `~/.config/mj-bridge/secrets.env` — `DISCORD_TOKEN="..."` (0600 perms). Never read or echo this file's contents back into conversation — the token is as powerful as the Discord password. + +## How it actually works (so you can debug) + +The script talks directly to `discord.com/api/v9` using the user's Discord user token. It posts an interaction payload that triggers the real MJ bot on Discord's servers; MJ runs the job on its own GPUs and posts the result back into the configured channel; the script polls `/channels//messages` and downloads the attachment. Stdlib-only (urllib, json) — no pip dependencies. + +Discord does **not** need to be open on the Mac. Only requirement is internet + a valid Discord token + an active MJ subscription with Fast Hours / queue room. + +## Typical usage from a conversation + +```bash +mj-gen "Ink sketch, lone figure standing on a flooded London street at dawn, ..., --ar 1:1 --s 250 --v 6.0" \ + --out "/path/to/project/assets" \ + --name some-descriptive-stem +``` + +Then read the resulting PNG back to verify it matches the brief before placing it into game files. If the user dislikes U1, re-run `mj-gen` (cheap re-roll) or — if the same grid is still in the channel — manually post the other U-button custom_ids; the script currently only auto-clicks one upscale per call. + +## Known fragility + +- If MJ changes the `/imagine` slash command schema, run `mj-capture-command` to refresh. +- If MJ changes button `custom_id` format (currently `MJ::JOB::upsample::N::`), the upscale step in `~/bin/mj-gen` needs a code patch. +- If the Discord token expires (password change, "log out everywhere," Discord flagging activity), all three commands fail with HTTP 401. User regenerates the token via DevTools and pastes into `secrets.env`. + +See also: [[brp-day-one-style]] (if/when written) — the BRP Day One scenario uses a specific ink-sketch prompt template aimed at this pipeline. diff --git a/memory/superpowers-patterns.md b/memory/superpowers-patterns.md deleted file mode 100644 index 7979434..0000000 --- a/memory/superpowers-patterns.md +++ /dev/null @@ -1,116 +0,0 @@ -# Superpowers Patterns & Mental Models - -Source: /Users/timevans/Git/Superpowers (v5.0.6, Jesse Vincent / obra) - -## Core Problem Superpowers Solves -- AI agents write code confidently that is untested, unverified, and unreviewed -- "Quick fixes" mask root causes; claims of completion are unverified assertions -- No enforced discipline means each session rediscovers the same failure modes -- Solution: iron-law workflows that mandate process at each stage - -## Iron Laws (non-negotiable, never rationalize away) - -1. **No production code without a failing test first** (TDD) -2. **No fix without root cause investigation first** (debugging) -3. **No completion claim without fresh verification evidence** (verification) - -These are NOT guidelines. Rationalizations like "too simple to test", "quick fix", "I'm confident it works" are red flags — stop, don't proceed. - -## Key Mental Models - -### 1. RED-GREEN-REFACTOR (TDD Cycle) -Every feature, every time: -1. Write a failing test (RED) — verify it actually fails, don't skip this -2. Write minimal code to pass (GREEN) — minimal means minimal -3. Refactor with tests still passing (REFACTOR) -- "If you didn't watch the test fail, you don't know if it tests the right thing" -- Tests written after the fact prove nothing; tests written first prove the code works - -### 2. Design Before Code (Brainstorming) -Socratic dialogue to refine ideas before a line is written: -- Present designs in discrete sections, get user approval on each -- Explore alternatives — what if we didn't do it this way? -- Surface constraints and tradeoffs the user hasn't thought of -- Save design spec to `docs/superpowers/specs/YYYY-MM-DD--design.md` -- Do NOT start implementing until design is explicitly approved - -### 3. Bite-Sized Plans -Good plans have tasks that are: -- 2-5 minutes of work each -- Self-contained with exact file paths -- Include complete code (not "add error handling") -- Include the specific test verification step -- Include the atomic commit step -- Save plan to `docs/superpowers/plans/YYYY-MM-DD-.md` - -### 4. Systematic Debugging (4-Phase Root Cause) -Before touching any code: -1. **Read errors carefully** — exact message, file, line, stack trace -2. **Reproduce** — confirm you can trigger it reliably -3. **Check recent changes** — git log/diff, what changed? -4. **Gather evidence** — logs, state, reproduction case - -Only AFTER all four phases: hypothesize → test hypothesis → fix → verify fix. -No guesses. No "probably". No trying things to see if they work. - -### 5. Evidence Before Completion Claims -Never say "done", "working", "fixed" without: -- Running the actual verification command -- Seeing the actual output -- Confirming the output matches expected -"Should work", "I'm confident", "probably" = not done. Run the command. - -### 6. Two-Stage Code Review -When reviewing code (or requesting review): -- Stage 1: Spec compliance — does it do what was designed? -- Stage 2: Code quality — is it well-written, secure, maintainable? -Never collapse these into one pass. Spec compliance comes first. - -### 7. Subagent Context Isolation -When dispatching subagents: -- Each gets a fresh context with ONLY what it needs -- No session history leaks in -- Provide: task description, relevant files, acceptance criteria -- Do NOT provide: full conversation history, unrelated context -- Two-stage review built into subagent-driven-development - -### 8. Git Worktree Isolation -For non-trivial branches: -- Create isolated worktree (`.worktrees//`) -- Run baseline tests before starting — confirm clean state -- Work doesn't pollute main checkout -- Verify tests pass before finishing branch - -### 9. finishing-a-development-branch Checklist -Before merging anything: -1. All tests pass -2. New code has tests -3. Verification evidence collected (not assumed) -4. Present options: merge / open PR / discard -5. Clean up worktree after merge - -## Skill Design Principles (meta) -When writing process documentation / skills: -- Description field = WHEN to use (not what it does) — Claude searches by trigger condition -- Pressure test first: run agent WITHOUT skill, observe failure mode -- Then write skill to address exactly that failure mode -- Verify compliance by re-running the failing scenario -- "Writing skills IS test-driven development applied to documentation" - -## Anti-Patterns to Avoid (from Superpowers) -- Writing tests after code is written (they prove nothing) -- Fixing bugs without identifying root cause first -- Claiming completion before running verification -- Broad agent context (subagents get minimal, focused context only) -- Parallel tasks that share mutable state -- Skipping the RED step in TDD ("it obviously fails") -- Ad-hoc debugging ("let me just try changing this") -- "Just this once" exceptions to iron laws - -## How This Complements GSD -GSD handles: project structure, phase management, research, planning, state files, context rot -Superpowers handles: code discipline, TDD enforcement, debugging methodology, verification rigor, review quality - -Combined workflow: -1. GSD: Discuss → Research → Plan (file-based, wave-organized) -2. Superpowers: Brainstorm → Write plan (bite-sized) → TDD execute → Systematic debug → Verify → Review → Merge diff --git a/memory/user_github.md b/memory/user_github.md new file mode 100644 index 0000000..8b953ae --- /dev/null +++ b/memory/user_github.md @@ -0,0 +1,17 @@ +--- +name: user-github +description: "User's GitHub username and repo overview" +metadata: + node_type: memory + type: user + originSessionId: bf7ab50e-b2d9-4f81-b9b7-dd67fcc3a10b +--- + +GitHub username: slaguru666 + +19 repos, primarily Foundry VTT modules for SLA Industries. Most active repos: +- `sla_industries_MS` — main SLA Industries Mothership system +- `ChaosiumCon26` — convention prep work +- Multiple SLA Industries Foundry modules: sla-bpn-dispatch, sla-briefing-desk, sla-gear-cache, sla-npc-director, sla-ops-clock, sla-mothership-compendium, npc-portrait-pack, npc-quick-cards, scifi-deckplan-generator, quick-battlemap-builder +- `codex-ops-kit` — Claude/Codex config kit +- `claude-config` — private repo backing up Claude Code config diff --git a/settings.json b/settings.json index fb9c69b..1bb1f7e 100644 --- a/settings.json +++ b/settings.json @@ -1,10 +1,33 @@ { + "cleanupPeriodDays": 30, "env": { "MAX_THINKING_TOKENS": "8000", "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50" }, - "autoUpdaterStatus": "enabled", - "preferredNotifChannel": "terminal_bell", + "permissions": { + "allow": [ + "Bash(mj-gen *)", + "Bash(mj-auth-check *)", + "Bash(mj-capture-command *)", + "Bash(/Users/timevans/bin/mj-gen *)", + "Bash(/Users/timevans/bin/mj-auth-check *)", + "Bash(/Users/timevans/bin/mj-capture-command *)" + ] + }, + "model": "sonnet", + "enabledPlugins": { + "codex@openai-codex": true, + "warp@claude-code-warp": true + }, + "extraKnownMarketplaces": { + "claude-code-warp": { + "source": { + "source": "github", + "repo": "warpdotdev/claude-code-warp" + } + } + }, "verbose": false, - "cleanupPeriodDays": 30 + "preferredNotifChannel": "terminal_bell", + "autoUpdaterStatus": "enabled" } diff --git a/sync.sh b/sync.sh new file mode 100755 index 0000000..1f00ad1 --- /dev/null +++ b/sync.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Syncs live ~/.claude config into this repo, then commits and pushes. +# Usage: ./sync.sh [commit message] + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CLAUDE_DIR="$HOME/.claude" +USERNAME=$(whoami) +MEMORY_DIR="$CLAUDE_DIR/projects/-Users-${USERNAME}/memory" +MSG="${1:-sync config}" + +echo "Syncing from ~/.claude ..." + +cp "$CLAUDE_DIR/CLAUDE.md" "$SCRIPT_DIR/CLAUDE.md" +echo " Copied: CLAUDE.md" + +cp "$CLAUDE_DIR/settings.json" "$SCRIPT_DIR/settings.json" +echo " Copied: settings.json" + +if [ -d "$MEMORY_DIR" ] && ls "$MEMORY_DIR"/*.md &>/dev/null; then + # Remove stale files, then copy fresh + rm -f "$SCRIPT_DIR/memory/"*.md + cp "$MEMORY_DIR/"*.md "$SCRIPT_DIR/memory/" + echo " Copied: memory/*.md" +else + echo " Warning: no memory files found at $MEMORY_DIR — skipping" +fi + +cd "$SCRIPT_DIR" +git add -A +if git diff --cached --quiet; then + echo "No changes to commit." +else + git commit -m "$MSG" + git push + echo "" + echo "Pushed." +fi