Commit Graph

589 Commits

Author SHA1 Message Date
Lex Christopherson
28c4c19112 docs(04-02): complete query interface plan
Tasks completed: 3/3
- Add graph query helpers
- Create graph-backed summary generator
- Integrate graph summary into regeneration flow

SUMMARY: .planning/phases/04-semantic-intelligence/04-02-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 10:00:21 -06:00
Lex Christopherson
9d9d7622d9 docs(04-03): complete entity generation instructions plan
Tasks completed: 3/3
- Add @anthropic-ai/sdk dependency
- Add semantic entity generation to analyze-codebase
- Add context section explaining execution model

SUMMARY: .planning/phases/04-semantic-intelligence/04-03-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:59:08 -06:00
Lex Christopherson
101bc58795 feat(04-02): integrate graph summary into regeneration flow
- regenerateEntitySummary() now async, prefers graph when available
- Falls back to entity-file-based summary if no graph.db
- Stdin handler properly awaits async regeneration
- SessionStart hook injects graph-backed summary into context

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:59:01 -06:00
Lex Christopherson
b3db2ff909 feat(04-03): add semantic entity generation to analyze-codebase
- Add Step 9 for semantic entity file generation
- Task tool batching for 100+ file codebases (10 files per batch)
- 50 file limit per run to manage context
- File selection criteria: 3+ exports, 5+ dependents, key directories
- Entity slug convention: path--segments--filename-ext.md
- Entity template with Purpose, Exports, Dependencies, Used By sections
- Update objective, output, and success criteria for entities
- Add context section explaining execution model

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:57:57 -06:00
Lex Christopherson
3d8cf70643 feat(04-02): create graph-backed summary generator
- generateGraphSummary() queries SQLite graph for rich summary
- Includes dependency hotspots with accurate counts from edges
- Groups nodes by type for module overview
- Tracks total relationships
- Target < 500 tokens for context injection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:57:37 -06:00
Lex Christopherson
5824196e4b feat(04-02): add graph query helpers for hotspots and dependents
- getHotspots() queries top N files by dependent count
- getNodesByType() groups nodes by type with counts
- getDependents() uses recursive CTE for transitive traversal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:57:07 -06:00
Lex Christopherson
8d33ae7686 chore(04-03): add @anthropic-ai/sdk dependency
- Add @anthropic-ai/sdk ^0.52.0 for entity generation API calls
- Required for semantic entity file creation in analyze-codebase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:56:49 -06:00
Lex Christopherson
0837278d60 docs(04-01): complete SQLite graph layer plan
Tasks completed: 3/3
- Add sql.js dependency and graph schema
- Implement graph database helpers
- Sync entity files to graph on write

SUMMARY: .planning/phases/04-semantic-intelligence/04-01-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:54:35 -06:00
Lex Christopherson
a39988e8f6 feat(04-01): sync entity files to SQLite graph database
- Add syncEntityToGraph() to upsert nodes and edges on entity write
- Entity id derived from filename, node body contains metadata as JSON
- Wiki-links [[target]] become edges with depends_on relationship
- Delete old edges before inserting new ones for clean updates
- Graph sync runs before summary regeneration
- Silent failures ensure Claude is never blocked

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:53:33 -06:00
Lex Christopherson
ec038e7240 feat(04-01): implement graph database helpers
- Add getSQL() for cached sql.js WASM initialization
- Add loadGraphDatabase() to create or load graph.db
- Add persistDatabase() to export in-memory DB to disk
- Singleton pattern avoids repeated WASM init overhead

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:52:24 -06:00
Lex Christopherson
11ab4a9218 feat(04-01): add sql.js dependency and graph schema
- Add sql.js ^1.12.0 dependency for WASM SQLite
- Add GRAPH_SCHEMA constant with nodes/edges tables
- Nodes use virtual id from JSON body for upserts
- Edges indexed by source and target for relationship queries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:51:59 -06:00
Lex Christopherson
3230fdfd2b fix(04): revise plans based on checker feedback
04-02: Added SessionStart hook wiring verification to Task 3 and
key_links. The hook already exists from Phase 2 - plan now verifies
it correctly injects the new graph-backed summary format.

04-03: Removed embedded JavaScript execution pattern. Commands are
instructions Claude follows, not scripts. Entity generation now uses
Task tool to spawn subagents for batch processing instead of pretending
markdown can execute JS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:43:37 -06:00
Lex Christopherson
e3d39c09e6 docs(04): create phase 4 plans for semantic intelligence
Phase 4: Semantic Intelligence & Scale
- 3 plans in 2 waves
- Wave 1: 04-01 SQLite graph layer (sql.js WASM)
- Wave 2: 04-02 Rich summary generation, 04-03 Semantic entity generation

