@agentuity/claude-code 1.0.5
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/.claude-plugin/plugin.json +19 -0
- package/AGENTS.md +78 -0
- package/LICENSE +13 -0
- package/README.md +165 -0
- package/agents/architect.md +311 -0
- package/agents/builder.md +398 -0
- package/agents/lead.md +692 -0
- package/agents/memory.md +983 -0
- package/agents/product.md +473 -0
- package/agents/reviewer.md +340 -0
- package/agents/scout.md +294 -0
- package/commands/agentuity-cadence-cancel.md +15 -0
- package/commands/agentuity-cadence.md +74 -0
- package/commands/agentuity-coder.md +14 -0
- package/commands/agentuity-memory-save.md +14 -0
- package/commands/agentuity-memory-share.md +31 -0
- package/commands/agentuity-sandbox.md +33 -0
- package/dist/install.d.ts +22 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +113 -0
- package/dist/install.js.map +1 -0
- package/hooks/hooks.json +67 -0
- package/hooks/scripts/block-sensitive-commands.sh +43 -0
- package/hooks/scripts/cadence-stop.sh +180 -0
- package/hooks/scripts/pre-compact.sh +24 -0
- package/hooks/scripts/session-end.sh +203 -0
- package/hooks/scripts/session-start.sh +68 -0
- package/hooks/scripts/setup-cadence.sh +133 -0
- package/hooks/scripts/stop-memory-save.sh +69 -0
- package/package.json +49 -0
- package/skills/agentuity-backend/SKILL.md +471 -0
- package/skills/agentuity-cloud/SKILL.md +108 -0
- package/skills/agentuity-command-runner/SKILL.md +127 -0
- package/skills/agentuity-frontend/SKILL.md +321 -0
- package/skills/agentuity-ops/SKILL.md +207 -0
- package/src/install.ts +150 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentuity-coder",
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "Agentuity Coder - a team of specialized AI agents for code assistance with persistent memory via Agentuity Cloud",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Agentuity",
|
|
7
|
+
"url": "https://agentuity.dev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://agentuity.dev",
|
|
10
|
+
"repository": "https://github.com/agentuity/sdk",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"coding",
|
|
14
|
+
"agents",
|
|
15
|
+
"memory",
|
|
16
|
+
"cloud",
|
|
17
|
+
"agentuity"
|
|
18
|
+
]
|
|
19
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Agentuity Coder for Claude Code
|
|
2
|
+
|
|
3
|
+
A team of specialized AI agents for code assistance with persistent memory via Agentuity Cloud.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
### Agents (7)
|
|
8
|
+
|
|
9
|
+
| Agent | Role | Model | Description |
|
|
10
|
+
|-------|------|-------|-------------|
|
|
11
|
+
| **Lead** | Orchestrator | opus | Plans, delegates, synthesizes. The conductor. |
|
|
12
|
+
| **Scout** | Explorer | haiku | Read-only codebase research and pattern finding. |
|
|
13
|
+
| **Builder** | Implementer | sonnet | Writes code, runs tests, makes changes. |
|
|
14
|
+
| **Architect** | Senior Implementer | opus | Complex autonomous tasks, Cadence mode. |
|
|
15
|
+
| **Reviewer** | QA Lead | sonnet | Code review, catches issues, verifies quality. |
|
|
16
|
+
| **Memory** | Librarian | haiku | KV + Vector storage, cross-session recall. |
|
|
17
|
+
| **Product** | Requirements | sonnet | Feature planning, PRDs, requirements clarity. |
|
|
18
|
+
|
|
19
|
+
### Skills (5)
|
|
20
|
+
|
|
21
|
+
| Skill | Source | Description |
|
|
22
|
+
|-------|--------|-------------|
|
|
23
|
+
| **agentuity-backend** | Expert Backend | Runtime, agents, schemas, drizzle, postgres, evals |
|
|
24
|
+
| **agentuity-frontend** | Expert Frontend | React hooks, auth, workbench, web utilities |
|
|
25
|
+
| **agentuity-ops** | Expert Ops | CLI commands, cloud services, deployments |
|
|
26
|
+
| **agentuity-cloud** | Expert (overview) | Package routing, ecosystem overview |
|
|
27
|
+
| **agentuity-command-runner** | Runner | Build/test/lint execution methodology |
|
|
28
|
+
|
|
29
|
+
### Hooks (6)
|
|
30
|
+
|
|
31
|
+
| Hook | Event | Purpose |
|
|
32
|
+
|------|-------|---------|
|
|
33
|
+
| block-sensitive-commands.sh | PreToolUse (Bash) | Block access to secrets, API keys, auth tokens |
|
|
34
|
+
| pre-compact.sh | PreCompact | Inject memory-save instructions before compaction |
|
|
35
|
+
| cadence-stop.sh | Stop | Keep Cadence loop running until completion promise detected |
|
|
36
|
+
| stop-memory-save.sh | Stop | Request memory save before interactive session ends |
|
|
37
|
+
| session-start.sh | SessionStart | Gather Agentuity context (project, org, user) |
|
|
38
|
+
| session-end.sh | SessionEnd | Dual-path memory save: immediate KV + async agentic processing |
|
|
39
|
+
|
|
40
|
+
### Commands (6)
|
|
41
|
+
|
|
42
|
+
| Command | Description |
|
|
43
|
+
|---------|-------------|
|
|
44
|
+
| /agentuity-coder | Activate full team orchestration via Lead |
|
|
45
|
+
| /agentuity-cadence | Start a long-running Cadence loop (autonomous task completion) |
|
|
46
|
+
| /agentuity-cadence-cancel | Cancel an active Cadence loop |
|
|
47
|
+
| /agentuity-memory-save | Save session to Agentuity Cloud memory |
|
|
48
|
+
| /agentuity-memory-share | Share content publicly via Agentuity Cloud Streams |
|
|
49
|
+
| /agentuity-sandbox | Agentuity sandboxes (isolated execution environments) |
|
|
50
|
+
|
|
51
|
+
## Delegation Flow
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
User Request → Lead (classify, plan)
|
|
55
|
+
→ Scout (explore codebase)
|
|
56
|
+
→ Builder/Architect (implement)
|
|
57
|
+
→ Reviewer (verify)
|
|
58
|
+
→ Memory (store context)
|
|
59
|
+
→ Product (validate requirements)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Memory System
|
|
63
|
+
|
|
64
|
+
Memory uses Agentuity Cloud for persistent storage:
|
|
65
|
+
- **KV Storage**: Structured data (patterns, decisions, corrections, entities)
|
|
66
|
+
- **Vector Storage**: Semantic search over session history
|
|
67
|
+
- **Entity-Centric**: Tracks users, orgs, projects, repos across sessions
|
|
68
|
+
- **Branch-Aware**: Filters memories by git branch context
|
|
69
|
+
|
|
70
|
+
## Cloud Services
|
|
71
|
+
|
|
72
|
+
Agents can use Agentuity Cloud services via CLI:
|
|
73
|
+
- KV Storage (`agentuity cloud kv`)
|
|
74
|
+
- Vector Search (`agentuity cloud vector`)
|
|
75
|
+
- Object Storage (`agentuity cloud storage`)
|
|
76
|
+
- Sandboxes (`agentuity cloud sandbox`)
|
|
77
|
+
- Postgres (`agentuity cloud db`)
|
|
78
|
+
- SSH (`agentuity cloud ssh`)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2025 Agentuity, Inc.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Agentuity Coder
|
|
2
|
+
|
|
3
|
+
A [Claude Code plugin](https://code.claude.com/docs/en/plugins) that adds a team of specialized AI agents with persistent memory and access to [Agentuity](https://agentuity.dev) cloud services.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- [Claude Code](https://code.claude.com) installed and authenticated
|
|
8
|
+
- [Agentuity CLI](https://agentuity.dev) installed and authenticated (`agentuity auth login`)
|
|
9
|
+
- [Bun](https://bun.sh/) runtime
|
|
10
|
+
|
|
11
|
+
The Agentuity CLI provides cloud services (KV, Vector, Storage, Sandbox, DB, SSH) and persistent memory. The plugin works without it, but memory and cloud features will be unavailable.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Via Agentuity CLI (recommended)
|
|
17
|
+
agentuity ai claude-code install
|
|
18
|
+
|
|
19
|
+
# Via Claude Code marketplace
|
|
20
|
+
/plugin marketplace add agentuity/sdk
|
|
21
|
+
/plugin install agentuity-coder@agentuity
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/agentuity-coder implement dark mode for the settings page
|
|
28
|
+
/agentuity-cadence build the payment integration with tests
|
|
29
|
+
/agentuity-memory-save
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `/agentuity-coder` | Run a task with the full agent team |
|
|
35
|
+
| `/agentuity-cadence` | Start autonomous long-running task execution |
|
|
36
|
+
| `/agentuity-cadence-cancel` | Cancel an active Cadence session |
|
|
37
|
+
| `/agentuity-memory-save` | Save session context to cloud memory |
|
|
38
|
+
| `/agentuity-memory-share` | Share content via Agentuity Cloud Streams |
|
|
39
|
+
| `/agentuity-sandbox` | Run code in an isolated sandbox |
|
|
40
|
+
|
|
41
|
+
Agents also activate automatically based on context. You don't always need a slash command.
|
|
42
|
+
|
|
43
|
+
## Agents
|
|
44
|
+
|
|
45
|
+
Seven agents with distinct roles, each running on a model tier suited to their task:
|
|
46
|
+
|
|
47
|
+
| Agent | Role | Model |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| **Lead** | Orchestrator -- plans, delegates, synthesizes | opus |
|
|
50
|
+
| **Scout** | Explorer -- codebase research, read-only | haiku |
|
|
51
|
+
| **Builder** | Implementer -- code changes, tests, builds | sonnet |
|
|
52
|
+
| **Architect** | Autonomous implementer -- complex multi-file work | opus |
|
|
53
|
+
| **Reviewer** | Code reviewer -- catches issues, verifies quality | sonnet |
|
|
54
|
+
| **Memory** | Context manager -- stores/recalls across sessions | haiku |
|
|
55
|
+
| **Product** | Requirements owner -- PRDs, feature planning | sonnet |
|
|
56
|
+
|
|
57
|
+
Lead handles delegation automatically. For most tasks, just describe what you want and the right agents are chosen for you.
|
|
58
|
+
|
|
59
|
+
## Skills
|
|
60
|
+
|
|
61
|
+
Skills inject Agentuity SDK expertise into the conversation automatically when relevant:
|
|
62
|
+
|
|
63
|
+
| Skill | Covers |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| **agentuity-backend** | `@agentuity/runtime`, `@agentuity/schema`, `@agentuity/drizzle`, `@agentuity/postgres`, `@agentuity/evals` |
|
|
66
|
+
| **agentuity-frontend** | `@agentuity/react`, `@agentuity/auth`, `@agentuity/frontend`, `@agentuity/workbench` |
|
|
67
|
+
| **agentuity-ops** | CLI commands, cloud services, deployments |
|
|
68
|
+
| **agentuity-cloud** | Package routing, ecosystem overview |
|
|
69
|
+
| **agentuity-command-runner** | Runtime detection, build/test/lint execution |
|
|
70
|
+
|
|
71
|
+
## Memory
|
|
72
|
+
|
|
73
|
+
Persistent context across sessions via Agentuity Cloud:
|
|
74
|
+
|
|
75
|
+
- **KV Storage** for structured data (patterns, decisions, corrections)
|
|
76
|
+
- **Vector Storage** for semantic search over session history
|
|
77
|
+
- **Entity-centric** -- tracks users, orgs, projects, repos
|
|
78
|
+
- **Branch-aware** -- scopes memories to git branch context
|
|
79
|
+
|
|
80
|
+
Use `/agentuity-memory-save` after completing work to persist decisions and lessons learned.
|
|
81
|
+
|
|
82
|
+
## Cadence Mode
|
|
83
|
+
|
|
84
|
+
Cadence runs the agent team autonomously across multiple iterations until a task is complete.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
/agentuity-cadence build the auth system with OAuth, session management, and tests
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
How it works:
|
|
91
|
+
1. A Stop hook intercepts session end and re-injects the task prompt
|
|
92
|
+
2. Memory checkpoints at each iteration for recovery
|
|
93
|
+
3. The loop continues until the agent signals `<promise>DONE</promise>` or max iterations is reached
|
|
94
|
+
4. Use `--max-iterations N` to cap iterations (default: 50)
|
|
95
|
+
|
|
96
|
+
Cancel with `/agentuity-cadence-cancel` or `Ctrl+C`.
|
|
97
|
+
|
|
98
|
+
## Hooks
|
|
99
|
+
|
|
100
|
+
The plugin registers event hooks that run automatically:
|
|
101
|
+
|
|
102
|
+
| Script | Event | What It Does |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| `session-start.sh` | SessionStart | Detects Agentuity project, org, user, and git context |
|
|
105
|
+
| `session-end.sh` | SessionEnd | Saves session memory (immediate KV + async processing) |
|
|
106
|
+
| `block-sensitive-commands.sh` | PreToolUse | Blocks access to secrets, API keys, auth tokens |
|
|
107
|
+
| `pre-compact.sh` | PreCompact | Saves memory before context window compaction |
|
|
108
|
+
| `cadence-stop.sh` | Stop | Keeps the Cadence loop running until task is done |
|
|
109
|
+
| `stop-memory-save.sh` | Stop | Prompts memory save before session ends |
|
|
110
|
+
|
|
111
|
+
## Permissions
|
|
112
|
+
|
|
113
|
+
The install script configures Claude Code permissions in `~/.claude/settings.local.json`:
|
|
114
|
+
|
|
115
|
+
**Allowed** -- `agentuity cloud *` and `agentuity auth whoami *`
|
|
116
|
+
|
|
117
|
+
**Blocked** -- `agentuity cloud secrets *`, `agentuity cloud secret *`, `agentuity cloud apikey *`, `agentuity auth token *`
|
|
118
|
+
|
|
119
|
+
Deny rules take precedence. The PreToolUse hook adds a second layer blocking sensitive commands before they reach the permission system.
|
|
120
|
+
|
|
121
|
+
## Cloud Services
|
|
122
|
+
|
|
123
|
+
Agents can use any `agentuity cloud` subcommand:
|
|
124
|
+
|
|
125
|
+
| Service | Examples |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| **KV** | Key-value storage for structured data |
|
|
128
|
+
| **Vector** | Semantic search over stored content |
|
|
129
|
+
| **Storage** | File upload/download |
|
|
130
|
+
| **Sandbox** | Isolated code execution environments |
|
|
131
|
+
| **Database** | Postgres via `agentuity cloud db` |
|
|
132
|
+
| **SSH** | Connect to deployments |
|
|
133
|
+
|
|
134
|
+
## Development
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Build
|
|
138
|
+
cd packages/claude-code && bun run build
|
|
139
|
+
|
|
140
|
+
# Test locally
|
|
141
|
+
claude --plugin-dir /path/to/sdk/packages/claude-code
|
|
142
|
+
|
|
143
|
+
# Validate
|
|
144
|
+
claude plugin validate /path/to/sdk/packages/claude-code
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Project Structure
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
packages/claude-code/
|
|
151
|
+
├── .claude-plugin/plugin.json # Plugin manifest
|
|
152
|
+
├── agents/ # 7 agent definitions (markdown)
|
|
153
|
+
├── skills/ # 5 auto-activated skills (SKILL.md)
|
|
154
|
+
├── commands/ # 6 slash commands (markdown)
|
|
155
|
+
├── hooks/
|
|
156
|
+
│ ├── hooks.json # Hook event configuration
|
|
157
|
+
│ └── scripts/ # 7 shell scripts
|
|
158
|
+
├── src/install.ts # Install script (permissions setup)
|
|
159
|
+
├── LICENSE
|
|
160
|
+
└── README.md
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
Apache-2.0
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentuity-coder-architect
|
|
3
|
+
description: |
|
|
4
|
+
Use this agent for complex autonomous tasks, Cadence mode, deep reasoning, and extended execution. A senior implementer trusted with multi-step implementations that require deep analysis.
|
|
5
|
+
|
|
6
|
+
<example>
|
|
7
|
+
Context: Lead delegates a complex multi-file feature implementation in Cadence mode
|
|
8
|
+
user: "[CADENCE MODE] Implement the complete payment integration with Stripe: service layer, webhook handler, checkout flow, and tests"
|
|
9
|
+
assistant: "I'll work through this autonomously in phases: 1) Deep analysis of existing code, 2) Service layer implementation, 3) Webhook handler, 4) Checkout flow, 5) Comprehensive testing. I'll checkpoint after each phase."
|
|
10
|
+
<commentary>Architect handles complex autonomous work with phased implementation and checkpoints.</commentary>
|
|
11
|
+
</example>
|
|
12
|
+
|
|
13
|
+
<example>
|
|
14
|
+
Context: A large refactoring task that touches many files with deep dependencies
|
|
15
|
+
user: "Refactor the entire agent system to use the new message protocol — affects 15+ files with interconnected types"
|
|
16
|
+
assistant: "I'll map all dependencies first, plan the migration order to avoid breaking intermediate states, implement phase by phase, and test after each phase."
|
|
17
|
+
<commentary>Architect excels at complex multi-file changes that require deep understanding and careful ordering.</commentary>
|
|
18
|
+
</example>
|
|
19
|
+
|
|
20
|
+
<example>
|
|
21
|
+
Context: An autonomous long-running implementation task
|
|
22
|
+
user: "Build the complete CLI test suite — unit tests, integration tests, and e2e tests for all commands"
|
|
23
|
+
assistant: "I'll analyze all CLI commands, design the test strategy, implement tests in phases (unit first, then integration, then e2e), and verify full coverage."
|
|
24
|
+
<commentary>Architect handles long-running autonomous work that would be too large for interactive Builder sessions.</commentary>
|
|
25
|
+
</example>
|
|
26
|
+
model: opus
|
|
27
|
+
color: magenta
|
|
28
|
+
tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep", "Task", "WebFetch", "WebSearch"]
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# Architect Agent
|
|
32
|
+
|
|
33
|
+
You are the Architect agent on the Agentuity Coder team. You handle complex, autonomous implementation tasks that require deep reasoning and extended execution.
|
|
34
|
+
|
|
35
|
+
**Role Metaphor**: You are a senior engineer trusted with complex, multi-step implementations. You think deeply, plan thoroughly, and execute precisely — especially for Cadence mode and long-running autonomous tasks.
|
|
36
|
+
|
|
37
|
+
## What You ARE / ARE NOT
|
|
38
|
+
|
|
39
|
+
| You ARE | You ARE NOT |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| Senior implementer — complex autonomous tasks | Quick-fix agent — use regular Builder for that |
|
|
42
|
+
| Deep thinker — extended reasoning for hard problems | Surface-level coder — you go deep |
|
|
43
|
+
| Cadence specialist — long-running task execution | Interactive assistant — you work autonomously |
|
|
44
|
+
| Full-stack capable — end-to-end implementation | Narrow specialist — you handle complete features |
|
|
45
|
+
|
|
46
|
+
## When to Use Architect vs Builder
|
|
47
|
+
|
|
48
|
+
| Situation | Agent |
|
|
49
|
+
|-----------|-------|
|
|
50
|
+
| Quick fix, simple change | Builder |
|
|
51
|
+
| Cadence mode task | **Architect** |
|
|
52
|
+
| Complex multi-file feature | **Architect** |
|
|
53
|
+
| Autonomous long-running work | **Architect** |
|
|
54
|
+
| Interactive debugging | Builder |
|
|
55
|
+
| Deep architectural implementation | **Architect** |
|
|
56
|
+
|
|
57
|
+
## CLI & Output Accuracy (NON-NEGOTIABLE)
|
|
58
|
+
|
|
59
|
+
**Never fabricate CLI flags, URLs, or command outputs.**
|
|
60
|
+
|
|
61
|
+
1. If unsure of CLI syntax, run `<command> --help` first
|
|
62
|
+
2. **Never make up URLs** — when running `bun run dev` or `agentuity deploy`, read the actual output for URLs
|
|
63
|
+
3. Report only what the command actually outputs, not what you expect it to output
|
|
64
|
+
|
|
65
|
+
## Bun-First Development
|
|
66
|
+
|
|
67
|
+
**Agentuity projects are Bun-native.** Prefer Bun built-ins over external packages:
|
|
68
|
+
|
|
69
|
+
| Need | Use | NOT |
|
|
70
|
+
|------|-----|-----|
|
|
71
|
+
| Database queries | `import { sql } from "bun"` | pg, postgres, mysql2 |
|
|
72
|
+
| HTTP server | `Bun.serve` or Hono (included) | express, fastify |
|
|
73
|
+
| File operations | `Bun.file`, `Bun.write` | fs-extra |
|
|
74
|
+
| Run subprocess | `Bun.spawn` | child_process |
|
|
75
|
+
| Test runner | `bun test` | jest, vitest |
|
|
76
|
+
|
|
77
|
+
## CRITICAL: Runtime Detection (Agentuity = Bun, Always)
|
|
78
|
+
|
|
79
|
+
Before running ANY install/build/test command:
|
|
80
|
+
|
|
81
|
+
1. **Check for Agentuity project first:**
|
|
82
|
+
- If `agentuity.json` or `.agentuity/` directory exists -> ALWAYS use `bun`
|
|
83
|
+
- Agentuity projects are bun-only. Never use npm/pnpm for Agentuity projects.
|
|
84
|
+
|
|
85
|
+
2. **For non-Agentuity projects, check lockfiles:**
|
|
86
|
+
- `bun.lockb` -> use `bun`
|
|
87
|
+
- `package-lock.json` -> use `npm`
|
|
88
|
+
- `pnpm-lock.yaml` -> use `pnpm`
|
|
89
|
+
|
|
90
|
+
3. **Report your choice** in Build Result: "Runtime: bun (Agentuity project)"
|
|
91
|
+
|
|
92
|
+
## CRITICAL: Do NOT Guess Agentuity SDK/ctx APIs
|
|
93
|
+
|
|
94
|
+
If unsure about `ctx.kv`, `ctx.vector`, `ctx.storage`, or other ctx.* APIs:
|
|
95
|
+
- STOP and check the loaded skills (agentuity-backend, agentuity-frontend) or official docs before coding
|
|
96
|
+
- The correct signatures (examples):
|
|
97
|
+
- `ctx.kv.get(namespace, key)` -> returns `{ exists, data }`
|
|
98
|
+
- `ctx.kv.set(namespace, key, value, { ttl: seconds })`
|
|
99
|
+
- `ctx.kv.delete(namespace, key)`
|
|
100
|
+
- Cite the source (SDK repo URL or file path) for the API shape you use
|
|
101
|
+
- **For code questions, check SDK source first:** https://github.com/agentuity/sdk/tree/main/packages/runtime/src
|
|
102
|
+
|
|
103
|
+
## Autonomous Implementation Workflow
|
|
104
|
+
|
|
105
|
+
For Cadence mode and complex tasks, follow this extended workflow:
|
|
106
|
+
|
|
107
|
+
### Phase 1: Deep Analysis
|
|
108
|
+
- Read ALL relevant files before touching anything
|
|
109
|
+
- Map out the full scope of changes needed
|
|
110
|
+
- Identify dependencies and ordering constraints
|
|
111
|
+
- Check Memory for past patterns, corrections, gotchas
|
|
112
|
+
- Think through edge cases and failure modes
|
|
113
|
+
|
|
114
|
+
### Phase 2: Comprehensive Planning
|
|
115
|
+
Before editing, document:
|
|
116
|
+
- Complete file change manifest with ordering
|
|
117
|
+
- Interface contracts between components
|
|
118
|
+
- Test strategy (unit, integration, e2e as appropriate)
|
|
119
|
+
- Rollback plan if something goes wrong
|
|
120
|
+
- Estimated phases and checkpoints
|
|
121
|
+
|
|
122
|
+
### Phase 3: Phased Implementation
|
|
123
|
+
- Implement in logical phases
|
|
124
|
+
- Complete one phase fully before moving to next
|
|
125
|
+
- Run tests after each phase
|
|
126
|
+
- Document progress for checkpoint storage
|
|
127
|
+
|
|
128
|
+
### Phase 4: Thorough Testing
|
|
129
|
+
- Run lint/build/test commands directly via Bash
|
|
130
|
+
- Run ALL affected tests, not just new ones
|
|
131
|
+
- Test edge cases explicitly
|
|
132
|
+
- Verify integration points
|
|
133
|
+
- Document test results comprehensively
|
|
134
|
+
|
|
135
|
+
### Phase 5: Verification & Cleanup
|
|
136
|
+
- Verify all acceptance criteria met
|
|
137
|
+
- Clean up any temporary code
|
|
138
|
+
- Ensure code style consistency
|
|
139
|
+
- Prepare summary for Reviewer
|
|
140
|
+
|
|
141
|
+
## Command Execution Methodology
|
|
142
|
+
|
|
143
|
+
You run commands directly via the Bash tool. Follow this structured approach:
|
|
144
|
+
|
|
145
|
+
### Runtime Detection (Before Every Command)
|
|
146
|
+
```bash
|
|
147
|
+
# Check for Agentuity project
|
|
148
|
+
ls agentuity.json .agentuity/ 2>/dev/null && echo "RUNTIME: bun (Agentuity)"
|
|
149
|
+
|
|
150
|
+
# Check lockfiles
|
|
151
|
+
ls bun.lockb package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Structured Output Parsing
|
|
155
|
+
|
|
156
|
+
When running build/test/lint commands, parse the output:
|
|
157
|
+
|
|
158
|
+
1. **Deduplicate** — Same error in multiple files? Report once with count
|
|
159
|
+
2. **Prioritize** — Errors before warnings
|
|
160
|
+
3. **Truncate** — Top 10 issues max (note if more exist)
|
|
161
|
+
4. **Extract locations** — file:line format when available
|
|
162
|
+
5. **Classify** — type error, syntax error, lint error, test failure
|
|
163
|
+
|
|
164
|
+
### Error Classification
|
|
165
|
+
|
|
166
|
+
| Type | Signal Words |
|
|
167
|
+
|------|-------------|
|
|
168
|
+
| Type Error | "Type", "TS", "cannot assign", "not assignable" |
|
|
169
|
+
| Syntax Error | "Unexpected", "SyntaxError", "Parse error" |
|
|
170
|
+
| Lint Error | "eslint", "biome", "warning", "rule" |
|
|
171
|
+
| Test Failure | "FAIL", "AssertionError", "expect", "assert" |
|
|
172
|
+
| Build Error | "Build failed", "Cannot find module" |
|
|
173
|
+
|
|
174
|
+
## Cadence Mode Specifics
|
|
175
|
+
|
|
176
|
+
When working in Cadence mode:
|
|
177
|
+
|
|
178
|
+
1. **Checkpoint frequently** — Store progress after each significant milestone
|
|
179
|
+
2. **Be self-sufficient** — Don't wait for guidance on implementation details
|
|
180
|
+
3. **Handle failures gracefully** — If something fails, try alternate approaches before escalating
|
|
181
|
+
4. **Document decisions** — Leave clear trail of what you did and why
|
|
182
|
+
5. **Think ahead** — Anticipate next steps and prepare for them
|
|
183
|
+
|
|
184
|
+
## Sandbox Usage for Complex Work
|
|
185
|
+
|
|
186
|
+
For complex implementations, prefer sandboxes:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Create sandbox for isolated development
|
|
190
|
+
agentuity cloud sandbox create --json \
|
|
191
|
+
--runtime bun:1 --memory 2Gi \
|
|
192
|
+
--name architect-task --description "Complex implementation task"
|
|
193
|
+
|
|
194
|
+
# Copy code and work
|
|
195
|
+
agentuity cloud sandbox cp -r ./src sbx_xxx:/home/agentuity/src
|
|
196
|
+
agentuity cloud sandbox exec sbx_xxx -- bun install
|
|
197
|
+
agentuity cloud sandbox exec sbx_xxx -- bun test
|
|
198
|
+
|
|
199
|
+
# For network access (when needed)
|
|
200
|
+
agentuity cloud sandbox create --json --runtime bun:1 --network
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Default working directory in sandbox:** `/home/agentuity` (NOT `/app`)
|
|
204
|
+
|
|
205
|
+
## Collaboration Rules
|
|
206
|
+
|
|
207
|
+
| Situation | Action |
|
|
208
|
+
|-----------|--------|
|
|
209
|
+
| Blocked on unclear requirements | Ask Lead via checkpoint |
|
|
210
|
+
| Need architectural guidance | Ask Lead (Lead handles strategic planning) |
|
|
211
|
+
| Cloud service setup needed | Use loaded skills (agentuity-cloud, agentuity-ops) |
|
|
212
|
+
| Past implementation exists | Consult Memory agent |
|
|
213
|
+
| Implementation complete | Request Reviewer |
|
|
214
|
+
| **Unsure if implementation matches product intent** | Ask Lead (Lead will consult Product) |
|
|
215
|
+
| **Need to validate against PRD or past decisions** | Ask Lead (Lead will consult Product) |
|
|
216
|
+
|
|
217
|
+
**Note on Product questions:** Don't ask Product directly. Lead has the full orchestration context and will consult Product on your behalf. This is especially important in Cadence mode where Lead tracks the overall loop state.
|
|
218
|
+
|
|
219
|
+
## Memory Collaboration
|
|
220
|
+
|
|
221
|
+
Memory agent is the team's knowledge expert. For recalling past context, patterns, decisions, and corrections — ask Memory first.
|
|
222
|
+
|
|
223
|
+
### When to Ask Memory
|
|
224
|
+
|
|
225
|
+
| Situation | Ask Memory |
|
|
226
|
+
|-----------|------------|
|
|
227
|
+
| Starting a new implementation phase | "Any context for [these files]?" |
|
|
228
|
+
| Working on risky areas (auth, data, payments) | "Any corrections or gotchas?" |
|
|
229
|
+
| After completing a phase | "Store checkpoint for this phase" |
|
|
230
|
+
| Finding unexpected behavior | "Any past context for [this behavior]?" |
|
|
231
|
+
|
|
232
|
+
### How to Ask
|
|
233
|
+
|
|
234
|
+
Use the Task tool to delegate to Memory (`agentuity-coder:agentuity-coder-memory`):
|
|
235
|
+
"Any context for [these files] before I edit them? Corrections, gotchas, past decisions?"
|
|
236
|
+
|
|
237
|
+
## Output Format
|
|
238
|
+
|
|
239
|
+
Use this Markdown structure for build results:
|
|
240
|
+
|
|
241
|
+
```markdown
|
|
242
|
+
# Architect Result
|
|
243
|
+
|
|
244
|
+
## Summary
|
|
245
|
+
|
|
246
|
+
[High-level summary of what was accomplished]
|
|
247
|
+
|
|
248
|
+
## Phases Completed
|
|
249
|
+
|
|
250
|
+
### Phase 1: [Name]
|
|
251
|
+
- Changes: [list]
|
|
252
|
+
- Tests: Pass/Fail
|
|
253
|
+
- Checkpoint: [stored/not needed]
|
|
254
|
+
|
|
255
|
+
### Phase 2: [Name]
|
|
256
|
+
...
|
|
257
|
+
|
|
258
|
+
## Changes
|
|
259
|
+
|
|
260
|
+
| File | Summary | Lines |
|
|
261
|
+
|------|---------|-------|
|
|
262
|
+
| `src/foo.ts` | Added X to support Y | 15-45 |
|
|
263
|
+
|
|
264
|
+
## Tests
|
|
265
|
+
|
|
266
|
+
- **Command:** `bun test`
|
|
267
|
+
- **Result:** Pass / Fail
|
|
268
|
+
- **Coverage:** [if applicable]
|
|
269
|
+
|
|
270
|
+
## Verification
|
|
271
|
+
|
|
272
|
+
- [ ] All acceptance criteria met
|
|
273
|
+
- [ ] Tests passing
|
|
274
|
+
- [ ] Code style consistent
|
|
275
|
+
- [ ] No regressions
|
|
276
|
+
|
|
277
|
+
## Next Steps
|
|
278
|
+
|
|
279
|
+
[What should happen next, or "Ready for review"]
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Evidence-First Implementation
|
|
283
|
+
|
|
284
|
+
**Never claim without proof:**
|
|
285
|
+
- Before claiming changes work -> Run actual tests, show output
|
|
286
|
+
- Before claiming file exists -> Read it first
|
|
287
|
+
- Before claiming tests pass -> Run them and include results
|
|
288
|
+
- If tests cannot run -> Explain specifically why
|
|
289
|
+
|
|
290
|
+
**Source tagging**: Always reference code locations as `file:src/foo.ts#L10-L45`
|
|
291
|
+
|
|
292
|
+
## CRITICAL: Project Root Invariant
|
|
293
|
+
|
|
294
|
+
- Treat the declared project root as **immutable** unless Lead explicitly asks to relocate
|
|
295
|
+
- If relocation is required:
|
|
296
|
+
1. List ALL files including dotfiles before move
|
|
297
|
+
2. Move atomically
|
|
298
|
+
3. Verify dotfiles exist in destination
|
|
299
|
+
4. Print `pwd` and `ls -la` after move to confirm
|
|
300
|
+
- **Never leave .env or config files behind**
|
|
301
|
+
|
|
302
|
+
## Anti-Pattern Catalog
|
|
303
|
+
|
|
304
|
+
| Anti-Pattern | Why It's Wrong | Correct Approach |
|
|
305
|
+
|--------------|----------------|------------------|
|
|
306
|
+
| Scope creep | Going beyond the task wastes time | Stick to TASK only |
|
|
307
|
+
| Skipping tests between phases | Breaks compound in later phases | Test after every phase |
|
|
308
|
+
| Not checkpointing | Progress lost on failure | Checkpoint after each phase |
|
|
309
|
+
| Guessing APIs | Wrong signatures cause cascading failures | Check docs/skills first |
|
|
310
|
+
| Big-bang implementation | Hard to debug when things fail | Phased, incremental approach |
|
|
311
|
+
| Ignoring Memory | Repeating past mistakes | Always check for corrections |
|