@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.
Files changed (28) hide show
  1. package/dist/cli/code-agent-executor.d.ts.map +1 -1
  2. package/dist/cli/code-agent-executor.js +53 -15
  3. package/dist/cli/code-agent-executor.js.map +1 -1
  4. package/dist/client/AssistantChat.d.ts.map +1 -1
  5. package/dist/client/AssistantChat.js +20 -1
  6. package/dist/client/AssistantChat.js.map +1 -1
  7. package/dist/client/guided-questions.d.ts +9 -1
  8. package/dist/client/guided-questions.d.ts.map +1 -1
  9. package/dist/client/guided-questions.flow.spec.d.ts +2 -0
  10. package/dist/client/guided-questions.flow.spec.d.ts.map +1 -0
  11. package/dist/client/guided-questions.flow.spec.js +147 -0
  12. package/dist/client/guided-questions.flow.spec.js.map +1 -0
  13. package/dist/client/guided-questions.js +45 -20
  14. package/dist/client/guided-questions.js.map +1 -1
  15. package/dist/coding-tools/index.d.ts.map +1 -1
  16. package/dist/coding-tools/index.js +18 -18
  17. package/dist/coding-tools/index.js.map +1 -1
  18. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  19. package/dist/server/agent-chat-plugin.js +201 -188
  20. package/dist/server/agent-chat-plugin.js.map +1 -1
  21. package/dist/templates/default/.agents/skills/create-skill/SKILL.md +47 -28
  22. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +47 -29
  23. package/docs/content/creating-templates.md +1 -1
  24. package/docs/content/skills-guide.md +2 -0
  25. package/docs/content/writing-agent-instructions.md +130 -0
  26. package/package.json +1 -1
  27. package/src/templates/default/.agents/skills/create-skill/SKILL.md +47 -28
  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 (extend it instead)
22
- - You're documenting something the agent already knows (e.g., how to write TypeScript)
23
- - The guidance is a one-off — put it in `AGENTS.md` or `learnings.md` instead
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
- ## 5-Question Interview
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 agent-native rule does it serve?** — Rule 1 (data in SQL), Rule 2 (delegate to agent), Rule 3 (scripts), Rule 4 (polling sync), Rule 5 (self-modify), Rule 6 (app-state in SQL), or "utility."
31
- 3. **When should it trigger?** — Describe the situations in natural language. Be slightly pushy — over-triggering is better than under-triggering.
32
- 4. **Does it involve context awareness?** — Does the agent need to know what the user is looking at to use this skill? If yes, the skill should reference the `navigation` app-state key and the `view-screen` script pattern. See the **context-awareness** skill.
33
- 5. **What type of skill?** — Pattern, Workflow, or Generator (see templates below).
34
- 6. **Does it need supporting files?** References (read-only context) or none. Keep it minimal.
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 pushyover-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. When should this trigger?]
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. When should this trigger?]
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. When should this trigger?]
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 SSE, add routes, etc.]
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-script`, `capture-learnings`)
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** — They're loaded into context on every conversation.
145
- - **Keep SKILL.md under 500 lines** Move detailed content to `references/` files.
146
- - **Use standard markdown headings** — No XML tags or custom formats.
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** — Skills must not call LLMs directly (violates Rule 2)
151
- - **Database patterns** Skills must not introduce databases (violates Rule 1)
152
- - **Ignoring db sync** — If a skill creates data, mention wiring up `useDbSync`
153
- - **Vague descriptions** — "Helps with development" won't trigger. Be specific about _when_.
154
- - **Pure documentation** Skills should guide action, not just explain concepts
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
- - **capture-learnings** — When a learning graduates to reusable guidance, create a skill
168
- - **self-modifying-code** — The agent can create new skills (Tier 2 modification)
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).