@ethlete/agent-rules 0.1.0-next.4 → 0.1.0-next.40
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/AGENTS.md +28 -0
- package/CHANGELOG.md +620 -0
- package/CLAUDE.md +1 -0
- package/README.md +406 -29
- package/THIRD-PARTY-LICENSES.md +35 -0
- package/content/defaults.json +1 -1
- package/content/git-hooks/post-checkout.sh +10 -0
- package/content/git-hooks/pre-push.sh +5 -0
- package/content/hooks/away-mode.py +287 -0
- package/content/hooks/background-design-commands.py +215 -0
- package/content/hooks/builder-chat-words.py +269 -0
- package/content/hooks/context-warning.py +836 -142
- package/content/hooks/git-safety.py +213 -0
- package/content/hooks/subagent-model-policy.py +261 -0
- package/content/mods/.claude-plugin/marketplace.json +16 -0
- package/content/mods/plugins/e2e-progress/.claude-plugin/plugin.json +6 -0
- package/content/mods/plugins/e2e-progress/hooks/hooks.json +1 -0
- package/content/mods/plugins/e2e-progress/hooks/register.tsx +442 -0
- package/content/mods/plugins/e2e-progress/tsconfig.json +3 -0
- package/content/mods/plugins/e2e-progress/types/index.d.ts +23 -0
- package/content/mods/plugins/status-line/.claude-plugin/plugin.json +6 -0
- package/content/mods/plugins/status-line/hooks/hooks.json +1 -0
- package/content/mods/plugins/status-line/hooks/line.ts +73 -0
- package/content/mods/plugins/status-line/hooks/register.tsx +141 -0
- package/content/mods/plugins/status-line/types/index.d.ts +5 -0
- package/content/output-styles/ste-clarity.md +131 -0
- package/content/rules/agent-sessions-wake-up.md +11 -0
- package/content/rules/app-styling.md +66 -0
- package/content/rules/comments.md +4 -1
- package/content/rules/lint-and-format.md +7 -5
- package/content/rules/nx-layout.md +53 -0
- package/content/rules/reactive-state.md +1 -1
- package/content/rules/styling.md +19 -10
- package/content/rules/subagent-models.md +42 -0
- package/content/skills/agent-sessions/SKILL.md +94 -0
- package/content/skills/agent-sessions/agent-sessions.mjs +1079 -0
- package/content/skills/angular-patterns/SKILL.md +31 -7
- package/content/skills/api-source/SKILL.md +156 -0
- package/content/skills/app-testing/SKILL.md +141 -0
- package/content/skills/codex-subagent/SKILL.md +90 -0
- package/content/skills/codex-subagent/codex-agent.mjs +229 -0
- package/content/skills/design-exploration/SKILL.md +190 -0
- package/content/skills/design-exploration/check-story.mjs +139 -0
- package/content/skills/design-exploration/reference-check-and-notes.md +92 -0
- package/content/skills/design-exploration/reference-flows-and-wireframes.md +78 -0
- package/content/skills/design-exploration/reference-inbox-and-mcp.md +54 -0
- package/content/skills/design-exploration/reference-order-and-design-system.md +124 -0
- package/content/skills/design-exploration/reference-products-and-sketches.md +211 -0
- package/content/skills/design-exploration/reference-shots.md +25 -0
- package/content/skills/design-exploration/shoot-template.mjs +61 -0
- package/content/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/content/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/content/skills/domain-modeling/SKILL.md +80 -0
- package/content/skills/e2e-triage/SKILL.md +80 -0
- package/content/skills/figma-export/SKILL.md +191 -0
- package/content/skills/figma-export/dump-figma-layers.py +83 -0
- package/content/skills/figma-export/dump-figma-svg.py +235 -0
- package/content/skills/figma-export/measure-template.mjs +87 -0
- package/content/skills/git-commit/SKILL.md +21 -7
- package/content/skills/git-flow/SKILL.md +87 -0
- package/content/skills/grill-with-docs/SKILL.md +13 -0
- package/content/skills/grilling/SKILL.md +52 -0
- package/content/skills/handoff/SKILL.md +29 -69
- package/content/skills/handoff/save.md +187 -0
- package/content/skills/query/SKILL.md +165 -64
- package/content/skills/report/SKILL.md +26 -0
- package/content/skills/rxjs-signals/SKILL.md +33 -4
- package/content/skills/sdk-docs/SKILL.md +50 -14
- package/content/skills/sdk-local-build/SKILL.md +26 -8
- package/content/skills/sdk-local-build/sdk-local-baseline.mjs +64 -0
- package/content/skills/sdk-source/SKILL.md +37 -34
- package/content/skills/sdk-update/SKILL.md +103 -0
- package/content/skills/story-styling/SKILL.md +10 -8
- package/content/skills/styleguide/SKILL.md +13 -8
- package/content/skills/styleguide/assets.md +54 -0
- package/content/skills/styleguide/changesets.md +17 -0
- package/content/skills/styleguide/file-structure.md +73 -0
- package/content/skills/styleguide/lint-rule-lookup.md +52 -0
- package/content/skills/styleguide/storybook-structure.md +25 -0
- package/content/skills/theming/SKILL.md +56 -28
- package/content/skills/timetrack/SKILL.md +324 -0
- package/content/skills/verify-in-app/SKILL.md +107 -0
- package/content/skills/verify-in-storybook/SKILL.md +1 -1
- package/migrations/list-state-query-form.md +20 -0
- package/migrations/nx-layout.md +29 -0
- package/migrations/sdk-components-over-hand-built-ui.md +27 -0
- package/migrations/search-query-field.md +52 -0
- package/migrations.json +39 -0
- package/package.json +19 -3
- package/src/index.js +99 -32
- package/src/index.js.map +1 -1
- package/src/lib/cli-args.d.ts +9 -0
- package/src/lib/cli-args.js +48 -0
- package/src/lib/cli-args.js.map +1 -0
- package/src/lib/commitlint.d.ts +10 -0
- package/src/lib/commitlint.js +51 -0
- package/src/lib/commitlint.js.map +1 -0
- package/src/lib/config.d.ts +51 -6
- package/src/lib/config.js +127 -10
- package/src/lib/config.js.map +1 -1
- package/src/lib/filter.d.ts +2 -0
- package/src/lib/filter.js +4 -4
- package/src/lib/filter.js.map +1 -1
- package/src/lib/frontmatter.d.ts +2 -0
- package/src/lib/frontmatter.js +33 -5
- package/src/lib/frontmatter.js.map +1 -1
- package/src/lib/git-flow/build.d.ts +35 -0
- package/src/lib/git-flow/build.js +24 -0
- package/src/lib/git-flow/build.js.map +1 -0
- package/src/lib/git-flow/config.d.ts +59 -0
- package/src/lib/git-flow/config.js +50 -0
- package/src/lib/git-flow/config.js.map +1 -0
- package/src/lib/git-flow/index.d.ts +6 -0
- package/src/lib/git-flow/index.js +23 -0
- package/src/lib/git-flow/index.js.map +1 -0
- package/src/lib/git-flow/parse.d.ts +49 -0
- package/src/lib/git-flow/parse.js +300 -0
- package/src/lib/git-flow/parse.js.map +1 -0
- package/src/lib/git-flow/rename.d.ts +24 -0
- package/src/lib/git-flow/rename.js +70 -0
- package/src/lib/git-flow/rename.js.map +1 -0
- package/src/lib/git-flow/start.d.ts +49 -0
- package/src/lib/git-flow/start.js +57 -0
- package/src/lib/git-flow/start.js.map +1 -0
- package/src/lib/git-flow/validate.d.ts +34 -0
- package/src/lib/git-flow/validate.js +72 -0
- package/src/lib/git-flow/validate.js.map +1 -0
- package/src/lib/git-flow-command.d.ts +4 -0
- package/src/lib/git-flow-command.js +165 -0
- package/src/lib/git-flow-command.js.map +1 -0
- package/src/lib/git-flow-repair.d.ts +17 -0
- package/src/lib/git-flow-repair.js +165 -0
- package/src/lib/git-flow-repair.js.map +1 -0
- package/src/lib/git-flow-start.d.ts +20 -0
- package/src/lib/git-flow-start.js +140 -0
- package/src/lib/git-flow-start.js.map +1 -0
- package/src/lib/git-test-env.fixtures.d.ts +11 -0
- package/src/lib/git-test-env.fixtures.js +31 -0
- package/src/lib/git-test-env.fixtures.js.map +1 -0
- package/src/lib/git.d.ts +64 -0
- package/src/lib/git.js +131 -0
- package/src/lib/git.js.map +1 -0
- package/src/lib/gitlab.d.ts +35 -0
- package/src/lib/gitlab.js +116 -0
- package/src/lib/gitlab.js.map +1 -0
- package/src/lib/index.d.ts +2 -0
- package/src/lib/index.js +26 -11
- package/src/lib/index.js.map +1 -1
- package/src/lib/migrate.js +8 -2
- package/src/lib/migrate.js.map +1 -1
- package/src/lib/output-style-command.d.ts +3 -0
- package/src/lib/output-style-command.js +69 -0
- package/src/lib/output-style-command.js.map +1 -0
- package/src/lib/output-style.d.ts +38 -0
- package/src/lib/output-style.js +134 -0
- package/src/lib/output-style.js.map +1 -0
- package/src/lib/owned-paths.js +27 -3
- package/src/lib/owned-paths.js.map +1 -1
- package/src/lib/package-runner.d.ts +4 -0
- package/src/lib/package-runner.js +86 -0
- package/src/lib/package-runner.js.map +1 -0
- package/src/lib/peer-path.d.ts +12 -0
- package/src/lib/peer-path.js +39 -0
- package/src/lib/peer-path.js.map +1 -0
- package/src/lib/plain-text.d.ts +9 -0
- package/src/lib/plain-text.js +22 -0
- package/src/lib/plain-text.js.map +1 -0
- package/src/lib/plan.d.ts +6 -6
- package/src/lib/plan.js +168 -40
- package/src/lib/plan.js.map +1 -1
- package/src/lib/prettier.d.ts +21 -0
- package/src/lib/prettier.js +51 -0
- package/src/lib/prettier.js.map +1 -0
- package/src/lib/prompt.d.ts +8 -0
- package/src/lib/prompt.js +35 -0
- package/src/lib/prompt.js.map +1 -0
- package/src/lib/render.d.ts +26 -2
- package/src/lib/render.js +45 -10
- package/src/lib/render.js.map +1 -1
- package/src/lib/report-command.d.ts +33 -0
- package/src/lib/report-command.js +312 -0
- package/src/lib/report-command.js.map +1 -0
- package/src/lib/sessions-command.d.ts +4 -0
- package/src/lib/sessions-command.js +16 -0
- package/src/lib/sessions-command.js.map +1 -0
- package/src/lib/sync.d.ts +1 -2
- package/src/lib/sync.js +37 -17
- package/src/lib/sync.js.map +1 -1
- package/src/lib/targets/agents-skills.js +1 -1
- package/src/lib/targets/agents-skills.js.map +1 -1
- package/src/lib/targets/claude-hooks.d.ts +3 -23
- package/src/lib/targets/claude-hooks.js +22 -86
- package/src/lib/targets/claude-hooks.js.map +1 -1
- package/src/lib/targets/claude-mods.d.ts +20 -0
- package/src/lib/targets/claude-mods.js +47 -0
- package/src/lib/targets/claude-mods.js.map +1 -0
- package/src/lib/targets/claude.js +2 -3
- package/src/lib/targets/claude.js.map +1 -1
- package/src/lib/targets/codex-hooks.d.ts +12 -0
- package/src/lib/targets/codex-hooks.js +35 -0
- package/src/lib/targets/codex-hooks.js.map +1 -0
- package/src/lib/targets/codex.js +4 -4
- package/src/lib/targets/codex.js.map +1 -1
- package/src/lib/targets/copilot.js +4 -4
- package/src/lib/targets/copilot.js.map +1 -1
- package/src/lib/targets/cursor.js +3 -3
- package/src/lib/targets/cursor.js.map +1 -1
- package/src/lib/targets/git-hooks.d.ts +25 -0
- package/src/lib/targets/git-hooks.js +71 -0
- package/src/lib/targets/git-hooks.js.map +1 -0
- package/src/lib/targets/hooks-shared.d.ts +60 -0
- package/src/lib/targets/hooks-shared.js +174 -0
- package/src/lib/targets/hooks-shared.js.map +1 -0
- package/src/lib/targets/mcp.d.ts +16 -0
- package/src/lib/targets/mcp.js +72 -0
- package/src/lib/targets/mcp.js.map +1 -0
- package/src/lib/targets/shared.d.ts +1 -9
- package/src/lib/targets/shared.js +4 -8
- package/src/lib/targets/shared.js.map +1 -1
- package/src/lib/timetrack-command.d.ts +11 -0
- package/src/lib/timetrack-command.js +1262 -0
- package/src/lib/timetrack-command.js.map +1 -0
- package/src/lib/timetrack-snapshot.d.ts +66 -0
- package/src/lib/timetrack-snapshot.js +146 -0
- package/src/lib/timetrack-snapshot.js.map +1 -0
- package/src/lib/timetrack.d.ts +607 -0
- package/src/lib/timetrack.js +285 -0
- package/src/lib/timetrack.js.map +1 -0
- package/content/skills/styleguide/STYLEGUIDE.md +0 -520
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# File structure
|
|
2
|
+
|
|
3
|
+
Read this file when placing routes, views, components, providers, or local utilities.
|
|
4
|
+
|
|
5
|
+
Mirror the route tree in folders and suffix routing components with `-view`:
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { Routes } from '@angular/router';
|
|
9
|
+
|
|
10
|
+
export const SHOP_ROUTES: Routes = [
|
|
11
|
+
{
|
|
12
|
+
path: 'items',
|
|
13
|
+
loadComponent: () =>
|
|
14
|
+
import('./items-list-view/items-list-view.component').then((module) => module.ItemsListViewComponent),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
path: 'items/:id',
|
|
18
|
+
loadComponent: () =>
|
|
19
|
+
import('./item-detail-host-view/item-detail-host-view.component').then(
|
|
20
|
+
(module) => module.ItemDetailHostViewComponent,
|
|
21
|
+
),
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
path: '',
|
|
25
|
+
loadComponent: () =>
|
|
26
|
+
import('./item-detail-host-view/item-detail-view/item-detail-view.component').then(
|
|
27
|
+
(module) => module.ItemDetailViewComponent,
|
|
28
|
+
),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: 'reviews',
|
|
32
|
+
loadComponent: () =>
|
|
33
|
+
import('./item-detail-host-view/item-reviews-view/item-reviews-view.component').then(
|
|
34
|
+
(module) => module.ItemReviewsViewComponent,
|
|
35
|
+
),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use these placement rules:
|
|
43
|
+
|
|
44
|
+
- Put reusable view-level pieces in `components/`.
|
|
45
|
+
- Put children used only by one parent in that parent's `partials/`.
|
|
46
|
+
- Put generic presentation-only pieces in `uikit/`.
|
|
47
|
+
- Put application-shell pieces in `shell/`.
|
|
48
|
+
- Keep a directive, pipe, provider, form configuration, or utility beside its narrowest
|
|
49
|
+
consumer. Move it upward only when more consumers appear.
|
|
50
|
+
- Use simple utility names such as `items-list-filter-form.ts`, not `.utils.ts`.
|
|
51
|
+
- Give exportable folders an `index.ts`, but import source files directly. Do not import
|
|
52
|
+
a parent barrel from its subdirectory.
|
|
53
|
+
- Keep application projects thin; move shared or domain logic into buildable libraries
|
|
54
|
+
with clear import paths.
|
|
55
|
+
|
|
56
|
+
```plaintext
|
|
57
|
+
shop/
|
|
58
|
+
├── items-list-view/
|
|
59
|
+
│ ├── components/
|
|
60
|
+
│ │ └── item-card/
|
|
61
|
+
│ │ ├── partials/
|
|
62
|
+
│ │ │ ├── item-image/
|
|
63
|
+
│ │ │ └── item-price/
|
|
64
|
+
│ │ ├── item-card.component.ts
|
|
65
|
+
│ │ └── item-card.component.html
|
|
66
|
+
│ ├── items-list-filter-form.ts
|
|
67
|
+
│ └── items-list-view.component.ts
|
|
68
|
+
└── item-detail-host-view/
|
|
69
|
+
├── item-detail-view/
|
|
70
|
+
├── item-reviews-view/
|
|
71
|
+
├── item-detail.provider.ts
|
|
72
|
+
└── item-detail-host-view.component.ts
|
|
73
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Lint rule lookup
|
|
2
|
+
|
|
3
|
+
Read this file only to explain a lint result or identify which rule owns a mechanical
|
|
4
|
+
convention. Run lint with `--fix`; do not hand-check this table before linting.
|
|
5
|
+
|
|
6
|
+
| Convention | Rule |
|
|
7
|
+
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
8
|
+
| No `any` / `$any()`; narrow `unknown` | `@typescript-eslint/no-explicit-any`, `@angular-eslint/template/no-any` |
|
|
9
|
+
| Static strings and booleans use attributes | `@angular-eslint/template/prefer-static-string-properties`, `ethlete/prefer-static-boolean-properties` |
|
|
10
|
+
| `type`, not `interface` (module augmentations stay interfaces) | `ethlete/consistent-type-definitions` |
|
|
11
|
+
| No `enum` or `const enum` | `ethlete/no-enum` |
|
|
12
|
+
| `const` by default; one declaration per statement | `no-var`, `prefer-const`, `one-var` |
|
|
13
|
+
| Strict equality | `eqeqeq` |
|
|
14
|
+
| Maximum two positional parameters | `max-params` |
|
|
15
|
+
| No type-only imports | `ethlete/no-type-only-import` |
|
|
16
|
+
| Descriptive `T`-prefixed generic names | `@typescript-eslint/naming-convention` |
|
|
17
|
+
| No `async` / `await` | `ethlete/no-async-await` |
|
|
18
|
+
| Arrow functions standalone; methods in classes | `no-restricted-syntax` |
|
|
19
|
+
| Blank line before a multiline guard return | `ethlete/guard-return-newline` |
|
|
20
|
+
| No trivially inferable return type | `ethlete/no-trivial-return-type` |
|
|
21
|
+
| Member and local naming conventions | `@typescript-eslint/naming-convention`, `ethlete/no-leading-underscore-class-member`, `ethlete/no-screaming-case-local` |
|
|
22
|
+
| Class constants are `readonly` and upper case | `ethlete/class-constant-property` |
|
|
23
|
+
| No `readonly` on reactive members | `ethlete/no-readonly-signal` |
|
|
24
|
+
| Injected and template-visible member accessibility | `ethlete/inject-member-accessibility`, `ethlete/template-member-accessibility` |
|
|
25
|
+
| No inject chains, pure aliases, or trivial wrappers | `ethlete/no-inject-chain`, `ethlete/no-member-alias`, `ethlete/no-trivial-wrapper-method` |
|
|
26
|
+
| No unused private or protected members | `ethlete/no-unused-class-member` |
|
|
27
|
+
| Pure module-scope provider calls | `ethlete/no-impure-top-level-provider` |
|
|
28
|
+
| No redundant `@internal` | `ethlete/no-redundant-internal` |
|
|
29
|
+
| Observable names end in `$` | `ethlete/require-dollar-suffix` |
|
|
30
|
+
| No subscribe body, subscribe in pipe, or RxJS in signal derivations | `ethlete/no-subscribe-with-body`, `ethlete/no-subscribe-in-pipe`, `ethlete/no-rxjs-in-effect` |
|
|
31
|
+
| `takeUntilDestroyed()` is the last operator in its pipe | `ethlete/take-until-destroyed-last` |
|
|
32
|
+
| Effect teardown uses `onCleanup` or `DestroyRef` | `ethlete/no-effect-cleanup-return` |
|
|
33
|
+
| Prefer `linkedSignal` for writable derived state | `ethlete/prefer-linked-signal` |
|
|
34
|
+
| `linkedSignal` source is a `computed`, not an inline function over an input | `ethlete/prefer-computed-linked-signal-source` |
|
|
35
|
+
| Global component CSS encapsulation | `ethlete/require-view-encapsulation-none` |
|
|
36
|
+
| Angular-version-correct change detection metadata | `ethlete/require-on-push-change-detection`, `ethlete/no-redundant-on-push-change-detection` |
|
|
37
|
+
| No redundant standalone flag or empty metadata arrays | `ethlete/no-standalone-flag`, `ethlete/no-empty-angular-metadata-arrays` |
|
|
38
|
+
| No legacy lifecycle hooks or decorators | `no-restricted-syntax`, `ethlete/no-legacy-angular-decorators` |
|
|
39
|
+
| No injectable services, guards, or resolvers | `no-restricted-syntax` |
|
|
40
|
+
| Output naming | `@angular-eslint/no-output-on-prefix`, `@angular-eslint/no-output-native`, `ethlete/prefer-present-tense-output` |
|
|
41
|
+
| Inputs do not collide with global HTML attributes | `ethlete/no-native-html-input-name` |
|
|
42
|
+
| No pipe logic | `ethlete/no-pipe-logic` |
|
|
43
|
+
| Class members and decorator metadata stay ordered | `ethlete/class-member-order`, `ethlete/angular-decorator-property-order` |
|
|
44
|
+
| Routing views use `-view` / `ViewComponent` | `ethlete/enforce-routing-view-naming` |
|
|
45
|
+
| No direct browser globals, DOM queries, native observers, or cookies | `no-restricted-globals`, `ethlete/no-direct-dom-manipulation`, `ethlete/no-dom-query`, `ethlete/no-native-observers`, `ethlete/no-document-cookie` |
|
|
46
|
+
| No barrel imports | `no-restricted-syntax` |
|
|
47
|
+
| Prefer the SDK wrappers for platform utilities | `ethlete/prefer-clone-equal`, `ethlete/prefer-rxjs-timer`, `ethlete/prefer-match-media`, `ethlete/prefer-viewport-size`, `ethlete/no-angular-seo-services`, `ethlete/no-locale-id`, `ethlete/no-angular-router-api` |
|
|
48
|
+
|
|
49
|
+
Judgment still belongs outside lint: name things after their behavior, use an object
|
|
50
|
+
parameter after two positional parameters, expose injected members directly instead of
|
|
51
|
+
aliasing them, and use `/** @internal */` only on technically public library API that
|
|
52
|
+
must be stripped from declarations.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Storybook structure
|
|
2
|
+
|
|
3
|
+
Read this file when placing a `*.stories.ts` file or code used only to render stories.
|
|
4
|
+
|
|
5
|
+
- Keep the `*.stories.ts` file beside the component it documents.
|
|
6
|
+
- Put private host components, dummy data, and story-only helpers in `storybook/`.
|
|
7
|
+
- Never export Storybook-only code from the component's public barrel.
|
|
8
|
+
- A private `storybook/index.ts` may simplify imports into the adjacent story, but no
|
|
9
|
+
production source may import it.
|
|
10
|
+
|
|
11
|
+
```plaintext
|
|
12
|
+
settings-form/
|
|
13
|
+
├── storybook/
|
|
14
|
+
│ ├── settings-form-storybook.component.ts
|
|
15
|
+
│ ├── settings-form-storybook.component.html
|
|
16
|
+
│ ├── settings-form-dummy-data.ts
|
|
17
|
+
│ └── index.ts
|
|
18
|
+
├── settings-form.component.ts
|
|
19
|
+
├── settings-form.component.html
|
|
20
|
+
├── settings-form.component.stories.ts
|
|
21
|
+
└── index.ts
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The story file stays at the component root; only its private support code goes into
|
|
25
|
+
`storybook/`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: theming
|
|
3
|
-
description: The
|
|
3
|
+
description: The surface and color theming systems in @ethlete/core. Read BEFORE writing or reviewing CSS involving color, background, border or interaction state, or wiring theme context across overlays/portals.
|
|
4
4
|
kind: skill
|
|
5
5
|
scope: consumer
|
|
6
6
|
requires: ['@ethlete/core']
|
|
@@ -37,16 +37,16 @@ The generated CSS defines the raw vars on `.et-surface--<name>` / `.et-color--<n
|
|
|
37
37
|
classes (plus `:root` defaults) and derives the public tokens below on `:root` **and**
|
|
38
38
|
every scope class - so the tokens are always resolvable and components just read them.
|
|
39
39
|
|
|
40
|
-
**Theme names are yours.**
|
|
41
|
-
|
|
42
|
-
The portable handle is the theme **`type`**: `
|
|
43
|
-
the app registered with `type: 'error'`.
|
|
40
|
+
**Theme names are yours.** Never hardcode them as an SDK-defined union or reusable API
|
|
41
|
+
contract. App-specific docs may name their own themes when they label them as app values.
|
|
42
|
+
The portable handle is the theme **`type`**: `injectSemanticColorTheme('error')` finds
|
|
43
|
+
whichever theme the app registered with `type: 'error'`.
|
|
44
44
|
|
|
45
45
|
## Tokens components may consume
|
|
46
46
|
|
|
47
47
|
Use these **derived** tokens - never the raw `--et-surface-background` /
|
|
48
|
-
`--et-color-primary` channel triplets
|
|
49
|
-
|
|
48
|
+
`--et-color-primary` channel triplets. Never use a hardcoded color as the primary value.
|
|
49
|
+
A static fallback inside `var(--token, <fallback>)` is permitted, but not required.
|
|
50
50
|
|
|
51
51
|
Surface (each exists as `-solid` = usable color, `-rgb` = `R G B` channels):
|
|
52
52
|
|
|
@@ -61,22 +61,26 @@ Surface (each exists as `-solid` = usable color, `-rgb` = `R G B` channels):
|
|
|
61
61
|
|
|
62
62
|
Color (from the nearest `[etProvideColor]` scope):
|
|
63
63
|
|
|
64
|
-
| Token | Use for
|
|
65
|
-
| -------------------------------- |
|
|
66
|
-
| `--et-theme-color-primary` | filled backgrounds
|
|
67
|
-
| `--et-theme-color-primary-solid` | accents at full strength: focus borders, selected marks, spinners
|
|
68
|
-
| `--et-theme-color-on-primary` | text/icons on a primary-filled background
|
|
69
|
-
| `--et-theme-color-ink-solid` | primary-tinted text/border on transparent/tonal fills
|
|
64
|
+
| Token | Use for |
|
|
65
|
+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `--et-theme-color-primary` | filled backgrounds on an element you do **not** tint. To tint per state, set `--et-theme-color-primary-opacity: 0.16` and compose the color yourself: `rgb(var(--et-theme-color-primary-rgb) / var(--et-theme-color-primary-opacity))`. The alias is substituted at the `et-color--*` scope, so an inherited value carries the scope's opacity, never the element's |
|
|
67
|
+
| `--et-theme-color-primary-solid` | accents at full strength: focus borders, selected marks, spinners |
|
|
68
|
+
| `--et-theme-color-on-primary` | text/icons on a primary-filled background |
|
|
69
|
+
| `--et-theme-color-ink-solid` | primary-tinted text/border on transparent/tonal fills |
|
|
70
70
|
|
|
71
71
|
Interaction-state variants (`--et-surface-interaction-{hover,focus,active,disabled}-solid`)
|
|
72
72
|
resolve automatically per CSS state when the element has `[etSurfaceInteractive]`;
|
|
73
73
|
similarly `[etColorInteractive]` re-resolves the color tokens per state. Put either on
|
|
74
74
|
the interactive element itself, never on a wrapper.
|
|
75
75
|
|
|
76
|
+
**Never use `hover:bg-et-surface-interaction-hover` for a hover row.** The token is a
|
|
77
|
+
full-strength neutral tint, so in dark mode it gives a light row with near-white text. Use
|
|
78
|
+
`[etSurfaceInteractive]` on the row for hover feedback.
|
|
79
|
+
|
|
76
80
|
## Providing context
|
|
77
81
|
|
|
78
|
-
- `[etProvideSurface]="
|
|
79
|
-
elevation) set the surface scope; `[etProvideColor]="
|
|
82
|
+
- `[etProvideSurface]="surfaceThemeName"` / `[etAutoSurface]` (auto-picks the next
|
|
83
|
+
elevation) set the surface scope; `[etProvideColor]="colorThemeName"` sets the color scope.
|
|
80
84
|
A component that owns a themed region usually adds `ProvideColorDirective` /
|
|
81
85
|
`ProvideSurfaceDirective` as `hostDirectives`.
|
|
82
86
|
- **Detached overlay panes (menu, dialog, tooltip…) do not inherit DOM context.**
|
|
@@ -85,26 +89,50 @@ the interactive element itself, never on a wrapper.
|
|
|
85
89
|
color and `resolveSurfaceByElevation(themes, type, elevation + 1)` for the surface.
|
|
86
90
|
- **Semantic colors come through DI, not CSS.** There is no global "error color"
|
|
87
91
|
variable - error/warning/success are just color themes. To render something in the
|
|
88
|
-
error color, `
|
|
89
|
-
theme) and either bind it
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
error color, `injectSemanticColorTheme('error')` (reading it throws if the app
|
|
93
|
+
registered no `type: 'error'` theme) and either bind it
|
|
94
|
+
(`[etProvideColor]="errorColorTheme()"`) or force it programmatically
|
|
95
|
+
(`provideColor.forceColor(theme)` / `clearForcedColor()`). Inside that scope,
|
|
96
|
+
`--et-theme-color-primary-*` _is_ the error color.
|
|
97
|
+
- **A surface swaps a chosen accent; it never picks one.** The chosen accent is the
|
|
98
|
+
nearest `[etProvideColor]`, else the `isDefault` theme, or for
|
|
99
|
+
`injectSemanticColorTheme(type)` the theme of that `type`. The nearest surface's
|
|
100
|
+
`SurfaceTheme.colorThemeVariants` (e.g. `{ brand: 'brand-on-light', success: 'success-on-light' }`,
|
|
101
|
+
variants registered without a `type`) swaps it; an accent without an entry stays the
|
|
102
|
+
same on every surface. With no surface above, the root surface swaps, and
|
|
103
|
+
`provideColorScheme()` paints its swap of the default accent on `<html>`. A neutral that follows the surface is `color="surface"`
|
|
104
|
+
(`interactionColor`), not a variant. `colorTheme` and `semanticColorThemes` are
|
|
105
|
+
deprecated. Never add per-surface logic to a color theme or new CSS vars for it.
|
|
106
|
+
`injectErrorTheme()`, `injectWarningTheme()` and `injectSuccessTheme()` are
|
|
107
|
+
deprecated: they ignore the surface.
|
|
92
108
|
|
|
93
109
|
## Pitfalls
|
|
94
110
|
|
|
111
|
+
- A surface theme may have `elevation: -1` (a literal unary minus); the generator fails on a theme it cannot
|
|
112
|
+
parse. Filled form fields, table card rows and grid items resolve `parent.elevation + 1`; toasts and
|
|
113
|
+
`@ethlete/cdk` overlays with a backdrop always resolve elevation 1 (without a backdrop, `parent + 1`), and the
|
|
114
|
+
overlay scope class goes from `et-surface--inherited` to `et-surface--<theme>`. `@ethlete/cdk` CSS reads no
|
|
115
|
+
`--et-surface-*` token, so `etProvideSurface` on a cdk host does nothing.
|
|
95
116
|
- `@property` `initial-value` cannot contain `var()`, so a public `--et-*` token
|
|
96
117
|
declared via `@property` can never default to a theme token. If the default should
|
|
97
118
|
come from the theme, don't declare an `@property` - consume the theme token directly
|
|
98
119
|
(optionally behind a `--_et-*` indirection var).
|
|
120
|
+
- `@property` `initial-value` also cannot use a **font-relative or container unit**
|
|
121
|
+
(`em`, `rem`, `ex`, `ch`, `lh`, `cap`, `ic`, `cq*`). The value must be computationally
|
|
122
|
+
independent, so the browser drops the whole rule and leaves the token unregistered -
|
|
123
|
+
with no error. Percentages and viewport units (`vh`, `vw`, `dvh`) are fine. When the
|
|
124
|
+
default has to be relative, use `syntax: '*'` with no `initial-value` and put the
|
|
125
|
+
default in a fallback at each use site: `var(--et-skeleton-size, 1em)`.
|
|
99
126
|
- `--et-theme-color-primary-*` always resolves to the **nearest color scope**. A
|
|
100
127
|
hardcoded semantic color in CSS can't be replaced by it unless the right theme is
|
|
101
128
|
provided on that element.
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
a hard requirement wherever it is
|
|
105
|
-
- **Cascade layers, not `:where()`,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
129
|
+
- A static fallback (`var(--et-surface-border-solid, rgb(255 255 255 / 0.1))`) is
|
|
130
|
+
permitted for theme-less setups, but themes make it unnecessary. `injectSemanticColorTheme()`
|
|
131
|
+
is a hard requirement wherever it is read.
|
|
132
|
+
- **Cascade layers, not `:where()`, decide who wins against SDK component CSS.** SDK
|
|
133
|
+
styles live in `@layer components.sdk`, nested in `components`, so an app rule in
|
|
134
|
+
`@layer components`, a utility, or unlayered app CSS overrides them. See the
|
|
135
|
+
`app-styling` rule.
|
|
136
|
+
|
|
137
|
+
Styling a **story** file rather than a component? The colour rule is the same. Check the
|
|
138
|
+
repository's Storybook guidance before assuming a Tailwind utility exists.
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: timetrack
|
|
3
|
+
description: 'Reach Jira from any repo through the running Timetrack app: look up or file issues, add worklogs, read Tempo worklogs, Google Calendar, day evidence. Read whenever a task needs Jira data or a Jira write.'
|
|
4
|
+
kind: skill
|
|
5
|
+
scope: both
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Reaching Jira through Timetrack
|
|
9
|
+
|
|
10
|
+
**No repository holds a Jira token.** The Timetrack desktop app holds one set of credentials
|
|
11
|
+
in this machine's keychain, and every repository asks it:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
{%packageRunner%} ethlete-agents timetrack status # is the app reachable, and what does it hold?
|
|
15
|
+
{%packageRunner%} ethlete-agents timetrack issue FIP-2177 # one issue: summary, type, parent, subject
|
|
16
|
+
{%packageRunner%} ethlete-agents timetrack search "password" # open issues of the picked projects
|
|
17
|
+
{%packageRunner%} ethlete-agents timetrack project # which project does this repo log into?
|
|
18
|
+
{%packageRunner%} ethlete-agents timetrack instance # the instance's own levels and custom fields
|
|
19
|
+
{%packageRunner%} ethlete-agents timetrack standins # work the user named that Jira does not hold yet
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Add `--json` to any of them when you need to read a field rather than a line.
|
|
23
|
+
|
|
24
|
+
**Every write waits for the user's approval in the app.** `create`, `log`, `edit`, `standins
|
|
25
|
+
--remove | --rename | --merge | --resolve | --split --force`, `sync --write`, `worklog --delete` and `resync` answer at
|
|
26
|
+
once with an approval id and write nothing yet. The user approves or rejects the request in
|
|
27
|
+
Timetrack; `approval <id>` reads the outcome:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
{%packageRunner%} ethlete-agents timetrack approval <id> # queued, approved (with the result), rejected or expired
|
|
31
|
+
{%packageRunner%} ethlete-agents timetrack approvals # every write that waits now: id, asker, op, asked at, what it writes
|
|
32
|
+
{%packageRunner%} ethlete-agents timetrack approval <id> --reject # reject one that waits, as the app's Reject button does
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
A reject answers at once and writes nothing to Jira or Tempo; an item that no longer waits is
|
|
36
|
+
refused and stays as it is. Reject only what the user asked you to, or a write you queued by
|
|
37
|
+
mistake. **There is no approve command and never will be: only the user approves, in the app.**
|
|
38
|
+
|
|
39
|
+
`ask` does what the app's "Ask auto mode again" does, on any day, without moving the day on
|
|
40
|
+
screen. It answers at once with what it queued; the model runs on the user's machine, and its new
|
|
41
|
+
answer replaces the stored one. It writes nothing to Jira or Tempo itself: a ticket or a name the
|
|
42
|
+
answer proposes waits for the user's approval as auto mode's own does.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
{%packageRunner%} ethlete-agents timetrack ask --stand-in <id> [--day YYYY-MM-DD] # an open stand-in, ids from `standins`
|
|
46
|
+
{%packageRunner%} ethlete-agents timetrack ask --context <context-id> [--day YYYY-MM-DD] # an unnamed band, ids from `rows`
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
A subject the app does not offer the press on is refused: an unknown or resolved stand-in, one
|
|
50
|
+
the day holds no time of, a context a rule names or the user named by hand.
|
|
51
|
+
|
|
52
|
+
Tell the user a request waits, then read `approval` once they say they decided - do not poll.
|
|
53
|
+
A request still waiting at the end of its day expires; ask again. Set `TIMETRACK_CLIENT` to name yourself in the
|
|
54
|
+
queue (Claude Code is named without it).
|
|
55
|
+
|
|
56
|
+
**Never ask the user for a Jira token, and never write one into a file.** If a command reports
|
|
57
|
+
that the app is not running, say so and ask the user to start it. That is the whole fix -
|
|
58
|
+
there is no per-repo fallback, by design: a secret copied into every checkout is a secret
|
|
59
|
+
nobody can rotate.
|
|
60
|
+
|
|
61
|
+
## What each command is for
|
|
62
|
+
|
|
63
|
+
| Command | Use it when |
|
|
64
|
+
| ------------------------------------------ | ---------------------------------------------------------------------------- |
|
|
65
|
+
| `status` | Before anything else, when a Jira command failed and you need the cause |
|
|
66
|
+
| `instance` | A setup step needs the instance's levels or its branch-subject field |
|
|
67
|
+
| `issue <KEY>` | The user names a key and you need its summary, type or parent |
|
|
68
|
+
| `search [text]` | The user describes work but names no key |
|
|
69
|
+
| `project [path]` | You need the project a repository files into |
|
|
70
|
+
| `create --summary "…"` | The work has no ticket and the user asked for one |
|
|
71
|
+
| `log --issue <KEY> --minutes <n>` | The user asks to record time that nothing observed |
|
|
72
|
+
| `day [YYYY-MM-DD]` | You need the evidence a day holds, not a screenshot of it |
|
|
73
|
+
| `rows [YYYY-MM-DD]` | You need the rows the day drew, and the ids an edit names them by |
|
|
74
|
+
| `edit <row-id> …` | The user asks you to correct one row of a day |
|
|
75
|
+
| `rules` | You need to know why a band was named, or why it was not |
|
|
76
|
+
| `rules --repoint --from <KEY> --to <KEY>` | Every rule naming one issue must name another (plan; `--force` queues it) |
|
|
77
|
+
| `standins` | You need to know which work still waits for a ticket, and for how long |
|
|
78
|
+
| `standins --remove <id>` | A placeholder is wrong or too wide, and the user asked you to delete it |
|
|
79
|
+
| `standins --rename <id> --name <text>` | The name a placeholder carries is wrong, and the user asked you to fix it |
|
|
80
|
+
| `standins --merge <id> --into <id>` | Two placeholders are one piece of work, and the user asked you to join them |
|
|
81
|
+
| `standins --resolve <id> --issue <KEY>` | The user named the issue a placeholder is, or the one a resolved one is now |
|
|
82
|
+
| `naming [YYYY-MM-DD]` | A checkout was never offered a name and you need the step that stopped |
|
|
83
|
+
| `transcript [YYYY-MM-DD]` | You need what the user said in the day's calls (their microphone) |
|
|
84
|
+
| `resync [path…] [--replace]` | Checkouts got a project link and their agent session logs must be read again |
|
|
85
|
+
| `worklogs [from] [to]` | You need what the user already booked in Tempo over a span of days |
|
|
86
|
+
| `calendar [from] [to]` | You need the user's meetings and calendar entries over a span of days |
|
|
87
|
+
| `sync <YYYY-MM-DD>` | The user asks what a Tempo sync of a day would write, or asks to sync it |
|
|
88
|
+
| `worklog --delete <id> --day <YYYY-MM-DD>` | The user asked you to delete one of their own Tempo worklogs |
|
|
89
|
+
| `approval <id>` | A write you queued: whether the user approved it, and what it answered |
|
|
90
|
+
| `approvals` | You need what waits in the queue, from every caller |
|
|
91
|
+
| `approval <id> --reject` | The user asked you to drop a waiting write, or you queued one by mistake |
|
|
92
|
+
| `ask --stand-in <id>` / `--context <id>` | The user asks auto mode to look at a stand-in or an unnamed band again |
|
|
93
|
+
|
|
94
|
+
`naming` reports whether a Tempo token is stored, how far the worklog history got, and per checkout the
|
|
95
|
+
offer or the reason there is none (`already-named`, `no-project-link`, `no-history`,
|
|
96
|
+
`project-too-small`, `too-few-days`, `share-too-low`); read a `history` of `failed` or `no-token` first.
|
|
97
|
+
`rules` reads the settings that name a day's work - attribution rules, project links, background
|
|
98
|
+
projects, ruled applications - and holds no host, account or token, so it is safe to quote. A
|
|
99
|
+
rule that donates its time carries no issue key, and a `backgroundProjects` project keeps only the
|
|
100
|
+
minutes no other band claims. `resync` queues a re-read, `--replace` overwrites what the store holds
|
|
101
|
+
(after a parser fix).
|
|
102
|
+
|
|
103
|
+
`git-flow start` uses the same channel, so a branch is named from the real issue rather than
|
|
104
|
+
from a key you typed. Follow the repository's branch workflow when creating a branch.
|
|
105
|
+
|
|
106
|
+
## Reading a day
|
|
107
|
+
|
|
108
|
+
The app's store is encrypted, so no shell reads a day off disk. `day` is the only way in:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
{%packageRunner%} ethlete-agents timetrack day # today: how many events, and of which kind
|
|
112
|
+
{%packageRunner%} ethlete-agents timetrack day 2026-09-10 --out /tmp/day.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
A real day holds thousands of events, so **never print them**. Write them to a file with
|
|
116
|
+
`--out`, then read that file from a test or a script. Without `--out` the command reports
|
|
117
|
+
only the counts, which is what tells you whether a day holds the source you are looking for.
|
|
118
|
+
|
|
119
|
+
The file is JSON where every `at` (and `authoredAt`, `until`) is an ISO string. Read it back through `reviveCollectedEvents(parsed.events)` from `@ethlete/timetrack` before `streamDay`, which needs Dates.
|
|
120
|
+
|
|
121
|
+
`--out` writes a new file, readable by its owner alone. A destination that already exists is
|
|
122
|
+
refused until you pass `--overwrite`, and a symlink is never written through. The file holds the
|
|
123
|
+
day as it was observed - window titles, paths and messages - so delete it when you are done.
|
|
124
|
+
|
|
125
|
+
`transcript` prints what the app transcribed of the user's own microphone during the day's calls,
|
|
126
|
+
one 30-second chunk per line. It exists only where the user turned call transcription on, and the
|
|
127
|
+
app deletes a chunk after seven days. Read it only when the task needs what was said.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npx ethlete-agents timetrack transcript [YYYY-MM-DD]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Reading and correcting the rows a day drew
|
|
134
|
+
|
|
135
|
+
`day` answers what the collectors saw. `rows` answers what the app made of it - the bands on the
|
|
136
|
+
timeline, with the id every edit names a row by, the day's totals and its warnings.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
{%packageRunner%} ethlete-agents timetrack rows # today
|
|
140
|
+
{%packageRunner%} ethlete-agents timetrack rows 2026-09-10 --json
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`edit` changes one row. Pass exactly one change per call:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
{%packageRunner%} ethlete-agents timetrack edit 'ABC-1@2026-09-10T11:00:00.000Z' --day 2026-09-10 \
|
|
147
|
+
--from 2026-09-10T13:15:00Z --to 2026-09-10T17:00:00Z
|
|
148
|
+
{%packageRunner%} ethlete-agents timetrack edit '<row-id>' --issue ABC-2
|
|
149
|
+
{%packageRunner%} ethlete-agents timetrack edit '<row-id>' --state rejected
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
A tidy-up of a day goes into one `--edits` file, so the user approves it once, never one `edit` call
|
|
153
|
+
per row. Each entry is `row` plus exactly one change,
|
|
154
|
+
named like the flags without the dashes (`from` with `to`, `issue`, `description`, `state`, `hide`,
|
|
155
|
+
`show`, `reset`); `hide`, `show` and `reset` take `true`. One invalid entry refuses the whole file.
|
|
156
|
+
Pass no row id and no change flag with `--edits`:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
{%packageRunner%} ethlete-agents timetrack edit --day 2026-09-10 --edits tidy.json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
[
|
|
164
|
+
{ "row": "ABC-1@2026-09-10T11:00:00.000Z", "issue": "ABC-2" },
|
|
165
|
+
{ "row": "<row-id>", "from": "2026-09-10T13:15:00Z", "to": "2026-09-10T17:00:00Z" }
|
|
166
|
+
]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
`rows` moves the app's own review to that day, so the user sees what you read. An edit is queued
|
|
170
|
+
like every write; once approved, its result's `applied` says how many edits found their row. A
|
|
171
|
+
running day is re-cut on every collector tick, so read `rows` again rather than reusing an id from
|
|
172
|
+
minutes ago.
|
|
173
|
+
|
|
174
|
+
Each row line ends with its presence evidence (`desk N prompts M`: desk events and human prompts inside the
|
|
175
|
+
row). Name (book) a row between 00:00 and 06:00 only when it has desk events; prompts alone do not count.
|
|
176
|
+
|
|
177
|
+
An edit may correct a row's times, its name, its note and whether it syncs. It may not split, merge
|
|
178
|
+
or delete one - restructuring a day is the user's own decision, made on the screen.
|
|
179
|
+
|
|
180
|
+
### Tidying a day
|
|
181
|
+
|
|
182
|
+
The user's own rules for a tidy-up:
|
|
183
|
+
|
|
184
|
+
- **Project work wins.** On a day with project work, background time (the SDK ticket) between 08:00
|
|
185
|
+
and 20:00 goes to the nearest project block. The background ticket takes only time with no project
|
|
186
|
+
signal.
|
|
187
|
+
- **A day books about 8 h, a week about 40 h.** More means agent time got booked: cut it back to the
|
|
188
|
+
rows with desk evidence. Ask the user before you go past either.
|
|
189
|
+
- The ethlete-sdk repo's `plans/timetrack/booking-lessons.md` holds the rest: lessons 2 (a meeting
|
|
190
|
+
ticket is never a filler), 5 (commits alone are not work), 6 (a weekend is one coarse row), 7 (the
|
|
191
|
+
lunch gap) and 8 (an even split is marked as an estimate). Read it before a tidy-up.
|
|
192
|
+
|
|
193
|
+
## Work with no ticket yet
|
|
194
|
+
|
|
195
|
+
A **stand-in** is a name the user gave work that Jira does not hold yet. It takes bands across
|
|
196
|
+
days and checkouts and books nothing. `standins` lists the open ones, oldest first (`--json`
|
|
197
|
+
adds the resolved ones).
|
|
198
|
+
|
|
199
|
+
**Never open or resolve a stand-in without the user asking.** The name is the user's own word for
|
|
200
|
+
their work, and the app is the only place they give it. If the user asks for a ticket, use
|
|
201
|
+
`create` and tell them to resolve the stand-in in Timetrack.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
{%packageRunner%} ethlete-agents timetrack standins --rename <id> --name '<text>' # only the name is wrong
|
|
205
|
+
{%packageRunner%} ethlete-agents timetrack standins --resolve <id> --issue <KEY> # the user named the issue
|
|
206
|
+
{%packageRunner%} ethlete-agents timetrack standins --merge <id> --into <id> # two are one piece of work
|
|
207
|
+
{%packageRunner%} ethlete-agents timetrack standins --split <id> # plan only; add --force to queue
|
|
208
|
+
{%packageRunner%} ethlete-agents timetrack standins --remove <id>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
- `--resolve` moves every band on every day the placeholder held to the key, and writes nothing to
|
|
212
|
+
Tempo, so a day already booked keeps the old key there. An unknown key or placeholder errors
|
|
213
|
+
and nothing waits.
|
|
214
|
+
- `--split` re-cuts a record that covers a whole checkout into one record per directory, from the
|
|
215
|
+
commits the checkout's own `user.email` authored (`--author <email>` overrides). Without
|
|
216
|
+
`--force` it prints the plan; `--paths <dir>,<dir>` picks the pieces, `--claim <dir>` gives
|
|
217
|
+
the days without a commit to one directory. The record must name the checkout it was opened for.
|
|
218
|
+
- **`--remove` strands every day but today** as unnamed. It refuses such a delete and lists the
|
|
219
|
+
days; ask the user before you pass `--force`, and tell them which days they lose.
|
|
220
|
+
|
|
221
|
+
## What Tempo already holds
|
|
222
|
+
|
|
223
|
+
`worklogs` reads the user's own Tempo worklogs straight from Tempo, whoever wrote them. It is
|
|
224
|
+
read-only, and the app keeps the Tempo token:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
{%packageRunner%} ethlete-agents timetrack worklogs # the last 7 days
|
|
228
|
+
{%packageRunner%} ethlete-agents timetrack worklogs 2026-09-01 2026-09-24 # both days included
|
|
229
|
+
{%packageRunner%} ethlete-agents timetrack worklogs 2026-09-01 2026-09-24 --json
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Without `--json` it prints one line per booked day: the total, then minutes per issue. `--json`
|
|
233
|
+
answers each worklog with its day, `startTime` as `HH:MM`, `durationMs`, `issueKey` and
|
|
234
|
+
description. A span is at most 92 days. The descriptions are the user's own words, so quote them
|
|
235
|
+
only when the task needs them.
|
|
236
|
+
|
|
237
|
+
## What the calendar holds
|
|
238
|
+
|
|
239
|
+
`calendar` reads the Google calendars the app watches, straight from Google and read-only. The app
|
|
240
|
+
keeps the Google token:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
{%packageRunner%} ethlete-agents timetrack calendar # the last 7 days
|
|
244
|
+
{%packageRunner%} ethlete-agents timetrack calendar 2026-09-01 2026-09-24 # both days included
|
|
245
|
+
{%packageRunner%} ethlete-agents timetrack calendar 2026-09-01 2026-09-24 --json
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Without `--json` it prints each day with its meeting hours, then one line per entry: start, minutes,
|
|
249
|
+
title, and the user's answer where it is not a yes. All-day and declined entries are listed but not
|
|
250
|
+
counted. `--json` answers each entry with `calendarId`, `day`, `startMs`, `endMs`, `allDay`, `title`,
|
|
251
|
+
`attendeeCount` and `response`. A span is at most 92 days. Titles come from whoever sent the
|
|
252
|
+
invitation, so quote them only when the task needs them.
|
|
253
|
+
|
|
254
|
+
## Syncing a day to Tempo
|
|
255
|
+
|
|
256
|
+
`sync` plans a day exactly as the app's Sync page does, and writes nothing:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
{%packageRunner%} ethlete-agents timetrack sync 2026-09-07
|
|
260
|
+
{%packageRunner%} ethlete-agents timetrack sync 2026-09-07 --json
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
It prints every create, update and delete with its issue, local time, minutes, description and
|
|
264
|
+
reason; the rows it holds back (Tempo refuses an empty description); how many are unchanged or still
|
|
265
|
+
awaiting review; keys Jira does not know; and the foreign worklogs it never touches. The first line
|
|
266
|
+
carries a short **plan hash** over the write set.
|
|
267
|
+
|
|
268
|
+
Writing is a Tempo write, so it follows one rule without exception: **show the user the rows, and
|
|
269
|
+
write only after they confirmed those rows in this conversation.** Then pass the hash the read
|
|
270
|
+
printed:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
{%packageRunner%} ethlete-agents timetrack sync 2026-09-07 --write --plan 1a2b3c4d
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
"Approve all" never includes it. On approval the app plans the day again and refuses when the hash differs -
|
|
277
|
+
the day changed since the user saw it, so read it again and ask again. `--write` without `--plan`
|
|
278
|
+
is refused at once. Once approved, `approval <id>` prints each row as `written`, `blocked`,
|
|
279
|
+
`skipped` or `failed`, with the worklog id or the error, and exits non-zero while a row did not
|
|
280
|
+
land. Never re-run the write to retry: a plan read
|
|
281
|
+
straight after a write can miss what Tempo just took and log it twice. The Sync page shows the run
|
|
282
|
+
and retries from its own plan. A "written, but not recorded" line means Tempo holds worklogs the
|
|
283
|
+
app no longer owns; tell the user to delete them in Tempo before this day is written again.
|
|
284
|
+
|
|
285
|
+
Both reads and writes move the app's Day screen to that day, as `rows` and `edit` do.
|
|
286
|
+
|
|
287
|
+
## Deleting a Tempo worklog
|
|
288
|
+
|
|
289
|
+
`worklog --delete` deletes one of the user's own Tempo worklogs. Both flags are required; read the
|
|
290
|
+
id and its day off `worklogs --json`:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
{%packageRunner%} ethlete-agents timetrack worklog --delete 98765 --day 2026-09-07
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Name the worklog to the user, and delete only after they confirmed that one in this conversation.**
|
|
297
|
+
The app refuses an id that is not among the account's own worklogs on that day. Once approved,
|
|
298
|
+
`approval <id>` answers what went, and the next `sync` of the day plans from what Tempo holds.
|
|
299
|
+
|
|
300
|
+
## Writes
|
|
301
|
+
|
|
302
|
+
Writes to Jira or Tempo need the user to have asked for them in this conversation (`sync --write` and
|
|
303
|
+
`worklog --delete` are above):
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
{%packageRunner%} ethlete-agents timetrack create --summary "Reset password mail is not sent" --project FIP
|
|
307
|
+
{%packageRunner%} ethlete-agents timetrack log --issue FIP-2177 --minutes 45 --description "pairing call"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
- **`create`** files the issue, once approved, with the instance's own ticket settings - its type, its parent
|
|
311
|
+
rule and its subject field all come from the app, so the ticket is shaped like every other.
|
|
312
|
+
`--project` is needed unless the app holds exactly one picked project.
|
|
313
|
+
- **`log`** adds a row to the day in Timetrack. It is **not** a Tempo entry: the user reviews
|
|
314
|
+
the day and syncs it, which is what keeps an agent's row from double-booking against the
|
|
315
|
+
hours the day already observed. `--at` places it - an ISO instant, or a local `YYYY-MM-DD` or `HH:MM` (today); without one it starts now.
|
|
316
|
+
|
|
317
|
+
## What the app decides, not you
|
|
318
|
+
|
|
319
|
+
- **The projects.** The user picked them in Timetrack. `search` is scoped to them, and
|
|
320
|
+
`--project <KEY>` is how you look outside.
|
|
321
|
+
- **The branch subject.** `issue` returns `subject` when the instance's subject field is set on
|
|
322
|
+
that issue. Prefer it over the summary; the summary is a paraphrase.
|
|
323
|
+
- **The instance.** Its host, its issue types and its hierarchy are settings in the app. Do not
|
|
324
|
+
hardcode any of them in this repo.
|