class-ai-agent 1.2.3 → 1.4.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.
- package/.agent/README.md +33 -0
- package/.agent/SESSION.md +54 -0
- package/.agent/SESSION.template.md +46 -0
- package/.claude/CLAUDE.md +24 -6
- package/.claude/commands/build.md +5 -4
- package/.claude/commands/debug.md +2 -1
- package/.claude/commands/handoff.md +94 -0
- package/.claude/commands/plan.md +1 -0
- package/.claude/commands/publish-npm.md +119 -0
- package/.claude/commands/resume.md +107 -0
- package/.claude/commands/spec.md +2 -1
- package/.claude/references/agent-continuity.md +42 -0
- package/.claude/references/codegraph.md +50 -0
- package/.claude/references/supabase.md +55 -0
- package/.claude/rules/agent-continuity.md +39 -0
- package/.claude/rules/tech-stack.md +2 -1
- package/.claude/skills/agent-continuity/SKILL.md +70 -0
- package/.claude/skills/supabase/SKILL.md +135 -0
- package/.claude/skills/supabase/UPSTREAM.md +16 -0
- package/.claude/skills/supabase/assets/feedback-issue-template.md +17 -0
- package/.claude/skills/supabase/references/skill-feedback.md +17 -0
- package/.claude/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/.claude/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
- package/.claude/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/.claude/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/.claude/skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/.claude/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/.claude/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/.claude/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/.claude/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/.claude/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/.claude/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/.claude/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/.claude/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/.claude/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/.claude/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/.claude/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/.claude/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/.claude/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/.claude/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/.claude/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/.claude/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/.claude/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/.claude/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/.claude/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/.claude/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/.claude/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/.claude/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/.claude/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/.claude/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/.claude/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/.claude/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/.claude/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/.claude/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/.claude/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/.claude/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/.claude/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/.cursor/CURSOR.md +40 -5
- package/.cursor/commands/build.md +5 -4
- package/.cursor/commands/debug.md +2 -1
- package/.cursor/commands/handoff.md +94 -0
- package/.cursor/commands/plan.md +1 -0
- package/.cursor/commands/publish-npm.md +119 -0
- package/.cursor/commands/resume.md +107 -0
- package/.cursor/commands/spec.md +2 -1
- package/.cursor/mcp.json +19 -0
- package/.cursor/references/agent-continuity.md +42 -0
- package/.cursor/references/codegraph.md +87 -0
- package/.cursor/references/supabase.md +55 -0
- package/.cursor/rules/agent-continuity.mdc +44 -0
- package/.cursor/rules/codegraph.mdc +47 -0
- package/.cursor/rules/cursor-overview.mdc +10 -3
- package/.cursor/rules/tech-stack.mdc +2 -1
- package/.cursor/settings.json +6 -1
- package/.cursor/skills/agent-continuity/SKILL.md +70 -0
- package/.cursor/skills/supabase/SKILL.md +135 -0
- package/.cursor/skills/supabase/UPSTREAM.md +16 -0
- package/.cursor/skills/supabase/assets/feedback-issue-template.md +17 -0
- package/.cursor/skills/supabase/references/skill-feedback.md +17 -0
- package/.cursor/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/.cursor/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/.cursor/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/.kiro/KIRO.md +149 -0
- package/.kiro/agents/backend.md +395 -0
- package/.kiro/agents/code-reviewer.md +110 -0
- package/.kiro/agents/copywriter-seo.md +236 -0
- package/.kiro/agents/frontend.md +384 -0
- package/.kiro/agents/project-manager.md +201 -0
- package/.kiro/agents/qa.md +221 -0
- package/.kiro/agents/security-auditor.md +143 -0
- package/.kiro/agents/systems-architect.md +211 -0
- package/.kiro/agents/test-engineer.md +123 -0
- package/.kiro/agents/ui-ux-designer.md +210 -0
- package/.kiro/commands/build.md +133 -0
- package/.kiro/commands/debug.md +243 -0
- package/.kiro/commands/deploy.md +40 -0
- package/.kiro/commands/fix-issue.md +42 -0
- package/.kiro/commands/handoff.md +94 -0
- package/.kiro/commands/plan.md +126 -0
- package/.kiro/commands/publish-npm.md +119 -0
- package/.kiro/commands/resume.md +107 -0
- package/.kiro/commands/review.md +50 -0
- package/.kiro/commands/simplify.md +222 -0
- package/.kiro/commands/spec.md +96 -0
- package/.kiro/commands/test.md +214 -0
- package/.kiro/references/accessibility-checklist.md +174 -0
- package/.kiro/references/agent-continuity.md +42 -0
- package/.kiro/references/codegraph.md +86 -0
- package/.kiro/references/performance-checklist.md +150 -0
- package/.kiro/references/security-checklist.md +94 -0
- package/.kiro/references/supabase.md +55 -0
- package/.kiro/references/testing-patterns.md +183 -0
- package/.kiro/settings/mcp.json +19 -0
- package/.kiro/settings.json +8 -0
- package/.kiro/skills/agent-continuity/SKILL.md +70 -0
- package/.kiro/skills/code-review/SKILL.md +208 -0
- package/.kiro/skills/deploy/SKILL.md +68 -0
- package/.kiro/skills/deploy/deploy.md +735 -0
- package/.kiro/skills/incremental-implementation/SKILL.md +210 -0
- package/.kiro/skills/security-review/SKILL.md +71 -0
- package/.kiro/skills/supabase/SKILL.md +135 -0
- package/.kiro/skills/supabase/UPSTREAM.md +16 -0
- package/.kiro/skills/supabase/assets/feedback-issue-template.md +17 -0
- package/.kiro/skills/supabase/references/skill-feedback.md +17 -0
- package/.kiro/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/.kiro/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/.kiro/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/.kiro/skills/tdd/SKILL.md +217 -0
- package/.kiro/skills/ui-ux-pro-max/SKILL.md +288 -0
- package/.kiro/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.kiro/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.kiro/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.kiro/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.kiro/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.kiro/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.kiro/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.kiro/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.kiro/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.kiro/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.kiro/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.kiro/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.kiro/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.kiro/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.kiro/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.kiro/steering/agent-continuity.md +44 -0
- package/.kiro/steering/api-conventions.md +85 -0
- package/.kiro/steering/clean-code.md +211 -0
- package/.kiro/steering/code-style.md +92 -0
- package/.kiro/steering/codegraph.md +47 -0
- package/.kiro/steering/database.md +66 -0
- package/.kiro/steering/error-handling.md +98 -0
- package/.kiro/steering/git-workflow.md +83 -0
- package/.kiro/steering/kiro-overview.md +38 -0
- package/.kiro/steering/monitoring.md +317 -0
- package/.kiro/steering/naming-conventions.md +266 -0
- package/.kiro/steering/project-structure.md +71 -0
- package/.kiro/steering/security.md +95 -0
- package/.kiro/steering/system-design.md +168 -0
- package/.kiro/steering/tech-stack.md +463 -0
- package/.kiro/steering/testing.md +110 -0
- package/AGENTS.md +13 -7
- package/README.md +126 -18
- package/bin/class-ai-agent.cjs +171 -11
- package/package.json +12 -4
package/.agent/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Agent continuity (`.agent/`)
|
|
2
|
+
|
|
3
|
+
Committed handoff state so **Cursor**, **Claude Code**, and **Kiro** agents can continue the same work without re-discovering context.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Purpose |
|
|
8
|
+
|------|---------|
|
|
9
|
+
| **`SESSION.md`** | Live handoff — read at session start, update at session end |
|
|
10
|
+
| **`SESSION.template.md`** | Schema reference (do not edit for handoff; copy to `SESSION.md` on fresh install) |
|
|
11
|
+
| **`history/`** | _(optional)_ milestone snapshots, e.g. `2025-06-02-feature-x.md` |
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. **Start** — Run `/resume` (or read `SESSION.md` first). Then `tasks/todo.md`, then linked `SPEC.md`.
|
|
16
|
+
2. **Work** — Follow `.cursor/`, `.claude/`, or `.kiro/` workflow (`/build`, etc.).
|
|
17
|
+
3. **End** — Run `/handoff` to refresh `SESSION.md` before closing the chat or switching tools.
|
|
18
|
+
|
|
19
|
+
## What to put in `SESSION.md`
|
|
20
|
+
|
|
21
|
+
- Goal, done / in progress / next steps
|
|
22
|
+
- Decisions and gotchas the next agent must know
|
|
23
|
+
- Pointers to spec, tasks, branch, key files
|
|
24
|
+
|
|
25
|
+
## What NOT to put here
|
|
26
|
+
|
|
27
|
+
- API keys, passwords, tokens, or credentials
|
|
28
|
+
- PII or customer data
|
|
29
|
+
- Long logs (link to issues or commits instead)
|
|
30
|
+
|
|
31
|
+
## Commit to git
|
|
32
|
+
|
|
33
|
+
`SESSION.md` is meant to be **committed** so the whole team and any IDE can resume. Keep it concise and current.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Agent session
|
|
2
|
+
|
|
3
|
+
> Cross-tool handoff state for Cursor, Claude Code, and Kiro. Update at session end (`/handoff`) or phase changes; read at session start (`/resume`).
|
|
4
|
+
|
|
5
|
+
## Meta
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|-------|-------|
|
|
9
|
+
| **Updated** | 2026-06-02 |
|
|
10
|
+
| **Phase** | build |
|
|
11
|
+
| **Tool** | cursor |
|
|
12
|
+
| **Persona** | _(maintainer)_ |
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
Ship and document **class-ai-agent** scaffolding (Cursor / Claude / Kiro), **agent continuity** (`.agent/SESSION.md`, `/resume`, `/handoff`), and clear **CodeGraph** usage so agents do not confuse MCP parameters or use CodeGraph for session handoff.
|
|
17
|
+
|
|
18
|
+
## Done
|
|
19
|
+
|
|
20
|
+
- Diagnosed `Error: task must be a non-empty string` — wrong args on `codegraph_context` (`query`/`limit` vs `task`/`maxNodes`).
|
|
21
|
+
- Documented parameter split in `.cursor/rules/codegraph.mdc`, `.cursor/references/codegraph.md`, `.claude/`, `.kiro/` (via `npm run sync:kiro`).
|
|
22
|
+
- Clarified in agent-continuity rules: resume handoff = Read `SESSION.md`, not CodeGraph.
|
|
23
|
+
|
|
24
|
+
## In progress
|
|
25
|
+
|
|
26
|
+
- Uncommitted doc fixes (8 files) on `main`.
|
|
27
|
+
- **Blockers:** none
|
|
28
|
+
|
|
29
|
+
## Next
|
|
30
|
+
|
|
31
|
+
1. Review and commit CodeGraph / agent-continuity doc changes (if approved).
|
|
32
|
+
2. Optionally add `SESSION.md` to `.gitignore` exclusion note in README — **do commit** `SESSION.md` for this repo when it reflects real team state (template stays in package).
|
|
33
|
+
3. Run `npm run test:cli` before any npm publish.
|
|
34
|
+
4. Run `/handoff` after each meaningful session end.
|
|
35
|
+
|
|
36
|
+
## Decisions
|
|
37
|
+
|
|
38
|
+
- Session resume uses **`.agent/SESSION.md` + `/resume`**, not `codegraph_context`.
|
|
39
|
+
- `codegraph_context` requires **`task`**; `codegraph_search` requires **`query`**.
|
|
40
|
+
|
|
41
|
+
## Gotchas
|
|
42
|
+
|
|
43
|
+
- Calling `codegraph_context` with `{ "query": "...", "limit": 15 }` → `task must be a non-empty string`.
|
|
44
|
+
- CodeGraph MCP may need `projectPath` if workspace root is not detected.
|
|
45
|
+
- Verify CLI: `npm run test:cli`
|
|
46
|
+
|
|
47
|
+
## Pointers
|
|
48
|
+
|
|
49
|
+
| Item | Location |
|
|
50
|
+
|------|----------|
|
|
51
|
+
| Spec | _(none — package maintenance)_ |
|
|
52
|
+
| Tasks | _(no `tasks/todo.md` yet)_ |
|
|
53
|
+
| Branch | `main` |
|
|
54
|
+
| Key files | `.cursor/commands/resume.md`, `.cursor/commands/handoff.md`, `.cursor/rules/agent-continuity.mdc`, `.cursor/rules/codegraph.mdc`, `bin/class-ai-agent.cjs` |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Agent session
|
|
2
|
+
|
|
3
|
+
> Cross-tool handoff state for Cursor, Claude Code, and Kiro. Update at session end (`/handoff`) or phase changes; read at session start (`/resume`).
|
|
4
|
+
|
|
5
|
+
## Meta
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|-------|-------|
|
|
9
|
+
| **Updated** | YYYY-MM-DD |
|
|
10
|
+
| **Phase** | spec \| plan \| build \| test \| review \| debug |
|
|
11
|
+
| **Tool** | cursor \| claude \| kiro |
|
|
12
|
+
| **Persona** | _(optional, e.g. backend, architect)_ |
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
_One paragraph: what we are building and why._
|
|
17
|
+
|
|
18
|
+
## Done
|
|
19
|
+
|
|
20
|
+
- _(completed work; include file paths or PR refs when useful)_
|
|
21
|
+
|
|
22
|
+
## In progress
|
|
23
|
+
|
|
24
|
+
- _(current task)_
|
|
25
|
+
- **Blockers:** _(none \| describe)_
|
|
26
|
+
|
|
27
|
+
## Next
|
|
28
|
+
|
|
29
|
+
1. _(ordered steps for the next agent)_
|
|
30
|
+
|
|
31
|
+
## Decisions
|
|
32
|
+
|
|
33
|
+
- _(non-obvious choices: API shape, libraries, approach)_
|
|
34
|
+
|
|
35
|
+
## Gotchas
|
|
36
|
+
|
|
37
|
+
- _(failed attempts, env quirks, test commands that matter)_
|
|
38
|
+
|
|
39
|
+
## Pointers
|
|
40
|
+
|
|
41
|
+
| Item | Location |
|
|
42
|
+
|------|----------|
|
|
43
|
+
| Spec | `SPEC.md` or `docs/specs/...` |
|
|
44
|
+
| Tasks | `tasks/todo.md` |
|
|
45
|
+
| Branch | `feature/...` |
|
|
46
|
+
| Key files | _(paths)_ |
|
package/.claude/CLAUDE.md
CHANGED
|
@@ -36,6 +36,15 @@ Follow this workflow for all feature development:
|
|
|
36
36
|
| `/debug` | Systematic error diagnosis and root cause analysis |
|
|
37
37
|
| `/simplify` | Reduce complexity without changing behavior |
|
|
38
38
|
| `/fix-issue` | Analyze and fix reported issues |
|
|
39
|
+
| `/handoff` | End session — update `.agent/SESSION.md` for cross-tool continuity |
|
|
40
|
+
| `/resume` | Start session — load `.agent/SESSION.md` and continue prior work |
|
|
41
|
+
| `publish-npm` | **Maintainers:** draft release notes, bump version, update README, publish to npm |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Agent continuity
|
|
46
|
+
|
|
47
|
+
Cross-tool handoff lives in **`.agent/SESSION.md`** (committed). Use **`/resume`** at session start and **`/handoff`** at session end when switching chats or tools. See **`.claude/references/agent-continuity.md`** and **`.claude/rules/agent-continuity.md`**.
|
|
39
48
|
|
|
40
49
|
---
|
|
41
50
|
|
|
@@ -86,6 +95,7 @@ All rules in `.claude/rules/` are **mandatory** and must be followed:
|
|
|
86
95
|
| `monitoring.md` | Prometheus, Grafana, logging, alerting |
|
|
87
96
|
| `testing.md` | Coverage thresholds, test patterns |
|
|
88
97
|
| `git-workflow.md` | Branching strategy, conventional commits |
|
|
98
|
+
| `agent-continuity.md` | Session handoff via `.agent/SESSION.md` |
|
|
89
99
|
|
|
90
100
|
---
|
|
91
101
|
|
|
@@ -128,6 +138,9 @@ Specialized skills for complex operations:
|
|
|
128
138
|
| `incremental-implementation` | Vertical slice development |
|
|
129
139
|
| `deploy` | Full deployment pipeline |
|
|
130
140
|
| `security-review` | Security audit checklist |
|
|
141
|
+
| `agent-continuity` | Cross-tool session handoff via `.agent/SESSION.md` |
|
|
142
|
+
| `supabase` | Supabase products, Auth, CLI, MCP, migrations, RLS |
|
|
143
|
+
| `supabase-postgres-best-practices` | Postgres performance, indexes, RLS tuning |
|
|
131
144
|
|
|
132
145
|
---
|
|
133
146
|
|
|
@@ -141,15 +154,20 @@ Quick references in `.claude/references/`:
|
|
|
141
154
|
| `testing-patterns.md` | Test structure and anti-patterns |
|
|
142
155
|
| `performance-checklist.md` | Core Web Vitals, optimization |
|
|
143
156
|
| `accessibility-checklist.md` | WCAG 2.1 AA compliance |
|
|
157
|
+
| `codegraph.md` | CodeGraph install (Claude Code) and Cursor MCP notes |
|
|
158
|
+
| `agent-continuity.md` | Session handoff and `/resume` / `/handoff` |
|
|
159
|
+
| `supabase.md` | Supabase skills, MCP OAuth, secrets |
|
|
144
160
|
|
|
145
161
|
---
|
|
146
162
|
|
|
147
163
|
## Agent Behavior Guidelines
|
|
148
164
|
|
|
149
165
|
1. **Follow the workflow** — Use `/spec` → `/plan` → `/build` → `/review`
|
|
150
|
-
2. **
|
|
151
|
-
3. **
|
|
152
|
-
4. **
|
|
153
|
-
5. **
|
|
154
|
-
6. **
|
|
155
|
-
7. **
|
|
166
|
+
2. **Read `.agent/SESSION.md`** before planning or coding when present; use **`/resume`** to continue prior work
|
|
167
|
+
3. **Apply mandatory rules** — All rules in `.claude/rules/` are non-negotiable
|
|
168
|
+
4. **Test first** — Write failing tests before implementing
|
|
169
|
+
5. **Incremental changes** — Small commits, always buildable
|
|
170
|
+
6. **Explain before acting** — Describe changes before making them
|
|
171
|
+
7. **Fix root causes** — Don't patch symptoms
|
|
172
|
+
8. **Use the right agent** — Invoke specialized agents for their domains
|
|
173
|
+
9. **Hand off** — Update `.agent/SESSION.md` with **`/handoff`** before ending a session
|
|
@@ -23,9 +23,10 @@ Implement tasks one at a time using Test-Driven Development. Each increment leav
|
|
|
23
23
|
#### Step 1: Load Context
|
|
24
24
|
|
|
25
25
|
```
|
|
26
|
-
1. Read
|
|
27
|
-
2.
|
|
28
|
-
3.
|
|
26
|
+
1. Read `.agent/SESSION.md` if present (or run `/resume` at session start)
|
|
27
|
+
2. Read the task's acceptance criteria from `tasks/todo.md`
|
|
28
|
+
3. Identify relevant existing code and patterns
|
|
29
|
+
4. Understand types and interfaces involved
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
#### Step 2: RED — Write Failing Test
|
|
@@ -86,7 +87,7 @@ git commit -m "feat(tasks): add createTask function"
|
|
|
86
87
|
|
|
87
88
|
#### Step 6: Mark Complete
|
|
88
89
|
|
|
89
|
-
Update `tasks/todo.md
|
|
90
|
+
Update `tasks/todo.md` and `.agent/SESSION.md` (**Done**, **In progress**, **Next**):
|
|
90
91
|
```markdown
|
|
91
92
|
- [x] Task 1.1: Create task endpoint
|
|
92
93
|
```
|
|
@@ -20,7 +20,7 @@ When unexpected failures occur:
|
|
|
20
20
|
3. **DIAGNOSE** — Follow the 6-step triage process
|
|
21
21
|
4. **FIX** — Address root cause, not symptoms
|
|
22
22
|
5. **GUARD** — Add tests to prevent recurrence
|
|
23
|
-
6. **RESUME** — Only continue after verification
|
|
23
|
+
6. **RESUME** — Only continue after verification; update `.agent/SESSION.md` with root cause, guard tests, and **Next**
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
@@ -236,6 +236,7 @@ git bisect reset # When done
|
|
|
236
236
|
- Regression test added
|
|
237
237
|
- All tests passing
|
|
238
238
|
- Clear commit message explaining the fix
|
|
239
|
+
- **`.agent/SESSION.md`** updated (Gotchas, Decisions, **Next**)
|
|
239
240
|
|
|
240
241
|
## Next Step
|
|
241
242
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff
|
|
3
|
+
description: End-of-session — update .agent/SESSION.md for the next agent or tool
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /handoff — Session handoff
|
|
7
|
+
|
|
8
|
+
> "Leave the next agent a map, not a maze."
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Capture current work in **`.agent/SESSION.md`** so another chat, persona, or tool (Cursor, Claude Code, Kiro) can continue without re-discovering context.
|
|
13
|
+
|
|
14
|
+
## When to use
|
|
15
|
+
|
|
16
|
+
- End of a work session (before closing chat)
|
|
17
|
+
- Switching tools (Cursor → Claude Code → Kiro)
|
|
18
|
+
- Switching persona (e.g. architect → backend)
|
|
19
|
+
- After completing a workflow phase (spec, plan, build, test, review)
|
|
20
|
+
- Before opening a PR (document what reviewers should know)
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- `.agent/SESSION.md` exists (created by `npx class-ai-agent` or copy from `.agent/SESSION.template.md`)
|
|
25
|
+
- You have context on what was done this session
|
|
26
|
+
|
|
27
|
+
## Workflow
|
|
28
|
+
|
|
29
|
+
### Phase 1: Gather state
|
|
30
|
+
|
|
31
|
+
1. **Review git** — branch name, uncommitted files, last commits
|
|
32
|
+
2. **Review tasks** — open `tasks/todo.md`; sync checkboxes with reality
|
|
33
|
+
3. **Review spec** — note linked `SPEC.md` or `docs/specs/...` path
|
|
34
|
+
4. **Scan decisions** — what did we choose that is not obvious from code alone?
|
|
35
|
+
5. **Scan gotchas** — what failed, env quirks, commands that matter
|
|
36
|
+
|
|
37
|
+
### Phase 2: Update `.agent/SESSION.md`
|
|
38
|
+
|
|
39
|
+
Refresh every section (use `.agent/SESSION.template.md` as schema):
|
|
40
|
+
|
|
41
|
+
| Section | Content |
|
|
42
|
+
|---------|---------|
|
|
43
|
+
| **Meta** | `Updated` (today), `Phase`, `Tool` (cursor/claude/kiro), optional `Persona` |
|
|
44
|
+
| **Goal** | One paragraph — still accurate? |
|
|
45
|
+
| **Done** | Bullets with file paths or commit refs |
|
|
46
|
+
| **In progress** | Current task; **Blockers** (none or describe) |
|
|
47
|
+
| **Next** | Numbered steps for the *next* agent |
|
|
48
|
+
| **Decisions** | Non-obvious choices made this session |
|
|
49
|
+
| **Gotchas** | Failed attempts, test commands, env notes |
|
|
50
|
+
| **Pointers** | Spec path, `tasks/todo.md`, branch, key files |
|
|
51
|
+
|
|
52
|
+
### Phase 3: Sync `tasks/todo.md`
|
|
53
|
+
|
|
54
|
+
- Mark completed items `[x]`
|
|
55
|
+
- Add new tasks discovered during work
|
|
56
|
+
- Remove or defer items that are out of scope
|
|
57
|
+
|
|
58
|
+
### Phase 4: Risk note (if applicable)
|
|
59
|
+
|
|
60
|
+
If work is **not** safe to pick up blindly, add under **Gotchas** or **In progress**:
|
|
61
|
+
|
|
62
|
+
- Uncommitted changes and why
|
|
63
|
+
- Failing tests or broken build
|
|
64
|
+
- External blockers (API, review, dependency)
|
|
65
|
+
|
|
66
|
+
### Phase 5: Optional milestone archive
|
|
67
|
+
|
|
68
|
+
For major milestones, copy `SESSION.md` to:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
.agent/history/YYYY-MM-DD-short-slug.md
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Commit both `SESSION.md` and the history file when ready.
|
|
75
|
+
|
|
76
|
+
## Security
|
|
77
|
+
|
|
78
|
+
**Never** write to `SESSION.md`:
|
|
79
|
+
|
|
80
|
+
- API keys, passwords, tokens, credentials
|
|
81
|
+
- PII or customer data
|
|
82
|
+
- Full stack traces with secrets
|
|
83
|
+
|
|
84
|
+
Use issue links or commit SHAs instead.
|
|
85
|
+
|
|
86
|
+
## Output
|
|
87
|
+
|
|
88
|
+
- Updated **`.agent/SESSION.md`**
|
|
89
|
+
- Updated **`tasks/todo.md`** (if it exists)
|
|
90
|
+
- Short summary for the user: phase, next steps, blockers
|
|
91
|
+
|
|
92
|
+
## Next step
|
|
93
|
+
|
|
94
|
+
Tell the user to run **`/resume`** in the next session or tool, or commit and share the branch.
|
package/.claude/commands/plan.md
CHANGED
|
@@ -100,6 +100,7 @@ Save to `tasks/` directory:
|
|
|
100
100
|
|
|
101
101
|
- `tasks/plan.md` — Full planning document with context
|
|
102
102
|
- `tasks/todo.md` — Actionable task checklist
|
|
103
|
+
- **`.agent/SESSION.md`** — Update Meta `phase` to `build`, **Pointers** → `tasks/todo.md` and spec path, **Next** → first `/build` task
|
|
103
104
|
|
|
104
105
|
```markdown
|
|
105
106
|
# TODO: [Feature Name]
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Publish to npm (maintainers)
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Publish **`class-ai-agent`** to the npm registry: draft release notes from git, get maintainer approval, update README, bump version, verify CLI, publish.
|
|
6
|
+
|
|
7
|
+
## Triggers
|
|
8
|
+
|
|
9
|
+
Use when the maintainer says any of:
|
|
10
|
+
|
|
11
|
+
- **push to npm repo**
|
|
12
|
+
- **publish to npm**
|
|
13
|
+
- **publish class-ai-agent**
|
|
14
|
+
|
|
15
|
+
Or **@ mention this file** in Chat/Composer (`.cursor/commands/publish-npm.md` in Cursor; `.kiro/commands/publish-npm.md` in Kiro).
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
- Changes are ready to ship; working tree reflects what you are publishing.
|
|
20
|
+
- **`npm login`** completed for the `class-ai-agent` package scope.
|
|
21
|
+
- Two-factor auth enabled for npm **writes** if the account requires it (see README *Publishing to npm*).
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### 1. Resolve baseline version
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git tag -l 'v*' --sort=-v:refname | head -1
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If no `v*` tags exist, use the latest `### x.y.z` heading under **## Release notes** in README, or `package.json` version as the last shipped baseline.
|
|
32
|
+
|
|
33
|
+
Strip a leading `v` from tags when comparing to semver (e.g. `v1.2.4` → `1.2.4`).
|
|
34
|
+
|
|
35
|
+
### 2. Draft release notes (do not publish yet)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git log <lastTagOrBaseline>..HEAD --pretty=format:'- %s (%h)'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- Group related commits; rewrite subjects for user-facing clarity.
|
|
42
|
+
- Drop noise (merge commits, duplicate WIP messages) unless relevant.
|
|
43
|
+
- Present the bullet list to the maintainer and **wait for explicit approval or edits**.
|
|
44
|
+
|
|
45
|
+
### 3. Confirm version bump
|
|
46
|
+
|
|
47
|
+
Default: **`patch`** (`npm version patch --no-git-tag-version`).
|
|
48
|
+
|
|
49
|
+
Use **`minor`** or **`major`** only if the maintainer requests it.
|
|
50
|
+
|
|
51
|
+
### 4. Bump version
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm version patch --no-git-tag-version # or minor | major
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Read the new version from `package.json`.
|
|
58
|
+
|
|
59
|
+
### 5. Update README
|
|
60
|
+
|
|
61
|
+
Prefer the helper script after approval (write bullets to a temp file):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run release:readme -- --version NEW_VERSION --date YYYY-MM-DD --notes-file /path/to/notes.md
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`notes.md` should contain one bullet per line (with or without leading `- `).
|
|
68
|
+
|
|
69
|
+
If **## Release notes** is missing, add it before **## Contributing** first, then run the script.
|
|
70
|
+
|
|
71
|
+
Fallback: manually insert at the top of **## Release notes**:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
### NEW_VERSION — YYYY-MM-DD
|
|
75
|
+
|
|
76
|
+
- …
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
And sync the version badge: `version-NEW_VERSION` in the shields.io img (line ~21).
|
|
80
|
+
|
|
81
|
+
### 6. Verify CLI
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm run test:cli
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Stop on failure; do not publish.
|
|
88
|
+
|
|
89
|
+
### 7. Publish
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm publish --access public
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
If npm prompts for **OTP**, the maintainer enters it in the terminal.
|
|
96
|
+
|
|
97
|
+
On **403 / cannot publish over previously published versions**: bump with `npm version patch --no-git-tag-version` and retry (each semver can only be published once).
|
|
98
|
+
|
|
99
|
+
### 8. Report
|
|
100
|
+
|
|
101
|
+
Tell the maintainer:
|
|
102
|
+
|
|
103
|
+
- Published version (from `package.json`)
|
|
104
|
+
- https://www.npmjs.com/package/class-ai-agent
|
|
105
|
+
|
|
106
|
+
**Do not** `git commit`, tag, or push unless the maintainer separately asks.
|
|
107
|
+
|
|
108
|
+
## Maintainer quick reference
|
|
109
|
+
|
|
110
|
+
| Step | Command / action |
|
|
111
|
+
|------|------------------|
|
|
112
|
+
| Draft | `git log <tag>..HEAD --pretty=format:'- %s (%h)'` |
|
|
113
|
+
| Approve | Maintainer edits bullets in chat |
|
|
114
|
+
| Bump | `npm version patch --no-git-tag-version` |
|
|
115
|
+
| README | `npm run release:readme -- --version … --notes-file …` |
|
|
116
|
+
| Test | `npm run test:cli` |
|
|
117
|
+
| Publish | `npm publish --access public` |
|
|
118
|
+
|
|
119
|
+
See also [README — Publishing to npm](../../README.md#publishing-to-npm-maintainers) and [README — Release notes](../../README.md#release-notes).
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resume
|
|
3
|
+
description: Start-of-session — load .agent/SESSION.md and continue prior work
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /resume — Continue prior work
|
|
7
|
+
|
|
8
|
+
> "Read the map before you move."
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Load cross-tool handoff state and continue work from a previous agent session without re-discovering context.
|
|
13
|
+
|
|
14
|
+
## When to use
|
|
15
|
+
|
|
16
|
+
- Starting a new chat on the same feature
|
|
17
|
+
- Switching tools (Cursor ↔ Claude Code ↔ Kiro)
|
|
18
|
+
- User says "continue", "pick up where we left off", or "resume"
|
|
19
|
+
- After pulling a branch that includes an updated `.agent/SESSION.md`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- **`.agent/SESSION.md`** exists in the project root
|
|
24
|
+
- If missing: run `npx class-ai-agent` or copy `.agent/SESSION.template.md` → `.agent/SESSION.md`
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
### Phase 1: Load handoff (read-only first)
|
|
29
|
+
|
|
30
|
+
Read in this order:
|
|
31
|
+
|
|
32
|
+
1. **`.agent/SESSION.md`** — goal, done, in progress, next, decisions, gotchas, pointers
|
|
33
|
+
2. **`tasks/todo.md`** — if referenced in Pointers
|
|
34
|
+
3. **`SPEC.md`** or path from Pointers — if in spec/plan/build phase
|
|
35
|
+
|
|
36
|
+
> Do **not** edit code until Phase 3 plan is stated to the user.
|
|
37
|
+
|
|
38
|
+
### Phase 2: Sanity check
|
|
39
|
+
|
|
40
|
+
From SESSION **Gotchas** and **Pointers**, run quick checks when noted:
|
|
41
|
+
|
|
42
|
+
- `git status` — uncommitted work matches SESSION?
|
|
43
|
+
- Build/test commands listed in Gotchas — run if stale or uncertain
|
|
44
|
+
- Branch matches Pointers
|
|
45
|
+
|
|
46
|
+
If SESSION reports **blockers** or broken build, surface them before implementing.
|
|
47
|
+
|
|
48
|
+
### Phase 3: State plan to user
|
|
49
|
+
|
|
50
|
+
Reply with a short structured summary:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Resuming
|
|
54
|
+
|
|
55
|
+
**Goal:** [from SESSION]
|
|
56
|
+
**Phase:** [spec | plan | build | test | review | debug]
|
|
57
|
+
**Last updated:** [Meta date] via [tool/persona]
|
|
58
|
+
|
|
59
|
+
### Already done
|
|
60
|
+
- ...
|
|
61
|
+
|
|
62
|
+
### In progress
|
|
63
|
+
- ...
|
|
64
|
+
|
|
65
|
+
### Next (this session)
|
|
66
|
+
1. ...
|
|
67
|
+
|
|
68
|
+
### Risks / blockers
|
|
69
|
+
- ...
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Ask for confirmation only if SESSION is ambiguous or blockers need a decision.
|
|
73
|
+
|
|
74
|
+
### Phase 4: Continue workflow
|
|
75
|
+
|
|
76
|
+
| Phase in SESSION | Command to follow |
|
|
77
|
+
|------------------|-------------------|
|
|
78
|
+
| spec | `/spec` (refine) or `/plan` if spec is done |
|
|
79
|
+
| plan | `/plan` or `/build` if plan exists |
|
|
80
|
+
| build | `/build` |
|
|
81
|
+
| test | `/test` |
|
|
82
|
+
| review | `/review` |
|
|
83
|
+
| debug | `/debug` |
|
|
84
|
+
|
|
85
|
+
Update **Meta** in `.agent/SESSION.md` when you change phase or tool.
|
|
86
|
+
|
|
87
|
+
### Phase 5: During work
|
|
88
|
+
|
|
89
|
+
- After meaningful progress, update SESSION **Done** / **In progress** / **Next**
|
|
90
|
+
- End session with **`/handoff`**
|
|
91
|
+
|
|
92
|
+
## If SESSION is empty or stale
|
|
93
|
+
|
|
94
|
+
1. Survey repo: `git log`, `tasks/todo.md`, open PRs
|
|
95
|
+
2. Rebuild SESSION from evidence
|
|
96
|
+
3. Ask user to confirm goal and next steps
|
|
97
|
+
4. Run `/handoff` when aligned
|
|
98
|
+
|
|
99
|
+
## Output
|
|
100
|
+
|
|
101
|
+
- Resumption summary (Phase 3)
|
|
102
|
+
- Explicit next action (first item from **Next**)
|
|
103
|
+
- No code changes until plan is stated (unless user asked for a specific fix)
|
|
104
|
+
|
|
105
|
+
## Next step
|
|
106
|
+
|
|
107
|
+
Execute the first **Next** item using the appropriate workflow command (`/build`, etc.).
|
package/.claude/commands/spec.md
CHANGED
|
@@ -89,7 +89,8 @@ After discovery, produce `SPEC.md` with these sections:
|
|
|
89
89
|
|
|
90
90
|
- `SPEC.md` — The specification document
|
|
91
91
|
- Clear alignment on what to build
|
|
92
|
+
- **`.agent/SESSION.md`** — Initialize or update: set Meta `phase` to `plan`, **Goal**, **Pointers** → spec path, **Next** → run `/plan`
|
|
92
93
|
|
|
93
94
|
## Next Step
|
|
94
95
|
|
|
95
|
-
After spec is approved, run `/plan` to decompose into tasks.
|
|
96
|
+
After spec is approved, run `/plan` to decompose into tasks. Run `/handoff` if ending the session before planning.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Agent continuity — quick reference
|
|
2
|
+
|
|
3
|
+
## Files
|
|
4
|
+
|
|
5
|
+
| Path | Role |
|
|
6
|
+
|------|------|
|
|
7
|
+
| `.agent/SESSION.md` | Live handoff (commit to git) |
|
|
8
|
+
| `.agent/SESSION.template.md` | Schema reference |
|
|
9
|
+
| `.agent/README.md` | Human overview |
|
|
10
|
+
| `tasks/todo.md` | Task checklist (workflow) |
|
|
11
|
+
| `SPEC.md` | Feature spec (workflow) |
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
| Command | When |
|
|
16
|
+
|---------|------|
|
|
17
|
+
| **`/resume`** | Start of session — read SESSION, summarize, continue |
|
|
18
|
+
| **`/handoff`** | End of session — write SESSION, sync tasks |
|
|
19
|
+
|
|
20
|
+
## Read order (resume)
|
|
21
|
+
|
|
22
|
+
1. `.agent/SESSION.md`
|
|
23
|
+
2. `tasks/todo.md`
|
|
24
|
+
3. Linked spec from SESSION Pointers
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx class-ai-agent
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Creates `.agent/` and seeds `SESSION.md` from template.
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- **Cursor:** `.cursor/rules/agent-continuity.mdc` (`alwaysApply`)
|
|
37
|
+
- **Claude:** `.claude/rules/agent-continuity.md`
|
|
38
|
+
- **Kiro:** `.kiro/steering/agent-continuity.md` (`inclusion: always`)
|
|
39
|
+
|
|
40
|
+
## Skill
|
|
41
|
+
|
|
42
|
+
`.cursor/skills/agent-continuity/SKILL.md` — full handoff/resume checklists.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# CodeGraph reference
|
|
2
|
+
|
|
3
|
+
[CodeGraph](https://github.com/colbymchenry/codegraph) is a local, tree-sitter–parsed knowledge graph exposed to agents via MCP.
|
|
4
|
+
|
|
5
|
+
## Claude Code setup
|
|
6
|
+
|
|
7
|
+
**class-ai-agent** does not write Claude MCP config. Install CodeGraph for Claude Code globally:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @colbymchenry/codegraph
|
|
11
|
+
# or: npm i -g @colbymchenry/codegraph
|
|
12
|
+
codegraph install --target=claude --yes
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
In each project, build the index:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
codegraph init -i
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If you used **class-ai-agent** to scaffold the project, it may have already run `init -i` and created `.codegraph/` (shared by any agent that uses the index).
|
|
22
|
+
|
|
23
|
+
## Cursor (via class-ai-agent)
|
|
24
|
+
|
|
25
|
+
- `.cursor/mcp.json` — CodeGraph MCP server
|
|
26
|
+
- `.cursor/rules/codegraph.mdc` — when to use `codegraph_*` tools
|
|
27
|
+
|
|
28
|
+
Reload Cursor after install. See `.cursor/references/codegraph.md`.
|
|
29
|
+
|
|
30
|
+
## Kiro (via class-ai-agent)
|
|
31
|
+
|
|
32
|
+
- `.kiro/settings/mcp.json` — CodeGraph MCP server
|
|
33
|
+
- `.kiro/steering/codegraph.md` — when to use `codegraph_*` tools
|
|
34
|
+
|
|
35
|
+
Restart Kiro after install. See `.kiro/references/codegraph.md`.
|
|
36
|
+
|
|
37
|
+
Or install globally: `codegraph install --target=kiro --yes`
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
40
|
+
|
|
41
|
+
- **Node 20+** recommended for CodeGraph.
|
|
42
|
+
- Index data lives in `.codegraph/` — add to `.gitignore` (class-ai-agent does this automatically).
|
|
43
|
+
|
|
44
|
+
## Troubleshooting
|
|
45
|
+
|
|
46
|
+
| Issue | Action |
|
|
47
|
+
|-------|--------|
|
|
48
|
+
| `task must be a non-empty string` | On `codegraph_context`, use **`task`** (not `query`) and **`maxNodes`** (not `limit`). For `/resume`, read `.agent/SESSION.md` — not CodeGraph. |
|
|
49
|
+
|
|
50
|
+
See [CodeGraph README — Troubleshooting](https://github.com/colbymchenry/codegraph#troubleshooting) or `.cursor/references/codegraph.md` for MCP setup.
|