@flydocs/cli 0.5.0-beta.9 → 0.6.0-alpha.2
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/README.md +6 -0
- package/dist/cli.js +1259 -370
- package/package.json +1 -1
- package/template/.claude/agents/implementation-agent.md +0 -1
- package/template/.claude/agents/pm-agent.md +0 -1
- package/template/.claude/agents/research-agent.md +0 -1
- package/template/.claude/agents/review-agent.md +0 -1
- package/template/.claude/commands/flydocs-setup.md +109 -26
- package/template/.claude/commands/flydocs-upgrade.md +330 -0
- package/template/.claude/skills/flydocs-cloud/SKILL.md +53 -38
- package/template/.claude/skills/flydocs-cloud/cursor-rule.mdc +5 -5
- package/template/.claude/skills/flydocs-cloud/scripts/assign.py +8 -24
- package/template/.claude/skills/flydocs-cloud/scripts/assign_cycle.py +14 -30
- package/template/.claude/skills/flydocs-cloud/scripts/assign_milestone.py +10 -32
- package/template/.claude/skills/flydocs-cloud/scripts/comment.py +15 -25
- package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +21 -58
- package/template/.claude/skills/flydocs-cloud/scripts/create_milestone.py +26 -37
- package/template/.claude/skills/flydocs-cloud/scripts/create_project.py +24 -31
- package/template/.claude/skills/flydocs-cloud/scripts/create_team.py +39 -0
- package/template/.claude/skills/flydocs-cloud/scripts/estimate.py +10 -19
- package/template/.claude/skills/flydocs-cloud/scripts/flydocs_api.py +103 -170
- package/template/.claude/skills/flydocs-cloud/scripts/get_issue.py +6 -59
- package/template/.claude/skills/flydocs-cloud/scripts/link.py +16 -35
- package/template/.claude/skills/flydocs-cloud/scripts/list_cycles.py +21 -28
- package/template/.claude/skills/flydocs-cloud/scripts/list_issues.py +16 -77
- package/template/.claude/skills/flydocs-cloud/scripts/list_labels.py +19 -0
- package/template/.claude/skills/flydocs-cloud/scripts/list_milestones.py +21 -33
- package/template/.claude/skills/flydocs-cloud/scripts/list_projects.py +24 -38
- package/template/.claude/skills/flydocs-cloud/scripts/list_teams.py +19 -0
- package/template/.claude/skills/flydocs-cloud/scripts/priority.py +10 -19
- package/template/.claude/skills/flydocs-cloud/scripts/project_update.py +36 -50
- package/template/.claude/skills/flydocs-cloud/scripts/set_labels.py +68 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_team.py +41 -0
- package/template/.claude/skills/flydocs-cloud/scripts/transition.py +11 -52
- package/template/.claude/skills/flydocs-cloud/scripts/update_description.py +16 -27
- package/template/.claude/skills/flydocs-cloud/scripts/update_issue.py +23 -52
- package/template/.env.example +16 -7
- package/template/.flydocs/config.json +1 -1
- package/template/.flydocs/version +1 -1
- package/template/CHANGELOG.md +144 -0
- package/template/manifest.json +5 -3
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: research-agent
|
|
3
3
|
description: "Codebase exploration and research. Invoke for understanding code structure, finding patterns, or gathering technical context."
|
|
4
|
-
model: sonnet
|
|
5
4
|
tools: [Read, Glob, Grep, WebFetch, WebSearch]
|
|
6
5
|
disallowedTools: [Bash, Write, Edit]
|
|
7
6
|
skills:
|
|
@@ -54,6 +54,32 @@ Ready to begin?
|
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
+
## Phase 0b: Import Previous Configuration (if applicable)
|
|
58
|
+
|
|
59
|
+
After detecting the scenario, check if `.flydocs/backup-originals/` exists.
|
|
60
|
+
This directory is created by the installer when it finds pre-existing config
|
|
61
|
+
files (`.claude/CLAUDE.md`, `.claude/settings.json`, `.cursor/hooks.json`,
|
|
62
|
+
`AGENTS.md`) before overwriting them with FlyDocs versions.
|
|
63
|
+
|
|
64
|
+
If the directory exists and contains files:
|
|
65
|
+
|
|
66
|
+
1. List the backed-up files and tell the user what was preserved.
|
|
67
|
+
2. Read the backed-up `.claude/CLAUDE.md` (if present).
|
|
68
|
+
3. Summarize what custom instructions, rules, or project-specific context it
|
|
69
|
+
contained.
|
|
70
|
+
4. Identify which rules are still relevant and worth preserving alongside
|
|
71
|
+
FlyDocs — focus on project-specific conventions, team standards, and custom
|
|
72
|
+
tool configurations.
|
|
73
|
+
5. Offer to add relevant rules to `flydocs/context/project.md` (Standards
|
|
74
|
+
section) or note them for the user to review.
|
|
75
|
+
6. Skip rules that conflict with or duplicate FlyDocs workflow rules (e.g.,
|
|
76
|
+
skill-led reasoning, mechanism scripts, session management).
|
|
77
|
+
|
|
78
|
+
This is agent-guided — review and suggest, let the user confirm. No automated
|
|
79
|
+
merging. If no backup directory exists, skip this phase silently.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
57
83
|
## Phase 1: Project Definition
|
|
58
84
|
|
|
59
85
|
The goal is to fill every section of `flydocs/context/project.md` with real
|
|
@@ -262,33 +288,52 @@ may be useful:
|
|
|
262
288
|
> **Local tier:** Skip this phase entirely. Print: "Local tier — no provider
|
|
263
289
|
> setup needed. Issues will be stored in `flydocs/issues/`."
|
|
264
290
|
|
|
265
|
-
For cloud tier, connect
|
|
291
|
+
For cloud tier, connect via the FlyDocs Relay API:
|
|
266
292
|
|
|
267
293
|
**Step 1: Verify API key.**
|
|
268
294
|
|
|
269
|
-
Check that `
|
|
295
|
+
Check that `FLYDOCS_API_KEY` is set in the environment (from `.env` or
|
|
270
296
|
`.env.local`). If not:
|
|
271
297
|
|
|
272
298
|
```
|
|
273
|
-
|
|
274
|
-
LINEAR_API_KEY=lin_api_xxxxx
|
|
275
|
-
|
|
276
|
-
Get your key from: Linear → Settings → API → Personal API keys
|
|
299
|
+
FLYDOCS_API_KEY is not set. Run `flydocs connect` first to set up your API key.
|
|
277
300
|
```
|
|
278
301
|
|
|
279
302
|
Do not proceed until the key is available.
|
|
280
303
|
|
|
281
|
-
**Step 2: Select team.**
|
|
304
|
+
**Step 2: Select or create team.**
|
|
282
305
|
|
|
283
306
|
If `provider.teamId` in config is null, discover available teams:
|
|
284
307
|
|
|
285
308
|
```bash
|
|
286
|
-
python3 .claude/skills/flydocs-cloud/scripts/
|
|
309
|
+
python3 .claude/skills/flydocs-cloud/scripts/list_teams.py
|
|
287
310
|
```
|
|
288
311
|
|
|
289
|
-
Present the teams to the user
|
|
312
|
+
Present the teams to the user as a numbered list showing name and key.
|
|
313
|
+
Add a final option: **"Create a new team"**. If only one team exists,
|
|
290
314
|
confirm it.
|
|
291
315
|
|
|
316
|
+
If the user selects **"Create a new team"**:
|
|
317
|
+
|
|
318
|
+
1. Ask for team name (required) and key (optional — auto-generated if omitted)
|
|
319
|
+
2. Ask if this should be a sub-team under an existing team (show the list
|
|
320
|
+
again for parent selection, or "None — top-level team")
|
|
321
|
+
3. Create via:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
python3 .claude/skills/flydocs-cloud/scripts/create_team.py --name "Team Name" [--key KEY] [--parent <parent_team_id>]
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
After selection or creation, store the preference on the relay and in local
|
|
328
|
+
config:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
python3 .claude/skills/flydocs-cloud/scripts/set_team.py <team_id>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
This stores the team preference server-side (the relay uses it for all
|
|
335
|
+
team-scoped operations) and updates `provider.teamId` in local config.
|
|
336
|
+
|
|
292
337
|
**Step 3: Get or create project.**
|
|
293
338
|
|
|
294
339
|
Query existing projects:
|
|
@@ -304,24 +349,59 @@ create a new project:
|
|
|
304
349
|
python3 .claude/skills/flydocs-cloud/scripts/create_project.py --name "Project Name"
|
|
305
350
|
```
|
|
306
351
|
|
|
307
|
-
**Step 4: Configure
|
|
352
|
+
**Step 4: Configure labels.**
|
|
308
353
|
|
|
309
|
-
|
|
354
|
+
Fetch available labels from the provider:
|
|
310
355
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
356
|
+
```bash
|
|
357
|
+
python3 .claude/skills/flydocs-cloud/scripts/list_labels.py
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Auto-detect type mapping:** Scan the returned labels for common names
|
|
361
|
+
(case-insensitive match):
|
|
362
|
+
|
|
363
|
+
- "Feature" → `feature`
|
|
364
|
+
- "Bug" → `bug`
|
|
365
|
+
- "Chore" → `chore`
|
|
366
|
+
- "Improvement" → `idea`
|
|
367
|
+
|
|
368
|
+
Build a `typeMap` from the matches. Show the user the proposed mapping and
|
|
369
|
+
let them adjust. If no matches found, ask the user to map manually from the
|
|
370
|
+
available labels.
|
|
371
|
+
|
|
372
|
+
**Default labels:** Ask if there are labels that should be applied to every
|
|
373
|
+
new issue (e.g., a project-scope label like "app" or "core"). Present the
|
|
374
|
+
available labels as options.
|
|
375
|
+
|
|
376
|
+
Store the configuration on the relay:
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
python3 .claude/skills/flydocs-cloud/scripts/set_labels.py \
|
|
380
|
+
--defaults '["app"]' \
|
|
381
|
+
--type-map '{"feature":["Feature"],"bug":["Bug"],"chore":["Chore"],"idea":["Improvement"]}'
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
If the relay returns `LABELS_NOT_FOUND`, show the invalid names and ask the
|
|
385
|
+
user to correct them.
|
|
386
|
+
|
|
387
|
+
**Step 5: Configure product identity.**
|
|
388
|
+
|
|
389
|
+
Ask about product metadata:
|
|
390
|
+
|
|
391
|
+
- **Product name** — how it appears in the provider (default: project name
|
|
392
|
+
from project.md)
|
|
315
393
|
- **Icon and color** — optional, ask if they have preferences
|
|
316
394
|
|
|
317
|
-
**Step
|
|
395
|
+
**Step 6: Save to config.**
|
|
318
396
|
|
|
319
397
|
Update `.flydocs/config.json`:
|
|
320
398
|
|
|
321
|
-
- `provider.
|
|
399
|
+
- `provider.type` — `"linear"` (set by connect command)
|
|
400
|
+
- `provider.teamId` — selected team ID (set by `set_team.py`)
|
|
401
|
+
- `labels.defaults` — default label names (set by `set_labels.py`)
|
|
402
|
+
- `labels.typeMap` — type-to-label mapping (set by `set_labels.py`)
|
|
322
403
|
- `workspace.activeProjects` — add the project ID
|
|
323
404
|
- `workspace.product.name` — product name
|
|
324
|
-
- `issueLabels` — map label IDs if created
|
|
325
405
|
|
|
326
406
|
---
|
|
327
407
|
|
|
@@ -576,20 +656,23 @@ Stage all new and modified FlyDocs files (`.flydocs/`, `.claude/`, `.cursor/`,
|
|
|
576
656
|
If the user declines, remind them to commit before starting work:
|
|
577
657
|
"No problem — just remember to commit these files before your first session."
|
|
578
658
|
|
|
579
|
-
### Step 5:
|
|
659
|
+
### Step 5: Community CTA
|
|
580
660
|
|
|
581
|
-
Always end with the
|
|
661
|
+
Always end with the community call-to-action:
|
|
582
662
|
|
|
583
663
|
```
|
|
584
664
|
─────────────────────────────────────────────────────
|
|
585
665
|
|
|
586
|
-
|
|
587
|
-
→
|
|
588
|
-
→
|
|
589
|
-
→
|
|
666
|
+
What's coming next:
|
|
667
|
+
→ Project management tool sync — Linear, Jira, and more
|
|
668
|
+
→ Web portal — project setup, team visibility, session analytics
|
|
669
|
+
→ Cost intelligence — AI usage tracking and spend analysis
|
|
670
|
+
|
|
671
|
+
Join the Discord for upcoming features, support, and early access to what's next.
|
|
672
|
+
Invite link:
|
|
673
|
+
https://discord.com/invite/YAkjePmZTQ
|
|
590
674
|
|
|
591
|
-
|
|
592
|
-
https://www.flydocs.ai?utm_source=cli&utm_medium=setup&utm_campaign=beta
|
|
675
|
+
Docs and updates: https://www.flydocs.ai
|
|
593
676
|
|
|
594
677
|
─────────────────────────────────────────────────────
|
|
595
678
|
```
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
# FlyDocs Upgrade — Local to Cloud Migration (PM/Planning Agent)
|
|
2
|
+
|
|
3
|
+
AI-guided migration from local tier to cloud tier. Handles API connection,
|
|
4
|
+
issue migration, and local content disposition in a single guided flow.
|
|
5
|
+
|
|
6
|
+
Read the active mechanism skill's `SKILL.md` for script calling conventions
|
|
7
|
+
before executing any scripts.
|
|
8
|
+
|
|
9
|
+
Triggers: "upgrade to cloud", "migrate to cloud", "local to cloud", "flydocs upgrade"
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## IMPORTANT: Use Plan Mode
|
|
14
|
+
|
|
15
|
+
**Before executing any migration steps, enter plan mode.** This migration
|
|
16
|
+
involves multiple phases with irreversible actions. Planning first ensures
|
|
17
|
+
the user understands what will happen:
|
|
18
|
+
|
|
19
|
+
1. Run pre-flight checks (Phase 0) to inventory the current state
|
|
20
|
+
2. Present a migration summary with issue counts and what each phase does
|
|
21
|
+
3. Get user approval before making any changes
|
|
22
|
+
|
|
23
|
+
Only exit plan mode and begin execution after the user approves the plan.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Phase 0: Pre-flight Checks
|
|
28
|
+
|
|
29
|
+
Before starting, verify the project is eligible for migration.
|
|
30
|
+
|
|
31
|
+
**Step 1: Read config and verify tier.**
|
|
32
|
+
|
|
33
|
+
Read `.flydocs/config.json` and check the `tier` field.
|
|
34
|
+
|
|
35
|
+
- If `tier` is `cloud`: abort with message:
|
|
36
|
+
```
|
|
37
|
+
This project is already on the cloud tier. No migration needed.
|
|
38
|
+
Run /flydocs-setup to configure your cloud workspace.
|
|
39
|
+
```
|
|
40
|
+
- If `tier` is not `local`: abort with error about unexpected tier value.
|
|
41
|
+
|
|
42
|
+
**Step 2: Inventory local issues.**
|
|
43
|
+
|
|
44
|
+
Scan `flydocs/issues/` for all issue files across status directories:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
flydocs/issues/backlog/*.md
|
|
48
|
+
flydocs/issues/ready/*.md
|
|
49
|
+
flydocs/issues/implementing/*.md
|
|
50
|
+
flydocs/issues/review/*.md
|
|
51
|
+
flydocs/issues/validating/*.md
|
|
52
|
+
flydocs/issues/done/*.md
|
|
53
|
+
flydocs/issues/closed/*.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For each issue file found, read the YAML frontmatter to extract:
|
|
57
|
+
|
|
58
|
+
- Title
|
|
59
|
+
- Type (feature, bug, chore, idea)
|
|
60
|
+
- Priority
|
|
61
|
+
- Status (from parent directory name)
|
|
62
|
+
- Any comments in the body
|
|
63
|
+
|
|
64
|
+
Count totals by status and type.
|
|
65
|
+
|
|
66
|
+
**Step 3: Check for API readiness.**
|
|
67
|
+
|
|
68
|
+
Check if `FLYDOCS_RELAY_API_KEY` is set in the environment (from `.env` or
|
|
69
|
+
`.env.local`). If not, warn the user they will need it for Phase 1.
|
|
70
|
+
|
|
71
|
+
**Step 4: Present migration summary.**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Migration Summary
|
|
75
|
+
─────────────────
|
|
76
|
+
Current tier: local
|
|
77
|
+
Target tier: cloud
|
|
78
|
+
|
|
79
|
+
Local issues found: [N total]
|
|
80
|
+
- Backlog: [n]
|
|
81
|
+
- Ready: [n]
|
|
82
|
+
- Implementing: [n]
|
|
83
|
+
- Review: [n]
|
|
84
|
+
- Done: [n]
|
|
85
|
+
|
|
86
|
+
Migration will:
|
|
87
|
+
1. Connect to cloud provider (Linear) via flydocs connect
|
|
88
|
+
2. Create [N] issues in Linear with matching status
|
|
89
|
+
3. Archive, delete, or keep local issue files (your choice)
|
|
90
|
+
|
|
91
|
+
API key: [set / not set — will be needed in Phase 1]
|
|
92
|
+
|
|
93
|
+
Ready to proceed?
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Confirm with the user before continuing.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Phase 1: Connect to Cloud
|
|
101
|
+
|
|
102
|
+
Guide the user through connecting to the cloud provider. This swaps the
|
|
103
|
+
mechanism skill from `flydocs-local` to `flydocs-cloud`.
|
|
104
|
+
|
|
105
|
+
**Step 1: Run flydocs connect.**
|
|
106
|
+
|
|
107
|
+
Instruct the user to run `flydocs connect --here` from their terminal
|
|
108
|
+
(this is a CLI command, not an AI command). Explain what it does:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Run this in your terminal:
|
|
112
|
+
flydocs connect --here
|
|
113
|
+
|
|
114
|
+
This will:
|
|
115
|
+
- Prompt for your relay API key (from flydocs.ai account)
|
|
116
|
+
- Update .flydocs/config.json to cloud tier
|
|
117
|
+
- Swap mechanism skills (local -> cloud)
|
|
118
|
+
- Verify the connection works
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Step 2: Wait for completion.**
|
|
122
|
+
|
|
123
|
+
After the user confirms they ran `flydocs connect`, verify:
|
|
124
|
+
|
|
125
|
+
1. Read `.flydocs/config.json` — `tier` should now be `cloud`
|
|
126
|
+
2. Check that `.claude/skills/flydocs-cloud/scripts/` exists
|
|
127
|
+
3. Run a test command to verify the connection:
|
|
128
|
+
```bash
|
|
129
|
+
python3 .claude/skills/flydocs-cloud/scripts/list_issues.py --limit 1
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If any check fails, help the user troubleshoot before proceeding.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Phase 2: Issue Migration
|
|
137
|
+
|
|
138
|
+
Migrate local issues to the cloud provider. After `flydocs connect` swaps
|
|
139
|
+
the mechanism skill, the local scripts are gone — read issue files directly.
|
|
140
|
+
|
|
141
|
+
**IMPORTANT:** The local mechanism scripts are no longer available after
|
|
142
|
+
Phase 1. Read the markdown files directly from `flydocs/issues/`.
|
|
143
|
+
|
|
144
|
+
**Step 1: Read local issue files.**
|
|
145
|
+
|
|
146
|
+
For each issue file in `flydocs/issues/{status}/*.md`, parse:
|
|
147
|
+
|
|
148
|
+
- **YAML frontmatter** — between `---` markers at the top of the file.
|
|
149
|
+
Fields: `title`, `type`, `priority`, `estimate`, `created`, `assigned`.
|
|
150
|
+
- **Body** — everything after the frontmatter closing `---`.
|
|
151
|
+
This is the issue description in markdown.
|
|
152
|
+
- **Comments** — look for `## Comments` section in the body.
|
|
153
|
+
Each comment has a timestamp header and content.
|
|
154
|
+
- **Status** — derived from the parent directory name. Map to cloud status:
|
|
155
|
+
- `backlog` -> `BACKLOG`
|
|
156
|
+
- `ready` -> `READY`
|
|
157
|
+
- `implementing` -> `IMPLEMENTING`
|
|
158
|
+
- `review` -> `REVIEW`
|
|
159
|
+
- `validating` -> `VALIDATING`
|
|
160
|
+
- `done` -> `DONE`
|
|
161
|
+
- `closed` -> `CLOSED`
|
|
162
|
+
|
|
163
|
+
**Step 2: Create issues in cloud.**
|
|
164
|
+
|
|
165
|
+
For each local issue, create it in the cloud provider. Read the cloud
|
|
166
|
+
mechanism skill's `SKILL.md` first for exact calling conventions.
|
|
167
|
+
|
|
168
|
+
For issues with long descriptions, write the description body to a temp file
|
|
169
|
+
and use `--description-file`:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
python3 .claude/skills/flydocs-cloud/scripts/create_issue.py \
|
|
173
|
+
--title "Issue title" \
|
|
174
|
+
--type feature \
|
|
175
|
+
--priority 3 \
|
|
176
|
+
--estimate 2 \
|
|
177
|
+
--description-file /tmp/flydocs-migrate-desc.md
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
If the issue had comments in its local file, append them to the description
|
|
181
|
+
body under a `## Migration Notes` section:
|
|
182
|
+
|
|
183
|
+
```markdown
|
|
184
|
+
## Migration Notes
|
|
185
|
+
|
|
186
|
+
Migrated from local tier on YYYY-MM-DD.
|
|
187
|
+
|
|
188
|
+
### Previous Comments
|
|
189
|
+
|
|
190
|
+
**YYYY-MM-DD HH:MM** — [comment content]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Step 3: Transition non-backlog issues.**
|
|
194
|
+
|
|
195
|
+
Issues created via `create_issue.py` start in BACKLOG status. For issues
|
|
196
|
+
that were in other statuses locally, transition them to match:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
python3 .claude/skills/flydocs-cloud/scripts/transition.py \
|
|
200
|
+
<new-issue-ref> <TARGET_STATUS> \
|
|
201
|
+
--comment "Migrated from local tier — original status was [status]"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Status transitions must follow the workflow — you may need intermediate
|
|
205
|
+
transitions for some statuses. Read
|
|
206
|
+
`.claude/skills/flydocs-workflow/reference/status-workflow.md` for valid
|
|
207
|
+
transitions.
|
|
208
|
+
|
|
209
|
+
**Step 4: Track the mapping.**
|
|
210
|
+
|
|
211
|
+
Maintain and display an old-to-new ID mapping as issues are migrated:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Migration Progress
|
|
215
|
+
──────────────────
|
|
216
|
+
[1/N] local-1 "Setup auth" -> FLY-234 (BACKLOG)
|
|
217
|
+
[2/N] local-2 "Fix header" -> FLY-235 (IMPLEMENTING)
|
|
218
|
+
[3/N] local-3 "Add tests" -> FLY-236 (READY)
|
|
219
|
+
...
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Step 5: Handle failures.**
|
|
223
|
+
|
|
224
|
+
If any issue fails to create or transition:
|
|
225
|
+
|
|
226
|
+
- Log the error with the local issue reference
|
|
227
|
+
- Continue with remaining issues (don't abort the whole migration)
|
|
228
|
+
- Report all failures at the end with suggestions for manual resolution
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Phase 3: Content Disposition
|
|
233
|
+
|
|
234
|
+
After migration, handle the local issue files. Present three options
|
|
235
|
+
(same pattern as the uninstall command):
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
All [N] issues have been migrated to Linear.
|
|
239
|
+
|
|
240
|
+
What would you like to do with the local issue files?
|
|
241
|
+
|
|
242
|
+
1. Archive — Rename flydocs/issues/ to flydocs/issues-archive/
|
|
243
|
+
(keeps files as read-only reference)
|
|
244
|
+
|
|
245
|
+
2. Delete — Remove flydocs/issues/ and .flydocs/issues.counter
|
|
246
|
+
(clean slate, issues live in Linear now)
|
|
247
|
+
|
|
248
|
+
3. Keep — Leave files as-is
|
|
249
|
+
(local files remain alongside cloud issues)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Execute the user's choice:
|
|
253
|
+
|
|
254
|
+
- **Archive**: Rename `flydocs/issues/` to `flydocs/issues-archive/`
|
|
255
|
+
- **Delete**: Remove `flydocs/issues/` directory and `.flydocs/issues.counter` file
|
|
256
|
+
- **Keep**: No action needed
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Phase 4: Completion
|
|
261
|
+
|
|
262
|
+
Summarize the migration and provide next steps.
|
|
263
|
+
|
|
264
|
+
**Step 1: Migration summary.**
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
Migration Complete
|
|
268
|
+
──────────────────
|
|
269
|
+
Tier: local -> cloud
|
|
270
|
+
Issues migrated: [N] ([success] succeeded, [fail] failed)
|
|
271
|
+
Local files: [archived / deleted / kept]
|
|
272
|
+
|
|
273
|
+
ID Mapping:
|
|
274
|
+
local-1 -> FLY-234
|
|
275
|
+
local-2 -> FLY-235
|
|
276
|
+
...
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Step 2: Next steps.**
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Next steps:
|
|
283
|
+
1. Run /flydocs-setup to configure milestones and labels
|
|
284
|
+
2. Review migrated issues in Linear
|
|
285
|
+
3. Start working with /start-session
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Step 3: Commit prompt.**
|
|
289
|
+
|
|
290
|
+
Offer to commit the configuration changes:
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
The tier change and skill swap modified several files.
|
|
294
|
+
Want to commit these changes?
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
If the user agrees, create a commit with message:
|
|
298
|
+
`Upgrade FlyDocs from local to cloud tier`
|
|
299
|
+
|
|
300
|
+
Stage: `.flydocs/config.json`, `.claude/skills/`, `.claude/CLAUDE.md`,
|
|
301
|
+
`.cursor/rules/`, and any archive/deletion changes.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Error Handling
|
|
306
|
+
|
|
307
|
+
- **Already cloud tier** — Abort in Phase 0 with helpful message.
|
|
308
|
+
- **Zero local issues** — Skip Phase 2 entirely, proceed to Phase 4.
|
|
309
|
+
- **flydocs connect fails** — Help troubleshoot; do not proceed to Phase 2.
|
|
310
|
+
- **Partial migration failure** — Report which issues succeeded and which
|
|
311
|
+
failed. Offer to retry failed issues or proceed with what succeeded.
|
|
312
|
+
- **Cancel mid-migration** — Report current state: which issues were already
|
|
313
|
+
created in cloud, which local files remain. The user can re-run to
|
|
314
|
+
continue (Phase 0 will re-inventory remaining local issues).
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Key Rules
|
|
319
|
+
|
|
320
|
+
1. **Always read the cloud mechanism skill's `SKILL.md`** before running
|
|
321
|
+
scripts in Phase 2. Calling conventions may have changed.
|
|
322
|
+
2. **Never delete local files without explicit user consent** in Phase 3.
|
|
323
|
+
3. **After `flydocs connect`, local scripts are gone.** Read issue files
|
|
324
|
+
directly — do not attempt to call `flydocs-local` scripts.
|
|
325
|
+
4. **Status transitions must follow the workflow.** Read the status workflow
|
|
326
|
+
reference for valid transition paths.
|
|
327
|
+
5. **Report progress continuously.** Show the mapping table after each
|
|
328
|
+
issue is migrated so the user can follow along.
|
|
329
|
+
|
|
330
|
+
$ARGUMENTS
|