@cliangdev/flux-plugin 0.2.0-dev.e34d43b → 0.2.0-dev.edce79d

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.
Files changed (39) hide show
  1. package/agents/coder.md +150 -25
  2. package/bin/install.cjs +22 -1
  3. package/commands/breakdown.md +44 -7
  4. package/commands/dashboard.md +29 -0
  5. package/commands/implement.md +165 -15
  6. package/commands/prd.md +176 -1
  7. package/manifest.json +2 -1
  8. package/package.json +4 -2
  9. package/skills/prd-writer/SKILL.md +184 -0
  10. package/skills/ux-ui-design/SKILL.md +346 -0
  11. package/skills/ux-ui-design/references/design-tokens.md +359 -0
  12. package/src/dashboard/__tests__/api.test.ts +211 -0
  13. package/src/dashboard/browser.ts +35 -0
  14. package/src/dashboard/public/app.js +869 -0
  15. package/src/dashboard/public/index.html +90 -0
  16. package/src/dashboard/public/styles.css +807 -0
  17. package/src/dashboard/public/vendor/highlight.css +10 -0
  18. package/src/dashboard/public/vendor/highlight.min.js +8422 -0
  19. package/src/dashboard/public/vendor/marked.min.js +2210 -0
  20. package/src/dashboard/server.ts +296 -0
  21. package/src/dashboard/watchers.ts +83 -0
  22. package/src/server/adapters/__tests__/dependency-ops.test.ts +52 -18
  23. package/src/server/adapters/linear/adapter.ts +19 -14
  24. package/src/server/adapters/local-adapter.ts +48 -7
  25. package/src/server/db/__tests__/queries.test.ts +2 -1
  26. package/src/server/db/schema.ts +9 -0
  27. package/src/server/tools/__tests__/crud.test.ts +111 -1
  28. package/src/server/tools/__tests__/mcp-interface.test.ts +2 -1
  29. package/src/server/tools/__tests__/query.test.ts +73 -2
  30. package/src/server/tools/__tests__/z-configure-linear.test.ts +1 -1
  31. package/src/server/tools/__tests__/z-get-linear-url.test.ts +1 -1
  32. package/src/server/tools/create-epic.ts +11 -2
  33. package/src/server/tools/create-prd.ts +11 -2
  34. package/src/server/tools/create-task.ts +11 -2
  35. package/src/server/tools/dependencies.ts +2 -2
  36. package/src/server/tools/get-entity.ts +12 -10
  37. package/src/server/tools/render-status.ts +38 -20
  38. package/src/status-line/__tests__/status-line.test.ts +1 -1
  39. package/src/utils/status-renderer.ts +32 -6
package/commands/prd.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: flux:prd
3
3
  description: Create comprehensive PRDs through discovery, research, and guided writing
4
- allowed-tools: mcp__flux__*, AskUserQuestion, Read, Glob, Grep, Task, WebSearch
4
+ allowed-tools: mcp__flux__*, AskUserQuestion, Read, Write, Glob, Grep, Task, WebSearch, Bash
5
5
  ---
6
6
 
7
7
  # PRD Creation Command
@@ -216,6 +216,181 @@ Use AskUserQuestion:
216
216
 
217
217
  **Goal**: Gather technical context to make the PRD specific and implementable.
218
218
 
