@flydocs/cli 0.5.0-beta.0

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 (134) hide show
  1. package/README.md +96 -0
  2. package/dist/cli.js +2666 -0
  3. package/package.json +32 -0
  4. package/template/.claude/CLAUDE.md +90 -0
  5. package/template/.claude/agents/README.md +19 -0
  6. package/template/.claude/agents/implementation-agent.md +29 -0
  7. package/template/.claude/agents/pm-agent.md +29 -0
  8. package/template/.claude/agents/research-agent.md +25 -0
  9. package/template/.claude/agents/review-agent.md +29 -0
  10. package/template/.claude/commands/activate.md +10 -0
  11. package/template/.claude/commands/attach.md +9 -0
  12. package/template/.claude/commands/block.md +10 -0
  13. package/template/.claude/commands/capture.md +10 -0
  14. package/template/.claude/commands/close.md +10 -0
  15. package/template/.claude/commands/flydocs-setup.md +598 -0
  16. package/template/.claude/commands/flydocs-update.md +27 -0
  17. package/template/.claude/commands/implement.md +10 -0
  18. package/template/.claude/commands/new-project.md +11 -0
  19. package/template/.claude/commands/project-update.md +10 -0
  20. package/template/.claude/commands/refine.md +10 -0
  21. package/template/.claude/commands/review.md +10 -0
  22. package/template/.claude/commands/start-session.md +10 -0
  23. package/template/.claude/commands/status.md +10 -0
  24. package/template/.claude/commands/validate.md +10 -0
  25. package/template/.claude/commands/wrap-session.md +10 -0
  26. package/template/.claude/settings.json +49 -0
  27. package/template/.claude/skills/README.md +293 -0
  28. package/template/.claude/skills/flydocs-cloud/SKILL.md +96 -0
  29. package/template/.claude/skills/flydocs-cloud/cursor-rule.mdc +50 -0
  30. package/template/.claude/skills/flydocs-cloud/scripts/assign.py +38 -0
  31. package/template/.claude/skills/flydocs-cloud/scripts/assign_cycle.py +44 -0
  32. package/template/.claude/skills/flydocs-cloud/scripts/assign_milestone.py +44 -0
  33. package/template/.claude/skills/flydocs-cloud/scripts/comment.py +39 -0
  34. package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +100 -0
  35. package/template/.claude/skills/flydocs-cloud/scripts/create_milestone.py +46 -0
  36. package/template/.claude/skills/flydocs-cloud/scripts/create_project.py +40 -0
  37. package/template/.claude/skills/flydocs-cloud/scripts/estimate.py +38 -0
  38. package/template/.claude/skills/flydocs-cloud/scripts/flydocs_api.py +277 -0
  39. package/template/.claude/skills/flydocs-cloud/scripts/get_issue.py +77 -0
  40. package/template/.claude/skills/flydocs-cloud/scripts/link.py +47 -0
  41. package/template/.claude/skills/flydocs-cloud/scripts/list_cycles.py +35 -0
  42. package/template/.claude/skills/flydocs-cloud/scripts/list_issues.py +105 -0
  43. package/template/.claude/skills/flydocs-cloud/scripts/list_milestones.py +40 -0
  44. package/template/.claude/skills/flydocs-cloud/scripts/list_projects.py +45 -0
  45. package/template/.claude/skills/flydocs-cloud/scripts/priority.py +38 -0
  46. package/template/.claude/skills/flydocs-cloud/scripts/project_update.py +59 -0
  47. package/template/.claude/skills/flydocs-cloud/scripts/transition.py +67 -0
  48. package/template/.claude/skills/flydocs-cloud/scripts/update_description.py +47 -0
  49. package/template/.claude/skills/flydocs-cloud/scripts/update_issue.py +111 -0
  50. package/template/.claude/skills/flydocs-context-graph/SKILL.md +87 -0
  51. package/template/.claude/skills/flydocs-context-graph/schema.md +78 -0
  52. package/template/.claude/skills/flydocs-context-graph/scripts/graph_build.py +299 -0
  53. package/template/.claude/skills/flydocs-context-graph/scripts/graph_context.py +338 -0
  54. package/template/.claude/skills/flydocs-context-graph/scripts/graph_query.py +191 -0
  55. package/template/.claude/skills/flydocs-context-graph/scripts/graph_session.py +161 -0
  56. package/template/.claude/skills/flydocs-context-graph/scripts/graph_update.py +194 -0
  57. package/template/.claude/skills/flydocs-context-graph/scripts/graph_utils.py +118 -0
  58. package/template/.claude/skills/flydocs-estimates/SKILL.md +384 -0
  59. package/template/.claude/skills/flydocs-estimates/references/provider-costs.md +152 -0
  60. package/template/.claude/skills/flydocs-figma/SKILL.md +377 -0
  61. package/template/.claude/skills/flydocs-figma/references/PROMPTING.md +108 -0
  62. package/template/.claude/skills/flydocs-figma/references/TROUBLESHOOTING.md +112 -0
  63. package/template/.claude/skills/flydocs-local/SKILL.md +103 -0
  64. package/template/.claude/skills/flydocs-local/cursor-rule.mdc +43 -0
  65. package/template/.claude/skills/flydocs-local/scripts/assign.py +20 -0
  66. package/template/.claude/skills/flydocs-local/scripts/comment.py +27 -0
  67. package/template/.claude/skills/flydocs-local/scripts/create_issue.py +44 -0
  68. package/template/.claude/skills/flydocs-local/scripts/estimate.py +37 -0
  69. package/template/.claude/skills/flydocs-local/scripts/flydocs_api.py +272 -0
  70. package/template/.claude/skills/flydocs-local/scripts/get_issue.py +20 -0
  71. package/template/.claude/skills/flydocs-local/scripts/link.py +41 -0
  72. package/template/.claude/skills/flydocs-local/scripts/list_issues.py +34 -0
  73. package/template/.claude/skills/flydocs-local/scripts/priority.py +37 -0
  74. package/template/.claude/skills/flydocs-local/scripts/project_update.py +67 -0
  75. package/template/.claude/skills/flydocs-local/scripts/status_summary.py +16 -0
  76. package/template/.claude/skills/flydocs-local/scripts/transition.py +24 -0
  77. package/template/.claude/skills/flydocs-local/scripts/update_description.py +35 -0
  78. package/template/.claude/skills/flydocs-local/scripts/update_issue.py +84 -0
  79. package/template/.claude/skills/flydocs-workflow/SKILL.md +85 -0
  80. package/template/.claude/skills/flydocs-workflow/cursor-rule.mdc +53 -0
  81. package/template/.claude/skills/flydocs-workflow/reference/comment-templates.md +131 -0
  82. package/template/.claude/skills/flydocs-workflow/reference/golden-rules.md +76 -0
  83. package/template/.claude/skills/flydocs-workflow/reference/priority-estimates.md +28 -0
  84. package/template/.claude/skills/flydocs-workflow/reference/status-workflow.md +50 -0
  85. package/template/.claude/skills/flydocs-workflow/session.md +128 -0
  86. package/template/.claude/skills/flydocs-workflow/stages/activate.md +46 -0
  87. package/template/.claude/skills/flydocs-workflow/stages/capture.md +50 -0
  88. package/template/.claude/skills/flydocs-workflow/stages/close.md +32 -0
  89. package/template/.claude/skills/flydocs-workflow/stages/implement.md +124 -0
  90. package/template/.claude/skills/flydocs-workflow/stages/refine.md +51 -0
  91. package/template/.claude/skills/flydocs-workflow/stages/review.md +86 -0
  92. package/template/.claude/skills/flydocs-workflow/stages/validate.md +90 -0
  93. package/template/.claude/skills/flydocs-workflow/templates/bug.md +95 -0
  94. package/template/.claude/skills/flydocs-workflow/templates/chore.md +75 -0
  95. package/template/.claude/skills/flydocs-workflow/templates/feature.md +93 -0
  96. package/template/.claude/skills/flydocs-workflow/templates/idea.md +84 -0
  97. package/template/.cursor/agents/implementation-agent.md +28 -0
  98. package/template/.cursor/agents/pm-agent.md +27 -0
  99. package/template/.cursor/agents/research-agent.md +23 -0
  100. package/template/.cursor/agents/review-agent.md +27 -0
  101. package/template/.cursor/hooks.json +29 -0
  102. package/template/.cursor/mcp.json +16 -0
  103. package/template/.env.example +44 -0
  104. package/template/.flydocs/config.json +104 -0
  105. package/template/.flydocs/hooks/auto-approve.py +71 -0
  106. package/template/.flydocs/hooks/post-edit.py +72 -0
  107. package/template/.flydocs/hooks/prefer-scripts.py +89 -0
  108. package/template/.flydocs/hooks/prompt-submit.py +277 -0
  109. package/template/.flydocs/scripts/generate_manifest.py +287 -0
  110. package/template/.flydocs/scripts/skill_manager.py +541 -0
  111. package/template/.flydocs/templates/README.md +46 -0
  112. package/template/.flydocs/templates/bug.md +166 -0
  113. package/template/.flydocs/templates/chore.md +110 -0
  114. package/template/.flydocs/templates/design-system/README.md +27 -0
  115. package/template/.flydocs/templates/design-system/component-patterns.md +92 -0
  116. package/template/.flydocs/templates/design-system/token-mapping.md +168 -0
  117. package/template/.flydocs/templates/feature.md +173 -0
  118. package/template/.flydocs/templates/idea.md +122 -0
  119. package/template/.flydocs/templates/instructions.md +228 -0
  120. package/template/.flydocs/templates/quick-capture.md +35 -0
  121. package/template/.flydocs/templates/scripts/check-design-system.template.mjs +179 -0
  122. package/template/.flydocs/version +1 -0
  123. package/template/AGENTS.md +95 -0
  124. package/template/CHANGELOG.md +271 -0
  125. package/template/flydocs/README.md +186 -0
  126. package/template/flydocs/context/project.md +51 -0
  127. package/template/flydocs/design-system/README.md +126 -0
  128. package/template/flydocs/design-system/component-patterns.md +173 -0
  129. package/template/flydocs/design-system/token-mapping.md +114 -0
  130. package/template/flydocs/knowledge/INDEX.md +100 -0
  131. package/template/flydocs/knowledge/README.md +62 -0
  132. package/template/flydocs/knowledge/product/personas.md +79 -0
  133. package/template/flydocs/knowledge/product/user-flows.md +88 -0
  134. package/template/manifest.json +221 -0
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env python3
2
+ """Transition an issue to a new status."""
3
+
4
+ import json
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ sys.path.insert(0, str(Path(__file__).parent))
9
+ from flydocs_api import transition, STATUSES
10
+
11
+ if len(sys.argv) < 4:
12
+ print("Usage: transition.py <ref> <STATUS> <comment>", file=sys.stderr)
13
+ sys.exit(1)
14
+
15
+ try:
16
+ ref, status, comment = sys.argv[1], sys.argv[2].upper(), sys.argv[3]
17
+ if status not in STATUSES:
18
+ print(f"Invalid status: {status}. Valid: {', '.join(sorted(STATUSES.keys()))}", file=sys.stderr)
19
+ sys.exit(1)
20
+ result = transition(ref, status, comment)
21
+ print(json.dumps(result))
22
+ except Exception as e:
23
+ print(str(e), file=sys.stderr)
24
+ sys.exit(1)
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env python3
2
+ """Update an issue's description."""
3
+
4
+ import argparse
5
+ import json
6
+ import sys
7
+ from pathlib import Path
8
+
9
+ sys.path.insert(0, str(Path(__file__).parent))
10
+ from flydocs_api import update_description
11
+
12
+ parser = argparse.ArgumentParser(description="Update issue description")
13
+ parser.add_argument("ref")
14
+ parser.add_argument("--text", default="")
15
+ parser.add_argument("--file", default="", dest="filepath")
16
+
17
+ try:
18
+ args = parser.parse_args()
19
+ text = args.text
20
+ if args.filepath:
21
+ try:
22
+ text = Path(args.filepath).read_text()
23
+ except FileNotFoundError:
24
+ print(f"File not found: {args.filepath}", file=sys.stderr)
25
+ sys.exit(1)
26
+ if not text and not sys.stdin.isatty():
27
+ text = sys.stdin.read().strip()
28
+ if not text:
29
+ print("Provide --text, --file, or pipe via stdin", file=sys.stderr)
30
+ sys.exit(1)
31
+ result = update_description(args.ref, text)
32
+ print(json.dumps(result))
33
+ except Exception as e:
34
+ print(str(e), file=sys.stderr)
35
+ sys.exit(1)
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env python3
2
+ """Bulk update an issue — set multiple fields in a single operation."""
3
+
4
+ import argparse
5
+ import json
6
+ import sys
7
+ from datetime import datetime
8
+ from pathlib import Path
9
+
10
+ sys.path.insert(0, str(Path(__file__).parent))
11
+ from flydocs_api import _find_issue, _parse_issue, _write_issue, add_comment
12
+ from flydocs_api import transition as do_transition
13
+
14
+ parser = argparse.ArgumentParser(description="Update issue fields")
15
+ parser.add_argument("ref", help="Issue reference (e.g., FD-001)")
16
+ parser.add_argument("--title", default=None)
17
+ parser.add_argument("--priority", type=int, choices=range(5), default=None)
18
+ parser.add_argument("--estimate", type=int, choices=range(1, 6), default=None)
19
+ parser.add_argument("--assignee", default=None)
20
+ parser.add_argument("--state", default=None)
21
+ parser.add_argument("--description", default=None)
22
+ parser.add_argument("--description-file", default=None)
23
+ parser.add_argument("--comment", default=None)
24
+
25
+ try:
26
+ args = parser.parse_args()
27
+
28
+ updated_fields = []
29
+
30
+ # Handle state transition first (moves the file between directories)
31
+ if args.state:
32
+ do_transition(args.ref, args.state.upper(), f"Status changed to {args.state.upper()}")
33
+ updated_fields.append("state")
34
+
35
+ # Handle comment next (appends to file via add_comment)
36
+ if args.comment:
37
+ add_comment(args.ref, args.comment)
38
+ updated_fields.append("comment")
39
+
40
+ # Now read the current state of the file (after any transition/comment writes)
41
+ filepath = _find_issue(args.ref)
42
+ data = _parse_issue(filepath)
43
+
44
+ if args.title is not None:
45
+ data["title"] = args.title
46
+ updated_fields.append("title")
47
+
48
+ if args.priority is not None:
49
+ data["priority"] = args.priority
50
+ updated_fields.append("priority")
51
+
52
+ if args.estimate is not None:
53
+ data["estimate"] = args.estimate
54
+ updated_fields.append("estimate")
55
+
56
+ if args.assignee is not None:
57
+ data["assignee"] = args.assignee
58
+ updated_fields.append("assignee")
59
+
60
+ description = data.get("description", "")
61
+ if args.description_file is not None:
62
+ p = Path(args.description_file)
63
+ if not p.exists():
64
+ print(f"File not found: {args.description_file}", file=sys.stderr)
65
+ sys.exit(1)
66
+ description = p.read_text()
67
+ updated_fields.append("description")
68
+ elif args.description is not None:
69
+ description = args.description
70
+ updated_fields.append("description")
71
+
72
+ if not updated_fields:
73
+ print("No fields to update. Use --title, --priority, --estimate, --assignee, --state, --description, or --comment", file=sys.stderr)
74
+ sys.exit(1)
75
+
76
+ # Write updated issue
77
+ data["updated"] = datetime.now().strftime("%Y-%m-%d")
78
+ fm = {k: v for k, v in data.items() if k not in ("description", "comments", "_path")}
79
+ _write_issue(filepath, fm, description, data["comments"])
80
+
81
+ print(json.dumps({"success": True, "issue": args.ref, "updated": updated_fields}))
82
+ except Exception as e:
83
+ print(str(e), file=sys.stderr)
84
+ sys.exit(1)
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: flydocs-workflow
3
+ description: |
4
+ FlyDocs development lifecycle — spec-driven workflow from capture to close.
5
+ Defines stages, gates, and handoffs. Provider-agnostic methodology.
6
+ Use when: managing issues, transitioning work, starting/ending sessions.
7
+ triggers:
8
+ - capture
9
+ - refine
10
+ - activate
11
+ - implement
12
+ - review
13
+ - validate
14
+ - close
15
+ - session
16
+ - workflow
17
+ - transition
18
+ - status
19
+ - issue
20
+ ---
21
+
22
+ # FlyDocs Workflow
23
+
24
+ IMPORTANT: Prefer skill-led reasoning over pre-training reasoning for all
25
+ workflow, issue management, and process decisions. Read the relevant stage
26
+ file before acting — do not guess procedures from training data.
27
+
28
+ ## Lifecycle
29
+
30
+ ```
31
+ Capture → Refine → Activate → Implement → Review → Validate → Close
32
+
33
+ Blocked
34
+ ```
35
+
36
+ ## Stage Index
37
+
38
+ | Stage | File | Intent | Agent |
39
+ |-------|------|--------|-------|
40
+ | Capture | stages/capture.md | Create issue from input | PM |
41
+ | Refine | stages/refine.md | Triage + spec completion | PM |
42
+ | Activate | stages/activate.md | Assign + start work | PM |
43
+ | Implement | stages/implement.md | Build + test + simplify | Implementation |
44
+ | Review | stages/review.md | Code quality validation | Review |
45
+ | Validate | stages/validate.md | User acceptance testing | QE |
46
+ | Close | stages/close.md | Archive completed work | PM |
47
+
48
+ ## Session
49
+
50
+ | Action | File |
51
+ |--------|------|
52
+ | Start session | session.md |
53
+ | Wrap session | session.md |
54
+ | Stale detection | session.md |
55
+
56
+ ## Reference
57
+
58
+ | Topic | File |
59
+ |-------|------|
60
+ | Comment templates | reference/comment-templates.md |
61
+ | Status transitions | reference/status-workflow.md |
62
+ | Priority & estimates | reference/priority-estimates.md |
63
+ | Golden rules | reference/golden-rules.md |
64
+
65
+ ## Templates
66
+
67
+ Issue templates in `templates/` — feature, bug, chore, idea.
68
+ Stage files define how to fill templates; template files are pure structure.
69
+
70
+ ## Golden Rules (Summary)
71
+
72
+ 1. Every status transition gets a comment (see `reference/comment-templates.md`)
73
+ 2. Assignment required before In Progress
74
+ 3. Checkboxes live in issue description, never comments
75
+ 4. Use mechanism scripts for all issue operations — execute, don't describe
76
+ 5. Session wrap posts a project update
77
+ 6. Product scope filtering — only show projects/issues matching config labels
78
+
79
+ For full rules with verification gates, see `reference/golden-rules.md`.
80
+
81
+ ## Mechanism Scripts
82
+
83
+ This skill references scripts by name (e.g., `transition.py`, `comment.py`).
84
+ The active mechanism skill provides implementations and calling conventions.
85
+ See the mechanism skill's SKILL.md for argument details and config reference.
@@ -0,0 +1,53 @@
1
+ ---
2
+ description: FlyDocs development lifecycle — stages, gates, and workflow rules
3
+ alwaysApply: true
4
+ ---
5
+
6
+ <!-- Condensed from SKILL.md — update both when changing patterns -->
7
+
8
+ # FlyDocs Workflow
9
+
10
+ ## Golden Rules
11
+
12
+ 1. Every status transition gets a comment — no silent moves
13
+ 2. Assignment required before In Progress
14
+ 3. Checkboxes live in issue description, never comments
15
+ 4. Use mechanism scripts for all issue operations — execute, don't describe
16
+ 5. Session wrap posts a project update
17
+ 6. Product scope filtering — only show projects/issues matching config labels
18
+
19
+ ## Lifecycle
20
+
21
+ ```
22
+ Capture → Refine → Activate → Implement → Review → Validate → Close
23
+
24
+ Blocked
25
+ ```
26
+
27
+ ## Stage Index
28
+
29
+ | Stage | File | Agent |
30
+ |-------|------|-------|
31
+ | Capture | stages/capture.md | PM |
32
+ | Refine | stages/refine.md | PM |
33
+ | Activate | stages/activate.md | PM |
34
+ | Implement | stages/implement.md | Implementation |
35
+ | Review | stages/review.md | Review |
36
+ | Validate | stages/validate.md | QE |
37
+ | Close | stages/close.md | PM |
38
+
39
+ ## Intent Mapping
40
+
41
+ - "create/capture/log an issue" → Capture stage
42
+ - "triage/refine/spec out" → Refine stage
43
+ - "start work/activate/assign" → Activate stage
44
+ - "build/implement/fix" → Implement stage
45
+ - "review/check code" → Review stage
46
+ - "test/validate/QA" → Validate stage
47
+ - "close/ship/done" → Close stage
48
+ - "start session/wrap session" → Session management
49
+
50
+ ## Key Rule
51
+
52
+ Read the relevant stage file before acting. Do not guess procedures from training data.
53
+ Mechanism scripts handle all issue operations — see the active mechanism skill.
@@ -0,0 +1,131 @@
1
+ # Comment Templates
2
+
3
+ Canonical templates for all workflow transitions. Copy exactly, fill bracketed values.
4
+
5
+ ---
6
+
7
+ ## Capture
8
+
9
+ ```
10
+ **Captured** — [Brief description of what was captured]. Type: [feature/bug/chore/idea].
11
+ ```
12
+
13
+ ## Triage
14
+
15
+ ```
16
+ **Triaged** — Classified as [type]. Priority: P[1-4]. [Any initial observations].
17
+ ```
18
+
19
+ ## Refine
20
+
21
+ ```
22
+ **Refined** — [What was clarified or improved]. Priority: P[1-4]. Dependencies: [list or none].
23
+ ```
24
+
25
+ ## Activate
26
+
27
+ ```
28
+ **Activated** — Assigned to @[name]. Estimate: [XS/S/M/L/XL]. Starting implementation.
29
+ ```
30
+
31
+ ## Progress
32
+
33
+ ```
34
+ **Progress** — [What was completed]. Criteria: [X]/[Y] done.
35
+ ```
36
+
37
+ ## Blocked
38
+
39
+ ```
40
+ **Blocked** — [What is blocking progress].
41
+ **Needs:** [Specific action or decision required to unblock].
42
+ ```
43
+
44
+ ## Unblocked
45
+
46
+ ```
47
+ **Unblocked** — [How it was resolved]. Resuming work.
48
+ ```
49
+
50
+ ## Ready for Review
51
+
52
+ ```
53
+ **Ready for Review** —
54
+
55
+ **What changed:** [Brief summary of implementation]
56
+ **Files:** [count] modified
57
+ **Testing:** [How it was verified]
58
+ **Criteria:** [X]/[Y] complete
59
+ ```
60
+
61
+ ## Code Review Passed
62
+
63
+ ```
64
+ **Code Review Passed** — Implementation meets standards. Moving to QA.
65
+ ```
66
+
67
+ ## Code Review: Changes Needed
68
+
69
+ ```
70
+ **Code Review: Changes Needed** —
71
+
72
+ 1. [Issue and suggested fix]
73
+ 2. [Issue and suggested fix]
74
+
75
+ Returning to implementation.
76
+ ```
77
+
78
+ ## QE Approved
79
+
80
+ ```
81
+ **QE Approved** — Acceptance criteria verified by user. Ready for close.
82
+ ```
83
+
84
+ ## QE Issues Found
85
+
86
+ ```
87
+ **QE: Issues Found** —
88
+
89
+ 1. [What failed or didn't meet expectations]
90
+ 2. [What failed or didn't meet expectations]
91
+
92
+ Returning to implementation.
93
+ ```
94
+
95
+ ## QE Partial
96
+
97
+ ```
98
+ **QE Partial** —
99
+
100
+ Passed:
101
+ - [Criterion that works]
102
+
103
+ Issues:
104
+ - [What needs fixing]
105
+
106
+ Returning to implementation.
107
+ ```
108
+
109
+ ## Close
110
+
111
+ ```
112
+ **Closed** — [One-line summary of what was delivered].
113
+ ```
114
+
115
+ ## Archive
116
+
117
+ ```
118
+ **Archived** — Deferring. Reason: [why not now].
119
+ ```
120
+
121
+ ## Cancel
122
+
123
+ ```
124
+ **Canceled** — Not pursuing. Reason: [why].
125
+ ```
126
+
127
+ ## Duplicate
128
+
129
+ ```
130
+ **Duplicate** — See [ISSUE-ID].
131
+ ```
@@ -0,0 +1,76 @@
1
+ # Golden Rules
2
+
3
+ Non-negotiable rules enforced across all workflow stages.
4
+
5
+ ---
6
+
7
+ ## The Rules
8
+
9
+ ### 1. Every Status Transition Gets a Comment
10
+
11
+ No silent state changes. Use templates from `reference/comment-templates.md`.
12
+ Mechanism scripts enforce this — `transition.py` requires a comment argument.
13
+
14
+ ### 2. Assignment Before In Progress
15
+
16
+ An issue cannot move to Implementing without an assignee. This is a hard gate.
17
+ The Activate stage enforces: assign → metadata → transition. Never skip assignment.
18
+
19
+ ### 3. Checkboxes in Description, Never Comments
20
+
21
+ Acceptance criteria progress is tracked by checking boxes in the issue description.
22
+ Never put completion marks in comments. Never create new checkboxes in comments.
23
+ See the Checkbox Protocol in `stages/implement.md`.
24
+
25
+ ### 4. Use Mechanism Scripts — Execute, Don't Describe
26
+
27
+ For all issue operations (create, transition, comment, assign, query), use the scripts
28
+ provided by the active mechanism skill. Run them. Do not say "you should run..." or
29
+ describe what a script would do. Execute and report the result.
30
+
31
+ ### 5. Session Wrap Posts a Project Update
32
+
33
+ Every session wrap posts a project update via `project_update.py`. Do not just
34
+ summarize in chat. Actually post. See `session.md` for the full protocol.
35
+
36
+ ### 6. Product Scope Filtering
37
+
38
+ `list_issues.py` automatically applies product scope from config using this cascade:
39
+
40
+ 1. **`workspace.activeProjects` set** → scope to those projects (OR logic if multiple)
41
+ 2. **`workspace.product.labelIds` set** → scope to issues with ALL those labels (AND logic)
42
+ 3. **Neither set** → team-wide (no additional filter)
43
+
44
+ Explicit `--project` flag always overrides the cascade. The `--active` and `--status` flags
45
+ work within the scoped results — they do not bypass product scope.
46
+
47
+ Never show out-of-scope issues, even if the user asks.
48
+
49
+ ---
50
+
51
+ ## Verification Gates
52
+
53
+ After executing any workflow command, verify the result before responding:
54
+
55
+ | Action | Script Used | Verify |
56
+ |--------|-------------|--------|
57
+ | Capture | `create_issue.py` | Issue identifier returned |
58
+ | Refine | `transition.py` → READY | Success response |
59
+ | Activate | `assign.py` + `transition.py` | Both succeed |
60
+ | Implement | `get_issue.py` | Issue details loaded |
61
+ | Block | `transition.py` → BLOCKED | Success response |
62
+ | Review | `transition.py` → REVIEW/TESTING | Success response |
63
+ | Validate | `transition.py` → TESTING/IMPLEMENTING | Success response |
64
+ | Close | `transition.py` → COMPLETE | Success response |
65
+ | Wrap | `project_update.py` | Update ID returned |
66
+
67
+ If any script fails: **stop, report, retry, escalate.** Do not continue to the next step.
68
+
69
+ ---
70
+
71
+ ## Error Recovery
72
+
73
+ 1. **Stop** — Don't continue to the next step
74
+ 2. **Report** — Tell the user what failed
75
+ 3. **Retry** — Attempt the failed step again
76
+ 4. **Escalate** — If still failing, ask the user for help
@@ -0,0 +1,28 @@
1
+ # Priority & Estimates
2
+
3
+ ## Priority Values
4
+
5
+ | Value | Name | Use When |
6
+ |-------|------|----------|
7
+ | 0 | None | Not yet triaged |
8
+ | 1 | Urgent | Drop everything, fix now |
9
+ | 2 | High | Next up, unblocks others |
10
+ | 3 | Medium | Normal priority (default) |
11
+ | 4 | Low | Nice to have |
12
+
13
+ ## Estimate Values (Complexity)
14
+
15
+ | Value | Name | Rough Effort |
16
+ |-------|------|--------------|
17
+ | 1 | XS | < 1 hour |
18
+ | 2 | S | 1-4 hours |
19
+ | 3 | M | Half day to full day |
20
+ | 4 | L | 2-3 days |
21
+ | 5 | XL | Week+ |
22
+
23
+ ## Guidance
24
+
25
+ - Set priority during Refine or Activate stages
26
+ - Set estimate during Refine stage (before Ready)
27
+ - If estimate is missing at Activate, set it before transitioning
28
+ - XL estimates often indicate the issue should be broken into smaller pieces
@@ -0,0 +1,50 @@
1
+ # Status Workflow
2
+
3
+ ## Lifecycle Diagram
4
+
5
+ ```
6
+ BACKLOG ──→ READY ──→ IMPLEMENTING ──→ REVIEW ──→ TESTING ──→ COMPLETE
7
+ ↕ ↕ ↕
8
+ BLOCKED ◄──────────┘──────────┘
9
+ ```
10
+
11
+ ## State Meanings
12
+
13
+ | FlyDocs State | Intent | Assignment Required |
14
+ |---------------|--------|---------------------|
15
+ | BACKLOG | Raw capture, not yet refined | No |
16
+ | READY | Refined spec, ready to pick up | No |
17
+ | IMPLEMENTING | Active work in progress | **Yes** |
18
+ | BLOCKED | Cannot proceed, waiting on resolution | Yes |
19
+ | REVIEW | Code complete, awaiting quality review | Yes |
20
+ | TESTING | Review passed, awaiting user acceptance | Yes |
21
+ | COMPLETE | All stages passed, work delivered | Yes |
22
+
23
+ ## Valid Transitions
24
+
25
+ | From | To | Trigger |
26
+ |------|----|---------|
27
+ | BACKLOG | READY | Refine stage completes |
28
+ | READY | IMPLEMENTING | Activate stage completes |
29
+ | IMPLEMENTING | REVIEW | Implement stage completes |
30
+ | IMPLEMENTING | BLOCKED | Blocker identified |
31
+ | BLOCKED | IMPLEMENTING | Blocker resolved |
32
+ | REVIEW | TESTING | Code review passes |
33
+ | REVIEW | IMPLEMENTING | Code review finds issues |
34
+ | TESTING | COMPLETE | QE approves, PM closes |
35
+ | TESTING | IMPLEMENTING | QE finds issues |
36
+
37
+ ## Terminal States
38
+
39
+ | State | When |
40
+ |-------|------|
41
+ | COMPLETE (Done) | Work delivered and verified |
42
+ | ARCHIVED | Deferred — may return later |
43
+ | CANCELED | Not pursuing |
44
+ | DUPLICATE | See referenced issue |
45
+
46
+ ## Provider Mapping
47
+
48
+ FlyDocs states are provider-agnostic. The mechanism skill maps them to provider-specific
49
+ state names via `statusMapping` in `.flydocs/config.json`. The workflow never references
50
+ provider-specific names directly.
@@ -0,0 +1,128 @@
1
+ # Session Management
2
+
3
+ ## Session Start
4
+
5
+ When a conversation begins or the user returns after a gap:
6
+
7
+ 1. **Fetch all product issues in one call** — Run `list_issues.py --active --limit 100`.
8
+ This is auto-scoped by the product cascade: `activeProjects` → `product.labelIds` → team-wide.
9
+ Issues outside the product scope are never shown.
10
+
11
+ 2. **Identify the active project** — Read `workspace.activeProjects` from config.
12
+ Separate issues into two buckets:
13
+ - **Active project issues** — issues whose `projectId` matches an active project
14
+ - **Other product issues** — issues in the product scope but in a different project
15
+
16
+ 3. **Group active project issues by milestone** — Use the `milestone` and `milestoneSortOrder`
17
+ fields returned by the script. Sort milestones by `milestoneSortOrder` (lowest first = earliest).
18
+ Within each milestone, group by status.
19
+
20
+ 4. **Identify the current milestone** — The first milestone (by sort order) that still has
21
+ open issues. This is where work should focus.
22
+
23
+ 5. **Present the dashboard:**
24
+
25
+ ```
26
+ Welcome back! [Product Name] status:
27
+
28
+ Active project: [Project Name]
29
+ Current milestone: [Milestone Name] — [X of Y issues open]
30
+
31
+ ## [Current Milestone Name]
32
+ - [N] in progress — [list identifiers]
33
+ - [N] blocked — [list identifiers, flag for attention]
34
+ - [N] in review — [list identifiers]
35
+ - [N] ready — [list identifiers, ordered by priority]
36
+
37
+ ## [Next Milestone Name] (upcoming)
38
+ - [N] total issues (brief summary only)
39
+
40
+ ## Unassigned to milestone
41
+ - [issues not in any milestone, if any]
42
+
43
+ Suggested starting point: [ISSUE-ID] — [reason: highest priority in current milestone / unblocks others / due soon]
44
+ ```
45
+
46
+ 6. **Suggest where to start** — Use this priority cascade:
47
+ - Blocked issues that need unblocking (always surface first)
48
+ - In-progress issues (continue existing work)
49
+ - Due date approaching (within 7 days)
50
+ - Highest priority in the current milestone
51
+ - Issues that unblock downstream milestones
52
+
53
+ 7. **Surface other product issues briefly** — If there are issues in the product scope
54
+ but outside the active project, mention the count with a one-line summary:
55
+ ```
56
+ Also in [Product Name]: [N] issues across other projects (use --all to see)
57
+ ```
58
+
59
+ 8. **Check for stale issues** — Flag issues exceeding staleness thresholds (see below).
60
+
61
+ **Important:** Do NOT make separate API calls per status or per milestone. One call returns
62
+ all issues with their status and milestone fields — group them in your response.
63
+
64
+ **Important:** Never show issues outside the product scope. The script handles this
65
+ automatically via the config cascade.
66
+
67
+ ## Session Wrap
68
+
69
+ When the user indicates they're done for the session:
70
+
71
+ 1. **Gather session data** — What was completed, what's in progress, what's blocked.
72
+ 2. **Compose summary** using the template below.
73
+ 3. **Determine health status** — See health table.
74
+ 4. **Post project update** — `project_update.py` with health and summary body.
75
+ 5. **Record session in context graph** — Call `graph_session.py` with summary and issues worked on:
76
+ ```
77
+ python3 .claude/skills/flydocs-context-graph/scripts/graph_session.py \
78
+ --summary "Brief summary of session outcomes" \
79
+ --issue ISSUE-ID [--issue ISSUE-ID2] \
80
+ [--decision NNN]
81
+ ```
82
+ This creates a session node for cross-session continuity. Skip silently if the script is not installed.
83
+ 6. **Verify** — Confirm the project update was posted (update ID returned).
84
+ 7. **Ask about uncommitted changes** — If git shows uncommitted work, offer to commit.
85
+
86
+ Do not just summarize in chat. Actually post the update. Do not skip if the user seems in a hurry.
87
+
88
+ ### Summary Template
89
+
90
+ ```
91
+ **Session Summary — [YYYY-MM-DD]**
92
+
93
+ **Completed:**
94
+ - [ISSUE-ID] — [What was done]
95
+
96
+ **In Progress:**
97
+ - [ISSUE-ID] — [Current state, what's next]
98
+
99
+ **Next Up:**
100
+ - [ISSUE-ID] — [Why this is next]
101
+
102
+ **Blockers:** [None / List with details]
103
+ ```
104
+
105
+ ### Health Status
106
+
107
+ | Status | When to Use |
108
+ |--------|-------------|
109
+ | onTrack | Progress made, no blockers |
110
+ | atRisk | Minor delays, attention needed |
111
+ | offTrack | Major blockers, behind schedule |
112
+
113
+ ### Wrap Detection Phrases
114
+
115
+ Offer session wrap when the user says:
116
+ - "I'm done for today" / "wrapping up" / "that's it for now"
117
+ - "save progress" / "end of day" / "stopping here"
118
+
119
+ ## Stale Issue Awareness
120
+
121
+ Proactively surface issues that may be stuck:
122
+
123
+ | State | Threshold | Action |
124
+ |-------|-----------|--------|
125
+ | Implementing | > 7 days without activity | Warn |
126
+ | Review | > 3 days without activity | Warn |
127
+ | Testing/QA | > 3 days without activity | Warn |
128
+ | Blocked | Any | Always surface |