@agent-native/core 0.28.5 → 0.30.1
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/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +53 -15
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +20 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/guided-questions.d.ts +9 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.flow.spec.d.ts +2 -0
- package/dist/client/guided-questions.flow.spec.d.ts.map +1 -0
- package/dist/client/guided-questions.flow.spec.js +147 -0
- package/dist/client/guided-questions.flow.spec.js.map +1 -0
- package/dist/client/guided-questions.js +45 -20
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/coding-tools/index.d.ts.map +1 -1
- package/dist/coding-tools/index.js +18 -18
- package/dist/coding-tools/index.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +201 -188
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/templates/default/.agents/skills/create-skill/SKILL.md +47 -28
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +47 -29
- package/docs/content/creating-templates.md +1 -1
- package/docs/content/skills-guide.md +2 -0
- package/docs/content/writing-agent-instructions.md +130 -0
- package/package.json +1 -1
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +47 -28
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +47 -29
|
@@ -12,26 +12,34 @@ description: >-
|
|
|
12
12
|
|
|
13
13
|
Create a new skill when:
|
|
14
14
|
|
|
15
|
-
- There's a pattern the agent should follow repeatedly
|
|
16
|
-
- A workflow needs step-by-step guidance
|
|
17
|
-
- You want to scaffold files from a template
|
|
15
|
+
- There's a pattern the agent should follow repeatedly.
|
|
16
|
+
- A multi-step workflow needs reliable, step-by-step guidance.
|
|
17
|
+
- You want to scaffold files from a template.
|
|
18
18
|
|
|
19
19
|
Don't create a skill when:
|
|
20
20
|
|
|
21
|
-
- The guidance already exists in another skill
|
|
22
|
-
- You're documenting something the agent already knows (e.g., how to write
|
|
23
|
-
|
|
21
|
+
- The guidance already exists in another skill — extend it instead.
|
|
22
|
+
- You're documenting something the agent already knows (e.g., how to write
|
|
23
|
+
TypeScript).
|
|
24
|
+
- It's a one-off — put it in `AGENTS.md` (for everyone) or `memory/MEMORY.md`
|
|
25
|
+
(personal, per-user). See **capture-learnings**.
|
|
24
26
|
|
|
25
|
-
##
|
|
27
|
+
## Interview
|
|
26
28
|
|
|
27
29
|
Before writing the skill, answer these:
|
|
28
30
|
|
|
29
31
|
1. **What should this skill enable?** — The core purpose in one sentence.
|
|
30
|
-
2. **Which
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
2. **Which of the four areas does it serve?** — UI, actions, skills/instructions,
|
|
33
|
+
or application state (see the **adding-a-feature** skill). Most skills are
|
|
34
|
+
about how to touch one or more of these correctly.
|
|
35
|
+
3. **When should it trigger?** — Describe the situations in natural language.
|
|
36
|
+
Be slightly pushy — over-triggering is better than under-triggering.
|
|
37
|
+
4. **Does it involve context awareness?** — Does the agent need to know what the
|
|
38
|
+
user is looking at? If so, reference the `navigation` application-state key and
|
|
39
|
+
the `view-screen` action pattern. See the **context-awareness** skill.
|
|
40
|
+
5. **What type of skill?** — Pattern, Workflow, or Generator (see below).
|
|
41
|
+
6. **Does it need supporting files?** — References (read-only context) or none.
|
|
42
|
+
Keep it minimal; push depth into `references/`.
|
|
35
43
|
|
|
36
44
|
## Skill Types and Templates
|
|
37
45
|
|
|
@@ -43,7 +51,7 @@ For documenting how things should be done:
|
|
|
43
51
|
---
|
|
44
52
|
name: my-pattern
|
|
45
53
|
description: >-
|
|
46
|
-
[Under 40 words.
|
|
54
|
+
[Under 40 words. What it covers AND when it should trigger.]
|
|
47
55
|
---
|
|
48
56
|
|
|
49
57
|
# [Pattern Name]
|
|
@@ -77,7 +85,7 @@ For multi-step implementation tasks:
|
|
|
77
85
|
---
|
|
78
86
|
name: my-workflow
|
|
79
87
|
description: >-
|
|
80
|
-
[Under 40 words.
|
|
88
|
+
[Under 40 words. What it covers AND when it should trigger.]
|
|
81
89
|
---
|
|
82
90
|
|
|
83
91
|
# [Workflow Name]
|
|
@@ -109,7 +117,7 @@ For creating files from templates:
|
|
|
109
117
|
---
|
|
110
118
|
name: my-generator
|
|
111
119
|
description: >-
|
|
112
|
-
[Under 40 words.
|
|
120
|
+
[Under 40 words. What it covers AND when it should trigger.]
|
|
113
121
|
---
|
|
114
122
|
|
|
115
123
|
# [Generator Name]
|
|
@@ -128,30 +136,36 @@ description: >-
|
|
|
128
136
|
|
|
129
137
|
## After Generation
|
|
130
138
|
|
|
131
|
-
[What to do next — wire up
|
|
139
|
+
[What to do next — wire up sync, add routes, register the action, etc.]
|
|
132
140
|
|
|
133
141
|
## Related Skills
|
|
134
142
|
```
|
|
135
143
|
|
|
136
144
|
## Naming Conventions
|
|
137
145
|
|
|
138
|
-
- Hyphen-case only: `[a-z0-9-]`, max 64 characters
|
|
139
|
-
- Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`)
|
|
140
|
-
- Workflow/generator skills: verb-noun (`create-
|
|
146
|
+
- Hyphen-case only: `[a-z0-9-]`, max 64 characters.
|
|
147
|
+
- Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`).
|
|
148
|
+
- Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
|
|
149
|
+
- The directory name must match the `name` in frontmatter.
|
|
141
150
|
|
|
142
151
|
## Tips
|
|
143
152
|
|
|
144
|
-
- **Keep descriptions under 40 words** —
|
|
145
|
-
|
|
146
|
-
- **
|
|
153
|
+
- **Keep descriptions under 40 words** — they load into context on every
|
|
154
|
+
conversation. State what the skill does AND when to trigger it.
|
|
155
|
+
- **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
|
|
156
|
+
`references/` files (progressive disclosure).
|
|
157
|
+
- **Use standard markdown headings** — no XML tags or custom formats.
|
|
147
158
|
|
|
148
159
|
## Anti-Patterns
|
|
149
160
|
|
|
150
|
-
- **Inline LLM calls** —
|
|
151
|
-
|
|
152
|
-
- **
|
|
153
|
-
- **
|
|
154
|
-
|
|
161
|
+
- **Inline LLM calls** — skills must not call LLMs directly. All AI work goes
|
|
162
|
+
through the agent chat (see **delegate-to-agent**).
|
|
163
|
+
- **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
|
|
164
|
+
- **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
|
|
165
|
+
`useActionQuery` so the UI updates (see **real-time-sync**).
|
|
166
|
+
- **Vague descriptions** — "Helps with development" won't trigger. Be specific
|
|
167
|
+
about _when_.
|
|
168
|
+
- **Pure documentation** — skills should guide action, not just explain concepts.
|
|
155
169
|
|
|
156
170
|
## File Structure
|
|
157
171
|
|
|
@@ -164,5 +178,9 @@ description: >-
|
|
|
164
178
|
|
|
165
179
|
## Related Skills
|
|
166
180
|
|
|
167
|
-
- **
|
|
168
|
-
- **
|
|
181
|
+
- **adding-a-feature** — The four-area model every skill ultimately serves.
|
|
182
|
+
- **writing-agent-instructions** — How to write AGENTS.md and skills well for
|
|
183
|
+
apps and templates you ship to others.
|
|
184
|
+
- **capture-learnings** — When a learning graduates to reusable guidance, create
|
|
185
|
+
a skill; one-offs go to `AGENTS.md` or `memory/MEMORY.md`.
|
|
186
|
+
- **self-modifying-code** — The agent can create new skills (Tier 2 modification).
|