class-ai-agent 1.2.3 → 1.3.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 +21 -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/rules/agent-continuity.md +39 -0
- package/.claude/skills/agent-continuity/SKILL.md +70 -0
- package/.cursor/CURSOR.md +37 -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 +15 -0
- package/.cursor/references/agent-continuity.md +42 -0
- package/.cursor/references/codegraph.md +87 -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/skills/agent-continuity/SKILL.md +70 -0
- package/.kiro/KIRO.md +146 -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/testing-patterns.md +183 -0
- package/.kiro/settings/mcp.json +15 -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/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 +462 -0
- package/.kiro/steering/testing.md +110 -0
- package/AGENTS.md +13 -7
- package/README.md +122 -18
- package/bin/class-ai-agent.cjs +165 -11
- package/package.json +10 -4
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Agent continuity
|
|
2
|
+
|
|
3
|
+
Cross-tool handoff lives in **`.agent/SESSION.md`** (committed). Cursor, Claude Code, and Kiro agents share this file.
|
|
4
|
+
|
|
5
|
+
## Session start
|
|
6
|
+
|
|
7
|
+
1. If **`.agent/SESSION.md`** exists, read it **before** planning or editing code.
|
|
8
|
+
2. When the user says **continue**, **resume**, or **pick up**, use **`.claude/commands/resume.md`**.
|
|
9
|
+
3. Then read **`tasks/todo.md`** and linked **SPEC** paths from SESSION **Pointers**.
|
|
10
|
+
|
|
11
|
+
**Do not** call `codegraph_context` with `query` / `limit` for session resume — that tool requires **`task`** and is for code symbols, not handoff state. For continuity, read `.agent/SESSION.md` (and `tasks/todo.md`); use `codegraph_context` only when you need structural code context for the work described in SESSION.
|
|
12
|
+
|
|
13
|
+
## Session end and phase changes
|
|
14
|
+
|
|
15
|
+
1. Update **`.agent/SESSION.md`** before ending a session or switching tools — use **`.claude/commands/handoff.md`** when possible.
|
|
16
|
+
2. Keep **Done**, **In progress**, and **Next** accurate; do not leave stale **In progress** items.
|
|
17
|
+
3. Sync **`tasks/todo.md`** checkboxes when tasks change.
|
|
18
|
+
|
|
19
|
+
## Security (SESSION.md)
|
|
20
|
+
|
|
21
|
+
**Never** store in `.agent/SESSION.md`:
|
|
22
|
+
|
|
23
|
+
- API keys, passwords, tokens, credentials
|
|
24
|
+
- PII or customer data
|
|
25
|
+
|
|
26
|
+
Use issue links, commit SHAs, and file paths instead.
|
|
27
|
+
|
|
28
|
+
## Workflow integration
|
|
29
|
+
|
|
30
|
+
| Phase | SESSION `phase` value |
|
|
31
|
+
|-------|------------------------|
|
|
32
|
+
| Spec | `spec` |
|
|
33
|
+
| Plan | `plan` |
|
|
34
|
+
| Build | `build` |
|
|
35
|
+
| Test | `test` |
|
|
36
|
+
| Review | `review` |
|
|
37
|
+
| Debug | `debug` |
|
|
38
|
+
|
|
39
|
+
Set **Meta → Tool** to `cursor`, `claude`, or `kiro` as appropriate.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Agent Continuity
|
|
3
|
+
description: Cross-tool session handoff and resume via .agent/SESSION.md
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Continuity Skill
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Keep **Cursor**, **Claude Code**, and **Kiro** aligned on the same in-flight work using committed **`.agent/SESSION.md`**.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## When to apply
|
|
15
|
+
|
|
16
|
+
| Situation | Action |
|
|
17
|
+
|-----------|--------|
|
|
18
|
+
| New chat, same feature | **Resume** — read SESSION first |
|
|
19
|
+
| End of session | **Handoff** — update SESSION |
|
|
20
|
+
| Switch IDE/tool | **Handoff** then **Resume** in new tool |
|
|
21
|
+
| Switch persona | Update Meta `persona`; handoff notes for next role |
|
|
22
|
+
| Phase change (plan → build) | Update Meta `phase` |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Handoff checklist
|
|
27
|
+
|
|
28
|
+
- [ ] Meta: date, phase, tool, persona
|
|
29
|
+
- [ ] Goal still accurate (one paragraph)
|
|
30
|
+
- [ ] Done: bullets with paths/commits
|
|
31
|
+
- [ ] In progress + blockers
|
|
32
|
+
- [ ] Next: numbered for next agent
|
|
33
|
+
- [ ] Decisions: non-obvious choices
|
|
34
|
+
- [ ] Gotchas: failures, test commands, env
|
|
35
|
+
- [ ] Pointers: spec, tasks, branch, key files
|
|
36
|
+
- [ ] `tasks/todo.md` synced
|
|
37
|
+
- [ ] No secrets or PII in SESSION
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Resume checklist
|
|
42
|
+
|
|
43
|
+
- [ ] Read `.agent/SESSION.md`
|
|
44
|
+
- [ ] Read `tasks/todo.md` if linked
|
|
45
|
+
- [ ] Read SPEC if linked
|
|
46
|
+
- [ ] `git status` vs SESSION expectations
|
|
47
|
+
- [ ] Run sanity build/test if Gotchas say so
|
|
48
|
+
- [ ] Post resumption summary to user
|
|
49
|
+
- [ ] Execute first **Next** step via workflow command
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## SESSION schema
|
|
54
|
+
|
|
55
|
+
See **`.agent/SESSION.template.md`** for the canonical sections.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Commands
|
|
60
|
+
|
|
61
|
+
| Command | File |
|
|
62
|
+
|---------|------|
|
|
63
|
+
| `/handoff` | `.cursor/commands/handoff.md` (`.claude/`, `.kiro/`) |
|
|
64
|
+
| `/resume` | `.cursor/commands/resume.md` |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Optional history
|
|
69
|
+
|
|
70
|
+
Copy SESSION to `.agent/history/YYYY-MM-DD-slug.md` at milestones; commit for audit trail.
|
package/.cursor/CURSOR.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
This project uses **Cursor** with the same structured workflows, specialized agent personas, and coding standards as
|
|
5
|
+
This project uses **Cursor** with the same structured workflows, specialized agent personas, and coding standards as **`.claude/`** and **`.kiro/`**. Cursor-specific files live under **`.cursor/`**.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -30,6 +30,9 @@ Follow this workflow for feature development:
|
|
|
30
30
|
| `commands/debug.md` | Systematic diagnosis |
|
|
31
31
|
| `commands/simplify.md` | Reduce complexity, same behavior |
|
|
32
32
|
| `commands/fix-issue.md` | Analyze and fix reported issues |
|
|
33
|
+
| `commands/handoff.md` | End session — update `.agent/SESSION.md` for cross-tool continuity |
|
|
34
|
+
| `commands/resume.md` | Start session — load `.agent/SESSION.md` and continue prior work |
|
|
35
|
+
| `commands/publish-npm.md` | **Maintainers:** draft release notes, bump version, update README, publish to npm |
|
|
33
36
|
|
|
34
37
|
**How to use:** Open the markdown file, copy the section you need, or **@ mention** the file in Chat/Composer so the model loads it.
|
|
35
38
|
|
|
@@ -56,6 +59,24 @@ Project rules are **`.cursor/rules/*.mdc`**. They use YAML frontmatter:
|
|
|
56
59
|
| Stack, structure, APIs | `tech-stack`, `project-structure`, `api-conventions` |
|
|
57
60
|
| Data & naming | `naming-conventions`, `database` |
|
|
58
61
|
| Ops & quality | `security`, `monitoring`, `testing`, `git-workflow`, `system-design` |
|
|
62
|
+
| Code intelligence | `codegraph` (MCP usage; see below) |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Code intelligence (CodeGraph)
|
|
67
|
+
|
|
68
|
+
This project includes **[CodeGraph](https://github.com/colbymchenry/codegraph)** for local, structural code search via MCP.
|
|
69
|
+
|
|
70
|
+
| Item | Location |
|
|
71
|
+
|------|----------|
|
|
72
|
+
| MCP server config | `.cursor/mcp.json` |
|
|
73
|
+
| Usage rules | `.cursor/rules/codegraph.mdc` |
|
|
74
|
+
| Symbol index (generated) | `.codegraph/` (gitignored) |
|
|
75
|
+
| Setup reference | `.cursor/references/codegraph.md` |
|
|
76
|
+
|
|
77
|
+
After installing scaffolding, **reload the Cursor window** (or restart Cursor) so the CodeGraph MCP server connects. Use `codegraph_*` tools for structural questions (callers, callees, traces, impact); use grep/read for literal text in comments or strings.
|
|
78
|
+
|
|
79
|
+
If the index is missing, run `npx @colbymchenry/codegraph init -i` in the project root.
|
|
59
80
|
|
|
60
81
|
---
|
|
61
82
|
|
|
@@ -82,6 +103,7 @@ Reusable playbooks: **`.cursor/skills/*/SKILL.md`** (and related `.md` files whe
|
|
|
82
103
|
| `incremental-implementation` | Vertical slices |
|
|
83
104
|
| `deploy` | Deployment pipeline |
|
|
84
105
|
| `security-review` | Security audit |
|
|
106
|
+
| `agent-continuity` | Cross-tool session handoff via `.agent/SESSION.md` |
|
|
85
107
|
|
|
86
108
|
---
|
|
87
109
|
|
|
@@ -95,18 +117,28 @@ Reusable playbooks: **`.cursor/skills/*/SKILL.md`** (and related `.md` files whe
|
|
|
95
117
|
| `testing-patterns.md` | Test structure |
|
|
96
118
|
| `performance-checklist.md` | Performance |
|
|
97
119
|
| `accessibility-checklist.md` | WCAG-oriented checks |
|
|
120
|
+
| `codegraph.md` | CodeGraph install and Claude Code setup |
|
|
121
|
+
| `agent-continuity.md` | Session handoff and `/resume` / `/handoff` |
|
|
98
122
|
|
|
99
123
|
---
|
|
100
124
|
|
|
101
125
|
## Config parity
|
|
102
126
|
|
|
103
|
-
**`.cursor/settings.json`** lists directories (mirrors `.claude/settings.json` for Claude Code). Cursor natively loads **`.cursor/rules/*.mdc
|
|
127
|
+
**`.cursor/settings.json`** lists directories (mirrors `.claude/settings.json` for Claude Code). Cursor natively loads **`.cursor/rules/*.mdc`** and **`.cursor/mcp.json`** for MCP servers; other paths are documentation for humans and for `@` includes.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Agent continuity
|
|
132
|
+
|
|
133
|
+
Cross-tool handoff lives in **`.agent/SESSION.md`** (committed). Use **`/resume`** at session start and **`/handoff`** at session end when switching chats or tools (Cursor, Claude Code, Kiro). See **`.cursor/references/agent-continuity.md`** and **`.cursor/rules/agent-continuity.mdc`**.
|
|
104
134
|
|
|
105
135
|
---
|
|
106
136
|
|
|
107
137
|
## Agent behavior
|
|
108
138
|
|
|
109
139
|
1. Follow the workflow and use the command prompts when starting a phase.
|
|
110
|
-
2.
|
|
111
|
-
3.
|
|
112
|
-
4.
|
|
140
|
+
2. If **`.agent/SESSION.md`** exists, read it before planning or coding; run **`/resume`** when continuing prior work.
|
|
141
|
+
3. Apply **`.cursor/rules/`**; treat **`security.mdc`** as non-negotiable.
|
|
142
|
+
4. Prefer tests first and small, buildable changes.
|
|
143
|
+
5. **@ mention** the right **`.cursor/agents/`** file when the task matches that role.
|
|
144
|
+
6. Update **`.agent/SESSION.md`** (or **`/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/.cursor/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/.cursor/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.
|
package/.cursor/mcp.json
ADDED
|
@@ -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.
|