Key additions:
- sql.js for zero-native-deps graph database
- @anthropic-ai/sdk for Claude API entity generation
- Recursive CTEs for dependency queries ("what uses X")
- Graph-backed summaries with hotspots

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:39:22 -06:00
Lex Christopherson
3a82930579 feat(intel): add self-evolving codebase intelligence
- Add entity.md template for documenting code understanding
- Add update_intel_entity step to executor workflow
- Modify gsd-intel-index.js to parse [[wiki-links]] from entities
- Hook regenerates summary.md with hotspots, modules, recent updates

Executor now creates/updates entity files after each task completion.
Summary automatically reflects accumulated semantic understanding.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:05:10 -06:00
Lex Christopherson
4218f8666a feat(profiles): add model profiles for GSD agents
Adds switchable model profiles (quality/balanced/budget) to control
which Claude model each agent uses, balancing quality vs token spend.

New files:
- get-shit-done/references/model-profiles.md - profile lookup table
- commands/gsd/set-profile.md - runtime profile switching

Updated orchestrators to resolve model before spawning agents:
- new-project, new-milestone (7 calls each)
- plan-phase (4 calls)
- execute-phase (3 calls)
- audit-milestone, debug, research-phase, quick (1-2 calls each)
- workflows: execute-phase, execute-plan, verify-work, map-codebase

Profile stored in .planning/config.json as model_profile.
Default: "balanced" (Opus for planning, Sonnet for execution).

Closes #160

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 01:29:04 -06:00
Lex Christopherson
9099d48495 perf(intel): simplify SessionStart hook + gitignore intel/
- SessionStart now reads pre-generated summary.md directly
- No more JSON parsing of potentially large index.json
- Added guidance: .planning/intel/ should always be gitignored
  (changes constantly, can be regenerated with /gsd:analyze-codebase)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 01:01:16 -06:00
Lex Christopherson
39ea6f4457 refactor(hooks): rename intel hooks with gsd- prefix
- intel-index.js → gsd-intel-index.js
- intel-session.js → gsd-intel-session.js
- intel-prune.js → gsd-intel-prune.js

Consistent naming allows installer to manage GSD hooks easily.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:50:09 -06:00
Lex Christopherson
fa48a13c9c feat(intel): add Stop hook to prune deleted files
New intel-prune.js hook runs after each Claude response.
Checks if indexed files still exist, removes stale entries.

Fast (only fs.existsSync checks) and silent (never blocks).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:49:07 -06:00
Lex Christopherson
f0b8afe7cc fix(intel): make PostToolUse hook opt-in only
Hook now checks if .planning/intel/ exists before indexing.
This prevents polluting non-GSD projects with intel files.

Directory is created by:
- /gsd:new-project (during setup)
- /gsd:analyze-codebase (explicit user action)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:36:47 -06:00
Lex Christopherson
9d129efaf6 docs(03-03): add codebase intelligence section to GSD-STYLE.md
- Document intel files and their purposes
- Add index.json schema reference
- Explain convention detection thresholds
- Document PostToolUse and SessionStart hook patterns
- Reference /gsd:analyze-codebase command

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:11:28 -06:00
Lex Christopherson
0898a705c5 docs(03-03): add analyze-codebase command to help.md
- Add /gsd:analyze-codebase command reference
- Add intel/ directory to Files & Structure section
- Document PostToolUse hook incremental learning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:11:05 -06:00
Lex Christopherson
9c239e4b15 docs(03-03): add codebase intelligence section to README
- Add Codebase Intelligence section explaining automatic learning
- Document convention detection and context injection
- Add /gsd:analyze-codebase to Brownfield commands table
- List intel files and their purposes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:10:42 -06:00
Lex Christopherson
4b686d17f4 feat(03-01): add summary.md generation to intel-index hook
- Add generateSummary() function for context injection content
- Write summary.md alongside conventions.json on every update
- Target < 500 tokens (top 5 dirs, top 3 suffixes)
- Exclude 'default' from export count
2026-01-20 00:07:08 -06:00
Lex Christopherson
8bb9cc7466 feat(03-02): add codebase intelligence to subagent prompts
- Add load_codebase_intelligence step to gsd-planner.md
- Add load_codebase_intelligence step to gsd-executor.md
- Include .planning/intel/summary.md in plan context template
- Subagents now use detected conventions during planning/execution
2026-01-20 00:06:57 -06:00
Lex Christopherson
02a9a614c7 feat(03-01): create /gsd:analyze-codebase command
- Standalone codebase scanning for brownfield projects
- Uses same extraction patterns as intel-index.js hook
- Produces index.json, conventions.json, summary.md
- Excludes node_modules, dist, build, .git, vendor, coverage
2026-01-20 00:06:28 -06:00
Lex Christopherson
df222be569 feat(03-02): add intel directory creation to new-project
- Create .planning/intel/ during Phase 1 setup
- Document intel directory in Creates and Output sections
- Directory prepared for PostToolUse hook population
2026-01-20 00:06:23 -06:00
Lex Christopherson
e5c9abaa55 feat(03-02): register intel hooks in install.js
- Add intel-index PostToolUse hook for codebase indexing
- Add intel-session SessionStart hook for context injection
- Hooks registered conditionally (skip if already exists)
2026-01-20 00:05:54 -06:00
Lex Christopherson
fbd5068b90 feat(new-project): add workflow agent settings to project init
- Split Phase 5 into two rounds of questions
- Round 1: core settings (mode, depth, parallel, git tracking)
- Round 2: workflow agents (researcher, plan checker, verifier)
- Add explainer table before workflow questions
- Include workflow section in config.json schema
- Note that /gsd:settings can update later

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:57:02 -06:00
Lex Christopherson
a3521161cd feat(02-02): create SessionStart context injection hook
- Read session metadata from stdin
- Check for startup/resume source
- Read index.json and conventions.json from .planning/intel/
- Silent exit if no intel files present
2026-01-19 23:44:07 -06:00
Lex Christopherson
d0db04f32f chore: stop tracking .planning/ (already gitignored)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:43:55 -06:00
Lex Christopherson
cffb3f24cd feat(settings): add /gsd:settings command for workflow toggles
Adds interactive settings command to toggle workflow agents:
- Plan Researcher (workflow.research)
- Plan Checker (workflow.plan_check)
- Execution Verifier (workflow.verifier)