219
+ #### Step 2.0: Greenfield Detection & Essential Setup
220
+
221
+ **Before exploring the codebase, check if this is a greenfield project.**
222
+
223
+ ##### Detection
224
+
225
+ Check for project indicators using Glob:
226
+ ```
227
+ - .git directory exists?
228
+ - package.json / go.mod / pyproject.toml / Cargo.toml / etc.?
229
+ - src/ or lib/ directories with code files?
230
+ ```
231
+
232
+ **If ALL indicators are missing → Greenfield project → Trigger setup flow**
233
+
234
+ ##### Essential Setup Flow
235
+
236
+ When greenfield is detected, present:
237
+
238
+ ```
239
+ This looks like a new project without existing setup.
240
+
241
+ Before we create the PRD, let's establish the foundation:
242
+
243
+ **Git Setup**
244
+ - Initialize repository with .gitignore for {detected/chosen tech stack}
245
+ - Create branching structure: main + develop (git flow ready)
246
+ - Initial commit with project structure
247
+
248
+ **Project Structure** (based on {project type from Phase 1})
249
+ {Show recommended minimal structure}
250
+
251
+ **Package Setup**
252
+ - Initialize {package.json / pyproject.toml / go.mod / etc.}
253
+
254
+ Proceed with this setup?
255
+ ```
256
+
257
+ Use AskUserQuestion:
258
+ - "Yes, set up essentials" (Recommended)
259
+ - "Customize setup first"
260
+ - "Skip - I'll set up manually"
261
+
262
+ ##### Essential Setup by Project Type
263
+
264
+ | Project Type | Git | Structure | Package Init |
265
+ |--------------|-----|-----------|--------------|
266
+ | **Web App (Node)** | .gitignore (node) | `src/`, `tests/`, `public/` | package.json |
267
+ | **Web App (Python)** | .gitignore (python) | `src/`, `tests/` | pyproject.toml |
268
+ | **CLI Tool (Node)** | .gitignore (node) | `src/`, `bin/`, `tests/` | package.json with bin |
269
+ | **CLI Tool (Go)** | .gitignore (go) | `cmd/`, `internal/`, `pkg/` | go.mod |
270
+ | **API/Backend** | .gitignore (lang) | `src/`, `tests/`, `config/` | Language-specific |
271
+ | **Library** | .gitignore (lang) | `src/`, `tests/`, `examples/` | Language-specific |
272
+
273
+ ##### Executing Essential Setup
274
+
275
+ When user confirms, execute via Bash:
276
+
277
+ ```bash
278
+ # Git initialization
279
+ git init
280
+ git checkout -b main
281
+ git checkout -b develop
282
+
283
+ # Create .gitignore (use appropriate template for language)
284
+ # Create initial directory structure (mkdir -p)
285
+ # Initialize package manager (npm init -y / go mod init / etc.)
286
+
287
+ # Initial commit
288
+ git add .
289
+ git commit -m "Initial project setup
290
+
291
+ - Initialize git with main/develop branches
292
+ - Add .gitignore for {language}
293
+ - Create project structure
294
+ - Initialize {package manager}
295
+
296
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
297
+
298
+ # Return to develop for feature work
299
+ git checkout develop
300
+ ```
301
+
302
+ ##### Foundation PRD Offer
303
+
304
+ After essential setup completes (or if user skipped), offer comprehensive setup as a tracked PRD:
305
+
306
+ ```
307
+ Foundation is ready. Would you like to track additional setup as a PRD?
308
+
309
+ A Foundation PRD would cover:
310
+ - CI/CD pipeline (GitHub Actions / GitLab CI)
311
+ - Linting & formatting (ESLint+Prettier / Biome / Ruff)
312
+ - Testing framework setup
313
+ - Environment configuration (.env patterns)
314
+ - Pre-commit hooks
315
+
316
+ This gets tracked in Flux so you can implement it systematically.
317
+ ```
318
+
319
+ Use AskUserQuestion:
320
+ - "Create Foundation PRD" - Creates PRD with [tag: foundation], then continues to feature PRD
321
+ - "Skip - continue to feature PRD" (Recommended for simple projects)
322
+
323
+ ##### Foundation PRD Template
324
+
325
+ If user wants a Foundation PRD, create it with this structure:
326
+
327
+ ```markdown
328
+ # Project Foundation
329
+
330
+ > **Tag**: foundation
331
+ > **Depends on**: None
332
+ > **Blocks**: All feature PRDs
333
+
334
+ ## Problem
335
+
336
+ New projects without proper tooling lead to inconsistent code quality,
337
+ manual testing overhead, and deployment friction.
338
+
339
+ ## Users
340
+
341
+ Developers working on this codebase.
342
+
343
+ ## Solution
344
+
345
+ Establish development infrastructure: CI/CD, code quality tools, testing
346
+ framework, and environment management.
347
+
348
+ ## Features
349
+
350
+ ### P0: Must Have
351
+
352
+ - **CI Pipeline**: Automated testing on push/PR
353
+ - **What**: GitHub Actions workflow for test/lint/build
354
+ - **Not**: Deployment pipelines, complex matrix builds
355
+ - **Acceptance Criteria**:
356
+ - [ ] Push to any branch triggers CI
357
+ - [ ] PR cannot merge if CI fails
358
+ - [ ] CI runs tests, linting, and type checking
359
+
360
+ - **Code Quality**: Linting and formatting
361
+ - **What**: {ESLint+Prettier / Biome / Ruff} with pre-commit hooks
362
+ - **Not**: Custom rules beyond standard configs
363
+ - **Acceptance Criteria**:
364
+ - [ ] Lint command runs without errors
365
+ - [ ] Pre-commit hook prevents unlinted commits
366
+ - [ ] Editor integration documented
367
+
368
+ - **Testing Framework**: Test infrastructure
369
+ - **What**: {Jest/Vitest / Pytest / Go test} with coverage
370
+ - **Not**: E2E tests, integration infrastructure
371
+ - **Acceptance Criteria**:
372
+ - [ ] Test command runs and reports coverage
373
+ - [ ] Example test demonstrates patterns
374
+ - [ ] Coverage threshold set (70%)
375
+
376
+ ### P1: Should Have
377
+
378
+ - **Environment Config**: .env management
379
+ - **Documentation**: README with setup instructions
380
+
381
+ ### Out of Scope
382
+ - Deployment pipelines
383
+ - Production infrastructure
384
+ - Monitoring/observability
385
+ ```
386
+
387
+ After creating Foundation PRD:
388
+ 1. Save it with `tag: foundation`
389
+ 2. Continue to the user's feature PRD
390
+ 3. Set feature PRD's `Depends on: {Foundation PRD ref}`
391
+
392
+ ---
393
+
219
394
  #### Step 2.1: Codebase Research
