@flydocs/cli 0.5.0-beta.6 → 0.5.0-beta.8
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.js +306 -237
- package/package.json +1 -1
- package/template/.claude/CLAUDE.md +1 -0
- package/template/.claude/agents/implementation-agent.md +1 -1
- package/template/.claude/agents/research-agent.md +1 -1
- package/template/.claude/commands/flydocs-setup.md +3 -3
- package/template/.claude/commands/flydocs-update.md +3 -4
- package/template/.claude/settings.json +0 -10
- package/template/.claude/skills/README.md +36 -41
- package/template/.claude/skills/flydocs-context7/SKILL.md +105 -0
- package/template/.claude/skills/flydocs-context7/cursor-rule.mdc +49 -0
- package/template/.claude/skills/flydocs-context7/scripts/context7.py +293 -0
- package/template/.cursor/hooks.json +0 -5
- package/template/.env.example +11 -2
- package/template/.flydocs/config.json +3 -8
- package/template/.flydocs/hooks/auto-approve.py +2 -2
- package/template/.flydocs/hooks/post-edit.py +13 -0
- package/template/.flydocs/templates/instructions.md +17 -69
- package/template/.flydocs/version +1 -1
- package/template/AGENTS.md +1 -0
- package/template/CHANGELOG.md +78 -0
- package/template/flydocs/README.md +36 -55
- package/template/flydocs/design-system/README.md +21 -13
- package/template/manifest.json +5 -16
- package/template/.cursor/mcp.json +0 -16
- package/template/.flydocs/hooks/prefer-scripts.py +0 -89
package/package.json
CHANGED
|
@@ -116,6 +116,7 @@ Consult the relevant skill BEFORE writing code or making workflow decisions.
|
|
|
116
116
|
| Skill | Triggers | Entry |
|
|
117
117
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
118
118
|
| flydocs-cloud | create issue, transition, comment, list issues, assign, update description, update issue, project update, Linear, cloud | .claude/skills/flydocs-cloud/SKILL.md |
|
|
119
|
+
| flydocs-context7 | context7, library docs, documentation lookup, framework docs, package docs, API reference | .claude/skills/flydocs-context7/SKILL.md |
|
|
119
120
|
| flydocs-estimates | estimate, cost, token usage, API cost, labor estimate, sizing, effort | .claude/skills/flydocs-estimates/SKILL.md |
|
|
120
121
|
| flydocs-figma | Figma, design, screenshot, token mapping, component from design, pixel-perfect, design system | .claude/skills/flydocs-figma/SKILL.md |
|
|
121
122
|
| flydocs-local | create issue, transition, comment, list issues, assign, update description, status summary, local | .claude/skills/flydocs-local/SKILL.md |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: implementation-agent
|
|
3
3
|
description: "Builds features, fixes bugs, writes code. Invoke for implementation, coding, or technical work."
|
|
4
4
|
model: opus
|
|
5
|
-
tools: [Read, Glob, Grep, Bash, Write, Edit, WebFetch, WebSearch
|
|
5
|
+
tools: [Read, Glob, Grep, Bash, Write, Edit, WebFetch, WebSearch]
|
|
6
6
|
skills:
|
|
7
7
|
- flydocs-workflow
|
|
8
8
|
---
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: research-agent
|
|
3
3
|
description: "Codebase exploration and research. Invoke for understanding code structure, finding patterns, or gathering technical context."
|
|
4
4
|
model: sonnet
|
|
5
|
-
tools: [Read, Glob, Grep, WebFetch, WebSearch
|
|
5
|
+
tools: [Read, Glob, Grep, WebFetch, WebSearch]
|
|
6
6
|
disallowedTools: [Bash, Write, Edit]
|
|
7
7
|
skills:
|
|
8
8
|
- flydocs-workflow
|
|
@@ -177,7 +177,7 @@ offer updates.
|
|
|
177
177
|
**Step 0: Check for legacy context files.**
|
|
178
178
|
|
|
179
179
|
Before reading project.md, check if `flydocs/context/legacy/` exists. This
|
|
180
|
-
directory is created by
|
|
180
|
+
directory is created by the installer when it finds pre-v1.0 separate context
|
|
181
181
|
files (`overview.md`, `stack.md`, `standards.md`) and moves them there for
|
|
182
182
|
safe migration.
|
|
183
183
|
|
|
@@ -191,7 +191,7 @@ Consolidate into project.md using the same mapping as Phase 1M Step 2.
|
|
|
191
191
|
Show the user the merged result and confirm before writing.
|
|
192
192
|
|
|
193
193
|
After successful migration, delete the files from `legacy/` so the next
|
|
194
|
-
`
|
|
194
|
+
`flydocs update` run will clean up the empty directory.
|
|
195
195
|
|
|
196
196
|
**Step 1: Show what's new in this version.**
|
|
197
197
|
|
|
@@ -203,7 +203,7 @@ update:
|
|
|
203
203
|
```
|
|
204
204
|
Updated to FlyDocs v0.2.0. Here's what changed:
|
|
205
205
|
- Scenario-aware setup command with proactive doc scanning
|
|
206
|
-
- Deprecated file cleanup in
|
|
206
|
+
- Deprecated file cleanup in the installer
|
|
207
207
|
- Legacy context migration for pre-v1.0 projects
|
|
208
208
|
- Changelog and version tracking
|
|
209
209
|
```
|
|
@@ -7,10 +7,9 @@ Check for and apply FlyDocs updates to this project.
|
|
|
7
7
|
1. **Check current version** — read `.flydocs/version` and report it.
|
|
8
8
|
2. **Show changelog** — read `.flydocs/CHANGELOG.md` and summarize recent changes
|
|
9
9
|
since the installed version.
|
|
10
|
-
3. **Run update** — execute `flydocs update`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
and user config in `.flydocs/config.json`.
|
|
10
|
+
3. **Run update** — execute `flydocs update` to update skills, commands, hooks,
|
|
11
|
+
and config to the latest version. Preserves project-specific content in
|
|
12
|
+
`flydocs/context/project.md` and user config in `.flydocs/config.json`.
|
|
14
13
|
4. **Post-update** — if version changed, suggest running `/flydocs-setup` to review
|
|
15
14
|
any new config options or migrate legacy content.
|
|
16
15
|
5. **Beta reminder** — always end with:
|
|
@@ -10,16 +10,6 @@
|
|
|
10
10
|
"timeout": 5
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"matcher": "mcp__linear.*",
|
|
16
|
-
"hooks": [
|
|
17
|
-
{
|
|
18
|
-
"type": "command",
|
|
19
|
-
"command": "python3 \"$CLAUDE_PROJECT_DIR\"/.flydocs/hooks/prefer-scripts.py",
|
|
20
|
-
"timeout": 5
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
13
|
}
|
|
24
14
|
],
|
|
25
15
|
"PostToolUse": [
|
|
@@ -11,24 +11,17 @@
|
|
|
11
11
|
Owned and maintained by FlyDocs. May include executable scripts and premium
|
|
12
12
|
functionality gated via API relay.
|
|
13
13
|
|
|
14
|
-
| Skill
|
|
15
|
-
|
|
16
|
-
| `flydocs-workflow`
|
|
17
|
-
| `flydocs-local`
|
|
18
|
-
| `flydocs-cloud`
|
|
19
|
-
| `flydocs-
|
|
20
|
-
| `flydocs-
|
|
14
|
+
| Skill | Category | Purpose |
|
|
15
|
+
| ------------------- | ---------------- | ------------------------------------------------------- |
|
|
16
|
+
| `flydocs-workflow` | Core | Lifecycle stages, session management, comment templates |
|
|
17
|
+
| `flydocs-local` | Mechanism (free) | File-based issue management |
|
|
18
|
+
| `flydocs-cloud` | Mechanism (paid) | Linear/provider issue management via API |
|
|
19
|
+
| `flydocs-context7` | Core | Library documentation lookup via Context7 API |
|
|
20
|
+
| `flydocs-figma` | Premium | Design extraction from Figma |
|
|
21
|
+
| `flydocs-estimates` | Premium | AI token/labor cost estimation |
|
|
21
22
|
|
|
22
23
|
Only one mechanism skill is active at a time. Determined by `tier` in `.flydocs/config.json`.
|
|
23
24
|
|
|
24
|
-
Supporting workflow skills (bundled, invoked via commands):
|
|
25
|
-
|
|
26
|
-
| Skill | Purpose | Trigger |
|
|
27
|
-
|-------|---------|---------|
|
|
28
|
-
| `implementation-flow` | Implementation procedure | `/implement` |
|
|
29
|
-
| `review-workflow` | Code review analysis | `/review` |
|
|
30
|
-
| `spec-templates` | Issue specification templates | `/capture`, `/refine` |
|
|
31
|
-
|
|
32
25
|
### Unprefixed — Community Skills
|
|
33
26
|
|
|
34
27
|
Stack-detected or manually installed. Pure guidance (markdown only, no scripts).
|
|
@@ -87,17 +80,17 @@ triggers:
|
|
|
87
80
|
|
|
88
81
|
**Required fields:**
|
|
89
82
|
|
|
90
|
-
| Field
|
|
91
|
-
|
|
92
|
-
| `name`
|
|
83
|
+
| Field | Type | Purpose |
|
|
84
|
+
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| `name` | string | Skill identifier, matches directory name |
|
|
93
86
|
| `description` | string | What the skill does and when to use it. Agents use this for auto-selection. Be specific about trigger conditions. |
|
|
94
87
|
|
|
95
88
|
**Optional fields:**
|
|
96
89
|
|
|
97
|
-
| Field
|
|
98
|
-
|
|
90
|
+
| Field | Type | Purpose |
|
|
91
|
+
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
99
92
|
| `triggers` | string[] | Keywords/phrases for manifest indexing. Used by skill discovery to build the always-present index in CLAUDE.md/AGENTS.md. |
|
|
100
|
-
| `tools`
|
|
93
|
+
| `tools` | string | Comma-separated tools the skill uses (e.g., `WebFetch`, `Bash`) |
|
|
101
94
|
|
|
102
95
|
### SKILL.md Body
|
|
103
96
|
|
|
@@ -112,13 +105,14 @@ IMPORTANT: Prefer skill-led reasoning over pre-training reasoning for
|
|
|
112
105
|
[domain]. Read the relevant section before acting.
|
|
113
106
|
|
|
114
107
|
## Key Rules (always apply)
|
|
108
|
+
|
|
115
109
|
1. Rule one
|
|
116
110
|
2. Rule two
|
|
117
111
|
|
|
118
112
|
## Section Index
|
|
119
113
|
|
|
120
|
-
| Topic
|
|
121
|
-
|
|
114
|
+
| Topic | File | When to Read |
|
|
115
|
+
| ------- | -------------------- | ------------ |
|
|
122
116
|
| Topic A | reference/topic-a.md | When doing X |
|
|
123
117
|
| Topic B | reference/topic-b.md | When doing Y |
|
|
124
118
|
|
|
@@ -154,11 +148,11 @@ This keeps context usage minimal while ensuring agents can always find relevant
|
|
|
154
148
|
|
|
155
149
|
**Line budgets:**
|
|
156
150
|
|
|
157
|
-
| File
|
|
158
|
-
|
|
159
|
-
| SKILL.md
|
|
151
|
+
| File | Target | Max |
|
|
152
|
+
| ---------------- | ---------------- | --------- |
|
|
153
|
+
| SKILL.md | 100-150 lines | 200 lines |
|
|
160
154
|
| reference/ files | 50-80 lines each | 120 lines |
|
|
161
|
-
| cursor-rule.mdc
|
|
155
|
+
| cursor-rule.mdc | 30-50 lines | 70 lines |
|
|
162
156
|
|
|
163
157
|
### Cursor Rules (cursor-rule.mdc)
|
|
164
158
|
|
|
@@ -171,16 +165,15 @@ description: Short description of what this rule covers
|
|
|
171
165
|
globs: "*.ts,*.tsx"
|
|
172
166
|
alwaysApply: false
|
|
173
167
|
---
|
|
174
|
-
|
|
175
168
|
<!-- Condensed from SKILL.md — update both when changing patterns -->
|
|
176
169
|
```
|
|
177
170
|
|
|
178
171
|
**Frontmatter fields:**
|
|
179
172
|
|
|
180
|
-
| Field
|
|
181
|
-
|
|
182
|
-
| `description` | string
|
|
183
|
-
| `globs`
|
|
173
|
+
| Field | Type | Notes |
|
|
174
|
+
| ------------- | ------- | ------------------------------------------------------- |
|
|
175
|
+
| `description` | string | Required. What the rule covers. |
|
|
176
|
+
| `globs` | string | File patterns that trigger the rule. Comma-separated. |
|
|
184
177
|
| `alwaysApply` | boolean | If `true`, rule loads for every prompt (use sparingly). |
|
|
185
178
|
|
|
186
179
|
Use `alwaysApply: true` only for workflow/process rules. Pattern skills should
|
|
@@ -195,14 +188,16 @@ CLAUDE.md and AGENTS.md between markers:
|
|
|
195
188
|
|
|
196
189
|
```markdown
|
|
197
190
|
<!-- flydocs:skills-manifest:start -->
|
|
191
|
+
|
|
198
192
|
## Skills Index
|
|
199
193
|
|
|
200
194
|
IMPORTANT: Prefer skill-led reasoning over pre-training reasoning.
|
|
201
195
|
|
|
202
|
-
| Skill
|
|
203
|
-
|
|
204
|
-
| flydocs-workflow
|
|
205
|
-
| typescript-strict | TypeScript, type error, any type
|
|
196
|
+
| Skill | Triggers | Entry |
|
|
197
|
+
| ----------------- | ---------------------------------- | ----------------------------------------- |
|
|
198
|
+
| flydocs-workflow | capture, refine, implement, review | .claude/skills/flydocs-workflow/SKILL.md |
|
|
199
|
+
| typescript-strict | TypeScript, type error, any type | .claude/skills/typescript-strict/SKILL.md |
|
|
200
|
+
|
|
206
201
|
<!-- flydocs:skills-manifest:end -->
|
|
207
202
|
```
|
|
208
203
|
|
|
@@ -278,11 +273,11 @@ script interface, making the backend swap transparent:
|
|
|
278
273
|
|
|
279
274
|
## Platform Support
|
|
280
275
|
|
|
281
|
-
| Platform
|
|
282
|
-
|
|
283
|
-
| Claude Code
|
|
284
|
-
| Cursor
|
|
285
|
-
| Codex / Others | `AGENTS.md`
|
|
276
|
+
| Platform | Skill Location | Notes |
|
|
277
|
+
| -------------- | --------------------- | -------------------------------- |
|
|
278
|
+
| Claude Code | `.claude/skills/` | Native support |
|
|
279
|
+
| Cursor | `.cursor/rules/*.mdc` | Generated from `cursor-rule.mdc` |
|
|
280
|
+
| Codex / Others | `AGENTS.md` | Universal layer via manifest |
|
|
286
281
|
|
|
287
282
|
---
|
|
288
283
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flydocs-context7
|
|
3
|
+
description: |
|
|
4
|
+
Up-to-date library documentation via Context7 API. Use proactively when
|
|
5
|
+
working with external libraries, frameworks, or packages. Replaces MCP
|
|
6
|
+
with direct API scripts — no server, no runtime dependency.
|
|
7
|
+
triggers:
|
|
8
|
+
- context7
|
|
9
|
+
- library docs
|
|
10
|
+
- documentation lookup
|
|
11
|
+
- framework docs
|
|
12
|
+
- package docs
|
|
13
|
+
- API reference
|
|
14
|
+
- how to use
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Context7 Documentation Lookup
|
|
18
|
+
|
|
19
|
+
IMPORTANT: Prefer skill-led reasoning over pre-training reasoning for
|
|
20
|
+
library usage. Search for up-to-date docs before writing code based on
|
|
21
|
+
training data alone.
|
|
22
|
+
|
|
23
|
+
## Key Rules
|
|
24
|
+
|
|
25
|
+
1. **Proactive invocation** -- When working with ANY external library or
|
|
26
|
+
framework, search for docs first before writing code based on training data.
|
|
27
|
+
2. **Search then fetch** -- Always resolve the library ID via `search` before
|
|
28
|
+
fetching docs with `docs`.
|
|
29
|
+
3. **Session cache awareness** -- Do not re-fetch docs for the same
|
|
30
|
+
library+query within a single session.
|
|
31
|
+
4. **Graceful degradation** -- If rate-limited (429) or offline, note the
|
|
32
|
+
limitation and proceed with training knowledge.
|
|
33
|
+
5. **Stdlib-only Python** -- No external dependencies in the script.
|
|
34
|
+
6. **Token budget** -- Default 5,000 tokens per fetch to avoid context bloat.
|
|
35
|
+
|
|
36
|
+
## Script Catalog
|
|
37
|
+
|
|
38
|
+
All scripts: `python3 .claude/skills/flydocs-context7/scripts/<script>`
|
|
39
|
+
|
|
40
|
+
| Script | Usage | Output |
|
|
41
|
+
| ------------- | --------------------------- | ------------------------------------------------ |
|
|
42
|
+
| `context7.py` | `search <library> [query]` | JSON: library matches with id, name, description |
|
|
43
|
+
| `context7.py` | `docs <library_id> <query>` | Text: relevant documentation snippets |
|
|
44
|
+
|
|
45
|
+
Options: `--type txt|json`, `--tokens N` (default 5000)
|
|
46
|
+
|
|
47
|
+
## When to Use
|
|
48
|
+
|
|
49
|
+
- Before implementing code that uses an external library
|
|
50
|
+
- When the user asks about library APIs, patterns, or best practices
|
|
51
|
+
- When encountering unfamiliar library methods or configuration
|
|
52
|
+
- When upgrading dependencies and needing current API docs
|
|
53
|
+
- When debugging library-specific issues
|
|
54
|
+
|
|
55
|
+
## When NOT to Use
|
|
56
|
+
|
|
57
|
+
- For project-internal code (use knowledge base and context graph instead)
|
|
58
|
+
- For general programming concepts (training knowledge is sufficient)
|
|
59
|
+
- When already fetched docs for the same library in this session
|
|
60
|
+
|
|
61
|
+
## API Key (Optional)
|
|
62
|
+
|
|
63
|
+
- Works without a key (anonymous, ~1,000 calls/month)
|
|
64
|
+
- For higher limits, add `CONTEXT7_API_KEY=ctx7sk-xxx` to `.env`
|
|
65
|
+
- Free key available at context7.com/dashboard
|
|
66
|
+
|
|
67
|
+
## Example Usage
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Find the React library
|
|
71
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "react" "hooks"
|
|
72
|
+
|
|
73
|
+
# Fetch docs for React hooks
|
|
74
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "/facebook/react" "useState useEffect hooks"
|
|
75
|
+
|
|
76
|
+
# Get Next.js App Router docs
|
|
77
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "next.js"
|
|
78
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "/vercel/next.js" "app router middleware"
|
|
79
|
+
|
|
80
|
+
# Fetch with custom token budget
|
|
81
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "/expressjs/express" "routing middleware" --tokens 8000
|
|
82
|
+
|
|
83
|
+
# Get output as JSON
|
|
84
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "prisma" --type json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Typical Workflow
|
|
88
|
+
|
|
89
|
+
1. **Identify the library** you need docs for (from import statements,
|
|
90
|
+
`package.json`, or the task at hand).
|
|
91
|
+
2. **Search** to resolve the library ID:
|
|
92
|
+
```bash
|
|
93
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "react-hook-form"
|
|
94
|
+
```
|
|
95
|
+
3. **Fetch docs** for the specific topic:
|
|
96
|
+
```bash
|
|
97
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "/react-hook-form/react-hook-form" "useForm validation"
|
|
98
|
+
```
|
|
99
|
+
4. **Apply** the retrieved documentation to your implementation.
|
|
100
|
+
5. **Do not re-fetch** for the same library+query later in the session.
|
|
101
|
+
|
|
102
|
+
## Related Skills
|
|
103
|
+
|
|
104
|
+
- `flydocs-context-graph` -- Project-internal knowledge navigation
|
|
105
|
+
- `flydocs-workflow` -- Development lifecycle and issue operations
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Context7 — look up library and framework documentation before writing code
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Condensed from SKILL.md — update both when changing patterns -->
|
|
7
|
+
|
|
8
|
+
# FlyDocs Context7
|
|
9
|
+
|
|
10
|
+
Proactively look up library documentation via Context7 scripts before writing
|
|
11
|
+
code that uses external packages. Do not rely on training data for API details.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Installing or importing a library you haven't used in this session
|
|
16
|
+
- Unsure about API signatures, configuration options, or return types
|
|
17
|
+
- Framework-specific patterns (routing, data fetching, middleware, hooks)
|
|
18
|
+
- Resolving version-specific behavior or breaking changes
|
|
19
|
+
|
|
20
|
+
## Scripts
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Step 1: Search for the library
|
|
24
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "<library>" "[query]"
|
|
25
|
+
|
|
26
|
+
# Step 2: Fetch docs using the library ID from search results
|
|
27
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "<library_id>" "<query>"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Examples
|
|
31
|
+
|
|
32
|
+
React hooks:
|
|
33
|
+
```bash
|
|
34
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "react" "hooks"
|
|
35
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "/facebook/react" "hooks useState"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Next.js App Router:
|
|
39
|
+
```bash
|
|
40
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py search "next.js"
|
|
41
|
+
python3 .claude/skills/flydocs-context7/scripts/context7.py docs "/vercel/next.js" "app router middleware"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Key Rules
|
|
45
|
+
|
|
46
|
+
- Always resolve the library ID first via `search` — do not guess the ID format
|
|
47
|
+
- Prefer Context7 docs over training data for API specifics
|
|
48
|
+
- If Context7 has no results or is rate-limited, fall back to web search
|
|
49
|
+
- Cache within a session — no need to re-fetch the same library docs repeatedly
|