@groupby/ai-dev 0.1.1 → 0.2.1
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/README.md +9 -0
- package/dist/index.js +260 -21
- package/package.json +16 -11
- package/toolsets/rzlv-flow/README.md +57 -0
- package/toolsets/rzlv-flow/docs/mcp-setup.md +126 -0
- package/toolsets/rzlv-flow/resources/README.md +16 -0
- package/toolsets/rzlv-flow/resources/confluence-file-structure.md +179 -0
- package/toolsets/rzlv-flow/resources/confluence-page-templates/README.md +19 -0
- package/toolsets/rzlv-flow/resources/confluence-page-templates/decisions.md +36 -0
- package/toolsets/rzlv-flow/resources/confluence-page-templates/initiative-overview.md +40 -0
- package/toolsets/rzlv-flow/resources/confluence-page-templates/strategic-context.md +44 -0
- package/toolsets/rzlv-flow/resources/confluence-page-templates/technical-architecture.md +48 -0
- package/toolsets/rzlv-flow/resources/fcmp-protocol.md +331 -0
- package/toolsets/rzlv-flow/resources/jira-file-structure.md +177 -0
- package/toolsets/rzlv-flow/resources/sync-state-format.md +209 -0
- package/toolsets/rzlv-flow/skills/atlassian-orchestrator/SKILL.md +643 -0
- package/toolsets/rzlv-flow/skills/context-analyst/SKILL.md +265 -0
- package/toolsets/rzlv-flow/skills/jira-comment/SKILL.md +89 -0
- package/toolsets/rzlv-flow/skills/jira-daily-triage/SKILL.md +135 -0
- package/toolsets/rzlv-flow/skills/jira-sprint-status/SKILL.md +116 -0
- package/toolsets/rzlv-flow/skills/jira-status/SKILL.md +97 -0
- package/toolsets/rzlv-flow/skills/jira-sync/SKILL.md +148 -0
- package/toolsets/rzlv-flow/skills/jira-ticket-focus/SKILL.md +240 -0
- package/toolsets/rzlv-flow/skills/jira-ticket-trace/SKILL.md +112 -0
- package/toolsets/rzlv-flow/skills/jira-wrap-sync/SKILL.md +227 -0
- package/toolsets/toolsets/rzlv-flow/README.md +102 -0
- package/toolsets/toolsets/rzlv-flow/docs/getting-started.md +102 -0
- package/toolsets/toolsets/rzlv-flow/docs/mcp-setup.md +126 -0
- package/toolsets/toolsets/rzlv-flow/resources/README.md +16 -0
- package/toolsets/toolsets/rzlv-flow/resources/confluence-file-structure.md +285 -0
- package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/README.md +19 -0
- package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/decisions.md +36 -0
- package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/initiative-overview.md +40 -0
- package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/strategic-context.md +44 -0
- package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/technical-architecture.md +48 -0
- package/toolsets/toolsets/rzlv-flow/resources/fcmp-protocol.md +331 -0
- package/toolsets/toolsets/rzlv-flow/resources/jira-file-structure.md +177 -0
- package/toolsets/toolsets/rzlv-flow/resources/sync-state-format.md +318 -0
- package/toolsets/toolsets/rzlv-flow/skills/atlassian-orchestrator/SKILL.md +643 -0
- package/toolsets/toolsets/rzlv-flow/skills/confluence-fetch/SKILL.md +189 -0
- package/toolsets/toolsets/rzlv-flow/skills/confluence-publish/SKILL.md +178 -0
- package/toolsets/toolsets/rzlv-flow/skills/context-analyst/SKILL.md +265 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-comment/SKILL.md +89 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-daily-triage/SKILL.md +143 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-sprint-status/SKILL.md +143 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-status/SKILL.md +97 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-sync/SKILL.md +148 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-ticket-focus/SKILL.md +245 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-ticket-trace/SKILL.md +112 -0
- package/toolsets/toolsets/rzlv-flow/skills/jira-wrap-sync/SKILL.md +260 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# FCMP Protocol — Atlassian Sync Instructions
|
|
2
|
+
|
|
3
|
+
> This resource is referenced by rzlv-flow skills. Skills should load this document at the start of any workflow that reads from or writes to Jira or Confluence.
|
|
4
|
+
|
|
5
|
+
**Pattern:** Fetch-Compare-Merge-Push (FCMP)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
This document defines the **standardized sync instruction patterns** that all skills must follow when interacting with Jira and Confluence. These are not code libraries — they are instruction patterns that skills execute during their workflows.
|
|
12
|
+
|
|
13
|
+
## Core Principle: Never Blind Write
|
|
14
|
+
|
|
15
|
+
> **CRITICAL:** Skills must NEVER write to Jira/Confluence without first fetching the current remote state. This prevents data loss from concurrent edits.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## The FCMP Protocol
|
|
20
|
+
|
|
21
|
+
### 1. FETCH — Get Remote State
|
|
22
|
+
|
|
23
|
+
Before any modification, fetch the current state:
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
fetch_instructions:
|
|
27
|
+
jira_ticket:
|
|
28
|
+
- Call: mcp_atlassian-rovo_fetch(id: "ari:cloud:jira:{cloudId}:issue/{issueId}")
|
|
29
|
+
- Extract: summary, description, status, comments, updated_at, version
|
|
30
|
+
- Store: remote_state.jira.{ticket_key}
|
|
31
|
+
|
|
32
|
+
confluence_page:
|
|
33
|
+
- Call: mcp_atlassian-rovo_fetch(id: "ari:cloud:confluence:{cloudId}:page/{pageId}")
|
|
34
|
+
- Extract: title, body, version, updated_at
|
|
35
|
+
- Store: remote_state.confluence.{page_id}
|
|
36
|
+
|
|
37
|
+
on_fetch_failure:
|
|
38
|
+
- Log: "⚠️ Could not fetch remote state for {resource}"
|
|
39
|
+
- Action: STOP and prompt user
|
|
40
|
+
- Never: Proceed with blind write
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. COMPARE — Detect Changes
|
|
44
|
+
|
|
45
|
+
Compare local changes against fetched remote state:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
compare_instructions:
|
|
49
|
+
check_for_conflicts:
|
|
50
|
+
- Compare: local.updated_at vs remote.updated_at
|
|
51
|
+
- Compare: local.version vs remote.version
|
|
52
|
+
- If remote is newer: CONFLICT DETECTED
|
|
53
|
+
|
|
54
|
+
conflict_scenarios:
|
|
55
|
+
no_conflict:
|
|
56
|
+
condition: "remote.version == local.last_known_version"
|
|
57
|
+
action: "Proceed to PUSH"
|
|
58
|
+
|
|
59
|
+
remote_changed:
|
|
60
|
+
condition: "remote.version > local.last_known_version"
|
|
61
|
+
action: "Proceed to MERGE"
|
|
62
|
+
|
|
63
|
+
both_changed:
|
|
64
|
+
condition: "local has changes AND remote has changes"
|
|
65
|
+
action: "Proceed to MERGE with user confirmation"
|
|
66
|
+
|
|
67
|
+
output_to_user:
|
|
68
|
+
- Show: Side-by-side diff (local vs remote)
|
|
69
|
+
- Highlight: Conflicting sections
|
|
70
|
+
- Ask: "Remote has changed. How would you like to proceed?"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3. MERGE — Resolve Conflicts
|
|
74
|
+
|
|
75
|
+
When conflicts are detected, guide the user through resolution:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
merge_instructions:
|
|
79
|
+
strategies:
|
|
80
|
+
auto_merge:
|
|
81
|
+
when: "Changes are in different sections"
|
|
82
|
+
action: "Combine both changes automatically"
|
|
83
|
+
confirm: "Auto-merged changes in different sections. Review?"
|
|
84
|
+
|
|
85
|
+
prefer_remote:
|
|
86
|
+
when: "User selects 'Keep remote'"
|
|
87
|
+
action: "Discard local changes, use remote"
|
|
88
|
+
confirm: "Local changes will be discarded. Confirm?"
|
|
89
|
+
|
|
90
|
+
prefer_local:
|
|
91
|
+
when: "User selects 'Keep local'"
|
|
92
|
+
action: "Overwrite remote with local"
|
|
93
|
+
confirm: "Remote changes will be overwritten. Confirm?"
|
|
94
|
+
|
|
95
|
+
manual_merge:
|
|
96
|
+
when: "User selects 'Manual merge'"
|
|
97
|
+
action: "Present both versions for manual editing"
|
|
98
|
+
output: "Combined document for user editing"
|
|
99
|
+
|
|
100
|
+
merge_output:
|
|
101
|
+
- Create: merged_content with resolved conflicts
|
|
102
|
+
- Update: local.version = remote.version
|
|
103
|
+
- Log: "Merge completed: {strategy_used}"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 4. PUSH — Write to Remote
|
|
107
|
+
|
|
108
|
+
Only after successful fetch-compare-merge cycle:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
push_instructions:
|
|
112
|
+
pre_push_checklist:
|
|
113
|
+
- Verify: fetch completed successfully
|
|
114
|
+
- Verify: no unresolved conflicts
|
|
115
|
+
- Verify: user confirmed changes (if required)
|
|
116
|
+
|
|
117
|
+
jira_update:
|
|
118
|
+
- Call: Appropriate MCP update tool
|
|
119
|
+
- Include: version field for optimistic locking
|
|
120
|
+
- On success: Update local.version, local.synced_at
|
|
121
|
+
- On conflict (409): Re-run FETCH-COMPARE-MERGE
|
|
122
|
+
|
|
123
|
+
confluence_update:
|
|
124
|
+
- Call: MCP confluence update tool
|
|
125
|
+
- Include: version for conflict detection
|
|
126
|
+
- On success: Update local frontmatter
|
|
127
|
+
- On conflict: Re-run FETCH-COMPARE-MERGE
|
|
128
|
+
|
|
129
|
+
post_push:
|
|
130
|
+
- Update local file: Set status to "synced"
|
|
131
|
+
- Update local file: Store new version number
|
|
132
|
+
- Log: "✓ Synced {resource} at {timestamp}"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Local File Storage Protocol
|
|
138
|
+
|
|
139
|
+
The same FCMP pattern applies to local file operations to prevent data loss:
|
|
140
|
+
|
|
141
|
+
### Local File Sync Rules
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
local_file_protocol:
|
|
145
|
+
before_write:
|
|
146
|
+
- Check: File exists?
|
|
147
|
+
- If exists: Read current content
|
|
148
|
+
- Compare: Local changes vs file content
|
|
149
|
+
- If different: Prompt user before overwrite
|
|
150
|
+
|
|
151
|
+
file_locking:
|
|
152
|
+
- Use: YAML frontmatter version field
|
|
153
|
+
- Format:
|
|
154
|
+
```yaml
|
|
155
|
+
---
|
|
156
|
+
sync:
|
|
157
|
+
local_version: 3
|
|
158
|
+
last_modified: "2025-12-09T10:30:00Z"
|
|
159
|
+
modified_by: "skill:jira-wrap-sync"
|
|
160
|
+
---
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
conflict_detection:
|
|
164
|
+
- Compare: frontmatter version vs expected version
|
|
165
|
+
- If mismatch: Another process modified file
|
|
166
|
+
- Action: Show diff, ask user to resolve
|
|
167
|
+
|
|
168
|
+
safe_write_pattern:
|
|
169
|
+
- Read: Current file content
|
|
170
|
+
- Validate: Version matches expected
|
|
171
|
+
- Write: New content with incremented version
|
|
172
|
+
- Verify: Write succeeded
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Skill Integration Requirements
|
|
178
|
+
|
|
179
|
+
### For skills that create/update Jira or Confluence (e.g. jira-wrap-sync, atlassian-orchestrator)
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
create_update_sync_requirements:
|
|
183
|
+
on_jira_create:
|
|
184
|
+
- Not applicable (new resource, no conflict possible)
|
|
185
|
+
- After create: Store returned key/id in local file
|
|
186
|
+
|
|
187
|
+
on_jira_update:
|
|
188
|
+
- MUST: Follow full FCMP protocol
|
|
189
|
+
- MUST: Show diff before update
|
|
190
|
+
- MUST: Handle 409 conflicts gracefully
|
|
191
|
+
|
|
192
|
+
on_confluence_create:
|
|
193
|
+
- After create: Update local frontmatter with page_id, url
|
|
194
|
+
|
|
195
|
+
on_confluence_update:
|
|
196
|
+
- MUST: Follow full FCMP protocol
|
|
197
|
+
- MUST: Preserve user edits in Confluence
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### For skills that modify ticket state (e.g. jira-status, jira-comment, jira-wrap-sync)
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
ticket_state_sync_requirements:
|
|
204
|
+
on_status_change:
|
|
205
|
+
- FETCH: Current ticket state
|
|
206
|
+
- COMPARE: Status hasn't changed since last fetch
|
|
207
|
+
- PUSH: New status
|
|
208
|
+
|
|
209
|
+
on_comment_add:
|
|
210
|
+
- FETCH: Current comments (check for new ones)
|
|
211
|
+
- INFORM: Show any new comments from others
|
|
212
|
+
- PUSH: Add new comment
|
|
213
|
+
|
|
214
|
+
on_description_update:
|
|
215
|
+
- FULL FCMP: Description is high-conflict field
|
|
216
|
+
- ALWAYS: Show diff before update
|
|
217
|
+
- ALWAYS: Require user confirmation
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### For skills that create documents (e.g. context-analyst)
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
document_creation_sync_requirements:
|
|
224
|
+
primary_operation: "Create only (transcripts → new docs)"
|
|
225
|
+
|
|
226
|
+
on_context_doc_create:
|
|
227
|
+
- Check: Target path exists?
|
|
228
|
+
- If exists: WARN user, ask to overwrite or rename
|
|
229
|
+
- Create: New context document
|
|
230
|
+
|
|
231
|
+
on_handoff_to_pm:
|
|
232
|
+
- Verify: Context doc saved successfully
|
|
233
|
+
- Verify: Path is accessible
|
|
234
|
+
- Log: Handoff details for traceability
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Error Handling Patterns
|
|
240
|
+
|
|
241
|
+
```yaml
|
|
242
|
+
error_handling:
|
|
243
|
+
connection_lost:
|
|
244
|
+
- Log: "⚠️ Connection to Atlassian lost"
|
|
245
|
+
- Action: Keep local changes with status "pending_sync"
|
|
246
|
+
- Inform: "Changes saved locally. Sync when connection restored."
|
|
247
|
+
|
|
248
|
+
auth_expired:
|
|
249
|
+
- Detect: 401 response from MCP
|
|
250
|
+
- Action: Prompt "Session expired. Please re-authenticate."
|
|
251
|
+
- Preserve: All local changes
|
|
252
|
+
|
|
253
|
+
rate_limited:
|
|
254
|
+
- Detect: 429 response from MCP
|
|
255
|
+
- Action: Exponential backoff (1s, 2s, 4s, 8s, max 60s)
|
|
256
|
+
- Inform: "Rate limited. Retrying in {n} seconds..."
|
|
257
|
+
|
|
258
|
+
version_conflict:
|
|
259
|
+
- Detect: 409 response or version mismatch
|
|
260
|
+
- Action: Restart FCMP from FETCH
|
|
261
|
+
- Inform: "Conflict detected. Refreshing remote state..."
|
|
262
|
+
|
|
263
|
+
partial_failure:
|
|
264
|
+
- Context: Batch operation with some failures
|
|
265
|
+
- Action: Mark successful items as "synced"
|
|
266
|
+
- Action: Mark failed items as "sync_failed"
|
|
267
|
+
- Report: "Synced {n}/{total}. {m} failed. See details."
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Sync Status Values
|
|
273
|
+
|
|
274
|
+
All local files tracking Atlassian resources use these status values:
|
|
275
|
+
|
|
276
|
+
```yaml
|
|
277
|
+
sync_status:
|
|
278
|
+
draft:
|
|
279
|
+
meaning: "Created locally, never synced to Atlassian"
|
|
280
|
+
action: "Full create operation needed"
|
|
281
|
+
|
|
282
|
+
synced:
|
|
283
|
+
meaning: "Local matches remote (as of last sync)"
|
|
284
|
+
action: "No action needed unless local changes"
|
|
285
|
+
|
|
286
|
+
modified:
|
|
287
|
+
meaning: "Local changes since last sync"
|
|
288
|
+
action: "FCMP protocol required before push"
|
|
289
|
+
|
|
290
|
+
pending_sync:
|
|
291
|
+
meaning: "Ready to sync, waiting for connection/confirmation"
|
|
292
|
+
action: "Push when ready"
|
|
293
|
+
|
|
294
|
+
sync_failed:
|
|
295
|
+
meaning: "Attempted sync failed"
|
|
296
|
+
action: "Review error, retry when resolved"
|
|
297
|
+
|
|
298
|
+
conflict:
|
|
299
|
+
meaning: "Both local and remote changed"
|
|
300
|
+
action: "Manual merge required"
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Quick Reference Card
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
309
|
+
│ FCMP PROTOCOL │
|
|
310
|
+
├─────────────────────────────────────────────────────────────┤
|
|
311
|
+
│ │
|
|
312
|
+
│ 1. FETCH → Get current remote state │
|
|
313
|
+
│ Never skip this step! │
|
|
314
|
+
│ │
|
|
315
|
+
│ 2. COMPARE → Local vs Remote │
|
|
316
|
+
│ Detect conflicts early │
|
|
317
|
+
│ │
|
|
318
|
+
│ 3. MERGE → Resolve any conflicts │
|
|
319
|
+
│ User decides on conflicts │
|
|
320
|
+
│ │
|
|
321
|
+
│ 4. PUSH → Write to remote │
|
|
322
|
+
│ Only after 1-2-3 complete │
|
|
323
|
+
│ │
|
|
324
|
+
├─────────────────────────────────────────────────────────────┤
|
|
325
|
+
│ ⚠️ NEVER do blind writes │
|
|
326
|
+
│ ⚠️ ALWAYS show diffs for updates │
|
|
327
|
+
│ ⚠️ ALWAYS preserve user's remote edits │
|
|
328
|
+
│ ✓ Log all sync operations │
|
|
329
|
+
│ ✓ Handle errors gracefully │
|
|
330
|
+
└─────────────────────────────────────────────────────────────┘
|
|
331
|
+
```
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Jira File Structure — Unified Hierarchy
|
|
2
|
+
|
|
3
|
+
**Pattern:** Shared Hierarchical Structure with Clear Ownership
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
All rzlv-flow skills that interact with Jira use the **same hierarchical structure** in `docs/jira/{instance}/{project}/`. This ensures:
|
|
10
|
+
|
|
11
|
+
- Single source of truth for sync state
|
|
12
|
+
- Natural parent-child navigation
|
|
13
|
+
- No duplicate files or conflicting structures
|
|
14
|
+
- Clear ownership rules within each ticket folder
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Directory Structure
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
docs/jira/{instance}/{project}/
|
|
22
|
+
│
|
|
23
|
+
├── epic-name/ # Epic folder (kebab-case)
|
|
24
|
+
│ ├── epic.md # Epic sync state + metadata
|
|
25
|
+
│ ├── _docs/ # Generated documentation (orchestrator)
|
|
26
|
+
│ │ ├── technical-architecture.md
|
|
27
|
+
│ │ ├── decisions.md
|
|
28
|
+
│ │ └── strategic-context.md
|
|
29
|
+
│ │
|
|
30
|
+
│ └── stories/
|
|
31
|
+
│ ├── PROJ-123/ # Story folder
|
|
32
|
+
│ │ ├── PROJ-123.md # Story sync state (shared)
|
|
33
|
+
│ │ ├── _docs/ # Generated story docs (orchestrator)
|
|
34
|
+
│ │ ├── _work/ # Developer notes (gitignored, ephemeral)
|
|
35
|
+
│ │ │ ├── notes.md
|
|
36
|
+
│ │ │ ├── scratch.md
|
|
37
|
+
│ │ │ └── checklist.md
|
|
38
|
+
│ │ │
|
|
39
|
+
│ │ └── subtasks/
|
|
40
|
+
│ │ └── PROJ-124/ # Subtask folder
|
|
41
|
+
│ │ ├── PROJ-124.md # Subtask sync state
|
|
42
|
+
│ │ └── _work/ # Subtask dev notes
|
|
43
|
+
│ │
|
|
44
|
+
│ └── PROJ-125/
|
|
45
|
+
│ └── PROJ-125.md
|
|
46
|
+
│
|
|
47
|
+
├── another-epic/
|
|
48
|
+
│ └── ...
|
|
49
|
+
│
|
|
50
|
+
└── _orphans/ # Stories without epic (yet)
|
|
51
|
+
└── PROJ-200/
|
|
52
|
+
├── PROJ-200.md # Story sync state
|
|
53
|
+
└── _work/ # Developer notes
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Hierarchy Rules
|
|
57
|
+
|
|
58
|
+
| Type | Path Pattern |
|
|
59
|
+
|------|-------------|
|
|
60
|
+
| Epic | `{epic-name}/epic.md` |
|
|
61
|
+
| Story | `{epic-name}/stories/{TICKET-KEY}/{TICKET-KEY}.md` |
|
|
62
|
+
| Subtask | `{epic-name}/stories/{PARENT-KEY}/subtasks/{TICKET-KEY}/{TICKET-KEY}.md` |
|
|
63
|
+
| Orphan | `_orphans/{TICKET-KEY}/{TICKET-KEY}.md` |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## File Ownership Rules
|
|
68
|
+
|
|
69
|
+
### 1. `{ticket}.md` — Sync State (Shared)
|
|
70
|
+
|
|
71
|
+
- **Updated by:** Multiple skills via FCMP protocol
|
|
72
|
+
- **Contains:** Jira metadata, sync state, description, acceptance criteria
|
|
73
|
+
- **Format:** Markdown with YAML frontmatter (see `sync-state-format.md`)
|
|
74
|
+
|
|
75
|
+
### 2. `_docs/` — Generated Documentation (Orchestrator Only)
|
|
76
|
+
|
|
77
|
+
- **Created by:** Orchestrator-type skills (e.g. `atlassian-orchestrator`) during epic/story generation
|
|
78
|
+
- **Contains:** Technical architecture, decisions, strategic context
|
|
79
|
+
- **Read by:** Developer workflow skills (e.g. `jira-ticket-focus`, `jira-wrap-sync`) for requirements context
|
|
80
|
+
|
|
81
|
+
### 3. `_work/` — Ephemeral Developer Workspace (Developer Skills Only)
|
|
82
|
+
|
|
83
|
+
- **Created by:** Developer workflow skills (e.g. `jira-ticket-focus`) when a developer focuses on a ticket
|
|
84
|
+
- **Contains:** Scratch notes, checklists, local context
|
|
85
|
+
- **Gitignored:** Yes (via `**/_work/`)
|
|
86
|
+
- **Never synced:** Local developer workspace only
|
|
87
|
+
|
|
88
|
+
### 4. `subtasks/` — Hierarchy (Shared)
|
|
89
|
+
|
|
90
|
+
- **Created by:** Any skill when subtasks are detected or requested
|
|
91
|
+
- **Contains:** Subtask folders following the same structure
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Ownership Summary
|
|
96
|
+
|
|
97
|
+
| Path | Owner | Purpose | Synced to Atlassian | Gitignored |
|
|
98
|
+
|------|-------|---------|---------------------|------------|
|
|
99
|
+
| `{ticket}.md` | Shared | Sync state | Yes | No |
|
|
100
|
+
| `_docs/` | Orchestrator skills | Generated docs | No | No |
|
|
101
|
+
| `_work/` | Developer workflow skills | Dev notes | No | Yes |
|
|
102
|
+
| `subtasks/` | Shared | Hierarchy | Partial | No |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Smart Creation Rules
|
|
107
|
+
|
|
108
|
+
### Rule 1: Epic Structure Exists
|
|
109
|
+
|
|
110
|
+
**Scenario:** A skill focuses on `PROJ-123` and the epic structure already exists.
|
|
111
|
+
|
|
112
|
+
**Action:**
|
|
113
|
+
```
|
|
114
|
+
docs/jira/{instance}/{project}/user-authentication/stories/PROJ-123/
|
|
115
|
+
├── PROJ-123.md # Read existing sync state
|
|
116
|
+
└── _work/ # Create if missing
|
|
117
|
+
└── notes.md # Create developer workspace
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Rule 2: Epic Missing (Orphan Story)
|
|
121
|
+
|
|
122
|
+
**Scenario:** A skill focuses on `PROJ-123` but no epic structure exists yet.
|
|
123
|
+
|
|
124
|
+
**Action:**
|
|
125
|
+
```
|
|
126
|
+
docs/jira/{instance}/{project}/_orphans/PROJ-123/
|
|
127
|
+
├── PROJ-123.md # Create with sync state
|
|
128
|
+
└── _work/
|
|
129
|
+
└── notes.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
When the epic structure is later created (e.g. by `atlassian-orchestrator`), the story is moved from `_orphans/` to its proper location in the epic hierarchy.
|
|
133
|
+
|
|
134
|
+
### Rule 3: Parent Requested
|
|
135
|
+
|
|
136
|
+
**Scenario:** Developer asks to load the parent ticket for `PROJ-123`.
|
|
137
|
+
|
|
138
|
+
**Action:**
|
|
139
|
+
1. Fetch parent ticket (e.g. `PROJ-120` epic) from Jira
|
|
140
|
+
2. Create epic structure: `docs/jira/{instance}/{project}/user-authentication/`
|
|
141
|
+
3. Move `PROJ-123` from `_orphans/` to `user-authentication/stories/PROJ-123/`
|
|
142
|
+
4. Update `PROJ-123.md` frontmatter: `parent: "../../epic.md"`
|
|
143
|
+
|
|
144
|
+
### Rule 4: Subtasks Requested
|
|
145
|
+
|
|
146
|
+
**Scenario:** Developer asks to load subtasks for `PROJ-123`.
|
|
147
|
+
|
|
148
|
+
**Action:**
|
|
149
|
+
1. Fetch subtasks from Jira
|
|
150
|
+
2. Create `PROJ-123/subtasks/` folder
|
|
151
|
+
3. For each subtask, create `subtasks/PROJ-124/PROJ-124.md`
|
|
152
|
+
4. Set parent reference: `parent: "../../PROJ-123.md"`
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## FCMP Protocol Integration
|
|
157
|
+
|
|
158
|
+
All skills MUST follow the FCMP protocol when updating `{ticket}.md`:
|
|
159
|
+
|
|
160
|
+
1. **FETCH:** Read current `{ticket}.md`, extract `sync.version`
|
|
161
|
+
2. **COMPARE:** Fetch from Jira, compare `version` field
|
|
162
|
+
3. **MERGE:** If mismatch, resolve conflict with user
|
|
163
|
+
4. **PUSH:** Update Jira with new version, update local file
|
|
164
|
+
|
|
165
|
+
See `fcmp-protocol.md` for full protocol details.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Gitignore
|
|
170
|
+
|
|
171
|
+
Add to your project's `.gitignore`:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
**/_work/
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
This ensures developer workspace folders are never committed to version control.
|