@tgoodington/intuition 11.0.1 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: intuition-enuncia-initialize
3
+ description: Set up project memory infrastructure for the Enuncia pipeline with workflow state tracking, memory files, project map, and configuration templates.
4
+ model: haiku
5
+ tools: Read, Write, Glob, Grep, Bash, AskUserQuestion
6
+ allowed-tools: Read, Write, Glob, Grep, Bash
7
+ ---
8
+
9
+ # Initialize - Enuncia Pipeline Setup Protocol
10
+
11
+ You create the `docs/project_notes/` directory structure, initialize memory files from templates, create the Enuncia workflow state file, set up the project map scaffold, and create project configuration files. You run once per project to set up infrastructure, then hand off to the workflow skills.
12
+
13
+ ## CRITICAL RULES
14
+
15
+ 1. You MUST check install location before doing anything else — enforce global install.
16
+ 2. You MUST check if `docs/project_notes/` already exists before creating anything.
17
+ 3. You MUST use template files from `references/` directory. Read each template with the Read tool, then Write to the target path.
18
+ 4. You MUST create `.project-memory-state.json` using the Enuncia schema from `references/state_template.json`.
19
+ 5. You MUST auto-create all configuration files (CLAUDE.md, INTUITION.md, settings, profile) if they do not exist. Do NOT ask — just create them.
20
+ 6. You MUST NOT overwrite existing files. If a file already exists, skip it silently.
21
+ 7. You MUST NOT invoke other skills. You only set up infrastructure.
22
+ 8. You MUST report what was created at the end.
23
+
24
+ ## PROTOCOL: COMPLETE FLOW
25
+
26
+ ```
27
+ Step 0: Check install location — enforce global install
28
+ Step 1: Detect existing setup
29
+ Step 2: Create memory directory and files from templates
30
+ Step 3: Create .project-memory-state.json with Enuncia schema
31
+ Step 4: Update CLAUDE.md with Enuncia workflow protocols
32
+ Step 4.5: Create INTUITION.md framework overview
33
+ Step 5: Create configuration files (settings, user profile)
34
+ Step 6: Report completion and suggest next step
35
+ ```
36
+
37
+ ## STEP 0: ENFORCE GLOBAL INSTALL
38
+
39
+ Before anything else, check whether `@tgoodington/intuition` is installed locally (project-level) vs globally.
40
+
41
+ Run these checks using Bash:
42
+
43
+ ```
44
+ Local: npm list @tgoodington/intuition --depth=0 2>&1
45
+ Global: npm list -g @tgoodington/intuition --depth=0 2>&1
46
+ ```
47
+
48
+ Apply this logic:
49
+
50
+ ```
51
+ IF local install found AND global install found:
52
+ → Uninstall local: npm uninstall @tgoodington/intuition
53
+ → Notify: "Removed local install. Using global install."
54
+
55
+ IF local install found AND no global install:
56
+ → Uninstall local: npm uninstall @tgoodington/intuition
57
+ → Install global: npm install -g @tgoodington/intuition
58
+ → Notify: "Moved install from local to global."
59
+
60
+ IF no local install AND global install found:
61
+ → Proceed (correct setup)
62
+
63
+ IF neither found:
64
+ → Warn: "Package not found. Install with: npm install -g @tgoodington/intuition"
65
+ → STOP
66
+ ```
67
+
68
+ ## STEP 1: DETECT EXISTING SETUP
69
+
70
+ Check if `docs/project_notes/` exists.
71
+
72
+ ```
73
+ IF docs/project_notes/ exists:
74
+ → Check which files already exist
75
+ → Ask user: "Project memory already exists. What would you like to do?"
76
+ Options:
77
+ - "Skip existing files, only create missing ones" (Recommended)
78
+ - "Overwrite everything with fresh templates"
79
+ - "Cancel — nothing to do"
80
+
81
+ IF docs/project_notes/ does NOT exist:
82
+ → Proceed with full setup
83
+ ```
84
+
85
+ Also check if CLAUDE.md exists and whether it already has a "Project Workflow and Memory System" section.
86
+
87
+ ## STEP 2: CREATE MEMORY FILES
88
+
89
+ Create the directory structure and initialize memory files:
90
+
91
+ ```
92
+ docs/
93
+ └── project_notes/
94
+ ├── trunk/
95
+ ├── branches/
96
+ ├── project_map.md
97
+ ├── bugs.md
98
+ ├── decisions.md
99
+ ├── key_facts.md
100
+ ├── issues.md
101
+ └── .project-memory-state.json
102
+ ```
103
+
104
+ Create `docs/project_notes/trunk/` and `docs/project_notes/branches/` as empty directories. Write a `.gitkeep` placeholder to each so they are tracked by git.
105
+
106
+ For each file, use the Read tool to read the template, then use Write to create the target:
107
+
108
+ | Template Source | Target File |
109
+ |----------------|-------------|
110
+ | `references/bugs_template.md` | `docs/project_notes/bugs.md` |
111
+ | `references/decisions_template.md` | `docs/project_notes/decisions.md` |
112
+ | `references/key_facts_template.md` | `docs/project_notes/key_facts.md` |
113
+ | `references/issues_template.md` | `docs/project_notes/issues.md` |
114
+ | `references/project_map_template.md` | `docs/project_notes/project_map.md` |
115
+
116
+ The project map template is a scaffold — compose and design fill it with real content during the workflow.
117
+
118
+ Do NOT create workflow output files (discovery_brief.md, tasks.json, etc.). Those are created by their respective skills.
119
+
120
+ ## STEP 3: CREATE STATE FILE
121
+
122
+ Read `references/state_template.json` and write to `docs/project_notes/.project-memory-state.json`.
123
+
124
+ The state file uses the Enuncia v11 schema:
125
+
126
+ ```json
127
+ {
128
+ "initialized": true,
129
+ "version": "11.0",
130
+ "pipeline": "enuncia",
131
+ "active_context": "trunk",
132
+ "trunk": {
133
+ "status": "none",
134
+ "workflow": {
135
+ "discovery": {
136
+ "started": false,
137
+ "completed": false,
138
+ "completed_at": null
139
+ },
140
+ "compose": {
141
+ "started": false,
142
+ "completed": false,
143
+ "completed_at": null
144
+ },
145
+ "design": {
146
+ "started": false,
147
+ "completed": false,
148
+ "completed_at": null
149
+ },
150
+ "execute": {
151
+ "started": false,
152
+ "completed": false,
153
+ "completed_at": null
154
+ },
155
+ "verify": {
156
+ "started": false,
157
+ "completed": false,
158
+ "completed_at": null
159
+ }
160
+ }
161
+ },
162
+ "branches": {},
163
+ "last_handoff": null,
164
+ "last_handoff_transition": null
165
+ }
166
+ ```
167
+
168
+ ## STEP 4: UPDATE CLAUDE.MD
169
+
170
+ Read `references/claude_template.md` for the Enuncia workflow protocol content.
171
+
172
+ ```
173
+ IF CLAUDE.md does NOT exist:
174
+ → Create CLAUDE.md with the template content
175
+
176
+ IF CLAUDE.md exists BUT has no "Project Workflow and Memory System" section:
177
+ → Append the template content to the end of the file
178
+
179
+ IF CLAUDE.md exists AND already has the section:
180
+ → Skip (do not overwrite)
181
+ ```
182
+
183
+ ## STEP 4.5: CREATE INTUITION.MD
184
+
185
+ Read `references/intuition_readme_template.md` and write to `INTUITION.md` at the project root.
186
+
187
+ ```
188
+ IF INTUITION.md does NOT exist:
189
+ → Create it from template
190
+
191
+ IF INTUITION.md already exists:
192
+ → Skip
193
+ ```
194
+
195
+ ## STEP 5: CREATE CONFIGURATION FILES
196
+
197
+ Auto-create each file if it does not exist. Do NOT ask — just create. If a file already exists, skip it silently.
198
+
199
+ ### 5A: Claude Code Settings
200
+
201
+ - Read `references/settings_template.json`
202
+ - If `.claude/settings.local.json` does not exist: create from template
203
+ - If `.claude/settings.local.json` exists: skip
204
+
205
+ ### 5B: User Profile
206
+
207
+ - Read `references/user_profile_template.json`
208
+ - If `.claude/USER_PROFILE.json` does not exist: create from template
209
+ - If `.claude/USER_PROFILE.json` exists: skip
210
+
211
+ ## STEP 6: REPORT COMPLETION
212
+
213
+ Present a concise summary of what was created vs skipped:
214
+
215
+ ```
216
+ Enuncia pipeline initialized!
217
+
218
+ Created:
219
+ - [list each file that was created]
220
+
221
+ Skipped (already existed):
222
+ - [list each file that was skipped, if any]
223
+
224
+ Next step: Run /intuition-enuncia-discovery to start defining your project,
225
+ or /intuition-enuncia-start to check project status.
226
+ ```
227
+
228
+ ## EDGE CASES
229
+
230
+ - **Partial setup exists**: Check each file individually. Only create missing files.
231
+ - **CLAUDE.md has custom content**: Append the workflow section. Do not replace the entire file.
232
+ - **Git-tracked project**: Memory files in `docs/project_notes/` are safe to commit. Settings in `.claude/` are typically gitignored.
233
+ - **Classic pipeline state exists**: If `.project-memory-state.json` exists with a non-enuncia pipeline, warn the user: "This project has an existing classic pipeline state. Overwriting will reset workflow tracking. Proceed?" Only overwrite if confirmed.
234
+
235
+ ## REFERENCE FILES
236
+
237
+ These template files are in the `references/` directory. Use Read tool to access them:
238
+
239
+ **Memory file templates** (Step 2):
240
+ - `bugs_template.md`, `decisions_template.md`, `key_facts_template.md`, `issues_template.md`, `project_map_template.md`
241
+
242
+ **State template** (Step 3):
243
+ - `state_template.json` — Enuncia v11 workflow state
244
+
245
+ **Framework overview** (Step 4.5):
246
+ - `intuition_readme_template.md`
247
+
248
+ **Configuration templates** (Steps 4-5):
249
+ - `claude_template.md` — Enuncia memory protocols for CLAUDE.md
250
+ - `settings_template.json` — pre-authorized tools for Claude Code
251
+ - `user_profile_template.json` — cross-project user context
@@ -0,0 +1,41 @@
1
+ # Bug Log Template
2
+
3
+ This file demonstrates the format for logging bugs and their solutions. Keep entries brief and chronological.
4
+
5
+ ## Format
6
+
7
+ Each bug entry should include:
8
+ - Date (YYYY-MM-DD)
9
+ - Brief description of the bug/issue
10
+ - Solution or fix applied
11
+ - Any prevention notes (optional)
12
+
13
+ Use bullet lists for simplicity. Older entries can be manually removed when they become irrelevant.
14
+
15
+ ## Example Entries
16
+
17
+ ### 2025-01-15 - Docker Architecture Mismatch
18
+ - **Issue**: Container failing to start with "exec format error"
19
+ - **Root Cause**: Built on ARM64 Mac but deploying to AMD64 Cloud Run
20
+ - **Solution**: Added `--platform linux/amd64` to docker build command
21
+ - **Prevention**: Always specify platform in Dockerfile and build scripts
22
+
23
+ ### 2025-01-20 - Cloud Scheduler HTTPS Requirement
24
+ - **Issue**: Cloud Scheduler jobs failing with "URL must use HTTPS"
25
+ - **Root Cause**: Forgot Cloud Run URLs require HTTPS by default
26
+ - **Solution**: Updated all scheduler job URLs from http:// to https://
27
+ - **Prevention**: Remember GCP services enforce HTTPS; check URLs in infrastructure code
28
+
29
+ ### 2025-01-22 - Database Connection Pool Exhaustion
30
+ - **Issue**: API returning 500 errors under load
31
+ - **Root Cause**: Connection pool size too small (default 5)
32
+ - **Solution**: Increased pool_size to 20 and max_overflow to 10 in SQLAlchemy config
33
+ - **Prevention**: Load test APIs before production deployment
34
+
35
+ ## Tips
36
+
37
+ - Keep descriptions under 2-3 lines
38
+ - Focus on what was learned, not exhaustive details
39
+ - Include enough context for future reference
40
+ - Date entries so you know how recent the issue is
41
+ - Periodically clean out very old entries (6+ months)
@@ -0,0 +1,33 @@
1
+ ## Project Workflow and Memory System
2
+
3
+ This project uses the Enuncia pipeline (`@tgoodington/intuition`). Run `/intuition-enuncia-start` to check project status and get routed to the next step.
4
+
5
+ ### Memory Files
6
+
7
+ Project memory is maintained in `docs/project_notes/` for consistency across sessions:
8
+
9
+ - **bugs.md** — Bug log with dates, solutions, and prevention notes
10
+ - **decisions.md** — Architectural Decision Records (ADRs) with context and trade-offs
11
+ - **key_facts.md** — Project configuration, credentials, ports, important URLs
12
+ - **issues.md** — Work log with ticket IDs, descriptions, and URLs
13
+ - **project_map.md** — Living architecture document, updated as the project evolves
14
+
15
+ ### Memory-Aware Protocols
16
+
17
+ **Before proposing architectural changes:**
18
+ - Check `docs/project_notes/decisions.md` for existing decisions
19
+ - Verify the proposed approach doesn't conflict with past choices
20
+ - If it does conflict, acknowledge the existing decision and explain why a change is warranted
21
+
22
+ **When encountering errors or bugs:**
23
+ - Search `docs/project_notes/bugs.md` for similar issues
24
+ - Apply known solutions if found
25
+ - Document new bugs and solutions when resolved
26
+
27
+ **When looking up project configuration:**
28
+ - Check `docs/project_notes/key_facts.md` for credentials, ports, URLs, service accounts
29
+ - Prefer documented facts over assumptions
30
+
31
+ **When completing work on tickets:**
32
+ - Log completed work in `docs/project_notes/issues.md`
33
+ - Include ticket ID, date, brief description, and URL
@@ -0,0 +1,92 @@
1
+ # Architectural Decisions Template
2
+
3
+ This file demonstrates the format for logging architectural decisions (ADRs). Use bullet lists for clarity.
4
+
5
+ ## Format
6
+
7
+ Each decision should include:
8
+ - Date and ADR number
9
+ - Context (why the decision was needed)
10
+ - Decision (what was chosen)
11
+ - Alternatives considered
12
+ - Consequences (trade-offs, implications)
13
+
14
+ ## Example Entries
15
+
16
+ ### ADR-001: Use Workload Identity Federation for GitHub Actions (2025-01-10)
17
+
18
+ **Context:**
19
+ - Need secure authentication from GitHub Actions to GCP
20
+ - Service account keys are deprecated and considered insecure
21
+ - Want to avoid managing long-lived credentials
22
+
23
+ **Decision:**
24
+ - Use Workload Identity Federation (WIF) for GitHub Actions authentication
25
+ - Configure via `WIF_PROVIDER` and `WIF_SERVICE_ACCOUNT` secrets
26
+
27
+ **Alternatives Considered:**
28
+ - Service account JSON keys → Rejected: security risk, manual rotation required
29
+ - Environment-specific credentials → Rejected: harder to manage across repos
30
+
31
+ **Consequences:**
32
+ - ✅ More secure (no long-lived credentials)
33
+ - ✅ Automatic credential rotation
34
+ - ✅ Better audit trail
35
+ - ❌ Slightly more complex initial setup
36
+ - ❌ Requires GitHub OIDC support
37
+
38
+ ### ADR-002: Use Alembic for Database Migrations (2025-01-12)
39
+
40
+ **Context:**
41
+ - Need version control for database schema changes
42
+ - Multiple developers working on database schema
43
+ - Want to avoid manual SQL scripts and migration conflicts
44
+
45
+ **Decision:**
46
+ - Use Alembic as the database migration tool
47
+ - Store migrations in `alembic/versions/` directory
48
+ - Use auto-generate feature for model changes
49
+
50
+ **Alternatives Considered:**
51
+ - Raw SQL scripts → Rejected: no versioning, error-prone
52
+ - Flask-Migrate → Rejected: too tied to Flask framework
53
+ - Django migrations → Rejected: using FastAPI, not Django
54
+
55
+ **Consequences:**
56
+ - ✅ Version-controlled schema changes
57
+ - ✅ Automatic migration generation from models
58
+ - ✅ Easy rollback capability
59
+ - ❌ Learning curve for team
60
+ - ❌ Must remember to generate migrations after model changes
61
+
62
+ ### ADR-003: Use AlloyDB Instead of Cloud SQL (2025-01-15)
63
+
64
+ **Context:**
65
+ - Need PostgreSQL-compatible database in GCP
66
+ - Require high availability and automatic backups
67
+ - Performance-critical application with complex queries
68
+
69
+ **Decision:**
70
+ - Use AlloyDB for PostgreSQL instead of Cloud SQL
71
+ - Configure with automated backups and point-in-time recovery
72
+
73
+ **Alternatives Considered:**
74
+ - Cloud SQL PostgreSQL → Rejected: slower query performance
75
+ - Self-managed PostgreSQL on GCE → Rejected: high operational overhead
76
+ - Firestore → Rejected: need relational data model and SQL
77
+
78
+ **Consequences:**
79
+ - ✅ Better query performance (2-4x faster than Cloud SQL)
80
+ - ✅ PostgreSQL compatibility
81
+ - ✅ Managed service (automated backups, HA)
82
+ - ❌ Higher cost than Cloud SQL
83
+ - ❌ Newer service, less community documentation
84
+
85
+ ## Tips
86
+
87
+ - Number decisions sequentially (ADR-001, ADR-002, etc.)
88
+ - Always include date for context
89
+ - Be honest about trade-offs (use ✅ and ❌)
90
+ - Keep alternatives brief but clear
91
+ - Update decisions if they're revisited/changed
92
+ - Focus on "why" not "how" (implementation details go elsewhere)
@@ -0,0 +1,50 @@
1
+ # Intuition (Enuncia Pipeline)
2
+
3
+ A discovery-driven workflow system for Claude Code. Transforms project visions into structured deliverables through foundational discovery, experience-slice decomposition, technical design, and verified implementation.
4
+
5
+ ## Workflow
6
+
7
+ ```
8
+ /intuition-enuncia-discovery → /intuition-enuncia-compose → /intuition-enuncia-design →
9
+ /intuition-enuncia-execute → /intuition-enuncia-verify → complete
10
+
11
+ /intuition-enuncia-start → create branch or /intuition-debugger
12
+ ```
13
+
14
+ Run `/clear` before each phase skill to keep context clean.
15
+
16
+ The first cycle is the **trunk**. After trunk completes, create **branches** for new features or changes.
17
+
18
+ ## Skills
19
+
20
+ | Skill | What it does |
21
+ |-------|-------------|
22
+ | `/intuition-enuncia-start` | Detects where you left off, routes to next step |
23
+ | `/intuition-enuncia-discovery` | Foundational project discovery — Who, Where, What, Why |
24
+ | `/intuition-enuncia-compose` | Maps experience slices, decomposes into buildable tasks |
25
+ | `/intuition-enuncia-design` | Technical design — enriches tasks with specs, updates project map |
26
+ | `/intuition-enuncia-execute` | Delegates production to subagents, verifies outputs |
27
+ | `/intuition-enuncia-verify` | Wires code into project, runs toolchain and tests |
28
+ | `/intuition-enuncia-handoff` | Branch creation and context management |
29
+ | `/intuition-initialize` | Sets up project memory (you already ran this) |
30
+ | `/intuition-meander` | Thought partner — reason through problems collaboratively |
31
+ | `/intuition-think-tank` | Rapid expert-panel analysis |
32
+ | `/intuition-debugger` | Expert diagnostic and resolution service |
33
+
34
+ ## Quick Start
35
+
36
+ ### First cycle (trunk)
37
+
38
+ 1. `/intuition-enuncia-start` — see where you are
39
+ 2. `/intuition-enuncia-discovery` — articulate what you're building and why
40
+ 3. `/intuition-enuncia-compose` — decompose into experience slices and tasks
41
+ 4. `/intuition-enuncia-design` — technical design for each task group
42
+ 5. `/intuition-enuncia-execute` — build from specs
43
+ 6. `/intuition-enuncia-verify` — wire in, test, prove it works (code projects)
44
+
45
+ Run `/clear` before each phase skill.
46
+
47
+ ### After trunk completes
48
+
49
+ - `/intuition-enuncia-start` — see project status, create a branch, or start fresh
50
+ - `/intuition-debugger` — investigate hard problems
@@ -0,0 +1,76 @@
1
+ # Issues/Work Log Template
2
+
3
+ This file demonstrates the format for logging work completed on tickets. Keep it simple - just enough to remember what was done. Full details live in Jira/GitHub.
4
+
5
+ ## Format
6
+
7
+ Each entry should include:
8
+ - Date (YYYY-MM-DD)
9
+ - Ticket ID
10
+ - Brief description (1-2 lines)
11
+ - URL to ticket (if available)
12
+ - Status (optional: completed, in-progress, blocked)
13
+
14
+ Use bullet lists for simplicity. This is NOT a replacement for your ticket system - it's a quick reference log.
15
+
16
+ ## Example Entries
17
+
18
+ ### 2025-01-15 - PROJ-123: Implement Contact API
19
+ - **Status**: Completed
20
+ - **Description**: Created FastAPI endpoints for contact CRUD operations with validation
21
+ - **URL**: https://jira.company.com/browse/PROJ-123
22
+ - **Notes**: Added unit tests, coverage at 85%
23
+
24
+ ### 2025-01-16 - PROJ-124: Fix Docker Build Issues
25
+ - **Status**: Completed
26
+ - **Description**: Fixed architecture mismatch for Cloud Run deployment
27
+ - **URL**: https://jira.company.com/browse/PROJ-124
28
+ - **Notes**: See bugs.md for details on the fix
29
+
30
+ ### 2025-01-18 - PROJ-125: Database Migration to AlloyDB
31
+ - **Status**: Completed
32
+ - **Description**: Migrated from Cloud SQL to AlloyDB with Pulumi infrastructure code
33
+ - **URL**: https://jira.company.com/browse/PROJ-125
34
+ - **Notes**: Multi-phase migration completed over 3 days
35
+
36
+ ### 2025-01-20 - GH-45: Add OAuth2 Authentication
37
+ - **Status**: In Progress
38
+ - **Description**: Implementing OAuth2 flow with Google provider
39
+ - **URL**: https://github.com/company/repo/issues/45
40
+ - **Notes**: Backend complete, frontend integration pending
41
+
42
+ ### 2025-01-22 - PROJ-130: Performance Optimization
43
+ - **Status**: Blocked
44
+ - **Description**: Optimize slow queries in contact search endpoint
45
+ - **URL**: https://jira.company.com/browse/PROJ-130
46
+ - **Notes**: Waiting for DBA review of proposed indexes
47
+
48
+ ## Alternative Format (Grouped by Week)
49
+
50
+ ### Week of 2025-01-15
51
+
52
+ **Completed:**
53
+ - PROJ-123: Contact API implementation → https://jira.company.com/browse/PROJ-123
54
+ - PROJ-124: Docker build fix → https://jira.company.com/browse/PROJ-124
55
+
56
+ **In Progress:**
57
+ - PROJ-125: AlloyDB migration (phase 2 of 3)
58
+
59
+ ### Week of 2025-01-22
60
+
61
+ **Completed:**
62
+ - PROJ-125: AlloyDB migration completed → https://jira.company.com/browse/PROJ-125
63
+ - GH-45: OAuth2 backend done → https://github.com/company/repo/issues/45
64
+
65
+ **Blocked:**
66
+ - PROJ-130: Query optimization (waiting on DBA) → https://jira.company.com/browse/PROJ-130
67
+
68
+ ## Tips
69
+
70
+ - Keep descriptions brief (1-2 lines max)
71
+ - Always include ticket URL for easy reference
72
+ - Update status if work gets blocked or resumed
73
+ - Optional: Group by week or sprint for better organization
74
+ - Don't duplicate ticket details - link to source of truth
75
+ - Clean out very old entries periodically (3+ months)
76
+ - Include both Jira and GitHub tickets as appropriate