@prateek_ai/agents-maker 1.0.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/LICENSE +21 -0
- package/README.md +659 -0
- package/agents/architect_agent.md +175 -0
- package/agents/code_agent.md +178 -0
- package/agents/compression_agent.md +226 -0
- package/agents/execution_agent.md +157 -0
- package/agents/orchestrator.md +406 -0
- package/agents/reviewer_agent.md +134 -0
- package/agents/ui_agent.md +147 -0
- package/agents/ux_agent.md +144 -0
- package/bin/cli.js +79 -0
- package/config/agents.yaml +388 -0
- package/config/domain_profiles.yaml +394 -0
- package/config/project.yaml.example +16 -0
- package/config/token_policies.yaml +325 -0
- package/context_loaders/__init__.py +15 -0
- package/context_loaders/__pycache__/__init__.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/file_chunker.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/project_summary.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/repo_tree.cpython-314.pyc +0 -0
- package/context_loaders/file_chunker.py +252 -0
- package/context_loaders/project_summary.py +369 -0
- package/context_loaders/repo_tree.py +203 -0
- package/package.json +46 -0
- package/quickstart.ps1 +252 -0
- package/quickstart.sh +232 -0
- package/requirements.txt +3 -0
- package/skills/analyze_repo.md +86 -0
- package/skills/animated_website.md +285 -0
- package/skills/compare_approaches.md +86 -0
- package/skills/define_data_schema.md +99 -0
- package/skills/design_api.md +126 -0
- package/skills/improve_copy.md +69 -0
- package/skills/review_code.md +83 -0
- package/skills/review_layout.md +89 -0
- package/skills/suggest_next.md +105 -0
- package/skills/summarize_history.md +89 -0
- package/skills/write_process_map.md +105 -0
- package/skills/write_tests.md +97 -0
- package/token_optimization/__pycache__/compressor.cpython-314.pyc +0 -0
- package/token_optimization/compressor.py +502 -0
- package/token_optimization/output_styles.md +80 -0
- package/tools/__pycache__/domain_utils.cpython-314.pyc +0 -0
- package/tools/__pycache__/generate_claude_md.cpython-314.pyc +0 -0
- package/tools/__pycache__/validate_kit.cpython-314.pyc +0 -0
- package/tools/domain_utils.py +141 -0
- package/tools/generate_claude_md.py +269 -0
- package/tools/generate_platform_configs.py +467 -0
- package/tools/generate_prompt.py +461 -0
- package/tools/init_project.py +454 -0
- package/tools/test_kit.py +363 -0
- package/tools/validate_kit.py +504 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# Skill: Animated Website
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Design and implement a production-quality animated website or web page. Covers entrance
|
|
6
|
+
animations, scroll-triggered effects, micro-interactions, page transitions, loading sequences,
|
|
7
|
+
and background motion — with performance and accessibility guardrails built in.
|
|
8
|
+
|
|
9
|
+
This skill is the canonical way to request any animation work across the kit. It picks the
|
|
10
|
+
right technology for the project's stack and budget, generates implementation-ready code,
|
|
11
|
+
and flags performance traps before they ship.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Trigger Conditions
|
|
16
|
+
|
|
17
|
+
Invoke this skill when the user's message contains:
|
|
18
|
+
- "animate", "animation", "animated website", "motion"
|
|
19
|
+
- "scroll effect", "parallax", "fade in", "slide in", "entrance"
|
|
20
|
+
- "micro-interaction", "hover effect", "transition", "loading screen"
|
|
21
|
+
- "GSAP", "Framer Motion", "Three.js", "Lottie", "CSS keyframe"
|
|
22
|
+
- "interactive", "dynamic page", "cinematic", "immersive"
|
|
23
|
+
- Any Phase 3 implementation task in `product_design` or `software` domain where
|
|
24
|
+
the `solution_design` artifact includes animation or motion as a requirement
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Technology Selection Guide
|
|
29
|
+
|
|
30
|
+
Pick the stack based on project constraints before writing any code:
|
|
31
|
+
|
|
32
|
+
| Technology | Use when | Avoid when |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| **CSS only** | Simple fade/slide/scale; no JS budget; SSR sites | Sequenced multi-step timelines; scroll scrubbing |
|
|
35
|
+
| **CSS + Intersection Observer** | Scroll-triggered entrance animations; no library budget | Complex staggering logic |
|
|
36
|
+
| **GSAP** | Complex timelines, scroll scrubbing (ScrollTrigger), SVG morphing | React-only projects (use Framer Motion instead) |
|
|
37
|
+
| **Framer Motion** | React/Next.js; layout animations; gesture-driven UI | Non-React stacks |
|
|
38
|
+
| **Three.js / R3F** | 3D scenes, WebGL backgrounds, particle systems | Simple 2D effects (overkill) |
|
|
39
|
+
| **Lottie** | Designer-exported After Effects animations; icon animations | When file size matters (Lottie JSON can be large) |
|
|
40
|
+
| **Web Animations API** | Lightweight imperative control; no library budget | Complex timelines (too verbose) |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Input Expectations
|
|
45
|
+
|
|
46
|
+
| Input | Required | Description |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `page_description` | Yes | What the page/site does — target audience, purpose, tone |
|
|
49
|
+
| `animation_goal` | Yes | What the animation should communicate (e.g., premium, playful, technical) |
|
|
50
|
+
| `stack` | Yes | React, Vue, plain HTML/CSS, Next.js, etc. |
|
|
51
|
+
| `sections` | No | List of page sections (hero, features, pricing, footer, etc.) |
|
|
52
|
+
| `brand_tokens` | No | Colors, fonts, spacing scale |
|
|
53
|
+
| `performance_budget` | No | Target Lighthouse score or "no library" constraint |
|
|
54
|
+
| `reference_sites` | No | URLs or descriptions of sites with similar motion feel |
|
|
55
|
+
|
|
56
|
+
**If required input is missing:**
|
|
57
|
+
- `page_description` — ask: "What does this page/site do? Who is the audience and what tone should the motion convey?" Do not proceed without this.
|
|
58
|
+
- `animation_goal` — ask: "What should the animation communicate — premium, playful, technical, minimal, energetic?" Vague briefs produce vague motion; this field is non-negotiable.
|
|
59
|
+
- `stack` — ask: "What is the frontend stack — React, Vue, plain HTML/CSS, Next.js, or something else?" Technology selection depends entirely on this.
|
|
60
|
+
- `sections` — assume a standard landing page structure (hero, features, CTA, footer); list these assumptions at the top of the Animation Plan.
|
|
61
|
+
- `brand_tokens` — proceed without; use neutral defaults (white background, dark text, `ease-out cubic` easing).
|
|
62
|
+
- `performance_budget` — default to "standard budget"; select technology based on complexity alone.
|
|
63
|
+
- `reference_sites` — if `animation_goal` is vague (e.g., "make it premium"), ask for 1–2 reference sites before writing any code.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Output Format
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
## Animation Plan: <page or component name>
|
|
71
|
+
|
|
72
|
+
**Motion language**: <one sentence — e.g., "Smooth, editorial fade-ups with staggered reveals and a subtle parallax hero.">
|
|
73
|
+
**Stack selected**: <technology choice + one-line reason>
|
|
74
|
+
**Estimated JS weight**: <e.g., "~45 KB gzipped (GSAP core + ScrollTrigger)">
|
|
75
|
+
**Reduced-motion fallback**: <yes — all animations disabled via prefers-reduced-motion>
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### Section Breakdown
|
|
80
|
+
|
|
81
|
+
| Section | Animation type | Trigger | Duration | Easing |
|
|
82
|
+
|---|---|---|---|---|
|
|
83
|
+
| Hero | Scale-up + fade text | Page load | 1.2s | ease-out cubic |
|
|
84
|
+
| Features | Staggered card slide-up | Scroll enter (20% visible) | 0.6s each, 0.1s stagger | ease-out quart |
|
|
85
|
+
| Testimonials | Horizontal marquee | Auto-play, pause on hover | infinite | linear |
|
|
86
|
+
| CTA | Pulse ring on button | Idle after 3s | 1.5s loop | ease-in-out |
|
|
87
|
+
| Footer | Fade-in | Scroll enter | 0.4s | ease |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Implementation
|
|
92
|
+
|
|
93
|
+
#### 1. Base CSS setup
|
|
94
|
+
|
|
95
|
+
```css
|
|
96
|
+
/* Reduced motion — always include */
|
|
97
|
+
@media (prefers-reduced-motion: reduce) {
|
|
98
|
+
*, *::before, *::after {
|
|
99
|
+
animation-duration: 0.01ms !important;
|
|
100
|
+
animation-iteration-count: 1 !important;
|
|
101
|
+
transition-duration: 0.01ms !important;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* GPU-composited properties only — do not animate layout properties */
|
|
106
|
+
.animate-ready {
|
|
107
|
+
will-change: transform, opacity;
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### 2. Entrance animation (CSS + Intersection Observer)
|
|
112
|
+
|
|
113
|
+
```css
|
|
114
|
+
.reveal {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transform: translateY(32px);
|
|
117
|
+
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.reveal.visible {
|
|
121
|
+
opacity: 1;
|
|
122
|
+
transform: translateY(0);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Stagger via custom property */
|
|
126
|
+
.reveal:nth-child(2) { transition-delay: 0.1s; }
|
|
127
|
+
.reveal:nth-child(3) { transition-delay: 0.2s; }
|
|
128
|
+
.reveal:nth-child(4) { transition-delay: 0.3s; }
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```js
|
|
132
|
+
const observer = new IntersectionObserver(
|
|
133
|
+
(entries) => entries.forEach(e => {
|
|
134
|
+
if (e.isIntersecting) {
|
|
135
|
+
e.target.classList.add('visible');
|
|
136
|
+
observer.unobserve(e.target); // fire once
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
{ threshold: 0.2 }
|
|
140
|
+
);
|
|
141
|
+
document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### 3. Hero entrance (GSAP timeline)
|
|
145
|
+
|
|
146
|
+
```js
|
|
147
|
+
import gsap from 'gsap';
|
|
148
|
+
|
|
149
|
+
const tl = gsap.timeline({ defaults: { ease: 'power3.out' } });
|
|
150
|
+
|
|
151
|
+
tl.from('.hero-headline', { opacity: 0, y: 48, duration: 1 })
|
|
152
|
+
.from('.hero-sub', { opacity: 0, y: 24, duration: 0.8 }, '-=0.6')
|
|
153
|
+
.from('.hero-cta', { opacity: 0, scale: 0.9, duration: 0.6 }, '-=0.4');
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### 4. Scroll-scrubbed parallax (GSAP ScrollTrigger)
|
|
157
|
+
|
|
158
|
+
```js
|
|
159
|
+
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
160
|
+
gsap.registerPlugin(ScrollTrigger);
|
|
161
|
+
|
|
162
|
+
gsap.to('.hero-bg', {
|
|
163
|
+
yPercent: -30,
|
|
164
|
+
ease: 'none',
|
|
165
|
+
scrollTrigger: {
|
|
166
|
+
trigger: '.hero',
|
|
167
|
+
start: 'top top',
|
|
168
|
+
end: 'bottom top',
|
|
169
|
+
scrub: true,
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
#### 5. Framer Motion card stagger (React)
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
import { motion } from 'framer-motion';
|
|
178
|
+
|
|
179
|
+
const container = {
|
|
180
|
+
hidden: {},
|
|
181
|
+
show: { transition: { staggerChildren: 0.1 } },
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const item = {
|
|
185
|
+
hidden: { opacity: 0, y: 32 },
|
|
186
|
+
show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.25, 0.46, 0.45, 0.94] } },
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export function FeatureGrid({ features }) {
|
|
190
|
+
return (
|
|
191
|
+
<motion.ul variants={container} initial="hidden" whileInView="show" viewport={{ once: true }}>
|
|
192
|
+
{features.map(f => (
|
|
193
|
+
<motion.li key={f.id} variants={item}>
|
|
194
|
+
{f.title}
|
|
195
|
+
</motion.li>
|
|
196
|
+
))}
|
|
197
|
+
</motion.ul>
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### 6. Loading screen
|
|
203
|
+
|
|
204
|
+
```css
|
|
205
|
+
.loader {
|
|
206
|
+
position: fixed; inset: 0;
|
|
207
|
+
background: #0a0a0a;
|
|
208
|
+
display: grid; place-items: center;
|
|
209
|
+
z-index: 9999;
|
|
210
|
+
transition: opacity 0.5s ease, visibility 0.5s ease;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.loader.hidden { opacity: 0; visibility: hidden; }
|
|
214
|
+
|
|
215
|
+
.loader-bar {
|
|
216
|
+
width: 160px; height: 2px;
|
|
217
|
+
background: #222;
|
|
218
|
+
border-radius: 2px;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.loader-bar::after {
|
|
223
|
+
content: '';
|
|
224
|
+
display: block;
|
|
225
|
+
height: 100%;
|
|
226
|
+
background: #fff;
|
|
227
|
+
animation: load 1.4s ease-in-out infinite;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@keyframes load {
|
|
231
|
+
0% { width: 0%; margin-left: 0; }
|
|
232
|
+
50% { width: 100%; margin-left: 0; }
|
|
233
|
+
100% { width: 0%; margin-left: 100%; }
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
### Performance Checklist
|
|
240
|
+
|
|
241
|
+
- [ ] Only animate `transform` and `opacity` (never `width`, `height`, `top`, `left`)
|
|
242
|
+
- [ ] Add `will-change: transform` only on elements actively animating (remove after animation)
|
|
243
|
+
- [ ] All entrance animations use `once: true` / `unobserve()` — no repeated triggers
|
|
244
|
+
- [ ] `prefers-reduced-motion` media query disables all motion
|
|
245
|
+
- [ ] GSAP ScrollTrigger instances killed on component unmount (React/Vue)
|
|
246
|
+
- [ ] Total animation JS budget: ≤ 60 KB gzipped unless 3D/WebGL is required
|
|
247
|
+
- [ ] Lottie files ≤ 150 KB; lazy-loaded below the fold
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### Accessibility
|
|
252
|
+
|
|
253
|
+
- All animated elements retain focus and keyboard navigability
|
|
254
|
+
- No animation relies on color alone to convey state
|
|
255
|
+
- Auto-playing carousels and marquees pause on `hover` and `focus`
|
|
256
|
+
- Loading screens resolve within 3 seconds or expose a skip option
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Rules
|
|
262
|
+
|
|
263
|
+
- Always include a `prefers-reduced-motion` block — no exceptions.
|
|
264
|
+
- Never animate `width`, `height`, `margin`, `padding`, `top`, `left`, or `bottom` — use
|
|
265
|
+
`transform: translate/scale` instead to stay on the compositor thread.
|
|
266
|
+
- If the user only specifies a vibe (e.g., "make it look premium"), ask for 1–2 reference sites
|
|
267
|
+
before writing code. Vague briefs produce vague motion.
|
|
268
|
+
- When GSAP ScrollTrigger is used in a React/Vue SPA, always include the cleanup call
|
|
269
|
+
(`ScrollTrigger.getAll().forEach(t => t.kill())`) in the component unmount hook.
|
|
270
|
+
- Output code must be copy-paste ready — no pseudocode, no `// TODO` placeholders.
|
|
271
|
+
- After the implementation block, always append a Performance Checklist (pre-filled based
|
|
272
|
+
on the techniques used) and an Accessibility section.
|
|
273
|
+
- If Three.js or WebGL is selected, warn: "3D scenes can drop to 20 fps on mid-range mobile
|
|
274
|
+
— always test on a real device and provide a 2D fallback."
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Token Cost Tier
|
|
279
|
+
|
|
280
|
+
**Medium** for CSS/Intersection Observer implementations (no file reads required).
|
|
281
|
+
**High** for GSAP or Framer Motion integrations that touch existing component files.
|
|
282
|
+
**High** for Three.js / WebGL scenes (full repo scan needed to assess bundle impact).
|
|
283
|
+
|
|
284
|
+
Compression hint: if the animation is isolated to a single new component, scope context to
|
|
285
|
+
that file only. If touching the global CSS bundle or app entry point, request a repo summary first.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Skill: Compare Approaches
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
When a decision has multiple valid implementation paths, produce a structured trade-off comparison
|
|
6
|
+
and recommend one approach based on the current project's constraints, stack, and goals.
|
|
7
|
+
|
|
8
|
+
This skill is how the kit provides **decision support** — not just executing a chosen path, but
|
|
9
|
+
helping the user pick the right one before committing.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Trigger Conditions
|
|
14
|
+
|
|
15
|
+
Invoke this skill when the user's message contains:
|
|
16
|
+
- "compare", "trade-off", "trade off", "pros and cons"
|
|
17
|
+
- "which approach", "which is better", "should I use X or Y"
|
|
18
|
+
- "what are my options for…", "how should I implement…"
|
|
19
|
+
- Any design choice point during Phase 2 (Solution Design) where ≥2 valid paths exist
|
|
20
|
+
- When the Reviewer Agent (Phase 4) flags a design decision as revisable
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Input Expectations
|
|
25
|
+
|
|
26
|
+
| Input | Required | Description |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `decision_question` | Yes | The specific choice being evaluated — e.g., "Redis vs. in-memory cache for rate limiting" |
|
|
29
|
+
| `candidate_approaches` | Yes | 2–4 named options to compare (from user message or inferred from design context) |
|
|
30
|
+
| `project_constraints` | No | Stack, team size, timeline, must-not constraints from `task_profile`, `requirements_spec`, or `project.yaml` |
|
|
31
|
+
| `approved_adrs` | No | Any architecture decisions already confirmed — recommendations must not contradict them |
|
|
32
|
+
|
|
33
|
+
**If required input is missing:**
|
|
34
|
+
- `decision_question` — infer from the user's message; if still ambiguous, ask: "What specifically are you deciding between?" before producing the table.
|
|
35
|
+
- `candidate_approaches` — if only one approach is named, actively surface a second (hybrid, deferral, or "don't solve this yet") so the comparison has ≥2 options.
|
|
36
|
+
- `project_constraints` — proceed without; note that the recommendation is based on general trade-offs only, not project-specific context.
|
|
37
|
+
- `approved_adrs` — proceed without; add a caveat: "Check existing ADRs before committing to this recommendation."
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Output Format
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
**Decision: <the specific question being decided — one clear sentence>**
|
|
45
|
+
|
|
46
|
+
| Approach | Pros | Cons | Complexity | Token cost to implement |
|
|
47
|
+
|---|---|---|---|---|
|
|
48
|
+
| A: <name> | <2–3 specific pros> | <2–3 specific cons> | low / med / high | low / med / high |
|
|
49
|
+
| B: <name> | <2–3 specific pros> | <2–3 specific cons> | low / med / high | low / med / high |
|
|
50
|
+
| C: <name> | <2–3 specific pros> | <2–3 specific cons> | low / med / high | low / med / high |
|
|
51
|
+
|
|
52
|
+
**Recommendation for this project: Approach <X>**
|
|
53
|
+
Reasoning: <2–3 sentences that reference specific project constraints, stack details, or known
|
|
54
|
+
goals from the task_profile or requirements_spec — not generic advice>
|
|
55
|
+
|
|
56
|
+
Confidence: <high | medium | low>
|
|
57
|
+
Reversibility: <easy to change later | hard to change later | irreversible — flag with WARNING>
|
|
58
|
+
|
|
59
|
+
Next step: `python agents-maker/tools/generate_prompt.py "implement <chosen approach name> for <decision context>"`
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Column Definitions
|
|
65
|
+
|
|
66
|
+
| Column | What to write |
|
|
67
|
+
|---|---|
|
|
68
|
+
| Pros | Specific advantages for THIS project — reference stack, team size, timeline if known |
|
|
69
|
+
| Cons | Specific drawbacks — what breaks, what becomes harder |
|
|
70
|
+
| Complexity | Effort to implement: low = <1 session, med = 1–3 sessions, high = 3+ sessions |
|
|
71
|
+
| Token cost | Context needed by AI to implement: low = conversation, med = 3–5 files, high = full repo |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Rules
|
|
76
|
+
|
|
77
|
+
- Always provide **2–4 options**. Never output a comparison with just one option.
|
|
78
|
+
- Pros and cons must be specific to the project — not copy-pasted generic trade-offs.
|
|
79
|
+
- The **Recommendation** must cite at least one known constraint from `project.yaml`,
|
|
80
|
+
`requirements_spec`, or the current conversation.
|
|
81
|
+
- If `Reversibility` is **irreversible**, prepend: `⚠ WARNING: This decision is difficult to undo.`
|
|
82
|
+
- If `Confidence` is **low**, explain what additional information would raise it.
|
|
83
|
+
- Never recommend an approach that conflicts with an already-approved ADR or `requirements_spec` constraint.
|
|
84
|
+
- If the user only asks about two options, still consider whether a third option exists (hybrid,
|
|
85
|
+
defer, or "don't solve this yet").
|
|
86
|
+
- After the table, offer: "Want me to expand on any approach? Say 'expand on approach X.'"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Skill: define_data_schema
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Produce a data schema artifact: entity-relationship sketch (ASCII), metric definition table, and data dictionary. Used by the Code Agent and Architect Agent in `data_analytics` tasks (Phases 2–3) and by any domain when a solution design requires specifying data structures.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to invoke
|
|
10
|
+
|
|
11
|
+
- User requests a data model, schema, data dictionary, or metric definitions.
|
|
12
|
+
- Architect Agent needs to specify data structures as part of a solution design.
|
|
13
|
+
- Code Agent needs a schema contract before writing queries or pipeline code.
|
|
14
|
+
- Review phase identifies metrics that lack formula or grain definitions.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Input expectations
|
|
19
|
+
|
|
20
|
+
| Input | Required | Description |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `entities` | Yes | List of data entities (tables, streams, or collections). Each: `{name, description, key_fields[]}` |
|
|
23
|
+
| `metrics` | Yes | List of metrics to define. Each: `{name, description}` |
|
|
24
|
+
| `grain` | Yes | The atomic unit each metric row represents (e.g., "one row per user per day") |
|
|
25
|
+
| `filters` | No | Standard filters applied to the data (e.g., `is_active=true`, `event_type='purchase'`) |
|
|
26
|
+
| `existing_tools` | No | Data stack in use (e.g., "BigQuery + dbt", "Postgres + SQLAlchemy", "Spark") |
|
|
27
|
+
| `relationships` | No | Foreign-key or join relationships between entities |
|
|
28
|
+
|
|
29
|
+
**If required input is missing:**
|
|
30
|
+
- `entities` — ask: "What data entities are involved? (e.g., users, orders, events — with their primary key fields)"
|
|
31
|
+
- `metrics` — ask: "Which metrics need to be defined? List each by name and what it measures."
|
|
32
|
+
- `grain` — ask: "What does one row in the output represent? (e.g., one user, one transaction, one day)"
|
|
33
|
+
- `filters` — default to "none" and note: "Add standard filters if some records should always be excluded."
|
|
34
|
+
- `existing_tools` — default to "unspecified"; omit tool-specific syntax notes from output.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Output format
|
|
39
|
+
|
|
40
|
+
### 1. Entity-Relationship Sketch (ASCII)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
## Entity-Relationship Sketch
|
|
44
|
+
|
|
45
|
+
<EntityA> (PK: <key>)
|
|
46
|
+
├── <field>: <type>
|
|
47
|
+
└── <field>: <type>
|
|
48
|
+
|
|
|
49
|
+
| 1:N
|
|
50
|
+
↓
|
|
51
|
+
<EntityB> (PK: <key>, FK: <EntityA.key>)
|
|
52
|
+
├── <field>: <type>
|
|
53
|
+
└── <field>: <type>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Use `|` for 1:1, `1:N` for one-to-many, `M:N` for many-to-many. If relationships were not provided, output a flat list of entities and note: "Relationships not specified — add FK links after confirming cardinality."
|
|
57
|
+
|
|
58
|
+
### 2. Metric Definition Table
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## Metric Definitions
|
|
62
|
+
|
|
63
|
+
| Metric | Formula | Grain | Standard Filters | NULL behavior | Owner |
|
|
64
|
+
|---|---|---|---|---|---|
|
|
65
|
+
| <metric_name> | <formula or description> | <grain> | <filter or "none"> | <what NULL means / how handled> | <team or role> |
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Required fields per metric row:**
|
|
69
|
+
- **Formula** — either a precise SQL-style expression or a plain-language definition if formula is not yet specified (flag with `[draft]`)
|
|
70
|
+
- **Grain** — must match the stated `grain` input or note the exception
|
|
71
|
+
- **NULL behavior** — explicitly state what a NULL value means for this metric (e.g., "NULL = user has no purchases", "NULL = sensor offline")
|
|
72
|
+
|
|
73
|
+
### 3. Data Dictionary
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## Data Dictionary
|
|
77
|
+
|
|
78
|
+
### <EntityName>
|
|
79
|
+
| Field | Type | Description | Nullable | Example |
|
|
80
|
+
|---|---|---|---|---|
|
|
81
|
+
| <field> | <type> | <description> | Yes / No | <example value> |
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Generate one section per entity listed in `entities`.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Token cost tier
|
|
89
|
+
|
|
90
|
+
**Medium.** Requires translating business descriptions into precise technical definitions. Output grows with number of entities and metrics. Typical output: 400–900 tokens.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Notes
|
|
95
|
+
|
|
96
|
+
- If a metric formula is ambiguous, output it as `[draft: <best interpretation>]` and add a clarifying question below the table.
|
|
97
|
+
- Flag any metric that cannot be computed from the provided entities: `[BLOCKED: requires <missing entity or field>]`.
|
|
98
|
+
- If `existing_tools` is specified, add a "Tool notes" row below each metric noting any platform-specific behavior (e.g., BigQuery's handling of DIV0, dbt metric layer syntax).
|
|
99
|
+
- The ER sketch uses ASCII art only — no Mermaid or PlantUML unless the user explicitly requests a diagram format.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Skill: design_api
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Draft a complete, unambiguous API contract for a set of related endpoints or an interface definition. Output is a structured contract that a developer can implement against without requiring further clarification. Covers REST, GraphQL (query/mutation list), and RPC-style interfaces.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to invoke
|
|
10
|
+
|
|
11
|
+
- The Architect Agent needs to define the public surface of a new service.
|
|
12
|
+
- A feature requires new endpoints and the contract must be agreed before implementation begins.
|
|
13
|
+
- An existing API is being versioned or extended and the delta must be documented.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Input expectations
|
|
18
|
+
|
|
19
|
+
| Input | Required | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `feature_description` | Yes | What the API enables the client to do |
|
|
22
|
+
| `api_style` | Yes | `REST` \| `GraphQL` \| `RPC` \| `event` |
|
|
23
|
+
| `existing_contracts` | No | Snippets of existing API contracts to ensure consistency |
|
|
24
|
+
| `auth_model` | No | `none` \| `bearer_token` \| `api_key` \| `oauth2` \| `session` |
|
|
25
|
+
| `versioning_strategy` | No | `url_prefix` \| `header` \| `none` |
|
|
26
|
+
| `non_functional` | No | Latency target, rate limits, pagination requirements |
|
|
27
|
+
|
|
28
|
+
**If required input is missing:**
|
|
29
|
+
- `feature_description` absent → ask: "What should this API allow a client to do? (one sentence is enough to start.)"
|
|
30
|
+
- `api_style` absent → infer from project stack (`project.yaml`): Python/FastAPI → REST, GraphQL server present → GraphQL, event-driven stack → event. State the assumption; user may override inline.
|
|
31
|
+
- `auth_model` absent → default to `bearer_token` for external APIs, `none` for internal. State assumption in the contract header.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Output format
|
|
36
|
+
|
|
37
|
+
### REST
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
## API Contract: <feature name>
|
|
41
|
+
|
|
42
|
+
**Base path**: `/api/v<N>/<resource>`
|
|
43
|
+
**Auth**: <auth_model>
|
|
44
|
+
|
|
45
|
+
| Method | Path | Description | Request body | Response | Error codes |
|
|
46
|
+
|---|---|---|---|---|---|
|
|
47
|
+
| POST | `/resource` | <desc> | `{field: type}` | `201 {id, ...}` | 400, 409 |
|
|
48
|
+
| GET | `/resource/{id}` | <desc> | — | `200 {id, ...}` | 404 |
|
|
49
|
+
| PATCH | `/resource/{id}` | <desc> | `{field?: type}` | `200 {id, ...}` | 400, 404 |
|
|
50
|
+
| DELETE | `/resource/{id}` | <desc> | — | `204` | 404 |
|
|
51
|
+
|
|
52
|
+
### Request / Response Schemas
|
|
53
|
+
|
|
54
|
+
**POST /resource — Request**
|
|
55
|
+
\`\`\`json
|
|
56
|
+
{
|
|
57
|
+
"field": "string", // required; max 255 chars
|
|
58
|
+
"other": "integer" // optional; default: 0
|
|
59
|
+
}
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
**POST /resource — Response (201)**
|
|
63
|
+
\`\`\`json
|
|
64
|
+
{
|
|
65
|
+
"id": "uuid",
|
|
66
|
+
"field": "string",
|
|
67
|
+
"created_at": "ISO8601"
|
|
68
|
+
}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
### Error Response Shape
|
|
72
|
+
\`\`\`json
|
|
73
|
+
{
|
|
74
|
+
"error": "string", // machine-readable code
|
|
75
|
+
"message": "string", // human-readable
|
|
76
|
+
"details": {} // optional; field-level validation errors
|
|
77
|
+
}
|
|
78
|
+
\`\`\`
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### GraphQL
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
## GraphQL Contract: <feature name>
|
|
85
|
+
|
|
86
|
+
**Queries**
|
|
87
|
+
| Name | Arguments | Returns | Description |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
|
|
90
|
+
**Mutations**
|
|
91
|
+
| Name | Input type | Returns | Description |
|
|
92
|
+
|---|---|---|---|
|
|
93
|
+
|
|
94
|
+
**Types**
|
|
95
|
+
\`\`\`graphql
|
|
96
|
+
type Resource {
|
|
97
|
+
id: ID!
|
|
98
|
+
field: String!
|
|
99
|
+
}
|
|
100
|
+
\`\`\`
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Event / async
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
## Event Contract: <feature name>
|
|
107
|
+
|
|
108
|
+
| Event name | Producer | Consumers | Payload schema | Ordering guarantee |
|
|
109
|
+
|---|---|---|---|---|
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Token cost tier
|
|
115
|
+
|
|
116
|
+
**Medium.** Schema detail depends on endpoint count. Typical output: 400–800 tokens.
|
|
117
|
+
|
|
118
|
+
Compression hint: if the contract is long, the caller may request "schema stubs only" — field names and types without descriptions or examples.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Notes
|
|
123
|
+
|
|
124
|
+
- Always include at least one error code per endpoint. "200 only" contracts are incomplete.
|
|
125
|
+
- Use consistent field naming: match the existing project convention (snake_case vs camelCase) visible in `existing_contracts`.
|
|
126
|
+
- Do not prescribe implementation details (ORM, DB table name, handler class). The contract is interface-only.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Skill: improve_copy
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Review and rewrite microcopy: button labels, placeholder text, error messages, empty states, tooltips, section headings, and instructional text. Output is a before/after table with a brief rationale for each change.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to invoke
|
|
10
|
+
|
|
11
|
+
- The UX Agent identifies copy as a friction source.
|
|
12
|
+
- The UI Agent needs updated labels to go with a layout change.
|
|
13
|
+
- A standalone request targets onboarding copy, error messages, or empty states.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Input expectations
|
|
18
|
+
|
|
19
|
+
| Input | Required | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `copy_items` | Yes | List of current strings with their UI context |
|
|
22
|
+
| `persona` | Yes | Who is reading this copy and what they are trying to do |
|
|
23
|
+
| `tone` | No | `professional` \| `friendly` \| `technical` \| `minimal` (default: `professional`) |
|
|
24
|
+
| `constraints` | No | Character limits, must-include terms, brand voice rules |
|
|
25
|
+
|
|
26
|
+
**If required input is missing:**
|
|
27
|
+
- `copy_items` absent → ask: "Please share the copy strings you want improved (paste them with their UI location, e.g. 'Submit button label: Submit Form')."
|
|
28
|
+
- `persona` absent → infer from project domain (e.g., software → "developer using this tool") and state the assumption explicitly in the output header. Do not block on this.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Output format
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
## Copy Improvements: <screen/feature name>
|
|
36
|
+
|
|
37
|
+
**Tone**: <detected or specified>
|
|
38
|
+
**Persona**: <one-line summary>
|
|
39
|
+
|
|
40
|
+
| Context | Current copy | Issue | Improved copy | Rationale |
|
|
41
|
+
|---|---|---|---|---|
|
|
42
|
+
| Submit button | "Submit" | Generic; doesn't describe outcome | "Save changes" | Action-oriented; tells user what happens |
|
|
43
|
+
| Error: required field | "Field is required" | Negative framing; no guidance | "Enter your email address" | Tells user exactly what to do |
|
|
44
|
+
| Empty state | "No data" | Unexplained; leaves user stuck | "No reports yet. Create your first report →" | Explains state + shows next action |
|
|
45
|
+
| Placeholder | "Enter name..." | Redundant with label | "" (remove) | Labels already describe the field |
|
|
46
|
+
| Tooltip | "Click to expand" | States the obvious | Remove tooltip entirely | The chevron icon is self-explanatory |
|
|
47
|
+
|
|
48
|
+
## Unchanged Items
|
|
49
|
+
| Item | Reason kept |
|
|
50
|
+
|---|---|
|
|
51
|
+
| "Cancel" button | Standard affordance; no improvement needed |
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Token cost tier
|
|
57
|
+
|
|
58
|
+
**Low.** Typically 150–300 tokens regardless of number of copy items.
|
|
59
|
+
|
|
60
|
+
Compression hint: this skill is already token-light. No compression needed.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Notes
|
|
65
|
+
|
|
66
|
+
- **Tone consistency**: all suggestions in a single invocation must match the specified tone. Do not mix friendly and technical voice.
|
|
67
|
+
- **Character limits**: if a constraint specifies a character limit (e.g., mobile button label ≤ 20 chars), flag any suggestion that exceeds it.
|
|
68
|
+
- **Do not over-improve**: if the current copy is acceptable, mark it in "Unchanged Items". Unnecessary rewrites create churn.
|
|
69
|
+
- **Placeholder text**: the default recommendation is to remove placeholders when a label exists. Only suggest placeholder text if the field format is non-obvious (e.g., date format).
|