Updates plan-phase.md and execute-phase.md to check config before
spawning these agents. Flags still override config per-invocation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:42:48 -06:00
Lex Christopherson
d77141e985 feat(02-01): integrate convention detection into index update flow
- Call detectConventions() after every index.json write
- Write conventions.json alongside index.json
- No staleness check needed - detection is fast, always regenerated
2026-01-19 23:40:51 -06:00
Lex Christopherson
06ac420326 feat(02-01): add convention detection functions
- Add detectCase() to identify naming conventions (camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE)
- Add detectConventions() to analyze index for patterns
- Add DIRECTORY_PURPOSES and SUFFIX_PURPOSES lookup tables
- Add MIN_SAMPLES (5) and MIN_MATCH_RATE (0.70) thresholds
2026-01-19 23:40:13 -06:00
Lex Christopherson
eeebde660a docs(phase-1): complete Foundation & Learning phase
Phase 1 verified: 6/6 must-haves passed.
- INDEX-01 through INDEX-05: Complete
- CONV-06: Complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:21:43 -06:00
Lex Christopherson
992040fa87 feat(01-02): create intel-index.js PostToolUse hook
- Indexes file exports/imports when Claude writes or edits JS/TS files
- Extracts ES6 imports, CommonJS require, side-effect imports
- Extracts named exports, default exports, declaration exports, TypeScript types
- Updates .planning/intel/index.json incrementally
- Silent failure on errors (always exits 0)
2026-01-19 23:13:52 -06:00
Lex Christopherson
ce4fc96ff7 fix(orchestrators): inline file contents in Task prompts
The @ file reference syntax does not expand across Task() boundaries.
Subagents receive literal @path strings instead of file contents.

Changed orchestrator→subagent handoffs to explicitly read files and
inline content before spawning:

- plan-phase → gsd-planner: STATE, ROADMAP, REQUIREMENTS, CONTEXT, RESEARCH
- plan-phase → gsd-plan-checker: PLAN files, REQUIREMENTS
- plan-phase → gsd-planner (revision): PLAN files
- execute-phase → gsd-executor: PLAN, STATE, config

Fixes #182

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:11:09 -06:00
Lex Christopherson
fb397df9b2 docs: create v1.9.0 roadmap (3 phases)
Phases:
1. Foundation & Learning: Index store, PostToolUse hook
2. Context Injection: Convention detection, SessionStart hook
3. Brownfield & Integration: analyze-codebase, GSD integration, docs

All 29 v1 requirements mapped to phases.
2026-01-19 22:58:46 -06:00
Lex Christopherson
cef51336c0 docs: start milestone v1.9.0 Codebase Intelligence System
Living knowledge system that learns codebase structure and conventions,
injecting understanding into every Claude session automatically.
2026-01-19 22:41:25 -06:00
Lex Christopherson
f616bb06b3 chore: complete v1.8.0 Quick Mode milestone
Archived:
- milestones/v1.8.0-ROADMAP.md
- milestones/v1.8.0-REQUIREMENTS.md

