@flydocs/cli 0.6.0-alpha.1 → 0.6.0-alpha.10
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 +504 -254
- package/package.json +1 -1
- package/template/.claude/CLAUDE.md +11 -9
- package/template/.claude/commands/flydocs-setup.md +114 -17
- package/template/.claude/commands/flydocs-upgrade.md +27 -15
- package/template/.claude/commands/knowledge.md +61 -0
- package/template/.claude/skills/flydocs-cloud/SKILL.md +44 -31
- package/template/.claude/skills/flydocs-cloud/scripts/assign.py +10 -4
- package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +22 -2
- package/template/.claude/skills/flydocs-cloud/scripts/create_team.py +39 -0
- package/template/.claude/skills/flydocs-cloud/scripts/delete_milestone.py +21 -0
- package/template/.claude/skills/flydocs-cloud/scripts/estimate.py +9 -5
- package/template/.claude/skills/flydocs-cloud/scripts/flydocs_api.py +11 -0
- package/template/.claude/skills/flydocs-cloud/scripts/get_estimate_scale.py +23 -0
- package/template/.claude/skills/flydocs-cloud/scripts/list_providers.py +19 -0
- 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/refresh_labels.py +87 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_identity.py +38 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_preferences.py +49 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_provider.py +46 -0
- 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/.claude/skills/flydocs-cloud/scripts/update_issue.py +22 -4
- package/template/.claude/skills/flydocs-cloud/scripts/update_milestone.py +42 -0
- package/template/.claude/skills/flydocs-cloud/scripts/validate_setup.py +139 -0
- package/template/.claude/skills/flydocs-local/SKILL.md +1 -1
- package/template/.claude/skills/flydocs-local/scripts/assign.py +13 -4
- package/template/.claude/skills/flydocs-local/scripts/flydocs_api.py +5 -2
- package/template/.claude/skills/flydocs-workflow/SKILL.md +23 -18
- package/template/.claude/skills/flydocs-workflow/reference/comment-templates.md +1 -0
- package/template/.claude/skills/flydocs-workflow/reference/pr-workflow.md +105 -0
- package/template/.claude/skills/flydocs-workflow/reference/priority-estimates.md +37 -15
- package/template/.claude/skills/flydocs-workflow/session.md +24 -16
- package/template/.claude/skills/flydocs-workflow/stages/capture.md +8 -3
- package/template/.claude/skills/flydocs-workflow/stages/close.md +4 -3
- package/template/.claude/skills/flydocs-workflow/stages/implement.md +28 -4
- package/template/.claude/skills/flydocs-workflow/stages/refine.md +20 -4
- package/template/.claude/skills/flydocs-workflow/stages/review.md +14 -2
- package/template/.flydocs/config.json +4 -18
- package/template/.flydocs/hooks/prompt-submit.py +27 -4
- package/template/.flydocs/version +1 -1
- package/template/AGENTS.md +8 -8
- package/template/CHANGELOG.md +39 -0
- 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 +8 -2
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Validate workspace setup via the FlyDocs Relay API.
|
|
3
|
+
|
|
4
|
+
Read-only validation that checks provider, team, status mapping, label config,
|
|
5
|
+
and user identity. Writes result to .flydocs/validation-cache.json and sets
|
|
6
|
+
setupComplete: true in config when all required checks pass.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
import sys
|
|
11
|
+
from datetime import datetime, timezone
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
sys.path.insert(0, str(Path(__file__).parent))
|
|
15
|
+
from flydocs_api import get_client, output_json, fail
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Required checks — failure blocks setup completion
|
|
19
|
+
REQUIRED_CHECKS = {
|
|
20
|
+
"provider": {
|
|
21
|
+
"test": lambda cfg: cfg.get("provider", {}).get("connected") is True,
|
|
22
|
+
"message": "No provider connected — configure in FlyDocs dashboard",
|
|
23
|
+
},
|
|
24
|
+
"team": {
|
|
25
|
+
"test": lambda cfg: bool(cfg.get("team", {}).get("id")),
|
|
26
|
+
"message": "No team selected — configure in FlyDocs dashboard",
|
|
27
|
+
},
|
|
28
|
+
"statusMapping": {
|
|
29
|
+
"test": lambda cfg: cfg.get("statusMapping", {}).get("configured") is True,
|
|
30
|
+
"message": "Status mapping not configured — configure in FlyDocs dashboard",
|
|
31
|
+
},
|
|
32
|
+
"labelConfig": {
|
|
33
|
+
"test": lambda cfg: cfg.get("labelConfig", {}).get("configured") is True,
|
|
34
|
+
"message": "Label config not configured — configure in FlyDocs dashboard",
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
# Optional checks — warn but don't block
|
|
39
|
+
OPTIONAL_CHECKS = {
|
|
40
|
+
"userIdentity": {
|
|
41
|
+
"test": lambda cfg: cfg.get("userIdentity", {}).get("linked") is True,
|
|
42
|
+
"message": (
|
|
43
|
+
"Provider identity not linked — run: "
|
|
44
|
+
"python3 .claude/skills/flydocs-cloud/scripts/set_identity.py <provider> <id>"
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
"repos": {
|
|
48
|
+
"test": lambda cfg: (cfg.get("repos", {}).get("count", 0) or 0) > 0,
|
|
49
|
+
"message": "No repos linked — link a repo in FlyDocs dashboard settings",
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def main() -> None:
|
|
55
|
+
client = get_client()
|
|
56
|
+
|
|
57
|
+
# Fetch workspace config from relay
|
|
58
|
+
config_response = client.get("/auth/config")
|
|
59
|
+
|
|
60
|
+
# Run checks
|
|
61
|
+
checks: dict[str, bool] = {}
|
|
62
|
+
valid: list[str] = []
|
|
63
|
+
missing: list[dict[str, str]] = []
|
|
64
|
+
warnings: list[dict[str, str]] = []
|
|
65
|
+
|
|
66
|
+
for name, check in REQUIRED_CHECKS.items():
|
|
67
|
+
passed = check["test"](config_response)
|
|
68
|
+
checks[name] = passed
|
|
69
|
+
if passed:
|
|
70
|
+
valid.append(name)
|
|
71
|
+
else:
|
|
72
|
+
missing.append({"check": name, "action": check["message"]})
|
|
73
|
+
|
|
74
|
+
for name, check in OPTIONAL_CHECKS.items():
|
|
75
|
+
passed = check["test"](config_response)
|
|
76
|
+
checks[name] = passed
|
|
77
|
+
if passed:
|
|
78
|
+
valid.append(name)
|
|
79
|
+
else:
|
|
80
|
+
warnings.append({"check": name, "action": check["message"]})
|
|
81
|
+
|
|
82
|
+
all_required_pass = len(missing) == 0
|
|
83
|
+
|
|
84
|
+
# Build workspace info from response
|
|
85
|
+
workspace = config_response.get("workspace", {})
|
|
86
|
+
provider_type = config_response.get("provider", {}).get("type", "unknown")
|
|
87
|
+
|
|
88
|
+
# Write validation cache
|
|
89
|
+
cache = {
|
|
90
|
+
"timestamp": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
|
|
91
|
+
"valid": all_required_pass,
|
|
92
|
+
"workspace": {
|
|
93
|
+
"id": workspace.get("id", ""),
|
|
94
|
+
"name": workspace.get("name", ""),
|
|
95
|
+
},
|
|
96
|
+
"provider": provider_type,
|
|
97
|
+
"checks": checks,
|
|
98
|
+
"missing": [m["check"] for m in missing],
|
|
99
|
+
"warnings": [w["check"] for w in warnings],
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
cache_path = client.project_root / ".flydocs" / "validation-cache.json"
|
|
103
|
+
cache_path.parent.mkdir(parents=True, exist_ok=True)
|
|
104
|
+
with open(cache_path, "w") as f:
|
|
105
|
+
json.dump(cache, f, indent=2)
|
|
106
|
+
f.write("\n")
|
|
107
|
+
|
|
108
|
+
# If all required checks pass, set setupComplete in config
|
|
109
|
+
if all_required_pass:
|
|
110
|
+
config_path = client.config_path
|
|
111
|
+
if config_path.exists():
|
|
112
|
+
with open(config_path, "r") as f:
|
|
113
|
+
local_config = json.load(f)
|
|
114
|
+
else:
|
|
115
|
+
local_config = {}
|
|
116
|
+
|
|
117
|
+
local_config["setupComplete"] = True
|
|
118
|
+
with open(config_path, "w") as f:
|
|
119
|
+
json.dump(local_config, f, indent=2)
|
|
120
|
+
f.write("\n")
|
|
121
|
+
|
|
122
|
+
# Output structured report
|
|
123
|
+
report: dict = {
|
|
124
|
+
"valid": all_required_pass,
|
|
125
|
+
"checks": checks,
|
|
126
|
+
"passed": valid,
|
|
127
|
+
}
|
|
128
|
+
if missing:
|
|
129
|
+
report["missing"] = missing
|
|
130
|
+
if warnings:
|
|
131
|
+
report["warnings"] = warnings
|
|
132
|
+
if all_required_pass:
|
|
133
|
+
report["setupComplete"] = True
|
|
134
|
+
|
|
135
|
+
output_json(report)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
if __name__ == "__main__":
|
|
139
|
+
main()
|
|
@@ -37,7 +37,7 @@ All scripts: `python3 .claude/skills/flydocs-local/scripts/<script>`
|
|
|
37
37
|
| `comment.py` | `<ref> ["<comment>"] \| stdin` | `{success, commentId}` |
|
|
38
38
|
| `list_issues.py` | `[--status STATUS] [--active] [--assignee STR] [--mine] [--limit N]` | `[{id, identifier, title, status, assignee, priority}]` |
|
|
39
39
|
| `get_issue.py` | `<ref>` | `{id, identifier, title, description, status, assignee, priority, estimate, comments[]}` |
|
|
40
|
-
| `assign.py` | `<ref> <assignee
|
|
40
|
+
| `assign.py` | `<ref> <assignee> \| --unassign` | `{success, issue, assignee}` |
|
|
41
41
|
| `update_description.py` | `<ref> --text "..." \| --file PATH \| stdin` | `{success, issue}` |
|
|
42
42
|
| `status_summary.py` | `[--project ID]` | `{statuses: {STATUS: count}, total}` |
|
|
43
43
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Assign an issue
|
|
2
|
+
"""Assign or unassign an issue."""
|
|
3
3
|
|
|
4
4
|
import json
|
|
5
5
|
import sys
|
|
@@ -8,12 +8,21 @@ from pathlib import Path
|
|
|
8
8
|
sys.path.insert(0, str(Path(__file__).parent))
|
|
9
9
|
from flydocs_api import assign_issue
|
|
10
10
|
|
|
11
|
-
if len(sys.argv) <
|
|
12
|
-
print("Usage: assign.py <ref> <assignee>", file=sys.stderr)
|
|
11
|
+
if len(sys.argv) < 2:
|
|
12
|
+
print("Usage: assign.py <ref> <assignee> | assign.py <ref> --unassign", file=sys.stderr)
|
|
13
13
|
sys.exit(1)
|
|
14
14
|
|
|
15
|
+
ref = sys.argv[1]
|
|
16
|
+
unassign = "--unassign" in sys.argv
|
|
17
|
+
|
|
18
|
+
if not unassign and len(sys.argv) < 3:
|
|
19
|
+
print("Usage: assign.py <ref> <assignee> | assign.py <ref> --unassign", file=sys.stderr)
|
|
20
|
+
sys.exit(1)
|
|
21
|
+
|
|
22
|
+
assignee = None if unassign else sys.argv[2]
|
|
23
|
+
|
|
15
24
|
try:
|
|
16
|
-
result = assign_issue(
|
|
25
|
+
result = assign_issue(ref, assignee)
|
|
17
26
|
print(json.dumps(result))
|
|
18
27
|
except Exception as e:
|
|
19
28
|
print(str(e), file=sys.stderr)
|
|
@@ -236,10 +236,13 @@ def get_issue(ref: str) -> dict:
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
def assign_issue(ref: str, assignee: str) -> dict:
|
|
239
|
+
def assign_issue(ref: str, assignee: str | None) -> dict:
|
|
240
240
|
filepath = _find_issue(ref)
|
|
241
241
|
data = _parse_issue(filepath)
|
|
242
|
-
|
|
242
|
+
if assignee is None:
|
|
243
|
+
data.pop("assignee", None)
|
|
244
|
+
else:
|
|
245
|
+
data["assignee"] = assignee
|
|
243
246
|
data["updated"] = datetime.now().strftime("%Y-%m-%d")
|
|
244
247
|
|
|
245
248
|
fm = {k: v for k, v in data.items() if k not in ("description", "comments", "_path")}
|
|
@@ -17,6 +17,10 @@ triggers:
|
|
|
17
17
|
- transition
|
|
18
18
|
- status
|
|
19
19
|
- issue
|
|
20
|
+
- knowledge
|
|
21
|
+
- document
|
|
22
|
+
- PR
|
|
23
|
+
- pull request
|
|
20
24
|
---
|
|
21
25
|
|
|
22
26
|
# FlyDocs Workflow
|
|
@@ -35,32 +39,33 @@ Capture → Refine → Activate → Implement → Review → Validate → Close
|
|
|
35
39
|
|
|
36
40
|
## Stage Index
|
|
37
41
|
|
|
38
|
-
| Stage
|
|
39
|
-
|
|
40
|
-
| Capture
|
|
41
|
-
| Refine
|
|
42
|
-
| Activate
|
|
43
|
-
| Implement | stages/implement.md | Build + test + simplify
|
|
44
|
-
| Review
|
|
45
|
-
| Validate
|
|
46
|
-
| Close
|
|
42
|
+
| Stage | File | Intent | Agent |
|
|
43
|
+
| --------- | ------------------- | ------------------------ | -------------- |
|
|
44
|
+
| Capture | stages/capture.md | Create issue from input | PM |
|
|
45
|
+
| Refine | stages/refine.md | Triage + spec completion | PM |
|
|
46
|
+
| Activate | stages/activate.md | Assign + start work | PM |
|
|
47
|
+
| Implement | stages/implement.md | Build + test + simplify | Implementation |
|
|
48
|
+
| Review | stages/review.md | Code quality validation | Review |
|
|
49
|
+
| Validate | stages/validate.md | User acceptance testing | QE |
|
|
50
|
+
| Close | stages/close.md | Archive completed work | PM |
|
|
47
51
|
|
|
48
52
|
## Session
|
|
49
53
|
|
|
50
|
-
| Action
|
|
51
|
-
|
|
52
|
-
| Start session
|
|
53
|
-
| Wrap session
|
|
54
|
+
| Action | File |
|
|
55
|
+
| --------------- | ---------- |
|
|
56
|
+
| Start session | session.md |
|
|
57
|
+
| Wrap session | session.md |
|
|
54
58
|
| Stale detection | session.md |
|
|
55
59
|
|
|
56
60
|
## Reference
|
|
57
61
|
|
|
58
|
-
| Topic
|
|
59
|
-
|
|
60
|
-
| Comment templates
|
|
61
|
-
| Status transitions
|
|
62
|
+
| Topic | File |
|
|
63
|
+
| -------------------- | ------------------------------- |
|
|
64
|
+
| Comment templates | reference/comment-templates.md |
|
|
65
|
+
| Status transitions | reference/status-workflow.md |
|
|
62
66
|
| Priority & estimates | reference/priority-estimates.md |
|
|
63
|
-
|
|
|
67
|
+
| PR & git workflow | reference/pr-workflow.md |
|
|
68
|
+
| Golden rules | reference/golden-rules.md |
|
|
64
69
|
|
|
65
70
|
## Templates
|
|
66
71
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# PR & Git Workflow
|
|
2
|
+
|
|
3
|
+
## Branch Naming
|
|
4
|
+
|
|
5
|
+
Format: `<type>/<ref>-<slug>`
|
|
6
|
+
|
|
7
|
+
| Type | When |
|
|
8
|
+
| --------- | -------------------------------------- |
|
|
9
|
+
| `feature` | New functionality |
|
|
10
|
+
| `fix` | Bug fixes |
|
|
11
|
+
| `chore` | Maintenance, refactoring, dependencies |
|
|
12
|
+
| `docs` | Documentation only |
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
|
|
16
|
+
- `feature/FLY-255-knowledge-capture`
|
|
17
|
+
- `fix/FLY-301-login-timeout`
|
|
18
|
+
- `chore/FLY-290-upgrade-deps`
|
|
19
|
+
|
|
20
|
+
Keep the slug short (2-4 words, kebab-case). Include the issue reference.
|
|
21
|
+
|
|
22
|
+
## Commit Messages
|
|
23
|
+
|
|
24
|
+
Format: `<type>: <description> (<ref>)`
|
|
25
|
+
|
|
26
|
+
- Lead with what changed, not how
|
|
27
|
+
- Use imperative mood ("Add", not "Added")
|
|
28
|
+
- Keep the first line under 72 characters
|
|
29
|
+
- Add a body for non-obvious changes
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
feat: Add knowledge doc templates and /knowledge command (FLY-255)
|
|
35
|
+
fix: Handle null milestone in create_issue response (FLY-301)
|
|
36
|
+
chore: Remove deprecated auth middleware (FLY-290)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## When to Create a PR
|
|
40
|
+
|
|
41
|
+
**Create a PR when:**
|
|
42
|
+
|
|
43
|
+
- Changes affect shared code (not just local config or docs)
|
|
44
|
+
- Multiple files changed across different concerns
|
|
45
|
+
- Changes need review before merging
|
|
46
|
+
- Working on a branch (not committing directly to main)
|
|
47
|
+
|
|
48
|
+
**Commit directly when:**
|
|
49
|
+
|
|
50
|
+
- Single-file documentation updates
|
|
51
|
+
- Config changes for local development
|
|
52
|
+
- Trivial fixes (typos, formatting)
|
|
53
|
+
- The user explicitly requests direct commit
|
|
54
|
+
|
|
55
|
+
When in doubt, create a PR. It's easier to merge a PR than to revert a direct commit.
|
|
56
|
+
|
|
57
|
+
## PR Description Template
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
## Summary
|
|
61
|
+
|
|
62
|
+
[1-3 bullet points describing what changed and why]
|
|
63
|
+
|
|
64
|
+
Closes [ISSUE-REF]
|
|
65
|
+
|
|
66
|
+
## Changes
|
|
67
|
+
|
|
68
|
+
- [Key change 1]
|
|
69
|
+
- [Key change 2]
|
|
70
|
+
- [Key change 3]
|
|
71
|
+
|
|
72
|
+
## Test Plan
|
|
73
|
+
|
|
74
|
+
- [ ] [How to verify change 1]
|
|
75
|
+
- [ ] [How to verify change 2]
|
|
76
|
+
|
|
77
|
+
## Notes
|
|
78
|
+
|
|
79
|
+
[Anything reviewers should know — tradeoffs, follow-up work, decisions made]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## PR Workflow in Practice
|
|
83
|
+
|
|
84
|
+
### During Implement Stage
|
|
85
|
+
|
|
86
|
+
After self-review (step 7 in `implement.md`), before handing off to review:
|
|
87
|
+
|
|
88
|
+
1. Create branch: `git checkout -b <type>/<ref>-<slug>`
|
|
89
|
+
2. Stage and commit changes with a descriptive message
|
|
90
|
+
3. Push branch: `git push -u origin <branch>`
|
|
91
|
+
4. Create PR with the template above, linking the issue
|
|
92
|
+
5. Include the PR link in the "Ready for Review" comment
|
|
93
|
+
|
|
94
|
+
### During Review Stage
|
|
95
|
+
|
|
96
|
+
The reviewer should:
|
|
97
|
+
|
|
98
|
+
- Review the PR diff (not just local git diff)
|
|
99
|
+
- Leave comments on the PR for specific code feedback
|
|
100
|
+
- Reference the PR in review comments on the issue
|
|
101
|
+
|
|
102
|
+
### After Review
|
|
103
|
+
|
|
104
|
+
- **Approved**: Merge the PR, then transition issue to Testing
|
|
105
|
+
- **Changes needed**: Push fixes to the same branch, re-request review
|
|
@@ -2,27 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
## Priority Values
|
|
4
4
|
|
|
5
|
-
| Value | Name
|
|
6
|
-
|
|
7
|
-
| 0
|
|
8
|
-
| 1
|
|
9
|
-
| 2
|
|
10
|
-
| 3
|
|
11
|
-
| 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
12
|
|
|
13
13
|
## Estimate Values (Complexity)
|
|
14
14
|
|
|
15
|
-
| Value | Name | Rough Effort
|
|
16
|
-
|
|
17
|
-
| 1
|
|
18
|
-
| 2
|
|
19
|
-
| 3
|
|
20
|
-
| 4
|
|
21
|
-
| 5
|
|
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
22
|
|
|
23
23
|
## Guidance
|
|
24
24
|
|
|
25
25
|
- Set priority during Refine or Activate stages
|
|
26
26
|
- Set estimate during Refine stage (before Ready)
|
|
27
27
|
- If estimate is missing at Activate, set it before transitioning
|
|
28
|
-
-
|
|
28
|
+
- Estimate values may vary by provider — the relay translates per provider configuration
|
|
29
|
+
|
|
30
|
+
## Decomposition
|
|
31
|
+
|
|
32
|
+
When an estimate is large (XL / 5+ or provider equivalent), prompt for decomposition:
|
|
33
|
+
|
|
34
|
+
1. **Identify natural boundaries** — separate concerns, independent deliverables, sequential phases
|
|
35
|
+
2. **Create child issues** — each should be independently estimable at M or smaller
|
|
36
|
+
3. **Link parent to children** — use `link.py` with type `blocks` (parent blocks children conceptually)
|
|
37
|
+
4. **Re-estimate parent** — set to 0 or remove estimate, since children carry the work
|
|
38
|
+
5. **Move parent to a tracking role** — it becomes the "epic" or summary issue
|
|
39
|
+
|
|
40
|
+
**Split pattern:**
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Original: FLY-100 "Build auth system" (XL)
|
|
44
|
+
→ FLY-101 "Add login endpoint" (S)
|
|
45
|
+
→ FLY-102 "Add session management" (M)
|
|
46
|
+
→ FLY-103 "Add role-based access control" (M)
|
|
47
|
+
→ FLY-104 "Add password reset flow" (S)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Don't force decomposition on every large issue — some are genuinely large and atomic. Use judgment. The prompt is: "This is estimated as XL. Can it be broken into smaller, independently deliverable pieces?"
|
|
@@ -52,6 +52,7 @@ When a conversation begins or the user returns after a gap:
|
|
|
52
52
|
|
|
53
53
|
7. **Surface other product issues briefly** — If there are issues in the product scope
|
|
54
54
|
but outside the active project, mention the count with a one-line summary:
|
|
55
|
+
|
|
55
56
|
```
|
|
56
57
|
Also in [Product Name]: [N] issues across other projects (use --all to see)
|
|
57
58
|
```
|
|
@@ -69,10 +70,16 @@ automatically via the config cascade.
|
|
|
69
70
|
When the user indicates they're done for the session:
|
|
70
71
|
|
|
71
72
|
1. **Gather session data** — What was completed, what's in progress, what's blocked.
|
|
72
|
-
2. **
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
2. **Knowledge capture check** — Review the session's work for uncaptured knowledge:
|
|
74
|
+
- Were any architectural decisions made?
|
|
75
|
+
- Were any non-obvious behaviors or workarounds discovered?
|
|
76
|
+
- Were any patterns established that future work should follow?
|
|
77
|
+
- Did debugging reveal something worth documenting?
|
|
78
|
+
If yes, prompt the user: "This session involved [specific discovery]. Should we capture it in a knowledge doc before wrapping?" Use `/knowledge` if they agree.
|
|
79
|
+
3. **Compose summary** using the template below.
|
|
80
|
+
4. **Determine health status** — See health table.
|
|
81
|
+
5. **Post project update** — `project_update.py` with health and summary body.
|
|
82
|
+
6. **Record session in context graph** — Call `graph_session.py` with summary and issues worked on:
|
|
76
83
|
```
|
|
77
84
|
python3 .claude/skills/flydocs-context-graph/scripts/graph_session.py \
|
|
78
85
|
--summary "Brief summary of session outcomes" \
|
|
@@ -80,8 +87,8 @@ When the user indicates they're done for the session:
|
|
|
80
87
|
[--decision NNN]
|
|
81
88
|
```
|
|
82
89
|
This creates a session node for cross-session continuity. Skip silently if the script is not installed.
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
7. **Verify** — Confirm the project update was posted (update ID returned).
|
|
91
|
+
8. **Ask about uncommitted changes** — If git shows uncommitted work, offer to commit.
|
|
85
92
|
|
|
86
93
|
Do not just summarize in chat. Actually post the update. Do not skip if the user seems in a hurry.
|
|
87
94
|
|
|
@@ -104,15 +111,16 @@ Do not just summarize in chat. Actually post the update. Do not skip if the user
|
|
|
104
111
|
|
|
105
112
|
### Health Status
|
|
106
113
|
|
|
107
|
-
| Status
|
|
108
|
-
|
|
109
|
-
| onTrack
|
|
110
|
-
| atRisk
|
|
114
|
+
| Status | When to Use |
|
|
115
|
+
| -------- | ------------------------------- |
|
|
116
|
+
| onTrack | Progress made, no blockers |
|
|
117
|
+
| atRisk | Minor delays, attention needed |
|
|
111
118
|
| offTrack | Major blockers, behind schedule |
|
|
112
119
|
|
|
113
120
|
### Wrap Detection Phrases
|
|
114
121
|
|
|
115
122
|
Offer session wrap when the user says:
|
|
123
|
+
|
|
116
124
|
- "I'm done for today" / "wrapping up" / "that's it for now"
|
|
117
125
|
- "save progress" / "end of day" / "stopping here"
|
|
118
126
|
|
|
@@ -120,9 +128,9 @@ Offer session wrap when the user says:
|
|
|
120
128
|
|
|
121
129
|
Proactively surface issues that may be stuck:
|
|
122
130
|
|
|
123
|
-
| State
|
|
124
|
-
|
|
125
|
-
| Implementing | > 7 days without activity | Warn
|
|
126
|
-
| Review
|
|
127
|
-
| Testing/QA
|
|
128
|
-
| Blocked
|
|
131
|
+
| State | Threshold | Action |
|
|
132
|
+
| ------------ | ------------------------- | -------------- |
|
|
133
|
+
| Implementing | > 7 days without activity | Warn |
|
|
134
|
+
| Review | > 3 days without activity | Warn |
|
|
135
|
+
| Testing/QA | > 3 days without activity | Warn |
|
|
136
|
+
| Blocked | Any | Always surface |
|
|
@@ -21,9 +21,14 @@ When the user has enough context to describe the issue:
|
|
|
21
21
|
- **Why** — User story or business value
|
|
22
22
|
- **How** — Technical notes or approach (if known)
|
|
23
23
|
- **Done when** — Acceptance criteria as checkboxes
|
|
24
|
-
4. **
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
4. **Apply labels** — Include appropriate labels from config:
|
|
25
|
+
- **Category label**: Automatic from issue type (feature, bug, chore, idea) via `issueLabels.category` in config
|
|
26
|
+
- **Repo label**: If multi-repo workspace, apply the repo label from `issueLabels.repo` in config
|
|
27
|
+
- **Product labels**: Applied automatically by the mechanism scripts from `workspace.product.labelIds`
|
|
28
|
+
- **Ad-hoc labels**: Only if explicitly relevant (e.g., "accessibility", "performance")
|
|
29
|
+
5. **Create issue** — `create_issue.py` with title, type, description, priority, estimate (if known), and labels.
|
|
30
|
+
6. **Add comment** — Use the Capture template from `reference/comment-templates.md`.
|
|
31
|
+
7. **Verify** — Confirm issue identifier returned.
|
|
27
32
|
|
|
28
33
|
### Quick Capture
|
|
29
34
|
|
|
@@ -11,12 +11,13 @@ Archive verified and completed work.
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
13
|
1. **Verify QE approval** — Check issue comments for a "QE Approved" comment. If not found, do not close — direct to Validate stage first.
|
|
14
|
-
2. **
|
|
14
|
+
2. **Final knowledge check** — If the issue involved significant implementation, verify `knowledge/INDEX.md` reflects any decisions or discoveries. This is informational — don't block close, but prompt the user if notable knowledge appears uncaptured.
|
|
15
|
+
3. **Determine terminal state:**
|
|
15
16
|
- **Done** — Work completed and verified (normal path)
|
|
16
17
|
- **Archived** — Deferring to a later date (not cancelled, may return)
|
|
17
18
|
- **Canceled** — Not pursuing (won't be done)
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
4. **Transition** — `transition.py` with the appropriate Close comment from `reference/comment-templates.md`.
|
|
20
|
+
5. **Verify** — Confirm terminal state reached.
|
|
20
21
|
|
|
21
22
|
## Gates
|
|
22
23
|
|
|
@@ -20,6 +20,7 @@ Build, test, simplify, and hand off to code review.
|
|
|
20
20
|
### 2. Show Implementation Checklist
|
|
21
21
|
|
|
22
22
|
Present to the user:
|
|
23
|
+
|
|
23
24
|
- Issue ID and title
|
|
24
25
|
- All acceptance criteria
|
|
25
26
|
- Estimate
|
|
@@ -46,7 +47,18 @@ Rationale: [Why this choice over alternatives]
|
|
|
46
47
|
|
|
47
48
|
For significant architectural decisions, also create a record in `knowledge/decisions/`.
|
|
48
49
|
|
|
49
|
-
### 5.
|
|
50
|
+
### 5. Knowledge Capture Check
|
|
51
|
+
|
|
52
|
+
Before moving to self-review, check if any of these occurred during implementation:
|
|
53
|
+
|
|
54
|
+
- **Architectural decision** — framework choice, pattern established, approach rejected
|
|
55
|
+
- **Discovery** — API quirk, debugging technique, non-obvious behavior
|
|
56
|
+
- **Workaround** — limitation found, temporary fix applied
|
|
57
|
+
- **Pattern** — reusable approach that future work should follow
|
|
58
|
+
|
|
59
|
+
If yes, prompt the user: "Should we capture this in a knowledge doc?" Use `/knowledge` to create the doc, or note it for session wrap if the user wants to defer.
|
|
60
|
+
|
|
61
|
+
### 6. TODO to Issue
|
|
50
62
|
|
|
51
63
|
When adding a TODO comment in code:
|
|
52
64
|
|
|
@@ -56,7 +68,7 @@ When adding a TODO comment in code:
|
|
|
56
68
|
|
|
57
69
|
Every TODO must have a tracked issue. No orphaned TODOs.
|
|
58
70
|
|
|
59
|
-
###
|
|
71
|
+
### 7. Simplify
|
|
60
72
|
|
|
61
73
|
After implementation is functionally complete, review modified files for:
|
|
62
74
|
|
|
@@ -67,7 +79,7 @@ After implementation is functionally complete, review modified files for:
|
|
|
67
79
|
|
|
68
80
|
Apply standards from installed community skills and `preferences.md`. Preserve all functionality.
|
|
69
81
|
|
|
70
|
-
###
|
|
82
|
+
### 8. Self-Review
|
|
71
83
|
|
|
72
84
|
Before handing off:
|
|
73
85
|
|
|
@@ -77,7 +89,18 @@ Before handing off:
|
|
|
77
89
|
- [ ] No obvious security issues
|
|
78
90
|
- [ ] No orphaned TODOs
|
|
79
91
|
|
|
80
|
-
###
|
|
92
|
+
### 9. Create PR (if applicable)
|
|
93
|
+
|
|
94
|
+
See `reference/pr-workflow.md` for full conventions. If changes warrant a PR:
|
|
95
|
+
|
|
96
|
+
1. Create branch: `git checkout -b <type>/<ref>-<slug>`
|
|
97
|
+
2. Stage and commit with a descriptive message: `<type>: <description> (<ref>)`
|
|
98
|
+
3. Push: `git push -u origin <branch>`
|
|
99
|
+
4. Create PR linking the issue, using the PR description template
|
|
100
|
+
|
|
101
|
+
If the user requested a direct commit or changes are trivial, skip the PR and commit directly.
|
|
102
|
+
|
|
103
|
+
### 10. Hand Off to Review
|
|
81
104
|
|
|
82
105
|
Transition to Review via `transition.py` with the "Ready for Review" comment from `reference/comment-templates.md`. Include:
|
|
83
106
|
|
|
@@ -85,6 +108,7 @@ Transition to Review via `transition.py` with the "Ready for Review" comment fro
|
|
|
85
108
|
- File count
|
|
86
109
|
- How it was tested
|
|
87
110
|
- Criteria completion count
|
|
111
|
+
- PR link (if PR was created)
|
|
88
112
|
|
|
89
113
|
## Checkbox Protocol
|
|
90
114
|
|
|
@@ -32,14 +32,30 @@ For backlog items that need fleshing out before activation:
|
|
|
32
32
|
5. **Add technical notes** — Implementation guidance, dependencies, affected areas.
|
|
33
33
|
6. **Set estimate and priority** — If not already set. See `reference/priority-estimates.md`.
|
|
34
34
|
7. **Check dependencies** — Blocked by other issues? Related work?
|
|
35
|
-
8. **
|
|
36
|
-
9. **
|
|
35
|
+
8. **Assign milestone** — If the issue fits a current or upcoming milestone, assign it via `--milestone` on `update_issue.py`. If no milestone is appropriate, leave unassigned but note it.
|
|
36
|
+
9. **Update description** — `update_description.py` with refined content.
|
|
37
|
+
10. **Quality gate check** — Verify all criteria pass before transitioning:
|
|
38
|
+
|
|
39
|
+
| Gate | Check | Required |
|
|
40
|
+
| ------------------- | ------------------------------------------------ | -------- |
|
|
41
|
+
| Description | Context section filled, not just a title | Yes |
|
|
42
|
+
| Acceptance criteria | Specific, testable, written as checkboxes | Yes |
|
|
43
|
+
| Estimate | Set (see `reference/priority-estimates.md`) | Yes |
|
|
44
|
+
| Priority | Set (P1-P4) | Yes |
|
|
45
|
+
| Labels | Category label applied, repo label if multi-repo | Yes |
|
|
46
|
+
| Dependencies | Identified and documented, or explicitly "none" | Yes |
|
|
47
|
+
| Milestone | Assigned if applicable | No |
|
|
48
|
+
|
|
49
|
+
If any required gate fails, address it before transitioning.
|
|
50
|
+
|
|
51
|
+
11. **Transition to Ready** — `transition.py` with Refine comment from `reference/comment-templates.md`.
|
|
37
52
|
|
|
38
53
|
## Gates
|
|
39
54
|
|
|
55
|
+
- All quality gate checks pass (see table above)
|
|
40
56
|
- Acceptance criteria defined (specific, testable, as checkboxes)
|
|
41
|
-
- Estimate set
|
|
42
|
-
- Priority set (
|
|
57
|
+
- Estimate set
|
|
58
|
+
- Priority set (P1-P4)
|
|
43
59
|
|
|
44
60
|
## Outputs
|
|
45
61
|
|