@flydocs/cli 0.6.0-alpha.3 → 0.6.0-alpha.31
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 +2053 -469
- package/package.json +1 -1
- package/template/.claude/CLAUDE.md +43 -48
- package/template/.claude/agents/implementation-agent.md +1 -1
- package/template/.claude/agents/pm-agent.md +1 -1
- package/template/.claude/commands/activate.md +1 -1
- package/template/.claude/commands/attach.md +1 -1
- package/template/.claude/commands/block.md +2 -2
- package/template/.claude/commands/capture.md +1 -1
- package/template/.claude/commands/close.md +1 -1
- package/template/.claude/commands/flydocs-setup.md +359 -72
- package/template/.claude/commands/flydocs-upgrade.md +26 -27
- package/template/.claude/commands/implement.md +1 -1
- package/template/.claude/commands/knowledge.md +61 -0
- package/template/.claude/commands/new-project.md +1 -1
- package/template/.claude/commands/onboard.md +275 -0
- package/template/.claude/commands/project-update.md +1 -1
- package/template/.claude/commands/refine.md +1 -1
- package/template/.claude/commands/review.md +1 -1
- package/template/.claude/commands/start-session.md +1 -1
- package/template/.claude/commands/status.md +1 -1
- package/template/.claude/commands/validate.md +1 -1
- package/template/.claude/commands/wrap-session.md +1 -1
- package/template/.claude/hooks/auto-approve.py +212 -0
- package/template/.claude/hooks/post-pr-check.py +108 -0
- package/template/.claude/hooks/post-transition-check.py +281 -0
- package/template/.claude/hooks/prompt-submit.py +554 -0
- package/template/.claude/hooks/session-start.py +262 -0
- package/template/.claude/hooks/stop-gate.py +162 -0
- package/template/.claude/settings.json +41 -4
- package/template/.claude/skills/README.md +23 -25
- package/template/.claude/skills/flydocs-workflow/SKILL.md +134 -42
- package/template/.claude/skills/flydocs-workflow/cursor-rule.mdc +9 -8
- package/template/.claude/skills/flydocs-workflow/reference/comment-templates.md +1 -0
- package/template/.claude/skills/flydocs-workflow/reference/golden-rules.md +28 -17
- package/template/.claude/skills/flydocs-workflow/reference/graph-schema.md +116 -0
- package/template/.claude/skills/flydocs-workflow/reference/pr-workflow.md +120 -0
- package/template/.claude/skills/flydocs-workflow/reference/priority-estimates.md +37 -15
- package/template/.claude/skills/flydocs-workflow/reference/service-descriptor-schema.md +260 -0
- package/template/.claude/skills/flydocs-workflow/reference/status-workflow.md +26 -26
- package/template/.claude/skills/flydocs-workflow/scripts/_local/__init__.py +0 -0
- package/template/.claude/skills/{flydocs-local/scripts/flydocs_api.py → flydocs-workflow/scripts/_local/file_store.py} +137 -47
- package/template/.claude/skills/flydocs-workflow/scripts/flydocs_api.py +724 -0
- package/template/{.flydocs → .claude/skills/flydocs-workflow}/scripts/generate_manifest.py +4 -4
- package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_build.py +132 -1
- package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_query.py +18 -5
- package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_session.py +1 -10
- package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_update.py +4 -4
- package/template/.claude/skills/{flydocs-context-graph → flydocs-workflow}/scripts/graph_utils.py +2 -1
- package/template/.claude/skills/flydocs-workflow/scripts/issues.py +738 -0
- package/template/.claude/skills/flydocs-workflow/scripts/projects.py +144 -0
- package/template/.claude/skills/flydocs-workflow/scripts/pull_services.py +128 -0
- package/template/.claude/skills/flydocs-workflow/scripts/push_service.py +132 -0
- package/template/.claude/skills/flydocs-workflow/scripts/session.py +54 -0
- package/template/.claude/skills/flydocs-workflow/scripts/test_enforcement.py +225 -0
- package/template/.claude/skills/flydocs-workflow/scripts/workspace.py +902 -0
- package/template/.claude/skills/flydocs-workflow/session.md +87 -29
- package/template/.claude/skills/flydocs-workflow/stages/activate.md +18 -7
- package/template/.claude/skills/flydocs-workflow/stages/capture.md +10 -5
- package/template/.claude/skills/flydocs-workflow/stages/close.md +4 -3
- package/template/.claude/skills/flydocs-workflow/stages/implement.md +33 -9
- package/template/.claude/skills/flydocs-workflow/stages/refine.md +22 -6
- package/template/.claude/skills/flydocs-workflow/stages/review.md +16 -4
- package/template/.claude/skills/flydocs-workflow/stages/validate.md +3 -1
- package/template/.claude/skills/flydocs-workflow/templates/pr/default.md +33 -0
- package/template/.cursor/agents/implementation-agent.md +1 -1
- package/template/.cursor/agents/pm-agent.md +2 -2
- package/template/.cursor/hooks.json +10 -3
- package/template/.env.example +6 -6
- package/template/.flydocs/config.json +5 -18
- package/template/.flydocs/templates/README.md +13 -14
- package/template/.flydocs/templates/bug.md +17 -153
- package/template/.flydocs/templates/chore.md +10 -98
- package/template/.flydocs/templates/feature.md +12 -158
- package/template/.flydocs/templates/idea.md +11 -111
- package/template/.flydocs/templates/quick-capture.md +4 -8
- package/template/.flydocs/version +1 -1
- package/template/AGENTS.md +44 -32
- package/template/CHANGELOG.md +37 -0
- package/template/flydocs/README.md +1 -3
- package/template/flydocs/context/project.md +6 -3
- package/template/flydocs/design-system/README.md +3 -3
- package/template/flydocs/knowledge/INDEX.md +38 -53
- package/template/flydocs/knowledge/README.md +60 -9
- package/template/flydocs/knowledge/templates/decision.md +47 -0
- package/template/flydocs/knowledge/templates/feature.md +35 -0
- package/template/flydocs/knowledge/templates/note.md +25 -0
- package/template/manifest.json +24 -20
- package/template/.claude/skills/flydocs-cloud/SKILL.md +0 -113
- package/template/.claude/skills/flydocs-cloud/cursor-rule.mdc +0 -50
- package/template/.claude/skills/flydocs-cloud/scripts/assign.py +0 -22
- package/template/.claude/skills/flydocs-cloud/scripts/assign_cycle.py +0 -28
- package/template/.claude/skills/flydocs-cloud/scripts/assign_milestone.py +0 -22
- package/template/.claude/skills/flydocs-cloud/scripts/comment.py +0 -29
- package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +0 -66
- package/template/.claude/skills/flydocs-cloud/scripts/create_milestone.py +0 -35
- package/template/.claude/skills/flydocs-cloud/scripts/create_project.py +0 -33
- package/template/.claude/skills/flydocs-cloud/scripts/create_team.py +0 -39
- package/template/.claude/skills/flydocs-cloud/scripts/estimate.py +0 -29
- package/template/.claude/skills/flydocs-cloud/scripts/flydocs_api.py +0 -210
- package/template/.claude/skills/flydocs-cloud/scripts/get_issue.py +0 -24
- package/template/.claude/skills/flydocs-cloud/scripts/link.py +0 -28
- package/template/.claude/skills/flydocs-cloud/scripts/list_cycles.py +0 -28
- package/template/.claude/skills/flydocs-cloud/scripts/list_issues.py +0 -44
- package/template/.claude/skills/flydocs-cloud/scripts/list_labels.py +0 -19
- package/template/.claude/skills/flydocs-cloud/scripts/list_milestones.py +0 -28
- package/template/.claude/skills/flydocs-cloud/scripts/list_projects.py +0 -31
- package/template/.claude/skills/flydocs-cloud/scripts/list_providers.py +0 -19
- package/template/.claude/skills/flydocs-cloud/scripts/list_teams.py +0 -19
- package/template/.claude/skills/flydocs-cloud/scripts/priority.py +0 -29
- package/template/.claude/skills/flydocs-cloud/scripts/project_update.py +0 -45
- package/template/.claude/skills/flydocs-cloud/scripts/set_labels.py +0 -68
- package/template/.claude/skills/flydocs-cloud/scripts/set_provider.py +0 -46
- package/template/.claude/skills/flydocs-cloud/scripts/set_team.py +0 -41
- package/template/.claude/skills/flydocs-cloud/scripts/transition.py +0 -26
- package/template/.claude/skills/flydocs-cloud/scripts/update_description.py +0 -36
- package/template/.claude/skills/flydocs-cloud/scripts/update_issue.py +0 -82
- package/template/.claude/skills/flydocs-context-graph/SKILL.md +0 -87
- package/template/.claude/skills/flydocs-context-graph/schema.md +0 -78
- package/template/.claude/skills/flydocs-context-graph/scripts/graph_context.py +0 -338
- package/template/.claude/skills/flydocs-context7/SKILL.md +0 -105
- package/template/.claude/skills/flydocs-context7/cursor-rule.mdc +0 -49
- package/template/.claude/skills/flydocs-context7/scripts/context7.py +0 -293
- package/template/.claude/skills/flydocs-estimates/SKILL.md +0 -384
- package/template/.claude/skills/flydocs-figma/SKILL.md +0 -377
- package/template/.claude/skills/flydocs-figma/references/PROMPTING.md +0 -108
- package/template/.claude/skills/flydocs-figma/references/TROUBLESHOOTING.md +0 -112
- package/template/.claude/skills/flydocs-local/SKILL.md +0 -103
- package/template/.claude/skills/flydocs-local/cursor-rule.mdc +0 -43
- package/template/.claude/skills/flydocs-local/scripts/assign.py +0 -20
- package/template/.claude/skills/flydocs-local/scripts/comment.py +0 -27
- package/template/.claude/skills/flydocs-local/scripts/create_issue.py +0 -44
- package/template/.claude/skills/flydocs-local/scripts/estimate.py +0 -37
- package/template/.claude/skills/flydocs-local/scripts/get_issue.py +0 -20
- package/template/.claude/skills/flydocs-local/scripts/link.py +0 -41
- package/template/.claude/skills/flydocs-local/scripts/list_issues.py +0 -34
- package/template/.claude/skills/flydocs-local/scripts/priority.py +0 -37
- package/template/.claude/skills/flydocs-local/scripts/project_update.py +0 -67
- package/template/.claude/skills/flydocs-local/scripts/status_summary.py +0 -16
- package/template/.claude/skills/flydocs-local/scripts/transition.py +0 -24
- package/template/.claude/skills/flydocs-local/scripts/update_description.py +0 -35
- package/template/.claude/skills/flydocs-local/scripts/update_issue.py +0 -84
- package/template/.flydocs/hooks/auto-approve.py +0 -71
- package/template/.flydocs/hooks/prompt-submit.py +0 -277
- package/template/.flydocs/scripts/skill_manager.py +0 -541
- /package/template/{.flydocs → .claude}/hooks/post-edit.py +0 -0
- /package/template/.claude/skills/{flydocs-estimates/references → flydocs-workflow/reference}/provider-costs.md +0 -0
- /package/template/.claude/skills/flydocs-workflow/templates/{bug.md → issues/bug.md} +0 -0
- /package/template/.claude/skills/flydocs-workflow/templates/{chore.md → issues/chore.md} +0 -0
- /package/template/.claude/skills/flydocs-workflow/templates/{feature.md → issues/feature.md} +0 -0
- /package/template/.claude/skills/flydocs-workflow/templates/{idea.md → issues/idea.md} +0 -0
|
@@ -4,7 +4,7 @@ Initial project onboarding — define project context, connect to provider, and
|
|
|
4
4
|
create an initial backlog. This command handles two scenarios: new projects
|
|
5
5
|
and FlyDocs version updates (including legacy content migration).
|
|
6
6
|
|
|
7
|
-
Read the
|
|
7
|
+
Read the workflow skill's `SKILL.md` for script calling conventions
|
|
8
8
|
before executing any scripts.
|
|
9
9
|
|
|
10
10
|
Triggers: "setup flydocs", "onboard project", "flydocs init"
|
|
@@ -48,7 +48,7 @@ Example:
|
|
|
48
48
|
|
|
49
49
|
```
|
|
50
50
|
Detected: New project setup (cloud tier)
|
|
51
|
-
I'll walk you through project definition,
|
|
51
|
+
I'll walk you through project definition, provider setup, and initial backlog.
|
|
52
52
|
Ready to begin?
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -73,13 +73,99 @@ If the directory exists and contains files:
|
|
|
73
73
|
5. Offer to add relevant rules to `flydocs/context/project.md` (Standards
|
|
74
74
|
section) or note them for the user to review.
|
|
75
75
|
6. Skip rules that conflict with or duplicate FlyDocs workflow rules (e.g.,
|
|
76
|
-
skill-led reasoning,
|
|
76
|
+
skill-led reasoning, workflow scripts, session management).
|
|
77
77
|
|
|
78
78
|
This is agent-guided — review and suggest, let the user confirm. No automated
|
|
79
79
|
merging. If no backup directory exists, skip this phase silently.
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
+
## Phase 0c: Topology Detection
|
|
84
|
+
|
|
85
|
+
Detect the project's physical layout. This affects Phase 1.5 (service
|
|
86
|
+
descriptor generation) and cross-repo context assembly.
|
|
87
|
+
|
|
88
|
+
**Step 1: Check for workspace config files.**
|
|
89
|
+
|
|
90
|
+
Look for these in the project root (in order):
|
|
91
|
+
|
|
92
|
+
- `pnpm-workspace.yaml` → Type 3 (monorepo multi-service)
|
|
93
|
+
- `nx.json` → Type 3
|
|
94
|
+
- `turbo.json` → Type 3
|
|
95
|
+
- `lerna.json` → Type 3
|
|
96
|
+
- `Cargo.toml` with `[workspace]` section → Type 3
|
|
97
|
+
- `go.work` → Type 3
|
|
98
|
+
|
|
99
|
+
If any found → **Type 3: Monorepo, multi-service**. Record which config file
|
|
100
|
+
was detected.
|
|
101
|
+
|
|
102
|
+
**Step 2: Check parent directory for sibling repos.**
|
|
103
|
+
|
|
104
|
+
If no workspace config found, check one directory up from the project root:
|
|
105
|
+
|
|
106
|
+
- List subdirectories of the parent directory
|
|
107
|
+
- Check which ones contain a `.git` directory
|
|
108
|
+
- If 2+ sibling directories (including this one) have `.git` → **Type 4: Sibling repos**
|
|
109
|
+
- Record the sibling repo directory names
|
|
110
|
+
|
|
111
|
+
**Step 3: Determine single-app vs monorepo-single.**
|
|
112
|
+
|
|
113
|
+
If neither workspace config nor sibling repos detected:
|
|
114
|
+
|
|
115
|
+
- Check if the project has multiple `package.json` files in subdirectories
|
|
116
|
+
(e.g., `apps/*/package.json`, `packages/*/package.json`)
|
|
117
|
+
- If yes → **Type 2: Monorepo, single app** (monorepo tooling without workspace config)
|
|
118
|
+
- If no → **Type 1: Single repo, single app**
|
|
119
|
+
|
|
120
|
+
**Step 4: Report and store.**
|
|
121
|
+
|
|
122
|
+
Tell the user what was detected:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Topology: Monorepo multi-service (Type 3)
|
|
126
|
+
Detected via: pnpm-workspace.yaml
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Update `.flydocs/config.json` with the `topology` field:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"topology": {
|
|
134
|
+
"type": 3,
|
|
135
|
+
"label": "monorepo-multi",
|
|
136
|
+
"detectedVia": "pnpm-workspace.yaml"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
For Type 4 (sibling repos), also include:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"topology": {
|
|
146
|
+
"type": 4,
|
|
147
|
+
"label": "sibling-repos",
|
|
148
|
+
"detectedVia": "parent directory scan",
|
|
149
|
+
"siblingRepos": ["flydocs-core", "flydocs-app", "flydocs-marketing"]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
For Type 3 with a workspace root different from project root:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"topology": {
|
|
159
|
+
"type": 3,
|
|
160
|
+
"label": "monorepo-multi",
|
|
161
|
+
"detectedVia": "turbo.json",
|
|
162
|
+
"workspaceRoot": "."
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
83
169
|
## Phase 1: Project Definition
|
|
84
170
|
|
|
85
171
|
The goal is to fill every section of `flydocs/context/project.md` with real
|
|
@@ -283,6 +369,114 @@ may be useful:
|
|
|
283
369
|
|
|
284
370
|
---
|
|
285
371
|
|
|
372
|
+
## Phase 1.5: Service Descriptor Generation
|
|
373
|
+
|
|
374
|
+
Generate `flydocs/context/service.json` — the dual-purpose descriptor that
|
|
375
|
+
provides cross-repo context AND intra-repo orientation. This phase uses the
|
|
376
|
+
topology detected in Phase 0c and stack detected in Phase 1.
|
|
377
|
+
|
|
378
|
+
Read `.claude/skills/flydocs-context-graph/service-descriptor-schema.md` for
|
|
379
|
+
the full schema reference before proceeding.
|
|
380
|
+
|
|
381
|
+
**Step 1: Scan for cross-repo export surface.**
|
|
382
|
+
|
|
383
|
+
Identify what this repo exposes to the outside world:
|
|
384
|
+
|
|
385
|
+
- **REST/GraphQL APIs** — scan for route definitions, API directories, endpoint
|
|
386
|
+
patterns. Look in common locations: `src/app/api/`, `src/routes/`,
|
|
387
|
+
`pages/api/`, `server/routes/`, `api/`.
|
|
388
|
+
- **Published packages** — check `package.json` for `name` field if it looks
|
|
389
|
+
like a library (`@scope/package` or explicitly `"private": false`).
|
|
390
|
+
- **Events/messages** — check for pub/sub, message queue, or webhook patterns.
|
|
391
|
+
- **gRPC** — check for `.proto` files.
|
|
392
|
+
|
|
393
|
+
For each API surface found, capture: type, path, description, and methods
|
|
394
|
+
(for REST).
|
|
395
|
+
|
|
396
|
+
**Step 2: Scan for dependencies on other services.**
|
|
397
|
+
|
|
398
|
+
Identify what this repo consumes from external services:
|
|
399
|
+
|
|
400
|
+
- Check environment variables (`.env.example`, `.env.local`) for service URLs,
|
|
401
|
+
API keys, or connection strings that reference other internal services.
|
|
402
|
+
- Check `package.json` for internal package references (`workspace:*`).
|
|
403
|
+
- Check import patterns for cross-service API clients.
|
|
404
|
+
- Check config files for external service endpoints.
|
|
405
|
+
|
|
406
|
+
For each dependency, capture: service name, interface type, and description.
|
|
407
|
+
|
|
408
|
+
**Step 3: Scan for intra-repo structure.**
|
|
409
|
+
|
|
410
|
+
Help the agent orient within THIS repo:
|
|
411
|
+
|
|
412
|
+
- **Entry points** — where does request handling or app logic start?
|
|
413
|
+
- Web frameworks: `src/app/`, `pages/`, `src/routes/`
|
|
414
|
+
- CLI tools: `src/cli.ts`, `src/index.ts`, `src/main.ts`
|
|
415
|
+
- Workers: `src/worker/`, `src/jobs/`
|
|
416
|
+
- **Shared types** — where do type definitions live?
|
|
417
|
+
- `src/types/`, `src/lib/types.ts`, `types/`, `packages/shared/`
|
|
418
|
+
- **Build system** — what builds the project?
|
|
419
|
+
- Read from `package.json` scripts, config files: turbo, nx, next, vite,
|
|
420
|
+
tsup, webpack, cargo, go
|
|
421
|
+
- **Packages** (monorepo Type 3 only) — scan workspace packages:
|
|
422
|
+
- Read `pnpm-workspace.yaml`, `turbo.json`, or `nx.json` for package list
|
|
423
|
+
- For each package: name, path, one-line purpose
|
|
424
|
+
|
|
425
|
+
**Step 4: Compose and confirm the descriptor.**
|
|
426
|
+
|
|
427
|
+
Build the `service.json` from scan results. Show the user the complete
|
|
428
|
+
descriptor and ask for confirmation or corrections:
|
|
429
|
+
|
|
430
|
+
```
|
|
431
|
+
Service Descriptor for [repo name]:
|
|
432
|
+
|
|
433
|
+
Purpose: [one-sentence description]
|
|
434
|
+
Stack: [technology list]
|
|
435
|
+
|
|
436
|
+
APIs exposed:
|
|
437
|
+
- REST /api/relay/* — Relay API for CLI operations
|
|
438
|
+
- package @flydocs/cli — npm CLI binary
|
|
439
|
+
|
|
440
|
+
Dependencies:
|
|
441
|
+
- plastrlab/flydocs-app (REST /api/relay/*) — cloud tier operations
|
|
442
|
+
|
|
443
|
+
Structure:
|
|
444
|
+
- Entry: src/cli.ts
|
|
445
|
+
- Types: src/lib/types.ts
|
|
446
|
+
- Build: tsup
|
|
447
|
+
|
|
448
|
+
Write to flydocs/context/service.json?
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Step 5: Write the descriptor.**
|
|
452
|
+
|
|
453
|
+
After user approval, write `flydocs/context/service.json` with the confirmed
|
|
454
|
+
content. Use the schema version `1`.
|
|
455
|
+
|
|
456
|
+
**Step 6: Push to relay (cloud tier only).**
|
|
457
|
+
|
|
458
|
+
For cloud tier projects, push the descriptor to the relay:
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
python3 .claude/skills/flydocs-context-graph/scripts/push_service.py
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
This calls `PUT /api/relay/workspace/service` with the descriptor content
|
|
465
|
+
(excluding the `structure` section which is local-only).
|
|
466
|
+
|
|
467
|
+
**Step 7: Pull workspace composite (cloud tier only).**
|
|
468
|
+
|
|
469
|
+
After pushing, pull the workspace composite to see sibling descriptors:
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
python3 .claude/skills/flydocs-context-graph/scripts/pull_services.py
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
This calls `GET /api/relay/workspace/services` and caches the result for
|
|
476
|
+
graph building and prompt hook orientation.
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
286
480
|
## Phase 2: Provider Setup — Cloud Only
|
|
287
481
|
|
|
288
482
|
> **Local tier:** Skip this phase entirely. Print: "Local tier — no provider
|
|
@@ -306,7 +500,7 @@ Do not proceed until the key is available.
|
|
|
306
500
|
Query connected providers:
|
|
307
501
|
|
|
308
502
|
```bash
|
|
309
|
-
python3 .claude/skills/flydocs-
|
|
503
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py list-integrations
|
|
310
504
|
```
|
|
311
505
|
|
|
312
506
|
This returns `[{type, name, connected}]`. Handle based on results:
|
|
@@ -320,66 +514,90 @@ This returns `[{type, name, connected}]`. Handle based on results:
|
|
|
320
514
|
After selection, store the preference:
|
|
321
515
|
|
|
322
516
|
```bash
|
|
323
|
-
python3 .claude/skills/flydocs-
|
|
517
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-provider <provider_type>
|
|
324
518
|
```
|
|
325
519
|
|
|
326
520
|
This stores the provider type on the relay (for routing) and updates
|
|
327
521
|
`provider.type` in local config.
|
|
328
522
|
|
|
329
|
-
**Step 3: Select or create team.**
|
|
523
|
+
**Step 3: Select or create team/project.**
|
|
524
|
+
|
|
525
|
+
> For Linear, this selects a team. For Jira, this selects a project. The relay
|
|
526
|
+
> normalizes both as "teams" in the API.
|
|
330
527
|
|
|
331
528
|
If `provider.teamId` in config is null, discover available teams:
|
|
332
529
|
|
|
333
530
|
```bash
|
|
334
|
-
python3 .claude/skills/flydocs-
|
|
531
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py teams
|
|
335
532
|
```
|
|
336
533
|
|
|
337
534
|
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,
|
|
535
|
+
Add a final option: **"Create a new team/project"**. If only one team exists,
|
|
339
536
|
confirm it.
|
|
340
537
|
|
|
341
|
-
If the user selects **"Create a new team"**:
|
|
538
|
+
If the user selects **"Create a new team/project"**:
|
|
342
539
|
|
|
343
540
|
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")
|
|
541
|
+
2. **Linear only:** Ask if this should be a sub-team under an existing team
|
|
542
|
+
(show the list again for parent selection, or "None — top-level team").
|
|
543
|
+
For Jira, skip the parent option — Jira projects do not have a parent
|
|
544
|
+
hierarchy.
|
|
346
545
|
3. Create via:
|
|
347
546
|
|
|
348
547
|
```bash
|
|
349
|
-
python3 .claude/skills/flydocs-
|
|
548
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-team --name "Team Name" [--key KEY] [--parent <parent_team_id>]
|
|
350
549
|
```
|
|
351
550
|
|
|
551
|
+
> The `--parent` flag is Linear-only (sub-teams). Omit for Jira.
|
|
552
|
+
|
|
352
553
|
After selection or creation, store the preference on the relay and in local
|
|
353
554
|
config:
|
|
354
555
|
|
|
355
556
|
```bash
|
|
356
|
-
python3 .claude/skills/flydocs-
|
|
557
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-team <team_id>
|
|
357
558
|
```
|
|
358
559
|
|
|
359
560
|
This stores the team preference server-side (the relay uses it for all
|
|
360
561
|
team-scoped operations) and updates `provider.teamId` in local config.
|
|
562
|
+
For Jira, this sets the active Jira project.
|
|
563
|
+
|
|
564
|
+
**Step 4: Get or create project (Linear only).**
|
|
361
565
|
|
|
362
|
-
**
|
|
566
|
+
> **Jira provider:** Skip this step. Jira organizes issues directly within
|
|
567
|
+
> projects (selected in Step 3). There is no secondary project container.
|
|
363
568
|
|
|
364
569
|
Query existing projects:
|
|
365
570
|
|
|
366
571
|
```bash
|
|
367
|
-
python3 .claude/skills/flydocs-
|
|
572
|
+
python3 .claude/skills/flydocs-workflow/scripts/projects.py list-projects
|
|
368
573
|
```
|
|
369
574
|
|
|
370
575
|
If matching projects exist, let the user select one. Otherwise, offer to
|
|
371
576
|
create a new project:
|
|
372
577
|
|
|
373
578
|
```bash
|
|
374
|
-
python3 .claude/skills/flydocs-
|
|
579
|
+
python3 .claude/skills/flydocs-workflow/scripts/projects.py create-project --name "Project Name"
|
|
375
580
|
```
|
|
376
581
|
|
|
582
|
+
**Step 4b: Set active project.**
|
|
583
|
+
|
|
584
|
+
After selecting or creating a project, store it as the active project:
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-active-project <project_id>
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
This writes `workspace.activeProjects` in `.flydocs/config.json`. All
|
|
591
|
+
subsequent operations (issue listing, captures, milestones, project updates)
|
|
592
|
+
use this to scope work to the active project. This is a critical step —
|
|
593
|
+
without it, product scope filtering and project-update targeting won't work.
|
|
594
|
+
|
|
377
595
|
**Step 5: Configure labels.**
|
|
378
596
|
|
|
379
597
|
Fetch available labels from the provider:
|
|
380
598
|
|
|
381
599
|
```bash
|
|
382
|
-
python3 .claude/skills/flydocs-
|
|
600
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py labels
|
|
383
601
|
```
|
|
384
602
|
|
|
385
603
|
**Auto-detect type mapping:** Scan the returned labels for common names
|
|
@@ -401,7 +619,7 @@ available labels as options.
|
|
|
401
619
|
Store the configuration on the relay:
|
|
402
620
|
|
|
403
621
|
```bash
|
|
404
|
-
python3 .claude/skills/flydocs-
|
|
622
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-labels \
|
|
405
623
|
--defaults '["app"]' \
|
|
406
624
|
--type-map '{"feature":["Feature"],"bug":["Bug"],"chore":["Chore"],"idea":["Improvement"]}'
|
|
407
625
|
```
|
|
@@ -409,7 +627,49 @@ python3 .claude/skills/flydocs-cloud/scripts/set_labels.py \
|
|
|
409
627
|
If the relay returns `LABELS_NOT_FOUND`, show the invalid names and ask the
|
|
410
628
|
user to correct them.
|
|
411
629
|
|
|
412
|
-
**Step 6: Configure
|
|
630
|
+
**Step 6: Configure status mapping.**
|
|
631
|
+
|
|
632
|
+
Map provider workflow states to FlyDocs statuses. Run auto-mapping first:
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-status-mapping --auto
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
The relay auto-maps by case-insensitive name matching (e.g., "In Progress"
|
|
639
|
+
maps to `IMPLEMENTING`, "Done" maps to `COMPLETE`, "Backlog" maps to
|
|
640
|
+
`BACKLOG`).
|
|
641
|
+
|
|
642
|
+
**Review the result:** The response includes `matched` (number of statuses
|
|
643
|
+
successfully mapped) and `total` (total FlyDocs statuses). Show the user
|
|
644
|
+
the `mapping` object:
|
|
645
|
+
|
|
646
|
+
```
|
|
647
|
+
Status mapping (matched 6/10):
|
|
648
|
+
BACKLOG -> Backlog
|
|
649
|
+
READY -> Ready
|
|
650
|
+
IMPLEMENTING -> In Progress
|
|
651
|
+
REVIEW -> In Review
|
|
652
|
+
COMPLETE -> Done
|
|
653
|
+
CANCELED -> Canceled
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
If `matched < total`, some statuses are unmapped — **warn but don't block**.
|
|
657
|
+
Transitions for unmapped statuses will fall back to provider name matching.
|
|
658
|
+
If the user wants to fix unmapped statuses, fetch available provider states
|
|
659
|
+
and let them map manually:
|
|
660
|
+
|
|
661
|
+
```bash
|
|
662
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py statuses
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
Then store the corrected mapping:
|
|
666
|
+
|
|
667
|
+
```bash
|
|
668
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py set-status-mapping \
|
|
669
|
+
--mapping '{"BACKLOG":"Backlog","IMPLEMENTING":"In Progress","BLOCKED":"On Hold",...}'
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
**Step 7: Configure product identity.**
|
|
413
673
|
|
|
414
674
|
Ask about product metadata:
|
|
415
675
|
|
|
@@ -417,28 +677,51 @@ Ask about product metadata:
|
|
|
417
677
|
from project.md)
|
|
418
678
|
- **Icon and color** — optional, ask if they have preferences
|
|
419
679
|
|
|
420
|
-
**Step
|
|
680
|
+
**Step 8: Generate config from relay.**
|
|
421
681
|
|
|
422
|
-
|
|
682
|
+
The setup scripts in Steps 2-7 all POST to the relay — they no longer write
|
|
683
|
+
to local config. After all setup steps complete, pull the canonical config:
|
|
423
684
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
685
|
+
```bash
|
|
686
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py config
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
This calls `GET /config/generate` which returns all server-owned fields
|
|
690
|
+
(`workspaceId`, `setupComplete`, `workspace`, `issueLabels`). The script
|
|
691
|
+
merges these with local-only fields (`tier`, `detectedStack`, `skills`,
|
|
692
|
+
`designSystem`, `aiLabor`, `paths`) and writes `.flydocs/config.json`.
|
|
693
|
+
|
|
694
|
+
It also cleans up ghost fields (`provider`, `statusMapping`, `labels`) that
|
|
695
|
+
were previously written by individual setup scripts but aren't in the TS
|
|
696
|
+
type system.
|
|
697
|
+
|
|
698
|
+
If the response includes `missing` or `warnings`, show them to the user
|
|
699
|
+
but don't block — they can fix in the dashboard and re-run later.
|
|
700
|
+
|
|
701
|
+
**Step 9: Fetch user identity.**
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
python3 .claude/skills/flydocs-workflow/scripts/workspace.py get-me
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
This calls `GET /auth/me` (no workspace required) and writes
|
|
708
|
+
`.flydocs/me.json` with `displayName`, `email`, `providerId`, and
|
|
709
|
+
`providerIdentities`. The file is gitignored — each developer gets their own.
|
|
710
|
+
|
|
711
|
+
This enables `--mine` filters and personalizes session output.
|
|
430
712
|
|
|
431
713
|
---
|
|
432
714
|
|
|
433
715
|
## Phase 3: Milestones — Cloud Only
|
|
434
716
|
|
|
435
717
|
> **Local tier:** Skip this phase entirely.
|
|
718
|
+
> **Jira provider:** Skip this phase. Milestone support for Jira is planned for a future release.
|
|
436
719
|
> **FlyDocs Update:** Skip if milestones already exist.
|
|
437
720
|
|
|
438
721
|
**Step 1: Check existing milestones.**
|
|
439
722
|
|
|
440
723
|
```bash
|
|
441
|
-
python3 .claude/skills/flydocs-
|
|
724
|
+
python3 .claude/skills/flydocs-workflow/scripts/projects.py list-milestones
|
|
442
725
|
```
|
|
443
726
|
|
|
444
727
|
**Step 2: If milestones exist** — show them and confirm they'll be used for
|
|
@@ -464,7 +747,7 @@ Let the user customize names, descriptions, and target dates.
|
|
|
464
747
|
For each approved milestone, pass the project ID from Phase 2 Step 3:
|
|
465
748
|
|
|
466
749
|
```bash
|
|
467
|
-
python3 .claude/skills/flydocs-
|
|
750
|
+
python3 .claude/skills/flydocs-workflow/scripts/projects.py create-milestone \
|
|
468
751
|
--name "Phase 1: Foundation" --project <project_id> --target-date YYYY-MM-DD
|
|
469
752
|
```
|
|
470
753
|
|
|
@@ -493,22 +776,25 @@ For each work item, follow the capture procedure from
|
|
|
493
776
|
`.claude/skills/flydocs-workflow/stages/capture.md`:
|
|
494
777
|
|
|
495
778
|
- Determine type (feature, bug, chore, idea)
|
|
496
|
-
- Create via the
|
|
779
|
+
- Create via the workflow script (cloud: pass `--project` from Phase 2 for
|
|
780
|
+
Linear; omit `--project` for Jira — issues are scoped to the team/project
|
|
781
|
+
selected in Phase 2 Step 3):
|
|
497
782
|
```bash
|
|
498
|
-
python3 .claude/skills/flydocs-
|
|
783
|
+
python3 .claude/skills/flydocs-workflow/scripts/issues.py create \
|
|
499
784
|
--title "Issue title" --type feature --priority 3 --estimate 2 \
|
|
500
785
|
--project <project_id>
|
|
501
786
|
```
|
|
502
787
|
- For quick ideas, use `--triage` flag
|
|
503
788
|
|
|
504
|
-
**Step 3: Milestone assignment (
|
|
789
|
+
**Step 3: Milestone assignment (Linear only).**
|
|
505
790
|
|
|
506
791
|
> **Local tier:** Skip this step.
|
|
792
|
+
> **Jira provider:** Skip this step.
|
|
507
793
|
|
|
508
794
|
After creating issues, assign them to milestones:
|
|
509
795
|
|
|
510
796
|
```bash
|
|
511
|
-
python3 .claude/skills/flydocs-
|
|
797
|
+
python3 .claude/skills/flydocs-workflow/scripts/projects.py assign-milestone \
|
|
512
798
|
<issue-ref> <milestone-id>
|
|
513
799
|
```
|
|
514
800
|
|
|
@@ -520,7 +806,7 @@ based on the issue content.
|
|
|
520
806
|
**Step 1: Check if backlog is populated.**
|
|
521
807
|
|
|
522
808
|
```bash
|
|
523
|
-
python3 .claude/skills/flydocs-
|
|
809
|
+
python3 .claude/skills/flydocs-workflow/scripts/issues.py list --limit 10
|
|
524
810
|
```
|
|
525
811
|
|
|
526
812
|
If issues exist, skip this phase:
|
|
@@ -546,7 +832,7 @@ Only if the user wants to add more.
|
|
|
546
832
|
List all issues in Backlog status:
|
|
547
833
|
|
|
548
834
|
```bash
|
|
549
|
-
python3 .claude/skills/flydocs-
|
|
835
|
+
python3 .claude/skills/flydocs-workflow/scripts/issues.py list --status BACKLOG
|
|
550
836
|
```
|
|
551
837
|
|
|
552
838
|
**Step 2: Set priorities.**
|
|
@@ -559,10 +845,10 @@ For each issue, suggest a priority and let the user confirm or adjust:
|
|
|
559
845
|
- **4 (Low)** — Nice to have, no urgency
|
|
560
846
|
|
|
561
847
|
```bash
|
|
562
|
-
python3 .claude/skills/flydocs-
|
|
848
|
+
python3 .claude/skills/flydocs-workflow/scripts/issues.py priority <issue-ref> <0-4>
|
|
563
849
|
```
|
|
564
850
|
|
|
565
|
-
Note:
|
|
851
|
+
Note: Priority scale is 0=No priority, 1=Urgent, 2=High, 3=Medium, 4=Low.
|
|
566
852
|
|
|
567
853
|
**Step 3: Set estimates.**
|
|
568
854
|
|
|
@@ -575,13 +861,13 @@ For each issue, suggest a t-shirt size estimate:
|
|
|
575
861
|
- **5** — XL (1+ week, consider breaking down)
|
|
576
862
|
|
|
577
863
|
```bash
|
|
578
|
-
python3 .claude/skills/flydocs-
|
|
864
|
+
python3 .claude/skills/flydocs-workflow/scripts/issues.py estimate <issue-ref> <1-5>
|
|
579
865
|
```
|
|
580
866
|
|
|
581
867
|
**Step 4: Identify dependencies.**
|
|
582
868
|
|
|
583
869
|
Ask about blocking relationships between issues. If any exist, note them
|
|
584
|
-
(
|
|
870
|
+
(most providers handle dependency tracking natively).
|
|
585
871
|
|
|
586
872
|
**Step 5: Recommend implementation order.**
|
|
587
873
|
|
|
@@ -599,7 +885,7 @@ Recommended implementation order:
|
|
|
599
885
|
|
|
600
886
|
## Phase 6: Completion & Onboarding
|
|
601
887
|
|
|
602
|
-
Summarize what was accomplished and
|
|
888
|
+
Summarize what was accomplished and guide the developer to onboarding.
|
|
603
889
|
|
|
604
890
|
### Step 1: Completion summary
|
|
605
891
|
|
|
@@ -611,7 +897,7 @@ Tier: [local / cloud]
|
|
|
611
897
|
|
|
612
898
|
✓ Project context: flydocs/context/project.md
|
|
613
899
|
✓ Stack detected: [framework list]
|
|
614
|
-
✓ Provider: [
|
|
900
|
+
✓ Provider: [Connected / Local file-based] (if applicable)
|
|
615
901
|
✓ Milestones: [N created] (cloud only)
|
|
616
902
|
✓ Backlog: [N issues captured]
|
|
617
903
|
✓ Priorities set (cloud only)
|
|
@@ -619,43 +905,44 @@ Tier: [local / cloud]
|
|
|
619
905
|
|
|
620
906
|
**Mark setup as complete.**
|
|
621
907
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
908
|
+
For **cloud tier**: Setup completion is determined by the relay. The
|
|
909
|
+
`workspace.py config` call in Phase 2 Step 8 already sets `setupComplete`
|
|
910
|
+
based on the relay's validation result. If the relay returns `valid: true`,
|
|
911
|
+
config will have `setupComplete: true`. If not, run `workspace.py validate` to
|
|
912
|
+
check what's still missing.
|
|
913
|
+
|
|
914
|
+
For **local tier**: Update `.flydocs/config.json` to set `setupComplete` to
|
|
915
|
+
`true`. Read the config, set the field, and write it back:
|
|
625
916
|
|
|
626
917
|
```json
|
|
627
918
|
{ "setupComplete": true }
|
|
628
919
|
```
|
|
629
920
|
|
|
630
|
-
### Step 2:
|
|
921
|
+
### Step 2: Direct to /onboard
|
|
631
922
|
|
|
632
|
-
|
|
923
|
+
Check `.flydocs/config.json` for the `onboardComplete` field. If it is not
|
|
924
|
+
`true`, direct the developer to run `/onboard` for full project orientation:
|
|
633
925
|
|
|
634
926
|
```
|
|
635
|
-
|
|
927
|
+
Setup is done! Next step:
|
|
636
928
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
/capture Capture a new issue or idea anytime
|
|
929
|
+
Run /onboard to get oriented to the codebase, active work, and available
|
|
930
|
+
commands. This is especially helpful for new team members joining the project.
|
|
931
|
+
```
|
|
641
932
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
/status Check current session and issue status
|
|
645
|
-
/block Flag a blocker on the current issue
|
|
933
|
+
If `onboardComplete` is already `true` (developer has onboarded before),
|
|
934
|
+
skip the nudge and go straight to the quick-start reminder:
|
|
646
935
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
/validate Run QE validation on completed work
|
|
650
|
-
/wrap-session End your session (posts summary, saves progress)
|
|
936
|
+
```
|
|
937
|
+
Setup refreshed. Run /start-session to begin working.
|
|
651
938
|
```
|
|
652
939
|
|
|
653
940
|
### Step 3: Tier-specific notes
|
|
654
941
|
|
|
655
942
|
**For cloud tier:**
|
|
656
943
|
|
|
657
|
-
-
|
|
658
|
-
- Recommend reviewing milestones in
|
|
944
|
+
- Provider project URL (if available from create_project response)
|
|
945
|
+
- Recommend reviewing milestones in your provider's UI for timeline view
|
|
659
946
|
|
|
660
947
|
**For local tier:**
|
|
661
948
|
|
|
@@ -709,11 +996,11 @@ Docs and updates: https://www.flydocs.ai
|
|
|
709
996
|
|
|
710
997
|
Throughout the setup flow:
|
|
711
998
|
|
|
712
|
-
- **Script failures** — If any
|
|
999
|
+
- **Script failures** — If any workflow script returns exit code 1, show the
|
|
713
1000
|
error message from stderr and ask the user how to proceed. Do not retry
|
|
714
1001
|
silently.
|
|
715
1002
|
- **Missing API key** — For cloud tier, cannot proceed past Phase 2 without
|
|
716
|
-
`
|
|
1003
|
+
`FLYDOCS_API_KEY`. Guide the user to set it up.
|
|
717
1004
|
- **Missing config** — If `.flydocs/config.json` doesn't exist, the user
|
|
718
1005
|
likely needs to run `flydocs` (install) first. Advise them accordingly.
|
|
719
1006
|
- **Partial completion** — If the user needs to stop mid-setup, note which
|
|
@@ -724,18 +1011,18 @@ Throughout the setup flow:
|
|
|
724
1011
|
|
|
725
1012
|
## Key Rules
|
|
726
1013
|
|
|
727
|
-
1. **Always read the
|
|
728
|
-
Script calling conventions
|
|
1014
|
+
1. **Always read the workflow skill's `SKILL.md`** before running any script.
|
|
1015
|
+
Script calling conventions are documented there.
|
|
729
1016
|
2. **All script paths** follow the pattern:
|
|
730
|
-
`python3 .claude/skills/flydocs-
|
|
731
|
-
|
|
1017
|
+
`python3 .claude/skills/flydocs-workflow/scripts/<dispatcher>.py <subcommand>`
|
|
1018
|
+
The unified client auto-detects tier from `.flydocs/config.json`.
|
|
732
1019
|
3. **Never skip user confirmation** on project.md content. This is their
|
|
733
1020
|
project definition — they must approve it.
|
|
734
|
-
4. **Never hardcode tier** —
|
|
735
|
-
tiers via `flydocs --tier <tier>`.
|
|
736
|
-
5. **Cloud
|
|
737
|
-
milestones, projects) only
|
|
738
|
-
|
|
1021
|
+
4. **Never hardcode tier** — the dispatcher scripts auto-detect tier from
|
|
1022
|
+
config. A project can switch tiers via `flydocs --tier <tier>`.
|
|
1023
|
+
5. **Cloud-only operations.** Extended operations (estimate, priority,
|
|
1024
|
+
milestones, projects) are cloud-only. The dispatchers will error if called
|
|
1025
|
+
on local tier for unsupported operations.
|
|
739
1026
|
6. **Capture procedure** — when creating issues during Phase 4, follow the
|
|
740
1027
|
full capture procedure from `.claude/skills/flydocs-workflow/stages/capture.md`.
|
|
741
1028
|
|