Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [0.11.11.0] - 2026-03-23 — /meditate: Repo Consciousness

### Added

- **`/meditate` — proactive repo consciousness.** Inspired by Vipassana body-scanning meditation: a compiled binary scans your repo structure, git history, and past AI conversations (Claude Code, Codex CLI, Gemini CLI) to produce `.gstack/context.md`. Every other skill reads this file and becomes smarter — `/qa` knows which flows to hammer, `/review` focuses on high-risk files, `/cso` already knows the attack surface. One command, compound awareness.
- **Daily background scanning.** The preamble checks context freshness on every skill invocation. When stale (>24h), it nudges you to run `/meditate`. Context builds up over time — each meditation compounds on the last.
- **Multi-AI conversation mining.** Scans sessions from all three AI CLIs — Claude Code (`~/.claude/projects/`), Codex (`~/.codex/sessions/`), and Gemini (`~/.gemini/tmp/`). Extracts recurring file references, error patterns, workflow habits, and skill usage across tools. Privacy-first: only patterns appearing in 3+ sessions are included, never raw prose.
- **Six-section context file.** Architecture Map (mental model, not file list), Hotspots (where energy flows), Conventions (what the codebase "believes"), User Taste (what you care about), Recurring Problems (patterns to be aware of), Watch These Next (skill-specific foresight). Capped at 1024 lines.
- **Template-based `--background` mode.** Scanner binary produces a basic `context.md` directly from JSON data without LLM tokens. Running `/meditate` explicitly adds Claude's deeper synthesis — richer architecture analysis, nuanced convention detection, and skill-specific foresight.
- **10 unit tests** covering scanner functions, slug derivation, language detection, template synthesis, and CLI integration.

### For contributors

- `bin/gstack-meditate.ts` compiled via `bun build --compile` (same pattern as browse binary)
- Conversation mining reuses `extractCwdFromJsonl()` pattern from `gstack-global-discover.ts`
- Touchfile entry: `meditate-scanner` triggers on `bin/gstack-meditate.ts`, `meditate/**`, `test/meditate-scanner.test.ts`

## [0.11.10.0] - 2026-03-23 — CI Evals on Ubicloud

### Added
Expand Down
21 changes: 21 additions & 0 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ mkdir -p ~/.gstack/analytics
echo '{"skill":"gstack","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
# zsh-compatible: use find instead of glob to avoid NOMATCH error
for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done
# Meditation freshness check + daily background scan
if [ -f ".gstack/context.md" ]; then
_MED_MOD=$(stat -f %m .gstack/context.md 2>/dev/null || stat -c %Y .gstack/context.md 2>/dev/null || echo 0)
_MED_AGE=$(( $(date +%s) - _MED_MOD ))
[ "$_MED_AGE" -gt 86400 ] && echo "MEDITATION_STALE" || echo "MEDITATION_FRESH"
else
echo "MEDITATION_MISSING"
fi
```

If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke
Expand Down Expand Up @@ -153,6 +161,19 @@ AI-assisted coding makes the marginal cost of completeness near-zero. When you p

Never let a noticed issue silently pass. The whole point is proactive communication.

## Meditation Context

The preamble prints `MEDITATION_FRESH`, `MEDITATION_STALE`, or `MEDITATION_MISSING`.

If `MEDITATION_FRESH`: Read `.gstack/context.md` silently and use its contents to
inform your work. Do not mention meditation to the user — just be smarter because of it.
The context file contains: Architecture Map, Hotspots, Conventions, User Taste,
Recurring Problems, and Watch These Next — use whichever sections are relevant.

If `MEDITATION_STALE` or `MEDITATION_MISSING`: Tell the user:
"[gstack] Repo consciousness is stale. Run /meditate for better results."
Continue normally — this is informational, not blocking.

## Search Before Building

Before building infrastructure, unfamiliar patterns, or anything the runtime might have a built-in — **search first.** Read `~/.claude/skills/gstack/ETHOS.md` for the full philosophy.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.10.0
0.11.11.0
21 changes: 21 additions & 0 deletions autoplan/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ mkdir -p ~/.gstack/analytics
echo '{"skill":"autoplan","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
# zsh-compatible: use find instead of glob to avoid NOMATCH error
for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done
# Meditation freshness check + daily background scan
if [ -f ".gstack/context.md" ]; then
_MED_MOD=$(stat -f %m .gstack/context.md 2>/dev/null || stat -c %Y .gstack/context.md 2>/dev/null || echo 0)
_MED_AGE=$(( $(date +%s) - _MED_MOD ))
[ "$_MED_AGE" -gt 86400 ] && echo "MEDITATION_STALE" || echo "MEDITATION_FRESH"
else
echo "MEDITATION_MISSING"
fi
```

If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke
Expand Down Expand Up @@ -154,6 +162,19 @@ AI-assisted coding makes the marginal cost of completeness near-zero. When you p

Never let a noticed issue silently pass. The whole point is proactive communication.

## Meditation Context

The preamble prints `MEDITATION_FRESH`, `MEDITATION_STALE`, or `MEDITATION_MISSING`.

If `MEDITATION_FRESH`: Read `.gstack/context.md` silently and use its contents to
inform your work. Do not mention meditation to the user — just be smarter because of it.
The context file contains: Architecture Map, Hotspots, Conventions, User Taste,
Recurring Problems, and Watch These Next — use whichever sections are relevant.

If `MEDITATION_STALE` or `MEDITATION_MISSING`: Tell the user:
"[gstack] Repo consciousness is stale. Run /meditate for better results."
Continue normally — this is informational, not blocking.

## Search Before Building

Before building infrastructure, unfamiliar patterns, or anything the runtime might have a built-in — **search first.** Read `~/.claude/skills/gstack/ETHOS.md` for the full philosophy.
Expand Down
21 changes: 21 additions & 0 deletions benchmark/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ mkdir -p ~/.gstack/analytics
echo '{"skill":"benchmark","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
# zsh-compatible: use find instead of glob to avoid NOMATCH error
for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done
# Meditation freshness check + daily background scan
if [ -f ".gstack/context.md" ]; then
_MED_MOD=$(stat -f %m .gstack/context.md 2>/dev/null || stat -c %Y .gstack/context.md 2>/dev/null || echo 0)
_MED_AGE=$(( $(date +%s) - _MED_MOD ))
[ "$_MED_AGE" -gt 86400 ] && echo "MEDITATION_STALE" || echo "MEDITATION_FRESH"
else
echo "MEDITATION_MISSING"
fi
```

If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke
Expand Down Expand Up @@ -147,6 +155,19 @@ AI-assisted coding makes the marginal cost of completeness near-zero. When you p

Never let a noticed issue silently pass. The whole point is proactive communication.

## Meditation Context

The preamble prints `MEDITATION_FRESH`, `MEDITATION_STALE`, or `MEDITATION_MISSING`.

If `MEDITATION_FRESH`: Read `.gstack/context.md` silently and use its contents to
inform your work. Do not mention meditation to the user — just be smarter because of it.
The context file contains: Architecture Map, Hotspots, Conventions, User Taste,
Recurring Problems, and Watch These Next — use whichever sections are relevant.

If `MEDITATION_STALE` or `MEDITATION_MISSING`: Tell the user:
"[gstack] Repo consciousness is stale. Run /meditate for better results."
Continue normally — this is informational, not blocking.

## Search Before Building

Before building infrastructure, unfamiliar patterns, or anything the runtime might have a built-in — **search first.** Read `~/.claude/skills/gstack/ETHOS.md` for the full philosophy.
Expand Down
Loading