220
395
 
221
396
  Check if there's an existing codebase to analyze:
package/manifest.json CHANGED
@@ -7,7 +7,8 @@
7
7
  "agent-creator",
8
8
  "epic-template",
9
9
  "flux-orchestrator",
10
- "prd-writer"
10
+ "prd-writer",
11
+ "ux-ui-design"
11
12
  ],
12
13
  "agents": ["coder.md", "critic.md", "researcher.md", "verifier.md"],
13
14
  "hooks": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliangdev/flux-plugin",
3
- "version": "0.2.0-dev.e34d43b",
3
+ "version": "0.2.0-dev.edce79d",
4
4
  "description": "Claude Code plugin for AI-first workflow orchestration with MCP server",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.js",
@@ -17,9 +17,11 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "dev": "bun run src/server/index.ts",
20
- "build": "bun build --compile --outfile bin/flux-server src/server/index.ts && bun build --compile --outfile bin/flux-status src/status-line/index.ts",
20
+ "build": "bun build --compile --outfile bin/flux-server src/server/index.ts && bun build --compile --outfile bin/flux-status src/status-line/index.ts && bun build --compile --outfile bin/flux-dashboard src/dashboard/server.ts",
21
21
  "build:server": "bun build --compile --outfile bin/flux-server src/server/index.ts",
22
22
  "build:status": "bun build --compile --outfile bin/flux-status src/status-line/index.ts",
