ai-wingman 0.0.2 → 0.0.3
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/package.json +17 -2
- package/skills/SKILL.md +148 -0
package/package.json
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-wingman",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "The right way to wire AI into your Next.js app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Yonatan Katz",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"homepage": "https://ai-wingman.dev",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/yontn-oss/ai-wingman"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"ai",
|
|
15
|
+
"nextjs",
|
|
16
|
+
"react",
|
|
17
|
+
"typescript",
|
|
18
|
+
"ai-wingman",
|
|
19
|
+
"wingman"
|
|
20
|
+
],
|
|
8
21
|
"bin": {
|
|
9
22
|
"ai-wingman": "./dist/wingman.js"
|
|
10
23
|
},
|
|
11
24
|
"files": [
|
|
12
|
-
"./dist"
|
|
25
|
+
"./dist",
|
|
26
|
+
"./README.md",
|
|
27
|
+
"./skills/SKILL.md"
|
|
13
28
|
],
|
|
14
29
|
"scripts": {
|
|
15
30
|
"build": "tsup",
|
package/skills/SKILL.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# ai-wingman skill
|
|
2
|
+
|
|
3
|
+
When the user asks you to add an AI feature, pattern, or capability to their Next.js project, use the ai-wingman CLI to scaffold it. Do not write AI boilerplate (routes, hooks, stores, schemas) by hand when a wingman pattern covers the requirement.
|
|
4
|
+
|
|
5
|
+
## Triggering this skill
|
|
6
|
+
|
|
7
|
+
Use this skill when the user asks for any of the following:
|
|
8
|
+
- A chat or streaming AI endpoint
|
|
9
|
+
- Structured JSON output from a prompt
|
|
10
|
+
- Tool calling / function calling
|
|
11
|
+
- RAG or document Q&A
|
|
12
|
+
- An agent, multi-agent system, or background agent
|
|
13
|
+
- Audio transcription or text-to-speech
|
|
14
|
+
- Multimodal (image + text) input
|
|
15
|
+
- Content moderation or safety classification
|
|
16
|
+
- Per-user long-term memory
|
|
17
|
+
- Image generation
|
|
18
|
+
- Generative UI (tool calls rendered as React components)
|
|
19
|
+
- Hybrid keyword + vector search
|
|
20
|
+
- An LLM eval or regression test harness
|
|
21
|
+
|
|
22
|
+
## Command syntax
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx ai-wingman add <pattern> [flags]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Always include `--yes` to skip interactive prompts. Always include `--provider`. Include `--overwrite` only when replacing existing generated files.
|
|
29
|
+
|
|
30
|
+
## Available patterns
|
|
31
|
+
|
|
32
|
+
| Pattern | What it generates |
|
|
33
|
+
|---------|------------------|
|
|
34
|
+
| `chat` | Streaming chat route, optional storage + persistence, optional chat UI page |
|
|
35
|
+
| `structured-output` | JSON extraction route, Zod schema, client fetch hook |
|
|
36
|
+
| `tools` | Tool-calling route, typed tool stubs for the user to fill in |
|
|
37
|
+
| `stream-object` | Streaming structured JSON route, schema, streaming hook |
|
|
38
|
+
| `rag` | Embed route, query route, vector store, text chunker |
|
|
39
|
+
| `interrupt` | Agent route with human approval gate, approval widget component |
|
|
40
|
+
| `agent` | Autonomous multi-step agent route, tool stubs, conversation storage |
|
|
41
|
+
| `multimodal` | Vision-aware chat route, image upload page |
|
|
42
|
+
| `audio` | Speech-to-text route, text-to-speech route, record/playback page |
|
|
43
|
+
| `eval` | LLM judge eval script — run manually with `npx tsx` |
|
|
44
|
+
| `eval-dataset` | JSONL dataset, dataset runner script, GitHub Actions CI workflow |
|
|
45
|
+
| `image-gen` | Image generation route, prompt input + image display page |
|
|
46
|
+
| `generative-ui` | Streaming route with tool definitions, useChat page that renders tool calls as components |
|
|
47
|
+
| `document-processing` | File upload + structured extraction route, Zod schema, client hook |
|
|
48
|
+
| `content-moderation` | Classifier route returning `{ allowed, category, reason }`, editable policy file |
|
|
49
|
+
| `hybrid-search` | Vector + BM25 parallel search, RRF reranking, extended vector store |
|
|
50
|
+
| `memory` | Save route, retrieve route, memory store, `buildMemoryContext()` inject helper |
|
|
51
|
+
| `multi-agent` | Orchestrator route, specialist agents, typed handoff tools, shared types |
|
|
52
|
+
| `background-agent` | Enqueue route (returns jobId), status/polling route, worker, job store |
|
|
53
|
+
|
|
54
|
+
## Flags
|
|
55
|
+
|
|
56
|
+
| Flag | Applies to | Description |
|
|
57
|
+
|------|------------|-------------|
|
|
58
|
+
| `--provider <id>` | all | `anthropic` \| `openai` \| `google` |
|
|
59
|
+
| `--yes` | all | Accept all defaults, skip prompts |
|
|
60
|
+
| `--overwrite` | all | Overwrite existing files |
|
|
61
|
+
| `--auth` | most | Add NextAuth v5 guard |
|
|
62
|
+
| `--storage <id>` | `chat`, `agent` | `memory` \| `postgres` |
|
|
63
|
+
| `--no-page` | `chat`, `agent`, `audio`, `multimodal`, `image-gen`, `interrupt` | Skip the UI page |
|
|
64
|
+
| `--schema-name <name>` | `structured-output`, `stream-object`, `document-processing` | Name for schema, hook, and type |
|
|
65
|
+
| `--no-hook` | `structured-output`, `stream-object`, `document-processing` | Skip the client hook |
|
|
66
|
+
| `--embedding-model <model>` | `rag`, `hybrid-search`, `memory` | Embedding model ID |
|
|
67
|
+
| `--image-model <model>` | `image-gen` | `dall-e-3` (default) \| `dall-e-2` |
|
|
68
|
+
| `--interrupt` | `chat` | Embed a human-in-the-loop approval gate |
|
|
69
|
+
|
|
70
|
+
## Multi-pattern recipes
|
|
71
|
+
|
|
72
|
+
For features that require more than one pattern, run the commands in sequence.
|
|
73
|
+
|
|
74
|
+
**Customer support copilot** — answers from docs, remembers user history, blocks policy violations
|
|
75
|
+
```bash
|
|
76
|
+
npx ai-wingman add chat --provider openai --storage memory --yes
|
|
77
|
+
npx ai-wingman add rag --provider openai --yes
|
|
78
|
+
npx ai-wingman add memory --provider openai --yes
|
|
79
|
+
npx ai-wingman add content-moderation --provider openai --yes
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Voice-powered knowledge base** — speak a question, get an answer grounded in your documents
|
|
83
|
+
```bash
|
|
84
|
+
npx ai-wingman add rag --provider openai --yes
|
|
85
|
+
npx ai-wingman add audio --provider openai --yes
|
|
86
|
+
npx ai-wingman add chat --provider openai --yes
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Contract review pipeline** — upload PDF, extract terms, flag risks, require approval
|
|
90
|
+
```bash
|
|
91
|
+
npx ai-wingman add document-processing --provider openai --yes
|
|
92
|
+
npx ai-wingman add content-moderation --provider openai --yes
|
|
93
|
+
npx ai-wingman add interrupt --provider openai --yes
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Personalised research assistant** — autonomous agent with hybrid search and long-term memory
|
|
97
|
+
```bash
|
|
98
|
+
npx ai-wingman add agent --provider openai --yes
|
|
99
|
+
npx ai-wingman add hybrid-search --provider openai --yes
|
|
100
|
+
npx ai-wingman add memory --provider openai --yes
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Async research report** — long-running task orchestrated across specialist agents
|
|
104
|
+
```bash
|
|
105
|
+
npx ai-wingman add background-agent --provider openai --yes
|
|
106
|
+
npx ai-wingman add multi-agent --provider openai --yes
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Generative dashboard** — natural language query renders live data cards as they stream in
|
|
110
|
+
```bash
|
|
111
|
+
npx ai-wingman add tools --provider openai --yes
|
|
112
|
+
npx ai-wingman add generative-ui --provider openai --yes
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Photo-to-structured data** — upload an image, extract typed JSON from the visual content
|
|
116
|
+
```bash
|
|
117
|
+
npx ai-wingman add multimodal --provider openai --yes
|
|
118
|
+
npx ai-wingman add structured-output --provider openai --yes
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Adaptive onboarding** — assistant remembers progress and renders personalised next-step components
|
|
122
|
+
```bash
|
|
123
|
+
npx ai-wingman add chat --provider openai --yes
|
|
124
|
+
npx ai-wingman add memory --provider openai --yes
|
|
125
|
+
npx ai-wingman add generative-ui --provider openai --yes
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**AI deployment quality gate** — dataset eval on every PR, structured output captures scores
|
|
129
|
+
```bash
|
|
130
|
+
npx ai-wingman add eval-dataset --provider openai --yes
|
|
131
|
+
npx ai-wingman add structured-output --provider openai --yes
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## After scaffolding
|
|
135
|
+
|
|
136
|
+
Generated files are plain TypeScript — the user owns them. Guide the user to make these edits after running the command:
|
|
137
|
+
|
|
138
|
+
1. **Wire real logic** — replace tool stubs with actual API calls, database queries, or business logic
|
|
139
|
+
2. **Customise the system prompt** — the generated prompt is a working default; tailor it to the product
|
|
140
|
+
3. **Swap the model** — change the `model:` line to any model the provider supports
|
|
141
|
+
4. **Add env vars** — wingman prints required env var names at the end; add them to `.env.local`
|
|
142
|
+
|
|
143
|
+
## Rules
|
|
144
|
+
|
|
145
|
+
- Always run with `--yes` — never leave the CLI waiting for interactive input
|
|
146
|
+
- Always specify `--provider` explicitly
|
|
147
|
+
- Never recreate what wingman generates by hand — run `wingman add --overwrite` to regenerate, then edit
|
|
148
|
+
- Never install `ai`, `@ai-sdk/*`, or `zod` manually before running wingman — it installs them automatically
|