Deleted (fresh for next milestone):
- ROADMAP.md
- REQUIREMENTS.md

Updated:
- MILESTONES.md (new entry)
- PROJECT.md (requirements → Validated)
- STATE.md (reset for next milestone)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:03:32 -06:00
Lex Christopherson
7692ebd346 1.8.0 2026-01-19 16:51:49 -06:00
Lex Christopherson
052c495b52 docs: update changelog for v1.8.0 2026-01-19 16:51:45 -06:00
Lex Christopherson
a1935c2d6b feat(new-project): add commit_docs option to workflow preferences
Adds 4th question to initial config asking whether to commit planning
docs to git. When user selects "No", sets planning.commit_docs: false
and adds .planning/ to .gitignore.

Builds on #107 (uncommitted planning mode) by surfacing the option
during project initialization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:49:44 -06:00
dan bachelder
1f18ec8907 feat: add uncommitted planning mode (#107)
* feat: add uncommitted planning mode

Add config option to keep planning docs local-only (not committed to git).
Useful for OSS contributions, client projects, or keeping planning private.

Config options in .planning/config.json:
- planning.commit_docs: true/false (default: true)
- planning.search_gitignored: true/false (default: false)

When commit_docs=false:
- All git operations for .planning/ files are skipped
- User should add .planning/ to .gitignore
- Planning system works normally, just not tracked

Updated files:
- config.json template: added planning section
- execute-plan.md: conditional git commits
- execute-phase.md: conditional git commits
- create-roadmap.md: conditional git commits
- help.md: documented new config options
- planning-config.md: reference doc for config behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: extend commit_docs check to all agents/commands/workflows

Add COMMIT_PLANNING_DOCS config check to all files that commit
.planning/ artifacts, ensuring consistent behavior when
commit_docs=false is set in config.json.

Updated:
- 5 agents (planner, executor, debugger, phase-researcher, synthesizer)
- 8 commands (add-todo, check-todos, execute-phase, new-milestone,
  pause-work, plan-milestone-gaps, remove-phase, research-project)
- 7 workflows (complete-milestone, create-milestone, define-requirements,
  diagnose-issues, discuss-phase, map-codebase, verify-work)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(progress): use Bash instead of Glob for .planning/ check

Glob respects .gitignore, so projects with gitignored .planning/
directories would fail with "No planning structure found."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(new-milestone): integrate full research/requirements/roadmap flow

Previously routed to non-existent /gsd:research-project and
/gsd:define-requirements commands. Now handles the full flow inline
like new-project does:

- Phase 7: Research Decision (spawns 4 milestone-aware researchers)
- Phase 8: Define Requirements (scopes features, creates REQUIREMENTS.md)
- Phase 9: Create Roadmap (continues phase numbering from previous milestone)
- Phase 10: Done

Key adaptations for milestones:
- Research focuses on NEW features only
- Requirements add to existing, don't start fresh
- Phase numbering continues from previous milestone

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:49:05 -06:00
Lex Christopherson
f8096792cc 1.7.1 2026-01-19 16:22:07 -06:00
Lex Christopherson
d6a27b009b docs: update changelog for v1.7.1 2026-01-19 16:22:03 -06:00
Lex Christopherson
125b97784e chore: gitignore commands.html
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:20:41 -06:00
Lex Christopherson
c1727a3b60 fix(quick): use numbered prefix for PLAN and SUMMARY files
Quick tasks now use `{NNN}-PLAN.md` and `{NNN}-SUMMARY.md` naming
(e.g., `001-PLAN.md`, `001-SUMMARY.md`) matching the convention
used by regular phase plans (`01-01-PLAN.md`, `01-01-SUMMARY.md`).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:19:50 -06:00
Lex Christopherson
fc3287c8cb feat(quick-002): create 90s-style HTML command reference page
- 383-line HTML with authentic 90s web aesthetic
- Garish lime green checkered background
- Comic Sans, Times New Roman, Courier mixed fonts
- Marquee tags for scrolling headers/footers
- Blink animation via CSS keyframes
- All 25 GSD commands organized in bordered tables
- Fake hit counter, guestbook link, webmaster email
- 'Under construction' banner and Y2K compliance badge
- Best viewed in Netscape Navigator disclaimer
2026-01-19 16:17:07 -06:00
Lex Christopherson
01f232375f 1.7.0 2026-01-19 15:59:29 -06:00
Lex Christopherson
7cb7b684c9 docs: update changelog for v1.7.0 2026-01-19 15:59:29 -06:00