23
+ "build:dashboard": "bun build --compile --outfile bin/flux-dashboard src/dashboard/server.ts",
24
+ "dev:dashboard": "bun run src/dashboard/server.ts",
23
25
  "validate": "node scripts/validate-structure.cjs",
24
26
  "test:integration": "bun test scripts/__tests__/integration.test.ts --timeout 120000",
25
27
  "prepublishOnly": "bun run validate && bun run test:integration",
@@ -497,6 +497,190 @@ After PRD approval, ask based on project type:
497
497
 
498
498
  **Goal**: Gather technical context to inform the PRD.
499
499
 
500
+ #### Step 2.0: Greenfield Detection & Setup
501
+
502
+ **Before exploring the codebase, check if this is a greenfield project.**
503
+
504
+ ##### Detection
505
+
506
+ Check for project indicators:
507
+ ```
508
+ - .git directory exists?
509
+ - package.json / go.mod / pyproject.toml / Cargo.toml / etc.?
510
+ - src/ or lib/ directories with code files?
511
+ - Any meaningful source files?
512
+ ```
513
+
514
+ **If ALL indicators are missing → Greenfield project → Trigger setup flow**
515
+
516
+ ##### Essential Setup Flow
517
+
518
+ When greenfield is detected, present:
519
+
520
+ ```
521
+ This looks like a new project without existing setup.
522
+
523
+ Before we create the PRD, let's establish the foundation:
524
+
525
+ **Git Setup**
526
+ - Initialize repository with .gitignore
527
+ - Create branching structure: main + develop (git flow ready)
528
+ - Initial commit with project structure
529
+
530
+ **Project Structure** (based on {detected project type from Phase 1})
531
+ {Show recommended minimal structure for the project type}
532
+
533
+ **Package Setup**
534
+ - Initialize {package.json / pyproject.toml / go.mod / etc.}
535
+ - Add essential dev dependencies
536
+
537
+ Proceed with this setup?
538
+ ```
539
+
540
+ Use AskUserQuestion:
541
+ - "Yes, set up essentials" (Recommended)
542
+ - "Customize setup first"
543
+ - "Skip - I'll set up manually"
544
+
545
+ ##### Essential Setup by Project Type
546
+
547
+ | Project Type | Git | Structure | Package Init |
548
+ |--------------|-----|-----------|--------------|
549
+ | **Web App (Node)** | .gitignore (node) | `src/`, `tests/`, `public/` | package.json with scripts |
550
+ | **Web App (Python)** | .gitignore (python) | `src/`, `tests/` | pyproject.toml |
551
+ | **CLI Tool (Node)** | .gitignore (node) | `src/`, `bin/`, `tests/` | package.json with bin |
552
+ | **CLI Tool (Go)** | .gitignore (go) | `cmd/`, `internal/`, `pkg/` | go.mod |
553
+ | **API/Backend** | .gitignore (lang) | `src/`, `tests/`, `config/` | Language-specific |
554
+ | **Library** | .gitignore (lang) | `src/`, `tests/`, `examples/` | Language-specific |
555
+
556
+ ##### Executing Essential Setup
557
+
558
+ When user confirms, execute these commands:
559
+
560
+ ```bash
561
+ # Git initialization
562
+ git init
563
+ git checkout -b main
564
+ git checkout -b develop
565
+
566
+ # Create .gitignore (language-appropriate)
567
+ # Create initial directory structure
568
+ # Initialize package manager
569
+
570
+ # Initial commit
571
+ git add .
572
+ git commit -m "Initial project setup
573
+
574
+ - Initialize git with main/develop branches
575
+ - Add .gitignore for {language}
576
+ - Create project structure
577
+ - Initialize {package manager}
578
+
579
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
580
+
581
+ # Return to develop for feature work
582
+ git checkout develop
583
+ ```
584
+
585
+ ##### Foundation PRD Offer
586
+
587
+ After essential setup completes (or if user skipped), offer comprehensive setup as a tracked PRD:
588
+
589
+ ```
590
+ Foundation is ready. Would you like to track additional setup as a PRD?
591
+
592
+ A Foundation PRD would include:
593
+ - CI/CD pipeline (GitHub Actions / GitLab CI)
594
+ - Linting & formatting (ESLint+Prettier / Ruff / etc.)
595
+ - Testing framework setup
596
+ - Environment configuration (.env patterns)
597
+ - Pre-commit hooks
598
+ - Documentation structure
599
+
600
+ This gets tracked in Flux so you can implement it systematically.
601
+ ```
602
+
603
+ Use AskUserQuestion:
604
+ - "Create Foundation PRD" - Creates PRD with [tag: foundation], then continues to feature PRD
605
+ - "Skip - continue to feature PRD" (Recommended for simple projects)
606
+
607
+ ##### Foundation PRD Template
608
+
609
+ If user wants a Foundation PRD, create it with this structure:
610
+
611
+ ```markdown
612
+ # Project Foundation
613
+
614
+ > **Tag**: foundation
615
+ > **Depends on**: None
616
+ > **Blocks**: All feature PRDs
617
+
618
+ ## Problem
619
+
620
+ New projects without proper tooling lead to inconsistent code quality,
621
+ manual testing overhead, and deployment friction.
622
+
623
+ ## Users
624
+
625
+ Developers working on this codebase.
626
+
627
+ ## Solution
628
+
629
+ Establish development infrastructure: CI/CD, code quality tools, testing
630
+ framework, and environment management.
631
+
632
+ ## Features
633
+
634
+ ### P0: Must Have
635
+
636
+ - **CI Pipeline**: Automated testing on push/PR
637
+ - **What**: GitHub Actions (or GitLab CI) workflow for test/lint/build
638
+ - **Not**: Deployment pipelines (separate PRD), complex matrix builds
639
+ - **Acceptance Criteria**:
640
+ - [ ] Push to any branch triggers CI
641
+ - [ ] PR cannot merge if CI fails
642
+ - [ ] CI runs tests, linting, and type checking
643
+
644
+ - **Code Quality**: Linting and formatting
645
+ - **What**: {ESLint+Prettier / Biome / Ruff / etc.} with pre-commit hooks
646
+ - **Not**: Custom rules beyond standard configs
647
+ - **Acceptance Criteria**:
648
+ - [ ] `{lint command}` runs without errors on codebase
649
+ - [ ] Pre-commit hook prevents committing unlinted code
650
+ - [ ] Editor integration documented in README
651
+
652
+ - **Testing Framework**: Test infrastructure
653
+ - **What**: {Jest/Vitest / Pytest / Go test} configured with coverage
654
+ - **Not**: E2E tests, integration test infrastructure
655
+ - **Acceptance Criteria**:
656
+ - [ ] `{test command}` runs and reports coverage
657
+ - [ ] Example test file demonstrates testing patterns
658
+ - [ ] Coverage threshold configured (suggest 70%)
659
+
660
+ ### P1: Should Have
661
+
662
+ - **Environment Config**: .env management
663
+ - .env.example with all required variables documented
664
+ - Validation on startup for required env vars
665
+
666
+ - **Documentation**: README and contributing guide
667
+ - Setup instructions
668
+ - Development workflow
669
+ - How to run tests
670
+
671
+ ### Out of Scope
672
+ - Deployment pipelines (separate DevOps PRD)
673
+ - Production infrastructure
674
+ - Monitoring and observability
675
+ ```
676
+
677
+ After creating Foundation PRD, continue to the user's feature PRD with proper dependency:
678
+ - Set feature PRD's `Depends on: {Foundation PRD ref}`
679
+
680
+ ---
681
+
682
+ #### Step 2.1: Codebase Exploration
683
+
500
684
  Spawn a research agent to:
501
685
  1. **Explore the codebase** (if exists):
502
686
  - Project structure and patterns