@flydocs/cli 0.6.0-alpha.3 → 0.6.0-alpha.5
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 +12 -16
- package/package.json +1 -1
- package/template/.claude/CLAUDE.md +9 -9
- package/template/.claude/commands/flydocs-setup.md +71 -13
- package/template/.claude/skills/flydocs-cloud/SKILL.md +12 -11
- package/template/.claude/skills/flydocs-cloud/scripts/create_team.py +3 -3
- package/template/.claude/skills/flydocs-cloud/scripts/list_statuses.py +19 -0
- package/template/.claude/skills/flydocs-cloud/scripts/list_teams.py +1 -1
- package/template/.claude/skills/flydocs-cloud/scripts/set_status_mapping.py +69 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_team.py +5 -4
- package/template/.flydocs/config.json +2 -2
- package/template/.flydocs/version +1 -1
- package/template/AGENTS.md +8 -8
- package/template/CHANGELOG.md +10 -0
- package/template/manifest.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -15,7 +15,7 @@ var CLI_VERSION, CLI_NAME, PACKAGE_NAME, POSTHOG_API_KEY;
|
|
|
15
15
|
var init_constants = __esm({
|
|
16
16
|
"src/lib/constants.ts"() {
|
|
17
17
|
"use strict";
|
|
18
|
-
CLI_VERSION = "0.6.0-alpha.
|
|
18
|
+
CLI_VERSION = "0.6.0-alpha.5";
|
|
19
19
|
CLI_NAME = "flydocs";
|
|
20
20
|
PACKAGE_NAME = "@flydocs/cli";
|
|
21
21
|
POSTHOG_API_KEY = "phc_v1MSJTQDFkMS90CBh3mxIz3v8bYCCnKU6v1ir6bz0Xn";
|
|
@@ -2046,7 +2046,7 @@ var init_install = __esm({
|
|
|
2046
2046
|
{
|
|
2047
2047
|
value: "cloud",
|
|
2048
2048
|
label: "Cloud (managed)",
|
|
2049
|
-
hint: "Sync with Linear
|
|
2049
|
+
hint: "Sync with Linear, Jira, and more"
|
|
2050
2050
|
}
|
|
2051
2051
|
]
|
|
2052
2052
|
});
|
|
@@ -3519,7 +3519,7 @@ var init_connect = __esm({
|
|
|
3519
3519
|
},
|
|
3520
3520
|
key: {
|
|
3521
3521
|
type: "string",
|
|
3522
|
-
description: "API key (fdk_
|
|
3522
|
+
description: "FlyDocs API key (fdk_...)"
|
|
3523
3523
|
}
|
|
3524
3524
|
},
|
|
3525
3525
|
async run({ args }) {
|
|
@@ -3548,22 +3548,19 @@ var init_connect = __esm({
|
|
|
3548
3548
|
console.log(` ${pc11.bold("Connect to FlyDocs Cloud")}`);
|
|
3549
3549
|
console.log();
|
|
3550
3550
|
console.log(
|
|
3551
|
-
` ${pc11.dim("
|
|
3552
|
-
);
|
|
3553
|
-
console.log(
|
|
3554
|
-
` ${pc11.dim("Linear API key (lin_api_...): Get from Linear \u2192 Settings \u2192 API")}`
|
|
3551
|
+
` ${pc11.dim("Get your API key (fdk_...) from your FlyDocs dashboard")}`
|
|
3555
3552
|
);
|
|
3556
3553
|
console.log();
|
|
3557
3554
|
let apiKey = args.key ?? "";
|
|
3558
3555
|
if (!apiKey) {
|
|
3559
3556
|
const keyInput = await text3({
|
|
3560
3557
|
message: "Enter your API key",
|
|
3561
|
-
placeholder: "fdk_...
|
|
3558
|
+
placeholder: "fdk_...",
|
|
3562
3559
|
validate(value) {
|
|
3563
3560
|
if (!value.trim()) return "API key is required";
|
|
3564
3561
|
const type = detectKeyType(value.trim());
|
|
3565
3562
|
if (type === "unknown")
|
|
3566
|
-
return "Key must start with fdk_ (FlyDocs
|
|
3563
|
+
return "Key must start with fdk_ (FlyDocs API key)";
|
|
3567
3564
|
return void 0;
|
|
3568
3565
|
}
|
|
3569
3566
|
});
|
|
@@ -3575,7 +3572,9 @@ var init_connect = __esm({
|
|
|
3575
3572
|
}
|
|
3576
3573
|
const keyType = detectKeyType(apiKey);
|
|
3577
3574
|
if (keyType === "unknown") {
|
|
3578
|
-
printError(
|
|
3575
|
+
printError(
|
|
3576
|
+
"Unrecognized key format. Expected fdk_ prefix (FlyDocs API key)."
|
|
3577
|
+
);
|
|
3579
3578
|
process.exit(1);
|
|
3580
3579
|
}
|
|
3581
3580
|
printInfo("Validating API key...");
|
|
@@ -3617,8 +3616,7 @@ var init_connect = __esm({
|
|
|
3617
3616
|
}
|
|
3618
3617
|
const wasLocal = config.tier === "local";
|
|
3619
3618
|
config.tier = "cloud";
|
|
3620
|
-
config.provider = config.provider ?? { type:
|
|
3621
|
-
config.provider.type = "linear";
|
|
3619
|
+
config.provider = config.provider ?? { type: null, teamId: null };
|
|
3622
3620
|
await writeConfig(targetDir, config);
|
|
3623
3621
|
printStatus("Config updated to cloud tier");
|
|
3624
3622
|
if (wasLocal) {
|
|
@@ -3706,7 +3704,7 @@ var init_upgrade = __esm({
|
|
|
3706
3704
|
);
|
|
3707
3705
|
console.log();
|
|
3708
3706
|
console.log(
|
|
3709
|
-
` Your issues sync with
|
|
3707
|
+
` Your issues sync with your provider via the cloud mechanism skill.`
|
|
3710
3708
|
);
|
|
3711
3709
|
console.log(
|
|
3712
3710
|
` Run ${pc12.cyan("flydocs connect")} to update your connection settings.`
|
|
@@ -3719,9 +3717,7 @@ var init_upgrade = __esm({
|
|
|
3719
3717
|
console.log(` You're currently on the ${pc12.yellow("local")} tier.`);
|
|
3720
3718
|
console.log(` Upgrade to cloud for:`);
|
|
3721
3719
|
console.log();
|
|
3722
|
-
console.log(
|
|
3723
|
-
` ${pc12.cyan("\u2192")} Issue sync with Linear (Jira coming soon)`
|
|
3724
|
-
);
|
|
3720
|
+
console.log(` ${pc12.cyan("\u2192")} Issue sync with Linear, Jira, and more`);
|
|
3725
3721
|
console.log(` ${pc12.cyan("\u2192")} Project milestones and cycle management`);
|
|
3726
3722
|
console.log(` ${pc12.cyan("\u2192")} Team assignment and priority tracking`);
|
|
3727
3723
|
console.log(` ${pc12.cyan("\u2192")} Project health updates and dashboards`);
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ Issue operations are handled by the installed mechanism skill. Only one is activ
|
|
|
43
43
|
| Tier | Skill | Backend |
|
|
44
44
|
| ----------------- | --------------- | ------------------------------ |
|
|
45
45
|
| Local (free) | `flydocs-local` | File-based (`flydocs/issues/`) |
|
|
46
|
-
| Cloud (connected) | `flydocs-cloud` |
|
|
46
|
+
| Cloud (connected) | `flydocs-cloud` | FlyDocs Relay API |
|
|
47
47
|
|
|
48
48
|
Read the active mechanism skill's `SKILL.md` for script catalog and calling conventions.
|
|
49
49
|
|
|
@@ -113,13 +113,13 @@ response — session summaries, issue comments, status updates, and plans.
|
|
|
113
113
|
IMPORTANT: Prefer skill-led reasoning over pre-training reasoning.
|
|
114
114
|
Consult the relevant skill BEFORE writing code or making workflow decisions.
|
|
115
115
|
|
|
116
|
-
| Skill | Triggers
|
|
117
|
-
| ----------------- |
|
|
118
|
-
| flydocs-cloud | create issue, transition, comment, list issues, assign, update description, update issue, project update,
|
|
119
|
-
| flydocs-context7 | context7, library docs, documentation lookup, framework docs, package docs, API reference
|
|
120
|
-
| flydocs-estimates | estimate, cost, token usage, API cost, labor estimate, sizing, effort
|
|
121
|
-
| flydocs-figma | Figma, design, screenshot, token mapping, component from design, pixel-perfect, design system
|
|
122
|
-
| flydocs-local | create issue, transition, comment, list issues, assign, update description, status summary, local
|
|
123
|
-
| flydocs-workflow | capture, refine, activate, implement, review, validate, close, session, workflow, transition, status, issue
|
|
116
|
+
| Skill | Triggers | Entry |
|
|
117
|
+
| ----------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
118
|
+
| flydocs-cloud | create issue, transition, comment, list issues, assign, update description, update issue, project update, 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 |
|
|
120
|
+
| flydocs-estimates | estimate, cost, token usage, API cost, labor estimate, sizing, effort | .claude/skills/flydocs-estimates/SKILL.md |
|
|
121
|
+
| flydocs-figma | Figma, design, screenshot, token mapping, component from design, pixel-perfect, design system | .claude/skills/flydocs-figma/SKILL.md |
|
|
122
|
+
| flydocs-local | create issue, transition, comment, list issues, assign, update description, status summary, local | .claude/skills/flydocs-local/SKILL.md |
|
|
123
|
+
| flydocs-workflow | capture, refine, activate, implement, review, validate, close, session, workflow, transition, status, issue | .claude/skills/flydocs-workflow/SKILL.md |
|
|
124
124
|
|
|
125
125
|
<!-- flydocs:skills-manifest:end -->
|
|
@@ -326,7 +326,10 @@ python3 .claude/skills/flydocs-cloud/scripts/set_provider.py <provider_type>
|
|
|
326
326
|
This stores the provider type on the relay (for routing) and updates
|
|
327
327
|
`provider.type` in local config.
|
|
328
328
|
|
|
329
|
-
**Step 3: Select or create team.**
|
|
329
|
+
**Step 3: Select or create team/project.**
|
|
330
|
+
|
|
331
|
+
> For Linear, this selects a team. For Jira, this selects a project. The relay
|
|
332
|
+
> normalizes both as "teams" in the API.
|
|
330
333
|
|
|
331
334
|
If `provider.teamId` in config is null, discover available teams:
|
|
332
335
|
|
|
@@ -335,20 +338,24 @@ python3 .claude/skills/flydocs-cloud/scripts/list_teams.py
|
|
|
335
338
|
```
|
|
336
339
|
|
|
337
340
|
Present the teams to the user as a numbered list showing name and key.
|
|
338
|
-
Add a final option: **"Create a new team"**. If only one team exists,
|
|
341
|
+
Add a final option: **"Create a new team/project"**. If only one team exists,
|
|
339
342
|
confirm it.
|
|
340
343
|
|
|
341
|
-
If the user selects **"Create a new team"**:
|
|
344
|
+
If the user selects **"Create a new team/project"**:
|
|
342
345
|
|
|
343
346
|
1. Ask for team name (required) and key (optional — auto-generated if omitted)
|
|
344
|
-
2. Ask if this should be a sub-team under an existing team
|
|
345
|
-
again for parent selection, or "None — top-level team")
|
|
347
|
+
2. **Linear only:** Ask if this should be a sub-team under an existing team
|
|
348
|
+
(show the list again for parent selection, or "None — top-level team").
|
|
349
|
+
For Jira, skip the parent option — Jira projects do not have a parent
|
|
350
|
+
hierarchy.
|
|
346
351
|
3. Create via:
|
|
347
352
|
|
|
348
353
|
```bash
|
|
349
354
|
python3 .claude/skills/flydocs-cloud/scripts/create_team.py --name "Team Name" [--key KEY] [--parent <parent_team_id>]
|
|
350
355
|
```
|
|
351
356
|
|
|
357
|
+
> The `--parent` flag is Linear-only (sub-teams). Omit for Jira.
|
|
358
|
+
|
|
352
359
|
After selection or creation, store the preference on the relay and in local
|
|
353
360
|
config:
|
|
354
361
|
|
|
@@ -358,8 +365,12 @@ python3 .claude/skills/flydocs-cloud/scripts/set_team.py <team_id>
|
|
|
358
365
|
|
|
359
366
|
This stores the team preference server-side (the relay uses it for all
|
|
360
367
|
team-scoped operations) and updates `provider.teamId` in local config.
|
|
368
|
+
For Jira, this sets the active Jira project.
|
|
369
|
+
|
|
370
|
+
**Step 4: Get or create project (Linear only).**
|
|
361
371
|
|
|
362
|
-
**
|
|
372
|
+
> **Jira provider:** Skip this step. Jira organizes issues directly within
|
|
373
|
+
> projects (selected in Step 3). There is no secondary project container.
|
|
363
374
|
|
|
364
375
|
Query existing projects:
|
|
365
376
|
|
|
@@ -409,7 +420,49 @@ python3 .claude/skills/flydocs-cloud/scripts/set_labels.py \
|
|
|
409
420
|
If the relay returns `LABELS_NOT_FOUND`, show the invalid names and ask the
|
|
410
421
|
user to correct them.
|
|
411
422
|
|
|
412
|
-
**Step 6: Configure
|
|
423
|
+
**Step 6: Configure status mapping.**
|
|
424
|
+
|
|
425
|
+
Map provider workflow states to FlyDocs statuses. Run auto-mapping first:
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
python3 .claude/skills/flydocs-cloud/scripts/set_status_mapping.py --auto
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
The relay auto-maps by case-insensitive name matching (e.g., "In Progress"
|
|
432
|
+
maps to `IMPLEMENTING`, "Done" maps to `COMPLETE`, "Backlog" maps to
|
|
433
|
+
`BACKLOG`).
|
|
434
|
+
|
|
435
|
+
**Review the result:** The response includes `matched` (number of statuses
|
|
436
|
+
successfully mapped) and `total` (total FlyDocs statuses). Show the user
|
|
437
|
+
the `mapping` object:
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
Status mapping (matched 6/10):
|
|
441
|
+
BACKLOG -> Backlog
|
|
442
|
+
READY -> Ready
|
|
443
|
+
IMPLEMENTING -> In Progress
|
|
444
|
+
REVIEW -> In Review
|
|
445
|
+
COMPLETE -> Done
|
|
446
|
+
CANCELED -> Canceled
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
If `matched < total`, some statuses are unmapped — **warn but don't block**.
|
|
450
|
+
Transitions for unmapped statuses will fall back to provider name matching.
|
|
451
|
+
If the user wants to fix unmapped statuses, fetch available provider states
|
|
452
|
+
and let them map manually:
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
python3 .claude/skills/flydocs-cloud/scripts/list_statuses.py
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Then store the corrected mapping:
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
python3 .claude/skills/flydocs-cloud/scripts/set_status_mapping.py \
|
|
462
|
+
--mapping '{"BACKLOG":"Backlog","IMPLEMENTING":"In Progress","BLOCKED":"On Hold",...}'
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**Step 7: Configure product identity.**
|
|
413
466
|
|
|
414
467
|
Ask about product metadata:
|
|
415
468
|
|
|
@@ -417,7 +470,7 @@ Ask about product metadata:
|
|
|
417
470
|
from project.md)
|
|
418
471
|
- **Icon and color** — optional, ask if they have preferences
|
|
419
472
|
|
|
420
|
-
**Step
|
|
473
|
+
**Step 8: Save to config.**
|
|
421
474
|
|
|
422
475
|
Update `.flydocs/config.json`:
|
|
423
476
|
|
|
@@ -425,6 +478,7 @@ Update `.flydocs/config.json`:
|
|
|
425
478
|
- `provider.teamId` — selected team ID (set by `set_team.py`)
|
|
426
479
|
- `labels.defaults` — default label names (set by `set_labels.py`)
|
|
427
480
|
- `labels.typeMap` — type-to-label mapping (set by `set_labels.py`)
|
|
481
|
+
- `statusMapping` — FlyDocs-to-provider status mapping (set by `set_status_mapping.py`)
|
|
428
482
|
- `workspace.activeProjects` — add the project ID
|
|
429
483
|
- `workspace.product.name` — product name
|
|
430
484
|
|
|
@@ -433,6 +487,7 @@ Update `.flydocs/config.json`:
|
|
|
433
487
|
## Phase 3: Milestones — Cloud Only
|
|
434
488
|
|
|
435
489
|
> **Local tier:** Skip this phase entirely.
|
|
490
|
+
> **Jira provider:** Skip this phase. Milestone support for Jira is planned for a future release.
|
|
436
491
|
> **FlyDocs Update:** Skip if milestones already exist.
|
|
437
492
|
|
|
438
493
|
**Step 1: Check existing milestones.**
|
|
@@ -493,7 +548,9 @@ For each work item, follow the capture procedure from
|
|
|
493
548
|
`.claude/skills/flydocs-workflow/stages/capture.md`:
|
|
494
549
|
|
|
495
550
|
- Determine type (feature, bug, chore, idea)
|
|
496
|
-
- Create via the mechanism script (cloud: pass `--project` from Phase 2
|
|
551
|
+
- Create via the mechanism script (cloud: pass `--project` from Phase 2 for
|
|
552
|
+
Linear; omit `--project` for Jira — issues are scoped to the team/project
|
|
553
|
+
selected in Phase 2 Step 3):
|
|
497
554
|
```bash
|
|
498
555
|
python3 .claude/skills/flydocs-{tier}/scripts/create_issue.py \
|
|
499
556
|
--title "Issue title" --type feature --priority 3 --estimate 2 \
|
|
@@ -501,9 +558,10 @@ For each work item, follow the capture procedure from
|
|
|
501
558
|
```
|
|
502
559
|
- For quick ideas, use `--triage` flag
|
|
503
560
|
|
|
504
|
-
**Step 3: Milestone assignment (
|
|
561
|
+
**Step 3: Milestone assignment (Linear only).**
|
|
505
562
|
|
|
506
563
|
> **Local tier:** Skip this step.
|
|
564
|
+
> **Jira provider:** Skip this step.
|
|
507
565
|
|
|
508
566
|
After creating issues, assign them to milestones:
|
|
509
567
|
|
|
@@ -654,8 +712,8 @@ Wrapping up:
|
|
|
654
712
|
|
|
655
713
|
**For cloud tier:**
|
|
656
714
|
|
|
657
|
-
-
|
|
658
|
-
-
|
|
715
|
+
- Provider project URL (if available from create_project response)
|
|
716
|
+
- For Linear: recommend reviewing milestones in Linear's UI for timeline view
|
|
659
717
|
|
|
660
718
|
**For local tier:**
|
|
661
719
|
|
|
@@ -713,7 +771,7 @@ Throughout the setup flow:
|
|
|
713
771
|
error message from stderr and ask the user how to proceed. Do not retry
|
|
714
772
|
silently.
|
|
715
773
|
- **Missing API key** — For cloud tier, cannot proceed past Phase 2 without
|
|
716
|
-
`
|
|
774
|
+
`FLYDOCS_API_KEY`. Guide the user to set it up.
|
|
717
775
|
- **Missing config** — If `.flydocs/config.json` doesn't exist, the user
|
|
718
776
|
likely needs to run `flydocs` (install) first. Advise them accordingly.
|
|
719
777
|
- **Partial completion** — If the user needs to stop mid-setup, note which
|
|
@@ -13,7 +13,6 @@ triggers:
|
|
|
13
13
|
- update description
|
|
14
14
|
- update issue
|
|
15
15
|
- project update
|
|
16
|
-
- Linear
|
|
17
16
|
- cloud
|
|
18
17
|
---
|
|
19
18
|
|
|
@@ -58,19 +57,21 @@ All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
|
|
|
58
57
|
|
|
59
58
|
### Workspace Scripts
|
|
60
59
|
|
|
61
|
-
| Script
|
|
62
|
-
|
|
|
63
|
-
| `list_providers.py`
|
|
64
|
-
| `set_provider.py`
|
|
65
|
-
| `list_teams.py`
|
|
66
|
-
| `create_team.py`
|
|
67
|
-
| `set_team.py`
|
|
68
|
-
| `list_labels.py`
|
|
69
|
-
| `set_labels.py`
|
|
60
|
+
| Script | Usage | Output |
|
|
61
|
+
| ----------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
62
|
+
| `list_providers.py` | (no args) | `[{type, name, connected}]` |
|
|
63
|
+
| `set_provider.py` | `<provider_type>` (`linear` or `jira`) | `{success}` — updates relay routing and local config `provider.type` |
|
|
64
|
+
| `list_teams.py` | (no args) | `[{id, name, key}]` — returns Linear teams or Jira projects (relay normalizes) |
|
|
65
|
+
| `create_team.py` | `--name "..." [--key KEY] [--description "..."] [--parent <team_id>]` | `{id, name, key}` — `--parent` is Linear-only (sub-teams) |
|
|
66
|
+
| `set_team.py` | `<team_id>` | `{success}` — updates relay preference and local config; for Jira, sets the active Jira project |
|
|
67
|
+
| `list_labels.py` | (no args) | `[{id, name, color}]` — requires team to be set first |
|
|
68
|
+
| `set_labels.py` | `--defaults '["a"]' --type-map '{"feature":["F"],...}' \| stdin` | `{success, validated, defaults, typeMap}` — stores label config on relay |
|
|
69
|
+
| `list_statuses.py` | (no args) | `{states, currentMapping, flydocsStatuses}` — provider workflow states and current mapping |
|
|
70
|
+
| `set_status_mapping.py` | `--auto \| --mapping '{"BACKLOG":"Backlog",...}' \| stdin` | `{success, mapping, matched, total}` — stores status mapping on relay |
|
|
70
71
|
|
|
71
72
|
### Script Notes
|
|
72
73
|
|
|
73
|
-
- **How it works**: Scripts call the FlyDocs Relay REST API, which translates to the provider (Linear, Jira) server-side. Same interface and output as before — the transport changed from direct GraphQL to managed REST.
|
|
74
|
+
- **How it works**: Scripts call the FlyDocs Relay REST API, which translates to the provider (Linear, Jira) server-side. Same interface and output as before — the transport changed from direct GraphQL to managed REST. For Jira, the relay handles Markdown-to-ADF (Atlassian Document Format) conversion automatically.
|
|
74
75
|
- **`list_issues.py --active`**: Returns all non-terminal issues (excludes Done, Archived, Canceled, Duplicate).
|
|
75
76
|
- **`list_issues.py --status`**: Accepts comma-separated statuses: `--status READY,IMPLEMENTING,BLOCKED`
|
|
76
77
|
- **`get_issue.py --fields basic`**: Skips comment fetch for faster responses.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Create a team
|
|
2
|
+
"""Create a team/project via the FlyDocs Relay API."""
|
|
3
3
|
|
|
4
4
|
import argparse
|
|
5
5
|
import sys
|
|
@@ -10,11 +10,11 @@ from flydocs_api import get_client, output_json
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def main():
|
|
13
|
-
parser = argparse.ArgumentParser(description="Create team")
|
|
13
|
+
parser = argparse.ArgumentParser(description="Create team or project")
|
|
14
14
|
parser.add_argument("--name", required=True)
|
|
15
15
|
parser.add_argument("--key", default=None, help="Team key (e.g., PROD). Auto-generated if omitted.")
|
|
16
16
|
parser.add_argument("--description", default=None)
|
|
17
|
-
parser.add_argument("--parent", default=None, dest="parent_id", help="Parent team ID
|
|
17
|
+
parser.add_argument("--parent", default=None, dest="parent_id", help="Parent team ID for sub-team (Linear only, ignored for Jira)")
|
|
18
18
|
args = parser.parse_args()
|
|
19
19
|
|
|
20
20
|
body: dict = {"name": args.name}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""List provider workflow states via the FlyDocs Relay API."""
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
sys.path.insert(0, str(Path(__file__).parent))
|
|
8
|
+
from flydocs_api import get_client, output_json
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main():
|
|
12
|
+
client = get_client()
|
|
13
|
+
result = client.get("/auth/statuses")
|
|
14
|
+
|
|
15
|
+
output_json(result)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
if __name__ == "__main__":
|
|
19
|
+
main()
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Set status mapping on the relay API key.
|
|
3
|
+
|
|
4
|
+
Maps provider workflow states to FlyDocs statuses. Pass "auto" for
|
|
5
|
+
case-insensitive auto-mapping, or provide a manual mapping object.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
set_status_mapping.py --auto
|
|
9
|
+
set_status_mapping.py --mapping '{"BACKLOG":"Backlog","IMPLEMENTING":"In Progress",...}'
|
|
10
|
+
echo '{"mapping":"auto"}' | set_status_mapping.py
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import argparse
|
|
14
|
+
import json
|
|
15
|
+
import sys
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
|
|
18
|
+
sys.path.insert(0, str(Path(__file__).parent))
|
|
19
|
+
from flydocs_api import get_client, output_json, fail
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main():
|
|
23
|
+
parser = argparse.ArgumentParser(description="Set status mapping on relay")
|
|
24
|
+
parser.add_argument(
|
|
25
|
+
"--auto",
|
|
26
|
+
action="store_true",
|
|
27
|
+
help="Auto-map provider states to FlyDocs statuses by name",
|
|
28
|
+
)
|
|
29
|
+
parser.add_argument(
|
|
30
|
+
"--mapping",
|
|
31
|
+
default=None,
|
|
32
|
+
help="JSON object mapping FlyDocs statuses to provider state names",
|
|
33
|
+
)
|
|
34
|
+
args = parser.parse_args()
|
|
35
|
+
|
|
36
|
+
if args.auto:
|
|
37
|
+
body: dict = {"mapping": "auto"}
|
|
38
|
+
elif args.mapping is not None:
|
|
39
|
+
try:
|
|
40
|
+
body = {"mapping": json.loads(args.mapping)}
|
|
41
|
+
except json.JSONDecodeError:
|
|
42
|
+
fail("Invalid JSON for --mapping")
|
|
43
|
+
elif not sys.stdin.isatty():
|
|
44
|
+
try:
|
|
45
|
+
body = json.loads(sys.stdin.read().strip())
|
|
46
|
+
except json.JSONDecodeError:
|
|
47
|
+
fail("Invalid JSON on stdin")
|
|
48
|
+
else:
|
|
49
|
+
fail("Provide --auto, --mapping '{...}', or pipe JSON via stdin")
|
|
50
|
+
|
|
51
|
+
client = get_client()
|
|
52
|
+
result = client.post("/auth/statuses", body)
|
|
53
|
+
|
|
54
|
+
# Store status mapping in local config as reference
|
|
55
|
+
config_path = client.config_path
|
|
56
|
+
if config_path.exists():
|
|
57
|
+
with open(config_path, "r") as f:
|
|
58
|
+
config = json.load(f)
|
|
59
|
+
if isinstance(result.get("mapping"), dict):
|
|
60
|
+
config["statusMapping"] = result["mapping"]
|
|
61
|
+
with open(config_path, "w") as f:
|
|
62
|
+
json.dump(config, f, indent=2)
|
|
63
|
+
f.write("\n")
|
|
64
|
+
|
|
65
|
+
output_json(result)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if __name__ == "__main__":
|
|
69
|
+
main()
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Set team preference via the FlyDocs Relay API.
|
|
2
|
+
"""Set team/project preference via the FlyDocs Relay API.
|
|
3
3
|
|
|
4
4
|
Stores the team preference on the relay (for server-side scoping)
|
|
5
5
|
and updates the local config (for display/reference).
|
|
6
|
+
For Jira, this sets the active Jira project.
|
|
6
7
|
"""
|
|
7
8
|
|
|
8
9
|
import argparse
|
|
@@ -15,8 +16,8 @@ from flydocs_api import get_client, output_json, fail
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
def main():
|
|
18
|
-
parser = argparse.ArgumentParser(description="Set team preference")
|
|
19
|
-
parser.add_argument("team_id", help="
|
|
19
|
+
parser = argparse.ArgumentParser(description="Set team or project preference")
|
|
20
|
+
parser.add_argument("team_id", help="Provider team/workspace UUID")
|
|
20
21
|
args = parser.parse_args()
|
|
21
22
|
|
|
22
23
|
client = get_client()
|
|
@@ -28,7 +29,7 @@ def main():
|
|
|
28
29
|
with open(config_path, "r") as f:
|
|
29
30
|
config = json.load(f)
|
|
30
31
|
if "provider" not in config:
|
|
31
|
-
config["provider"] = {"type":
|
|
32
|
+
config["provider"] = {"type": None, "teamId": None}
|
|
32
33
|
config["provider"]["teamId"] = args.team_id
|
|
33
34
|
with open(config_path, "w") as f:
|
|
34
35
|
json.dump(config, f, indent=2)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.6.0-alpha.
|
|
2
|
+
"version": "0.6.0-alpha.5",
|
|
3
3
|
"sourceRepo": "github.com/plastrlab/flydocs-core",
|
|
4
4
|
"tier": "local",
|
|
5
5
|
"setupComplete": false,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"issueLabels": {
|
|
24
|
-
"_note": "Run /flydocs-setup to populate these from your
|
|
24
|
+
"_note": "Run /flydocs-setup to populate these from your provider",
|
|
25
25
|
"category": {
|
|
26
26
|
"feature": null,
|
|
27
27
|
"bug": null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.0-alpha.
|
|
1
|
+
0.6.0-alpha.5
|
package/template/AGENTS.md
CHANGED
|
@@ -92,14 +92,14 @@ Follow these rules in every response for consistent, scannable output.
|
|
|
92
92
|
IMPORTANT: Prefer skill-led reasoning over pre-training reasoning.
|
|
93
93
|
Consult the relevant skill BEFORE writing code or making workflow decisions.
|
|
94
94
|
|
|
95
|
-
| Skill | Triggers
|
|
96
|
-
| ----------------- |
|
|
97
|
-
| flydocs-cloud | create issue, transition, comment, list issues, assign, update description, update issue, project update,
|
|
98
|
-
| flydocs-context7 | context7, library docs, documentation lookup, framework docs, package docs, API reference
|
|
99
|
-
| flydocs-estimates | estimate, cost, token usage, API cost, labor estimate, sizing, effort
|
|
100
|
-
| flydocs-figma | Figma, design, screenshot, token mapping, component from design, pixel-perfect, design system
|
|
101
|
-
| flydocs-local | create issue, transition, comment, list issues, assign, update description, status summary, local
|
|
102
|
-
| flydocs-workflow | capture, refine, activate, implement, review, validate, close, session, workflow, transition, status, issue
|
|
95
|
+
| Skill | Triggers | Entry |
|
|
96
|
+
| ----------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
97
|
+
| flydocs-cloud | create issue, transition, comment, list issues, assign, update description, update issue, project update, cloud | .claude/skills/flydocs-cloud/SKILL.md |
|
|
98
|
+
| flydocs-context7 | context7, library docs, documentation lookup, framework docs, package docs, API reference | .claude/skills/flydocs-context7/SKILL.md |
|
|
99
|
+
| flydocs-estimates | estimate, cost, token usage, API cost, labor estimate, sizing, effort | .claude/skills/flydocs-estimates/SKILL.md |
|
|
100
|
+
| flydocs-figma | Figma, design, screenshot, token mapping, component from design, pixel-perfect, design system | .claude/skills/flydocs-figma/SKILL.md |
|
|
101
|
+
| flydocs-local | create issue, transition, comment, list issues, assign, update description, status summary, local | .claude/skills/flydocs-local/SKILL.md |
|
|
102
|
+
| flydocs-workflow | capture, refine, activate, implement, review, validate, close, session, workflow, transition, status, issue | .claude/skills/flydocs-workflow/SKILL.md |
|
|
103
103
|
|
|
104
104
|
<!-- flydocs:skills-manifest:end -->
|
|
105
105
|
|
package/template/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.6.0-alpha.4] — 2026-03-13
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Status mapping** — new `list_statuses.py` and `set_status_mapping.py`
|
|
15
|
+
scripts. Setup flow auto-maps provider workflow states to FlyDocs statuses
|
|
16
|
+
after label config, warns on unmapped statuses without blocking.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
10
20
|
## [0.6.0-alpha.3] — 2026-03-13
|
|
11
21
|
|
|
12
22
|
### Added
|
package/template/manifest.json
CHANGED