revert: remove codebase intelligence system
Rolled back the intel system due to overengineering concerns: - 1200+ line hook with SQLite graph database - 21MB sql.js dependency - Entity generation spawning additional Claude calls - Complex system with unclear value Removed: - /gsd:analyze-codebase command - /gsd:query-intel command - gsd-intel-index.js, gsd-intel-session.js, gsd-intel-prune.js hooks - gsd-entity-generator, gsd-indexer agents - entity.md template - sql.js dependency Preserved: - Model profiles feature - Statusline hook - All other v1.9.x improvements -3,065 lines removed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -598,8 +598,7 @@ Execute each task in the prompt. **Deviations are normal** - handle them automat
|
||||
- Continue implementing, applying rules as needed
|
||||
- Run the verification
|
||||
- Confirm done criteria met
|
||||
- **Update intel entities** for modified files (see `<update_intel_entity>` below)
|
||||
- **Commit the task** (see `<task_commit>` below) - includes entity files in commit
|
||||
- **Commit the task** (see `<task_commit>` below)
|
||||
- Track task completion and commit hash for Summary documentation
|
||||
- Continue to next task
|
||||
|
||||
@@ -928,148 +927,6 @@ None - plan executed exactly as written.
|
||||
|
||||
</deviation_documentation>
|
||||
|
||||
<update_intel_entity>
|
||||
|
||||
## Update Codebase Intelligence Entity
|
||||
|
||||
**Trigger:** After each task's `<done>` criteria met, BEFORE committing.
|
||||
|
||||
This step documents your understanding of modified files. The knowledge base self-evolves as you work.
|
||||
|
||||
**1. Get files from the just-completed task:**
|
||||
|
||||
Check the task's `<files>` list. If no `<files>` attribute, use `git status --short` to identify modified files.
|
||||
|
||||
**2. For each file, determine if significant:**
|
||||
|
||||
**Skip these patterns (not worth indexing):**
|
||||
```bash
|
||||
# Build/generated
|
||||
node_modules/*, .next/*, dist/*, build/*, .git/*
|
||||
|
||||
# Tests (their targets are more valuable)
|
||||
*.test.*, *.spec.*, __tests__/*, __mocks__/*
|
||||
|
||||
# Config files (change rarely, low context value)
|
||||
package.json, package-lock.json, tsconfig.json, *.config.*, *.config.js, *.config.ts
|
||||
|
||||
# Environment and locks
|
||||
.env*, *.lock, *.log, yarn.lock, pnpm-lock.yaml
|
||||
```
|
||||
|
||||
If file matches skip pattern: continue to next file.
|
||||
|
||||
**3. Derive entity path:**
|
||||
|
||||
```bash
|
||||
# Convert file path to entity filename
|
||||
# src/lib/auth.ts → src-lib-auth.md
|
||||
# app/api/users/route.ts → app-api-users-route.md
|
||||
|
||||
FILE_PATH="$1"
|
||||
ENTITY_NAME=$(echo "$FILE_PATH" | sed 's|^[./]*||' | tr '/' '-' | sed 's/\.[^.]*$//')
|
||||
ENTITY_PATH=".planning/intel/entities/${ENTITY_NAME}.md"
|
||||
```
|
||||
|
||||
**4. Create intel directory if needed:**
|
||||
|
||||
```bash
|
||||
mkdir -p .planning/intel/entities
|
||||
```
|
||||
|
||||
**5. Check if entity exists:**
|
||||
|
||||
```bash
|
||||
if [ -f "$ENTITY_PATH" ]; then
|
||||
ACTION="update"
|
||||
else
|
||||
ACTION="create"
|
||||
fi
|
||||
```
|
||||
|
||||
**6. Create or update entity:**
|
||||
|
||||
Use template from `~/.claude/get-shit-done/templates/entity.md`.
|
||||
|
||||
Fill fields based on what you just built:
|
||||
|
||||
| Field | Source |
|
||||
|-------|--------|
|
||||
| `path` | Absolute path to file |
|
||||
| `type` | Infer: module, component, util, config, api, hook |
|
||||
| `updated` | Today's date (YYYY-MM-DD) |
|
||||
| `status` | active (unless you're deprecating) |
|
||||
| **Purpose** | What you understand this file does |
|
||||
| **Exports** | Extract from the code you just wrote |
|
||||
| **Dependencies** | `[[slugified-path]]` for internal, plain for external |
|
||||
| **Used By** | Add callers if you know them from this session |
|
||||
| **Notes** | Gotchas, patterns, warnings discovered |
|
||||
|
||||
**If updating existing entity:**
|
||||
- Read current content first
|
||||
- Preserve Used By entries you didn't touch
|
||||
- Update sections that changed
|
||||
- Don't remove information unless it's wrong
|
||||
|
||||
**7. Write entity file:**
|
||||
|
||||
```bash
|
||||
# Write the entity content
|
||||
cat > "$ENTITY_PATH" << 'EOF'
|
||||
---
|
||||
path: {path}
|
||||
type: {type}
|
||||
updated: {today}
|
||||
status: active
|
||||
---
|
||||
|
||||
# {filename}
|
||||
|
||||
## Purpose
|
||||
|
||||
{purpose}
|
||||
|
||||
## Exports
|
||||
|
||||
{exports}
|
||||
|
||||
## Dependencies
|
||||
|
||||
{dependencies}
|
||||
|
||||
## Used By
|
||||
|
||||
{used_by}
|
||||
|
||||
## Notes
|
||||
|
||||
{notes}
|
||||
EOF
|
||||
```
|
||||
|
||||
**8. Verify entity was created/updated:**
|
||||
|
||||
```bash
|
||||
head -10 "$ENTITY_PATH"
|
||||
```
|
||||
|
||||
**9. Stage entity file:**
|
||||
|
||||
Entity files are staged along with task code files in the task commit.
|
||||
|
||||
```bash
|
||||
git add "$ENTITY_PATH"
|
||||
```
|
||||
|
||||
**Error handling:**
|
||||
- If entity creation fails: Log warning, continue to task_commit
|
||||
- Entity update is NOT blocking - a failed entity shouldn't stop code from being committed
|
||||
- Log: `"Warning: Could not update entity for {file}: {reason}"`
|
||||
|
||||
**Target size:** Keep entities concise (30-50 lines). Purpose and Exports are most valuable.
|
||||
|
||||
</update_intel_entity>
|
||||
|
||||
<tdd_plan_execution>
|
||||
## TDD Plan Execution
|
||||
|
||||
|
||||
Reference in New Issue
Block a user