@knpkv/jira-clockify 1.3.0 → 1.4.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 +245 -1
- package/dist/package.json +36 -12
- package/dist/src/agent/agentSettings.d.ts +18 -0
- package/dist/src/agent/agentSettings.d.ts.map +1 -0
- package/dist/src/agent/agentSettings.js +23 -0
- package/dist/src/agent/agentSettings.js.map +1 -0
- package/dist/src/agent/schedule.d.ts +20 -0
- package/dist/src/agent/schedule.d.ts.map +1 -0
- package/dist/src/agent/schedule.js +189 -0
- package/dist/src/agent/schedule.js.map +1 -0
- package/dist/src/agent/sessions.d.ts +427 -0
- package/dist/src/agent/sessions.d.ts.map +1 -0
- package/dist/src/agent/sessions.js +868 -0
- package/dist/src/agent/sessions.js.map +1 -0
- package/dist/src/agent/sourceConsumption.d.ts +79 -0
- package/dist/src/agent/sourceConsumption.d.ts.map +1 -0
- package/dist/src/agent/sourceConsumption.js +191 -0
- package/dist/src/agent/sourceConsumption.js.map +1 -0
- package/dist/src/agent/watch.d.ts +76 -0
- package/dist/src/agent/watch.d.ts.map +1 -0
- package/dist/src/agent/watch.js +45 -0
- package/dist/src/agent/watch.js.map +1 -0
- package/dist/src/agent/writePlanning.d.ts +154 -0
- package/dist/src/agent/writePlanning.d.ts.map +1 -0
- package/dist/src/agent/writePlanning.js +210 -0
- package/dist/src/agent/writePlanning.js.map +1 -0
- package/dist/src/bin.d.ts +3 -0
- package/dist/src/bin.d.ts.map +1 -0
- package/dist/src/bin.js +9 -3
- package/dist/src/bin.js.map +1 -1
- package/dist/src/cli/agentWrite.d.ts +164 -0
- package/dist/src/cli/agentWrite.d.ts.map +1 -0
- package/dist/src/cli/agentWrite.js +362 -0
- package/dist/src/cli/agentWrite.js.map +1 -0
- package/dist/src/cli/auth.d.ts +8 -0
- package/dist/src/cli/auth.d.ts.map +1 -0
- package/dist/src/cli/auth.js +10 -10
- package/dist/src/cli/auth.js.map +1 -1
- package/dist/src/cli/calendar.d.ts +42 -0
- package/dist/src/cli/calendar.d.ts.map +1 -0
- package/dist/src/cli/calendar.js +189 -0
- package/dist/src/cli/calendar.js.map +1 -0
- package/dist/src/cli/config.d.ts +12 -0
- package/dist/src/cli/config.d.ts.map +1 -0
- package/dist/src/cli/config.js +163 -21
- package/dist/src/cli/config.js.map +1 -1
- package/dist/src/cli/fetchTicket.d.ts +51 -0
- package/dist/src/cli/fetchTicket.d.ts.map +1 -0
- package/dist/src/cli/fetchTicket.js +18 -2
- package/dist/src/cli/fetchTicket.js.map +1 -1
- package/dist/src/cli/fuzzySelect.d.ts +24 -0
- package/dist/src/cli/fuzzySelect.d.ts.map +1 -0
- package/dist/src/cli/layers.d.ts +40 -0
- package/dist/src/cli/layers.d.ts.map +1 -0
- package/dist/src/cli/layers.js +57 -13
- package/dist/src/cli/layers.js.map +1 -1
- package/dist/src/cli/list.d.ts +8 -0
- package/dist/src/cli/list.d.ts.map +1 -0
- package/dist/src/cli/list.js +2 -2
- package/dist/src/cli/list.js.map +1 -1
- package/dist/src/cli/reconcile.d.ts +129 -0
- package/dist/src/cli/reconcile.d.ts.map +1 -0
- package/dist/src/cli/reconcile.js +635 -46
- package/dist/src/cli/reconcile.js.map +1 -1
- package/dist/src/cli/root.d.ts +15 -0
- package/dist/src/cli/root.d.ts.map +1 -0
- package/dist/src/cli/root.js +4 -3
- package/dist/src/cli/root.js.map +1 -1
- package/dist/src/cli/runtimeFailure.d.ts +10 -0
- package/dist/src/cli/runtimeFailure.d.ts.map +1 -0
- package/dist/src/cli/runtimeFailure.js +17 -0
- package/dist/src/cli/runtimeFailure.js.map +1 -0
- package/dist/src/cli/setup.d.ts +10 -0
- package/dist/src/cli/setup.d.ts.map +1 -0
- package/dist/src/cli/setup.js +7 -7
- package/dist/src/cli/setup.js.map +1 -1
- package/dist/src/cli/timer/discard.d.ts +4 -0
- package/dist/src/cli/timer/discard.d.ts.map +1 -0
- package/dist/src/cli/timer/discard.js +2 -2
- package/dist/src/cli/timer/discard.js.map +1 -1
- package/dist/src/cli/timer/edit.d.ts +22 -0
- package/dist/src/cli/timer/edit.d.ts.map +1 -0
- package/dist/src/cli/timer/edit.js +62 -42
- package/dist/src/cli/timer/edit.js.map +1 -1
- package/dist/src/cli/timer/index.d.ts +12 -0
- package/dist/src/cli/timer/index.d.ts.map +1 -0
- package/dist/src/cli/timer/log.d.ts +16 -0
- package/dist/src/cli/timer/log.d.ts.map +1 -0
- package/dist/src/cli/timer/log.js +6 -6
- package/dist/src/cli/timer/log.js.map +1 -1
- package/dist/src/cli/timer/start.d.ts +21 -0
- package/dist/src/cli/timer/start.d.ts.map +1 -0
- package/dist/src/cli/timer/start.js +9 -9
- package/dist/src/cli/timer/start.js.map +1 -1
- package/dist/src/cli/timer/status.d.ts +22 -0
- package/dist/src/cli/timer/status.d.ts.map +1 -0
- package/dist/src/cli/timer/status.js +3 -3
- package/dist/src/cli/timer/status.js.map +1 -1
- package/dist/src/cli/timer/stop.d.ts +48 -0
- package/dist/src/cli/timer/stop.d.ts.map +1 -0
- package/dist/src/cli/timer/stop.js +19 -19
- package/dist/src/cli/timer/stop.js.map +1 -1
- package/dist/src/cli/timer.d.ts +11 -0
- package/dist/src/cli/timer.d.ts.map +1 -0
- package/dist/src/cli/timer.js +1 -1
- package/dist/src/cli/timer.js.map +1 -1
- package/dist/src/cli/watch.d.ts +54 -0
- package/dist/src/cli/watch.d.ts.map +1 -0
- package/dist/src/cli/watch.js +412 -0
- package/dist/src/cli/watch.js.map +1 -0
- package/dist/src/cli/watchLease.d.ts +99 -0
- package/dist/src/cli/watchLease.d.ts.map +1 -0
- package/dist/src/cli/watchLease.js +204 -0
- package/dist/src/cli/watchLease.js.map +1 -0
- package/dist/src/cli/writerGuard.d.ts +37 -0
- package/dist/src/cli/writerGuard.d.ts.map +1 -0
- package/dist/src/cli/writerGuard.js +92 -0
- package/dist/src/cli/writerGuard.js.map +1 -0
- package/dist/src/index.d.ts +46 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +46 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/main.d.ts +4 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/services/AgentSessionReader.d.ts +121 -0
- package/dist/src/services/AgentSessionReader.d.ts.map +1 -0
- package/dist/src/services/AgentSessionReader.js +392 -0
- package/dist/src/services/AgentSessionReader.js.map +1 -0
- package/dist/src/services/ClockifyAuth.d.ts +47 -0
- package/dist/src/services/ClockifyAuth.d.ts.map +1 -0
- package/dist/src/services/ClockifyAuth.js +2 -2
- package/dist/src/services/ClockifyAuth.js.map +1 -1
- package/dist/src/services/CodexTranscript.d.ts +112 -0
- package/dist/src/services/CodexTranscript.d.ts.map +1 -0
- package/dist/src/services/CodexTranscript.js +96 -0
- package/dist/src/services/CodexTranscript.js.map +1 -0
- package/dist/src/services/ConfigService.d.ts +99 -0
- package/dist/src/services/ConfigService.d.ts.map +1 -0
- package/dist/src/services/ConfigService.js +79 -7
- package/dist/src/services/ConfigService.js.map +1 -1
- package/dist/src/services/HomeDirectory.d.ts +17 -0
- package/dist/src/services/HomeDirectory.d.ts.map +1 -0
- package/dist/src/services/HomeDirectory.js +1 -1
- package/dist/src/services/IssueFacts.d.ts +127 -0
- package/dist/src/services/IssueFacts.d.ts.map +1 -0
- package/dist/src/services/IssueFacts.js +277 -0
- package/dist/src/services/IssueFacts.js.map +1 -0
- package/dist/src/services/ProviderDeletion.d.ts +19 -0
- package/dist/src/services/ProviderDeletion.d.ts.map +1 -0
- package/dist/src/services/ProviderDeletion.js +37 -0
- package/dist/src/services/ProviderDeletion.js.map +1 -0
- package/dist/src/services/ReconcileService.d.ts +378 -0
- package/dist/src/services/ReconcileService.d.ts.map +1 -0
- package/dist/src/services/ReconcileService.js +1270 -79
- package/dist/src/services/ReconcileService.js.map +1 -1
- package/dist/src/services/SavedEntries.d.ts +40 -0
- package/dist/src/services/SavedEntries.d.ts.map +1 -0
- package/dist/src/services/SavedEntries.js +209 -0
- package/dist/src/services/SavedEntries.js.map +1 -0
- package/dist/src/services/SessionAttributor.d.ts +114 -0
- package/dist/src/services/SessionAttributor.d.ts.map +1 -0
- package/dist/src/services/SessionAttributor.js +240 -0
- package/dist/src/services/SessionAttributor.js.map +1 -0
- package/dist/src/services/SourceLedger.d.ts +104 -0
- package/dist/src/services/SourceLedger.d.ts.map +1 -0
- package/dist/src/services/SourceLedger.js +302 -0
- package/dist/src/services/SourceLedger.js.map +1 -0
- package/dist/src/services/StateWriter.d.ts +39 -0
- package/dist/src/services/StateWriter.d.ts.map +1 -0
- package/dist/src/services/TicketService.d.ts +63 -0
- package/dist/src/services/TicketService.d.ts.map +1 -0
- package/dist/src/services/TimerService.d.ts +145 -0
- package/dist/src/services/TimerService.d.ts.map +1 -0
- package/dist/src/services/TimerService.js +113 -80
- package/dist/src/services/TimerService.js.map +1 -1
- package/dist/src/services/internal/JiraWorklogPost.d.ts +7 -0
- package/dist/src/services/internal/JiraWorklogPost.d.ts.map +1 -0
- package/dist/src/services/internal/JiraWorklogPost.js +32 -0
- package/dist/src/services/internal/JiraWorklogPost.js.map +1 -0
- package/dist/src/testing/fakeHeadless.d.ts +318 -0
- package/dist/src/testing/fakeHeadless.d.ts.map +1 -0
- package/dist/src/testing/fakeHeadless.js +1149 -0
- package/dist/src/testing/fakeHeadless.js.map +1 -0
- package/dist/src/tui/App.d.ts +6 -0
- package/dist/src/tui/App.d.ts.map +1 -0
- package/dist/src/tui/App.js +1 -1
- package/dist/src/tui/App.js.map +1 -1
- package/dist/src/tui/atoms/runtime.d.ts +8 -0
- package/dist/src/tui/atoms/runtime.d.ts.map +1 -0
- package/dist/src/tui/atoms/runtime.js +1 -1
- package/dist/src/tui/atoms/runtime.js.map +1 -1
- package/dist/src/tui/atoms/tickets.d.ts +3 -0
- package/dist/src/tui/atoms/tickets.d.ts.map +1 -0
- package/dist/src/tui/atoms/timer.d.ts +11 -0
- package/dist/src/tui/atoms/timer.d.ts.map +1 -0
- package/dist/src/tui/atoms/timer.js +1 -1
- package/dist/src/tui/atoms/timer.js.map +1 -1
- package/dist/src/tui/atoms/ui.d.ts +11 -0
- package/dist/src/tui/atoms/ui.d.ts.map +1 -0
- package/dist/src/tui/atoms/ui.js +1 -1
- package/dist/src/tui/atoms/ui.js.map +1 -1
- package/dist/src/tui/components/BigTimer.d.ts +2 -0
- package/dist/src/tui/components/BigTimer.d.ts.map +1 -0
- package/dist/src/tui/components/Footer.d.ts +2 -0
- package/dist/src/tui/components/Footer.d.ts.map +1 -0
- package/dist/src/tui/components/Header.d.ts +2 -0
- package/dist/src/tui/components/Header.d.ts.map +1 -0
- package/dist/src/tui/components/Header.js +1 -1
- package/dist/src/tui/components/Header.js.map +1 -1
- package/dist/src/tui/components/PopupInput.d.ts +18 -0
- package/dist/src/tui/components/PopupInput.d.ts.map +1 -0
- package/dist/src/tui/components/PopupMessage.d.ts +20 -0
- package/dist/src/tui/components/PopupMessage.d.ts.map +1 -0
- package/dist/src/tui/components/TicketList.d.ts +2 -0
- package/dist/src/tui/components/TicketList.d.ts.map +1 -0
- package/dist/src/tui/components/TicketList.js +1 -1
- package/dist/src/tui/components/TicketList.js.map +1 -1
- package/dist/src/tui/components/TicketRow.d.ts +8 -0
- package/dist/src/tui/components/TicketRow.d.ts.map +1 -0
- package/dist/src/tui/components/TimerDisplay.d.ts +2 -0
- package/dist/src/tui/components/TimerDisplay.d.ts.map +1 -0
- package/dist/src/tui/components/index.d.ts +12 -0
- package/dist/src/tui/components/index.d.ts.map +1 -0
- package/dist/src/tui/context/theme.d.ts +15 -0
- package/dist/src/tui/context/theme.d.ts.map +1 -0
- package/dist/src/tui/hooks/useElapsedTimer.d.ts +6 -0
- package/dist/src/tui/hooks/useElapsedTimer.d.ts.map +1 -0
- package/dist/src/tui/hooks/useElapsedTimer.js +1 -1
- package/dist/src/tui/hooks/useElapsedTimer.js.map +1 -1
- package/dist/src/tui/hooks/useTerminalSize.d.ts +5 -0
- package/dist/src/tui/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/src/utils/hints.d.ts +12 -0
- package/dist/src/utils/hints.d.ts.map +1 -0
- package/dist/src/utils/hints.js +12 -0
- package/dist/src/utils/hints.js.map +1 -0
- package/dist/src/utils/time.d.ts +104 -0
- package/dist/src/utils/time.d.ts.map +1 -0
- package/dist/src/utils/time.js +74 -8
- package/dist/src/utils/time.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -18
- package/skills/jcf/SKILL.md +93 -1
package/package.json
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knpkv/jira-clockify",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "TUI for Jira-Clockify time tracking, attachable to neovim",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "knpkv",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"main": "dist/src/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/src/index.d.ts",
|
|
12
|
+
"default": "./dist/src/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./testing.js": {
|
|
15
|
+
"types": "./dist/src/testing/fakeHeadless.d.ts",
|
|
16
|
+
"default": "./dist/src/testing/fakeHeadless.js"
|
|
17
|
+
},
|
|
18
|
+
"./*.js": {
|
|
19
|
+
"types": "./dist/src/*.d.ts",
|
|
20
|
+
"default": "./dist/src/*.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
8
23
|
"bin": {
|
|
9
24
|
"jcf": "dist/src/bin.js"
|
|
10
25
|
},
|
|
@@ -18,30 +33,33 @@
|
|
|
18
33
|
"skills"
|
|
19
34
|
],
|
|
20
35
|
"dependencies": {
|
|
21
|
-
"@effect/atom-react": "4.0.0
|
|
22
|
-
"@effect/platform-node": "4.0.0
|
|
23
|
-
"@opentui/core": "0.5.
|
|
24
|
-
"@opentui/react": "0.5.
|
|
25
|
-
"effect": "4.0.0
|
|
26
|
-
"react": "^19.
|
|
27
|
-
"@knpkv/agent-skills": "^0.3.
|
|
28
|
-
"@knpkv/
|
|
29
|
-
"@knpkv/
|
|
30
|
-
"@knpkv/
|
|
31
|
-
"@knpkv/
|
|
36
|
+
"@effect/atom-react": "4.0.0",
|
|
37
|
+
"@effect/platform-node": "4.0.0",
|
|
38
|
+
"@opentui/core": "0.5.14",
|
|
39
|
+
"@opentui/react": "0.5.14",
|
|
40
|
+
"effect": "4.0.0",
|
|
41
|
+
"react": "^19.3.0",
|
|
42
|
+
"@knpkv/agent-skills": "^0.3.2",
|
|
43
|
+
"@knpkv/ai-claude": "^0.4.0",
|
|
44
|
+
"@knpkv/atlassian-common": "^1.6.0",
|
|
45
|
+
"@knpkv/ai-codex": "^0.5.0",
|
|
46
|
+
"@knpkv/clockify-api-client": "^2.0.0",
|
|
47
|
+
"@knpkv/jira-api-client": "^2.0.0",
|
|
48
|
+
"@knpkv/jira-cli": "^1.4.1"
|
|
32
49
|
},
|
|
33
50
|
"devDependencies": {
|
|
34
|
-
"@effect/vitest": "4.0.0
|
|
51
|
+
"@effect/vitest": "4.0.0",
|
|
35
52
|
"@types/node": "latest",
|
|
36
|
-
"@types/react": "^19.
|
|
37
|
-
"tsx": "^4.23.
|
|
38
|
-
"vitest": "^
|
|
53
|
+
"@types/react": "^19.3.0",
|
|
54
|
+
"tsx": "^4.23.15",
|
|
55
|
+
"vitest": "^5.0.3"
|
|
39
56
|
},
|
|
40
57
|
"scripts": {
|
|
41
58
|
"start": "tsx src/bin.ts",
|
|
42
59
|
"build": "tsc -b && chmod +x dist/src/bin.js",
|
|
43
|
-
"check": "tsc -b tsconfig.json",
|
|
60
|
+
"check": "tsc -b tsconfig.json && tsc --noEmit -p test/tsconfig.json",
|
|
44
61
|
"test": "vitest",
|
|
45
62
|
"lint": "eslint \"{src,test}/**/*.{ts,tsx}\""
|
|
46
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"types": "dist/src/index.d.ts"
|
|
47
65
|
}
|
package/skills/jcf/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jcf
|
|
3
|
-
description: Use the @knpkv/jira-clockify CLI to track work across Jira and Clockify. Trigger when the user asks an agent to start, stop, discard, edit, inspect, or manually log time for Jira tickets; configure Jira OAuth or Clockify API access; list current Jira tickets; set default Clockify project, billable flag, or JQL; or launch the jcf TUI.
|
|
3
|
+
description: Use the @knpkv/jira-clockify CLI to track work across Jira and Clockify. Trigger when the user asks an agent to start, stop, discard, edit, inspect, or manually log time for Jira tickets; reconcile Clockify against Jira or recover forgotten time from local Claude Code and Codex sessions; configure Jira OAuth or Clockify API access; list current Jira tickets; set default Clockify project, billable flag, or JQL; or launch the jcf TUI.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Jcf
|
|
@@ -38,6 +38,15 @@ jcf config set jql 'assignee = currentUser() AND status != Done ORDER BY updated
|
|
|
38
38
|
jcf config reset
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
Configure which directories' Claude Code and Codex sessions may become proposed worklogs:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
jcf config set session-root ~/dev/work
|
|
45
|
+
jcf config set session-root ~/dev/work --remove
|
|
46
|
+
jcf config set session-ticket ~/dev/work/docs PROJ-42
|
|
47
|
+
jcf config set idle-cap 300
|
|
48
|
+
```
|
|
49
|
+
|
|
41
50
|
## Timer Commands
|
|
42
51
|
|
|
43
52
|
Launch the TUI:
|
|
@@ -85,6 +94,87 @@ Edit the running timer:
|
|
|
85
94
|
jcf timer edit
|
|
86
95
|
```
|
|
87
96
|
|
|
97
|
+
## Reconcile Commands
|
|
98
|
+
|
|
99
|
+
Both forms are remote write commands: they create Clockify entries and Jira worklogs. Never run
|
|
100
|
+
either unattended. Confirm the window and the direction (or the agent) with the user first, and
|
|
101
|
+
prefer the read-only forms below when gathering information.
|
|
102
|
+
|
|
103
|
+
Compare the two sides and fill whichever is short:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
jcf sync reconcile clockify-to-jira --day
|
|
107
|
+
jcf sync reconcile jira-to-clockify --week
|
|
108
|
+
jcf sync reconcile clockify-to-jira --since 2026-07-01 --until 2026-07-07
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Recover time neither side recorded, using local Claude Code and Codex sessions as evidence:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
jcf sync reconcile --agent claude --day
|
|
115
|
+
jcf sync reconcile --agent claude --week
|
|
116
|
+
jcf sync reconcile --agent claude --json
|
|
117
|
+
jcf sync reconcile --agent claude --day --calendar
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
- `--agent` is a mode switch, not a direction. Passing both is a usage error.
|
|
121
|
+
- `claude` is the only supported agent mode; `--agent codex` fails. That mode reads in-scope Claude Code
|
|
122
|
+
and Codex sessions as evidence.
|
|
123
|
+
- `--agent claude --json` is the read-only form: it writes exactly one JSON value to stdout, sends
|
|
124
|
+
everything human-facing to stderr, and creates no Clockify entry or Jira worklog. Use it to
|
|
125
|
+
inspect proposals before asking the user which to accept.
|
|
126
|
+
- Without `--json`, every row needs an interactive confirmation, so this form is unsuitable for
|
|
127
|
+
unattended use.
|
|
128
|
+
- Nothing is proposed for a directory outside the configured session roots, and a day with a timer
|
|
129
|
+
still running is reported but never proposed. Stop the timer and re-run to log that day.
|
|
130
|
+
- Every picker row names the issue summary and assignee; `--json` carries both as `summary` and
|
|
131
|
+
`assignee`. Rows are not listed above the picker — the picker rows _are_ the report.
|
|
132
|
+
- Written entries carry the issue title and an agent-written sentence saying what was done, read off
|
|
133
|
+
the session prompts. Notes are asked for only about confirmed rows, and only when writing, so
|
|
134
|
+
`--json` never spends a call on one. A row still writes when no note can be produced.
|
|
135
|
+
- `--calendar` adds an ASCII hour-by-hour grid of when the time was credited. `--json` carries the
|
|
136
|
+
same information as a `blocks` array per proposal, with `startMs`, `endMs` and credited `seconds`,
|
|
137
|
+
plus the issue `summary`. Sum `seconds`, not wall-clock bounds, for shared work.
|
|
138
|
+
- In `--json`, `ownershipWithheld` keeps rows assigned to someone else or unassigned, with a
|
|
139
|
+
`reason`; `withheld` remains the separate confidence-floor list. Neither list is offered to write.
|
|
140
|
+
- `--json` and `--calendar` are agent-mode flags; passing either without `--agent` is a usage error.
|
|
141
|
+
- Only messages the user typed count towards time; the agent's own output, its tool results, and
|
|
142
|
+
prompts it sends its own subagents do not, so an unattended agent run credits at most the idle cap
|
|
143
|
+
rather than the hour it ran for.
|
|
144
|
+
- If Jira cannot be read, the run fails rather than proposing time that may already be logged.
|
|
145
|
+
- Time worked on several issues at once is split equally between them, so a row's credited total can
|
|
146
|
+
be lower than the clock ranges beneath it; the report names the active total and the shared amount.
|
|
147
|
+
- Each proposal shows the attribution signal behind it (`branch`, `path`, `standing`, `agent`).
|
|
148
|
+
A branch name states intent, not fact: time spent on an unrelated fix while on a ticket branch is
|
|
149
|
+
credited to that branch's ticket, so review the signal before confirming.
|
|
150
|
+
|
|
151
|
+
## Watch Command
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
jcf watch claude # Runs until interrupted; writes as work settles
|
|
155
|
+
jcf watch claude --dry-run # Prints what it would write, writes nothing
|
|
156
|
+
jcf watch claude --interval 60
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
- A long-running remote write command. Only start it when the user explicitly asks for live
|
|
160
|
+
tracking, and say that it will keep writing until they stop it. Do not start it to answer a
|
|
161
|
+
question — it never terminates on its own, so it cannot be used to gather information.
|
|
162
|
+
- `--dry-run` is the read-only form, but it still runs forever. To inspect unlogged work, use
|
|
163
|
+
`jcf sync reconcile --agent claude --json` instead.
|
|
164
|
+
- It writes only branch-, path-, and standing-attributed blocks. Time only a coding agent could
|
|
165
|
+
place is reported and left for `jcf sync reconcile --agent claude`.
|
|
166
|
+
- It writes a block once it has been quiet for one idle cap, so work in progress is never written.
|
|
167
|
+
Nothing is written twice _on this machine_ — a proposal is always the gap the two sides still have,
|
|
168
|
+
and the lease keeps a second local watch out. Two machines watching one Clockify account can still
|
|
169
|
+
duplicate: see ADR-0007.
|
|
170
|
+
- It covers time since it started, plus any stretch a previous watch reached but had not written —
|
|
171
|
+
it leaves a cursor, so a restart resumes rather than dropping the block. A first run reaches back
|
|
172
|
+
for nothing. Earlier work in the same day needs `jcf sync reconcile`.
|
|
173
|
+
- Only one watch writes at a time, per machine. Starting a second one prints who holds the lease and
|
|
174
|
+
exits; do not start one to "check" on a running watch. After an ungraceful process death, verify no
|
|
175
|
+
watch remains before manually removing `~/.jcf/watch.lease`; the file is never auto-taken-over.
|
|
176
|
+
- It stops itself if Jira rejects the login. Re-authenticate with `jcf auth jira login` and restart.
|
|
177
|
+
|
|
88
178
|
## Agent Workflow
|
|
89
179
|
|
|
90
180
|
1. Run `jcf auth status` and `jcf timer status` before changing timer state.
|
|
@@ -92,3 +182,5 @@ jcf timer edit
|
|
|
92
182
|
3. Verify the active Jira profile when the user names a Jira site/account or before posting worklogs; `atlassian profiles doctor` shows Jira Clockify as a consumer of the `jira-cli` auth store.
|
|
93
183
|
4. Prefer explicit flags for non-interactive work: issue key, duration, date, time, project id, billable flag, and comment.
|
|
94
184
|
5. If no timer is running, `jcf timer stop` may offer an interactive correction interval; use `jcf timer log` for deterministic manual logging.
|
|
185
|
+
6. To find unlogged work, read `jcf sync reconcile --agent claude --json` first and report the
|
|
186
|
+
proposals to the user; only they should decide which rows to write.
|