@timurproko/a1 0.2.7-dev.1276 → 0.2.7-dev.1285
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 +5 -1
- package/dist/app/session-shell/session-shell-root.d.ts +4 -68
- package/dist/app/session-shell/session-shell.js +5 -11
- package/dist/app/session-shell/shell-host.js +2 -2
- package/dist/app/session-shell/shell-options.d.ts +65 -0
- package/dist/app/session-shell/shell-options.js +1 -0
- package/dist/app/session-shell/workflow-router.d.ts +3 -1
- package/dist/app/session-shell/workflow-router.js +12 -0
- package/dist/cli/dispatch.js +27 -1
- package/dist/cli/packages.js +18 -2
- package/dist/cli/session-context.js +6 -2
- package/dist/composition/owned-ui.js +20 -8
- package/dist/composition/session-naming.js +1 -1
- package/dist/composition/session-runtime-registry.d.ts +2 -0
- package/dist/composition/session-runtime-registry.js +49 -9
- package/dist/contracts/agent-engine/package-ports.d.ts +10 -14
- package/dist/contracts/agent-engine/package-ports.js +5 -9
- package/dist/contracts/owned-ui/session-workflows.d.ts +6 -0
- package/dist/contracts/presentation/index.d.ts +1 -0
- package/dist/contracts/presentation/progress-palette.generated.d.ts +1 -1
- package/dist/contracts/presentation/progress-palette.generated.js +1 -1
- package/dist/contracts/presentation/progress-spinner.d.ts +7 -0
- package/dist/contracts/presentation/progress-spinner.js +1 -0
- package/dist/features/launch/session-context.d.ts +8 -0
- package/dist/features/launch/session-context.js +19 -10
- package/dist/features/owned-ui/reference-screen-app.js +9 -5
- package/dist/features/owned-ui/session-fork-prompt.d.ts +2 -1
- package/dist/features/owned-ui/session-fork-prompt.js +11 -5
- package/dist/features/owned-ui/settings-app.d.ts +1 -1
- package/dist/features/owned-ui/settings-app.js +14 -7
- package/dist/features/owned-ui/settings-spinner-preview.d.ts +9 -0
- package/dist/features/owned-ui/settings-spinner-preview.js +29 -0
- package/dist/features/session-naming/context.d.ts +17 -0
- package/dist/features/session-naming/context.js +39 -0
- package/dist/features/session-naming/controller.d.ts +1 -5
- package/dist/features/session-naming/controller.js +7 -4
- package/dist/features/session-naming/generate.d.ts +2 -1
- package/dist/features/session-naming/generate.js +14 -10
- package/dist/features/session-naming/index.d.ts +1 -1
- package/dist/foundation/lifecycle/index.d.ts +3 -1
- package/dist/foundation/lifecycle/index.js +3 -1
- package/dist/foundation/lifecycle/session-claim-lock.d.ts +2 -2
- package/dist/foundation/lifecycle/session-claim-lock.js +36 -10
- package/dist/foundation/lifecycle/session-context-retry.d.ts +2 -0
- package/dist/foundation/lifecycle/session-context-retry.js +17 -0
- package/dist/foundation/lifecycle/session-repository-context.d.ts +7 -1
- package/dist/foundation/lifecycle/session-repository-context.js +105 -39
- package/dist/foundation/lifecycle/session-worktree-entry.d.ts +3 -0
- package/dist/foundation/lifecycle/session-worktree-entry.js +87 -0
- package/dist/foundation/release/automatic-update.js +2 -2
- package/dist/foundation/release/bootstrap.js +19 -3
- package/dist/foundation/release/release-gc.js +20 -5
- package/dist/foundation/release/release-state.d.ts +12 -3
- package/dist/foundation/release/release-state.js +55 -24
- package/dist/foundation/release/release-use.d.ts +10 -0
- package/dist/foundation/release/release-use.js +70 -0
- package/dist/foundation/release/update-activation.js +2 -2
- package/dist/foundation/release/update-recovery.js +2 -2
- package/dist/foundation/release/update.js +1 -1
- package/dist/foundation/release/warmup.js +8 -9
- package/dist/foundation/session-writer-lock/index.d.ts +2 -2
- package/dist/foundation/session-writer-lock/index.js +82 -12
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/foundation/terminal-cleanup/fatal-diagnostic.d.ts +2 -0
- package/dist/foundation/terminal-cleanup/fatal-diagnostic.js +59 -0
- package/dist/foundation/terminal-cleanup/fatal-exit.js +1 -29
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -2
- package/dist/integrations/pi/components/resources/builtin-themes.js +2 -2
- package/dist/integrations/pi/components/share-operation-dialog.d.ts +2 -1
- package/dist/integrations/pi/components/share-operation-dialog.js +13 -5
- package/dist/integrations/pi/components/shell-footer-status.d.ts +2 -1
- package/dist/integrations/pi/components/shell-footer-status.js +15 -8
- package/dist/integrations/pi/components/shell-session-info-reference.js +11 -8
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +1 -1
- package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
- package/dist/integrations/pi/components/upstream/components/auth-url.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/auth-url.js +1 -1
- package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-input.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/login-dialog.js +1 -1
- package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
- package/dist/integrations/pi/components/upstream/components/oauth-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/oauth-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/components/pi-logo.js +1 -1
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/session-footer.js +14 -8
- package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +1 -1
- package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/status-indicator.js +1 -1
- package/dist/integrations/pi/components/upstream/components/themed-text.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/themed-text.js +1 -1
- package/dist/integrations/pi/components/upstream/components/thinking-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/thinking-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.js +1 -1
- package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/kill-ring.js +1 -1
- package/dist/integrations/pi/components/upstream/history/printable-key.js +1 -1
- package/dist/integrations/pi/components/upstream/history/text-helpers.js +1 -1
- package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/undo-stack.js +1 -1
- package/dist/integrations/pi/components/upstream/history/word-navigation.js +1 -1
- package/dist/integrations/pi/components/upstream/model-search.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/program-status-reporter.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme.js +1 -1
- package/dist/integrations/pi/engine/adapter.d.ts +3 -1
- package/dist/integrations/pi/engine/adapter.js +24 -6
- package/dist/integrations/pi/engine/changelog.js +5 -2
- package/dist/integrations/pi/engine/delivery-retention.d.ts +7 -0
- package/dist/integrations/pi/engine/delivery-retention.js +66 -0
- package/dist/integrations/pi/engine/event-delivery.d.ts +17 -1
- package/dist/integrations/pi/engine/event-delivery.js +25 -3
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -1
- package/dist/integrations/pi/engine/extension-ui-binding.js +45 -0
- package/dist/integrations/pi/engine/host-ports.d.ts +2 -0
- package/dist/integrations/pi/engine/host.d.ts +3 -0
- package/dist/integrations/pi/engine/host.js +2 -0
- package/dist/integrations/pi/engine/package-integration.js +19 -4
- package/dist/integrations/pi/engine/pending-delivery.d.ts +4 -1
- package/dist/integrations/pi/engine/pending-delivery.js +51 -18
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/runtime-integration.d.ts +8 -0
- package/dist/integrations/pi/engine/runtime-integration.js +58 -9
- package/dist/integrations/pi/engine/session-cwd-recovery.d.ts +11 -0
- package/dist/integrations/pi/engine/session-cwd-recovery.js +18 -0
- package/dist/integrations/pi/engine/session-runtime.d.ts +3 -0
- package/dist/integrations/pi/engine/session-runtime.js +2 -0
- package/dist/integrations/pi/engine/session-selection.d.ts +3 -2
- package/dist/integrations/pi/engine/session-selection.js +25 -5
- package/dist/integrations/pi/engine/transcript-image-assets.d.ts +3 -0
- package/dist/integrations/pi/engine/transcript-image-assets.js +65 -14
- package/dist/integrations/pi/engine/view-state.d.ts +14 -0
- package/dist/integrations/pi/engine/view-state.js +17 -0
- package/dist/integrations/pi/engine/workflow-runner.d.ts +2 -0
- package/dist/integrations/pi/engine/workflow-runner.js +47 -26
- package/dist/integrations/pi/engine/worktree-tools.d.ts +4 -0
- package/dist/integrations/pi/engine/worktree-tools.js +26 -0
- package/dist/integrations/pi/session-presenters/components.d.ts +2 -1
- package/dist/integrations/pi/session-presenters/components.js +5 -3
- package/dist/integrations/pi/session-presenters/presenters.d.ts +3 -1
- package/dist/integrations/pi/session-presenters/presenters.js +1 -1
- package/dist/integrations/pi/startup-public.d.ts +1 -1
- package/dist/integrations/pi/startup-public.js +16 -20
- package/dist/integrations/pi/startup-public.manifest.json +29 -29
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +1 -1
- package/dist/product-identity.json +1 -1
- package/dist/runtime-payload-inventory.json +5027 -5027
- package/dist/ui/components/index.d.ts +1 -1
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/progress-status.d.ts +7 -0
- package/dist/ui/components/progress-status.js +21 -0
- package/dist/ui/components/value-menu.d.ts +1 -1
- package/dist/ui/components/value-menu.js +4 -2
- package/dist/ui/settings/declarations.d.ts +16 -4
- package/dist/ui/settings/declarations.js +13 -4
- package/docs/architecture/internal-naming.md +1 -1
- package/docs/architecture/project-structure.md +7 -11
- package/docs/features/session-exports.md +1 -1
- package/docs/features/session-naming.md +8 -6
- package/docs/features/worktrees.md +38 -0
- package/docs/local-worktree-cleanup.md +27 -4
- package/docs/openspec-archive-automation.md +30 -4
- package/docs/worktree-link-recovery.md +2 -2
- package/package.json +5 -5
|
@@ -16,7 +16,7 @@ export type { ParsedMouseInput, RoutedMouseInput } from "./mouse.js";
|
|
|
16
16
|
export { isInsidePane, toPaneLocalMouse } from "./pane.js";
|
|
17
17
|
export type { Pane, PaneInputResult, PaneMouseEvent } from "./pane.js";
|
|
18
18
|
export { sessionNameFrame } from "./session-name-frame.js";
|
|
19
|
-
export { progressStatusFrame, progressStatusText } from "./progress-status.js";
|
|
19
|
+
export { progressStatusFrame, progressStatusText, isProgressSpinnerStyle, progressSpinnerFrame, PROGRESS_SPINNER_INTERVAL_MS } from "./progress-status.js";
|
|
20
20
|
export type { ProgressStatusFrameStyles, ProgressStatusMarker } from "./progress-status.js";
|
|
21
21
|
export { FrameCache, RENDER_REVISION_KINDS, RenderRevisionTracker, ZERO_REVISIONS, normalizeRevisions, revisionsEqual } from "./revision.js";
|
|
22
22
|
export type { RenderCacheContract, RenderRevisionKind, RenderRevisions } from "./revision.js";
|
|
@@ -8,7 +8,7 @@ export { STEPPER_RESERVE, placementFor, regionAt, renderGroupHeader, renderListR
|
|
|
8
8
|
export { MOUSE_TRACKING_OFF, MOUSE_TRACKING_ON, parseMouseInput, routeMouseInput } from "./mouse.js";
|
|
9
9
|
export { isInsidePane, toPaneLocalMouse } from "./pane.js";
|
|
10
10
|
export { sessionNameFrame } from "./session-name-frame.js";
|
|
11
|
-
export { progressStatusFrame, progressStatusText } from "./progress-status.js";
|
|
11
|
+
export { progressStatusFrame, progressStatusText, isProgressSpinnerStyle, progressSpinnerFrame, PROGRESS_SPINNER_INTERVAL_MS } from "./progress-status.js";
|
|
12
12
|
export { FrameCache, RENDER_REVISION_KINDS, RenderRevisionTracker, ZERO_REVISIONS, normalizeRevisions, revisionsEqual } from "./revision.js";
|
|
13
13
|
export { COPY_ACKNOWLEDGEMENT_DURATION_MS, MAX_COPY_ROWS, MAX_COPY_SOURCE_UNITS, copyAcknowledgementText, selectionCopyLineContent, selectionCopyRowText } from "./selection-copy.js";
|
|
14
14
|
export { ScrollbarRails, isThumbRow, scrollForThumbRow, scrollForTrackPage, scrollbarGeometry, scrollbarPresentation, scrollbarReservesSpace, scrollbarSelectionRows, scrollbarWheelRows, } from "./scrollbar.js";
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import type { ProgressSpinnerStyle } from "../../contracts/presentation/index.js";
|
|
1
2
|
export type ProgressStatusMarker = "…" | "...";
|
|
3
|
+
/** Pinned loader cadence, shared by the focused Settings preview. */
|
|
4
|
+
export declare const PROGRESS_SPINNER_INTERVAL_MS = 80;
|
|
5
|
+
/** Accepts only the declared owned spinner choices. */
|
|
6
|
+
export declare function isProgressSpinnerStyle(value: unknown): value is ProgressSpinnerStyle;
|
|
7
|
+
/** One fixed-cell glyph; actual Current indicators retain the loader's supplied frame. */
|
|
8
|
+
export declare function progressSpinnerFrame(style: ProgressSpinnerStyle, phase: number, currentFrame?: string): string;
|
|
2
9
|
export interface ProgressStatusFrameStyles {
|
|
3
10
|
readonly muted: (text: string) => string;
|
|
4
11
|
readonly highlight: (text: string) => string;
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/** Pinned loader cadence, shared by the focused Settings preview. */
|
|
2
|
+
export const PROGRESS_SPINNER_INTERVAL_MS = 80;
|
|
3
|
+
const SPINNER_FRAMES = {
|
|
4
|
+
none: [],
|
|
5
|
+
current: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
|
|
6
|
+
circle: ["◐", "◓", "◑", "◒"],
|
|
7
|
+
diamond: ["◇", "◈", "◆", "◈"],
|
|
8
|
+
square: ["◧", "◩", "◨", "◪"],
|
|
9
|
+
};
|
|
10
|
+
/** Accepts only the declared owned spinner choices. */
|
|
11
|
+
export function isProgressSpinnerStyle(value) {
|
|
12
|
+
return typeof value === "string" && Object.hasOwn(SPINNER_FRAMES, value);
|
|
13
|
+
}
|
|
14
|
+
/** One fixed-cell glyph; actual Current indicators retain the loader's supplied frame. */
|
|
15
|
+
export function progressSpinnerFrame(style, phase, currentFrame) {
|
|
16
|
+
if (style === "current" && currentFrame !== undefined)
|
|
17
|
+
return currentFrame;
|
|
18
|
+
const frames = SPINNER_FRAMES[style];
|
|
19
|
+
const index = Number.isFinite(phase) ? Math.max(0, Math.floor(phase)) : 0;
|
|
20
|
+
return frames.length === 0 ? "" : frames[index % frames.length];
|
|
21
|
+
}
|
|
1
22
|
const GRAPHEMES = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
2
23
|
const HIGHLIGHT_WIDTH = 2;
|
|
3
24
|
const UPDATES_PER_STEP = 3;
|
|
@@ -7,7 +7,7 @@ import type { UiTheme } from "./theme.js";
|
|
|
7
7
|
export interface ValueMenuState {
|
|
8
8
|
/** Values offered, as they should read. */
|
|
9
9
|
readonly choices: readonly string[];
|
|
10
|
-
/** Optional already-painted
|
|
10
|
+
/** Optional already-painted glyph previews, aligned before each choice label. */
|
|
11
11
|
readonly previews?: readonly string[];
|
|
12
12
|
/** The value in effect, marked rather than highlighted. */
|
|
13
13
|
readonly current: string | null;
|
|
@@ -11,7 +11,7 @@ export function valueMenuFrame(state, anchor, layout) {
|
|
|
11
11
|
const top = Math.max(bodyTop, Math.min(anchor.screenRow - currentIndex, bodyBottom - state.choices.length));
|
|
12
12
|
const previewWidth = Math.max(0, ...(state.previews ?? []).map(displayWidth));
|
|
13
13
|
const previewColumns = previewWidth === 0 ? 0 : previewWidth + 1;
|
|
14
|
-
const width = Math.max(...state.choices.map(choice => displayWidth(choice) + previewColumns + 4), 6);
|
|
14
|
+
const width = Math.min(Math.max(0, layout.surfaceWidth - layout.reservedRight), Math.max(...state.choices.map(choice => displayWidth(choice) + previewColumns + 4), 6));
|
|
15
15
|
// Invariant: rows reserve two cells for the effective-value mark and, when present,
|
|
16
16
|
// a preview plus one gap. Choice text remains aligned with the source value column.
|
|
17
17
|
const column = Math.min(Math.max(0, anchor.valueColumn - 2 - previewColumns), Math.max(0, layout.surfaceWidth - width - layout.reservedRight));
|
|
@@ -20,6 +20,8 @@ export function valueMenuFrame(state, anchor, layout) {
|
|
|
20
20
|
/** Draws the menu over the rows behind it, leaving them otherwise untouched. */
|
|
21
21
|
export function renderValueMenu(lines, state, frame, theme) {
|
|
22
22
|
const output = [...lines];
|
|
23
|
+
if (frame.width <= 0)
|
|
24
|
+
return output;
|
|
23
25
|
state.choices.forEach((choice, index) => {
|
|
24
26
|
const target = frame.top + index;
|
|
25
27
|
if (target < 0 || target >= output.length)
|
|
@@ -31,7 +33,7 @@ export function renderValueMenu(lines, state, frame, theme) {
|
|
|
31
33
|
const previewWidth = Math.max(0, ...previews.map(displayWidth));
|
|
32
34
|
const preview = previewWidth === 0 ? "" : `${padToWidth(previews[index] ?? "", previewWidth)} `;
|
|
33
35
|
// Invariant: the current-value check stays on ordinary text while the optional
|
|
34
|
-
//
|
|
36
|
+
// preview carries its own color; the row treatment supplies only its surface.
|
|
35
37
|
const tail = padToWidth(`${current ? " " : " "}${preview}${choice} `, frame.width - (current ? 1 : 0));
|
|
36
38
|
const painted = current
|
|
37
39
|
? `${paint(theme.fg("text", "✓"))}${paint(tail)}`
|
|
@@ -70,6 +70,18 @@ export declare const OWNED_SETTING_DECLARATIONS: Readonly<{
|
|
|
70
70
|
defaultValue: true;
|
|
71
71
|
allowedValues: readonly [true, false];
|
|
72
72
|
}>;
|
|
73
|
+
readonly spinnerStyle: Readonly<{
|
|
74
|
+
id: "spinnerStyle";
|
|
75
|
+
label: "Spinner style";
|
|
76
|
+
section: Readonly<{
|
|
77
|
+
id: "appearance";
|
|
78
|
+
title: "Appearance";
|
|
79
|
+
}>;
|
|
80
|
+
description: "Indicator beside working and operation progress text. None keeps text only; Current keeps the dot spinner.";
|
|
81
|
+
application: "live";
|
|
82
|
+
defaultValue: "current";
|
|
83
|
+
allowedValues: readonly ["none", "current", "circle", "diamond", "square"];
|
|
84
|
+
}>;
|
|
73
85
|
readonly scrollbarAppearance: Readonly<{
|
|
74
86
|
id: "scrollbarAppearance";
|
|
75
87
|
label: "Scrollbar mode";
|
|
@@ -149,7 +161,7 @@ export declare const OWNED_SETTING_DECLARATIONS: Readonly<{
|
|
|
149
161
|
id: "agent";
|
|
150
162
|
title: "Agent";
|
|
151
163
|
}>;
|
|
152
|
-
description: "Name unnamed sessions from the
|
|
164
|
+
description: "Name unnamed sessions from the current task and relevant discussion; regenerate on the next prompt after a worktree context change. Manual names are preserved.";
|
|
153
165
|
application: "live";
|
|
154
166
|
defaultValue: true;
|
|
155
167
|
allowedValues: readonly [true, false];
|
|
@@ -161,10 +173,10 @@ export declare const OWNED_SETTING_DECLARATIONS: Readonly<{
|
|
|
161
173
|
id: "agent";
|
|
162
174
|
title: "Agent";
|
|
163
175
|
}>;
|
|
164
|
-
description: "Format for future automatic names: fix-api-cache,
|
|
176
|
+
description: "Format for future automatic names: Fix API cache (default), fix-api-cache, or Fix API Cache. Existing and manual names stay unchanged.";
|
|
165
177
|
application: "live";
|
|
166
|
-
defaultValue: "
|
|
167
|
-
allowedValues: readonly ["
|
|
178
|
+
defaultValue: "sentence";
|
|
179
|
+
allowedValues: readonly ["sentence", "kebab", "title"];
|
|
168
180
|
}>;
|
|
169
181
|
readonly promptSuggestions: Readonly<{
|
|
170
182
|
id: "promptSuggestions";
|
|
@@ -46,6 +46,15 @@ export const OWNED_SETTING_DECLARATIONS = Object.freeze({
|
|
|
46
46
|
defaultValue: true,
|
|
47
47
|
allowedValues: Object.freeze([true, false]),
|
|
48
48
|
}),
|
|
49
|
+
spinnerStyle: Object.freeze({
|
|
50
|
+
id: "spinnerStyle",
|
|
51
|
+
label: "Spinner style",
|
|
52
|
+
section: APPEARANCE_SECTION,
|
|
53
|
+
description: "Indicator beside working and operation progress text. None keeps text only; Current keeps the dot spinner.",
|
|
54
|
+
application: "live",
|
|
55
|
+
defaultValue: "current",
|
|
56
|
+
allowedValues: Object.freeze(["none", "current", "circle", "diamond", "square"]),
|
|
57
|
+
}),
|
|
49
58
|
scrollbarAppearance: Object.freeze({
|
|
50
59
|
id: "scrollbarAppearance",
|
|
51
60
|
label: "Scrollbar mode",
|
|
@@ -104,7 +113,7 @@ export const OWNED_SETTING_DECLARATIONS = Object.freeze({
|
|
|
104
113
|
id: "sessionAutoName",
|
|
105
114
|
label: "Automatic session name",
|
|
106
115
|
section: AGENT_SECTION,
|
|
107
|
-
description: "Name unnamed sessions from the
|
|
116
|
+
description: "Name unnamed sessions from the current task and relevant discussion; regenerate on the next prompt after a worktree context change. Manual names are preserved.",
|
|
108
117
|
application: "live",
|
|
109
118
|
defaultValue: true,
|
|
110
119
|
allowedValues: Object.freeze([true, false]),
|
|
@@ -113,10 +122,10 @@ export const OWNED_SETTING_DECLARATIONS = Object.freeze({
|
|
|
113
122
|
id: "sessionNameFormat",
|
|
114
123
|
label: "Session name format",
|
|
115
124
|
section: AGENT_SECTION,
|
|
116
|
-
description: "Format for future automatic names: fix-api-cache,
|
|
125
|
+
description: "Format for future automatic names: Fix API cache (default), fix-api-cache, or Fix API Cache. Existing and manual names stay unchanged.",
|
|
117
126
|
application: "live",
|
|
118
|
-
defaultValue: "
|
|
119
|
-
allowedValues: Object.freeze(["
|
|
127
|
+
defaultValue: "sentence",
|
|
128
|
+
allowedValues: Object.freeze(["sentence", "kebab", "title"]),
|
|
120
129
|
}),
|
|
121
130
|
promptSuggestions: Object.freeze({
|
|
122
131
|
id: "promptSuggestions",
|
|
@@ -66,7 +66,7 @@ The old environment registry included `fixture` and `inputAcknowledgement`, but
|
|
|
66
66
|
|
|
67
67
|
`certificationTarball`, `internalPackaging`, `nativePi`, `piParityIntentionalMutation`, `protocolVersion`, `structuredFlowLimits`, `terminalArgumentsJson`, and `terminalExecutable` had no active runtime consumer in the reviewed tree. They are removed from the current environment authority, not renamed into new settings. Rejection patterns and immutable historical evidence remain factual.
|
|
68
68
|
|
|
69
|
-
The release store (`src/foundation/release/release-state.ts`, persisted as `release-state.json`)
|
|
69
|
+
The release store (`src/foundation/release/release-state.ts`, persisted as `release-state.json`) uses `a1-release-cohort-v2` and retains the identity key `releaseCohortSchema`. "Cohort" is a historical wire name, not a supervisor. New readers accept v1 and preserve its records; the next locked write upgrades control state to v2. This deliberately fences older cleanup/control writers that cannot protect live release-use claims. Existing sessions are not migrated or restarted, legacy approved roots remain protected, and a claim-aware launcher may still run a retained older UI. A pre-v2 launcher cannot independently control a v2 store.
|
|
70
70
|
|
|
71
71
|
## Negotiated handoff and protected state
|
|
72
72
|
|
|
@@ -93,11 +93,11 @@ Build output mirrors the production namespaces directly under ignored `dist/`, w
|
|
|
93
93
|
|
|
94
94
|
## Development worktrees
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Task checkouts live inside the primary repository's `.worktrees/<task-id>/`, not beside the repository. Follow the shared Worktrees guidance in `AGENTS.md`. The product command contract is documented in [Worktree commands](../features/worktrees.md).
|
|
97
97
|
|
|
98
98
|
### Common Git workflow
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Keep primary on `develop` and run the delivery skill's bounded cleanup sweep. In A1, enter or attach once; success is authoritative and informational inventory is not a second approval gate. Outside A1, use ordinary Git without installing A1 or inventing runtime identities.
|
|
101
101
|
|
|
102
102
|
For a new delivery, create a unique absent task path and a new topic branch from freshly fetched `origin/develop`, unless the maintainer selected another base. For example, with primary at `D:/Git/a1` and unused task/branch names:
|
|
103
103
|
|
|
@@ -105,25 +105,21 @@ For a new delivery, create a unique absent task path and a new topic branch from
|
|
|
105
105
|
cd /d/Git/a1 && git fetch origin develop && git worktree add -b feature/example-task .worktrees/example-task origin/develop && git -C .worktrees/example-task rev-parse --show-toplevel --git-common-dir && git -C .worktrees/example-task status --short --branch
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
For external agents, successful creation establishes provenance for a fresh checkout; verify the canonical root, common repository, branch, and local work before using it. Never force a collision or fall back to task edits in primary. A1 performs its own exact-context and editing-claim checks internally.
|
|
109
109
|
|
|
110
110
|
### Resume and ownership
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
Continue the same task's branch, change, and PR. A1 owns cooperative editing claims and preserves existing edits when resuming; external agents establish continuing ownership or an explicit handoff themselves. Cleanup registration remains a separate repository concern: follow [cleanup ownership](../local-worktree-cleanup.md#resume-or-recover-ownership) when resuming a released cleanup candidate. Neither attachment nor cleanup registration authorizes merge or deletion.
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
Repeat exact-context and ownership verification when resuming or switching streams. Handoffs name the absolute worktree, branch, change, PR, and whether editing ownership is being handed over. This is cooperative coordination, not enforcement against arbitrary external editors. Missing A1 integration alone never blocks external agents and is not evidence of a conflicting owner.
|
|
114
|
+
Do not replace a delivery's history or PR to evade a real ownership conflict. Handoffs name the absolute worktree, branch, change, PR, and editing handoff. Runtime coordination is cooperative, not exclusion against arbitrary external editors.
|
|
117
115
|
|
|
118
116
|
### Environment-specific adapters
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
A stale Git registration elsewhere whose directory is missing and whose row is `prunable` may be pruned before retrying inventory; this does not permit removing a live checkout. Mutation-gate corruption and transient A1 startup-registration failures have a separate [worktree-link recovery procedure](../worktree-link-recovery.md). Recovery never overrides a live or unverifiable editing claim.
|
|
118
|
+
A1 owns creation/attachment, bounded retries, and ordinary recovery behind its worktree commands. Successful attachment returns the canonical path and branch; no follow-up inventory check is required. The old session link/unlink commands remain compatible aliases. Rare installation/legacy coordination failures have an operator [recovery reference](../worktree-link-recovery.md), not an agent preflight procedure.
|
|
123
119
|
|
|
124
120
|
Claude Code uses its established `EnterWorktree` tool by task name. The tracked `.claude/settings.json` wires `scripts/governance/claude-worktree-create.mjs` to create `.worktrees/<task-id>` detached at fresh `origin/develop`, or return an already registered path. The agent must still establish ownership before reusing that path and create the topic branch in a new detached worktree before editing. Passing an absolute `path` to `EnterWorktree` is reserved for a worktree created by hand, from primary before any shell command in that session. The matching `WorktreeRemove` hook declines removal: leave with `ExitWorktree` `keep` and use only the guarded cleanup tool for removal. Other agents do not need these tools or hooks.
|
|
125
121
|
|
|
126
|
-
A1
|
|
122
|
+
A1 attachment updates footer repository/PR discovery and subsequent built-in tool working directories without changing process-global cwd. Detach/disposal releases the runtime's claim and preserves Git data. An existing PR is not required. Explicit absolute paths retain their meaning; custom extensions and independent terminals keep their own cwd. Attachment never creates a Git lock, changes cleanup registration, or grants acceptance, finalization, merge, or deletion authority.
|
|
127
123
|
|
|
128
124
|
An agent that directly chooses a transient file path for a PR/comment body, command payload, captured output, temporary patch/diff, or ad hoc log must place it beneath the verified task worktree's exact `.artifacts/` root, never the primary checkout, another worktree, OS temp, home/desktop, or a sibling path. Such scratch remains ignored, unstaged, uncommitted, disposable, non-authoritative, and secret-free. This repository path rule does not relocate storage internally selected by tools, product runtime code, or hermetic tests.
|
|
129
125
|
|
|
@@ -12,4 +12,4 @@ Automatic export storage refuses linked storage-directory entries rather than fo
|
|
|
12
12
|
|
|
13
13
|
Exports are user data and can contain private session content. They are not disposable build artifacts, do not belong in `.artifacts/`, and are never removed by ordinary worktree cleanup. The `a1 pi` comparison profile retains its pinned export behavior.
|
|
14
14
|
|
|
15
|
-
For an old export
|
|
15
|
+
For an old export blocking worktree cleanup, follow [export decisions](../local-worktree-cleanup.md#export-decisions): an explicit request to delete the identified file is sufficient, without mandatory preservation or another confirmation. If preservation is wanted instead, the optional named-export operation saves and verifies a copy before removing the source. Neither choice bypasses ordinary worktree cleanup checks.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Session names
|
|
2
2
|
|
|
3
|
-
Bare A1 automatically names an unnamed session from its
|
|
3
|
+
Bare A1 automatically names an unnamed session from its current task while the agent works. Names prefer two or three descriptive words, with a maximum of three words and 32 characters including separators. The active model receives the current prompt, verified worktree/branch hints, and bounded relevant recent discussion in a separate tool-free request. Short approvals such as `ok do it` refer back to the concrete task, producing names such as `Spinner style settings` rather than `Implement task`. Images, tool output, thinking blocks, and pasted-image paths are not naming subjects.
|
|
4
|
+
|
|
5
|
+
The request does not add a conversation turn or delay the main response. It makes at most two attempts, with 30-second deadlines and respective 4,096/32,768 token ceilings. Failed, empty, generic, or attachment-path results use a deterministic fallback from meaningful task words or current branch hints; when no usable task words exist, the fallback is `New task` in the default format.
|
|
4
6
|
|
|
5
7
|
**Automatic session name** in the Agent settings group is enabled by default. Turning it off cancels pending naming without deleting the current name. The `a1 pi` comparison profile does not receive automatic naming or the A1 footer layout/reveal.
|
|
6
8
|
|
|
@@ -10,11 +12,11 @@ Choose **Session name format** in Agent settings:
|
|
|
10
12
|
|
|
11
13
|
| Choice | Example |
|
|
12
14
|
| --- | --- |
|
|
13
|
-
| **
|
|
14
|
-
| **
|
|
15
|
+
| **Sentence case** (default, first choice) | `Fix API cache` |
|
|
16
|
+
| **Kebab case** | `fix-api-cache` |
|
|
15
17
|
| **Title Case** | `Fix API Cache` |
|
|
16
18
|
|
|
17
|
-
Sentence case capitalizes the first word; Title Case capitalizes every ordinary word. Both preserve acronyms and technical spellings supplied by the model, such as `API` and `GitHub`. The same format applies to
|
|
19
|
+
Sentence case capitalizes the first word; Title Case capitalizes every ordinary word. Both preserve acronyms and technical spellings supplied by the model, such as `API` and `GitHub`. The same format applies to contextual fallback, and all formats enforce the three-word/32-character limits, trimming at a word boundary where possible. Valid saved format choices are preserved; only missing or invalid values use Sentence case.
|
|
18
20
|
|
|
19
21
|
The choice is saved to your A1 profile and applies live to future automatic naming, including context regeneration and pending results. Changing it does not rewrite an existing name or start another naming request. Manual `/name` values remain untouched.
|
|
20
22
|
|
|
@@ -22,7 +24,7 @@ The choice is saved to your A1 profile and applies live to future automatic nami
|
|
|
22
24
|
|
|
23
25
|
Linking a different worktree, clearing and re-entering the same worktree, or changing its confirmed branch makes an automatic name eligible for regeneration. A durable association revision detects exit/re-entry even between footer refreshes. Repeating a link without leaving, runtime heartbeats, commits, dirty files, and PR-check updates do not trigger regeneration.
|
|
24
26
|
|
|
25
|
-
The old name stays visible until the **next user prompt** starts a run in the new context. That prompt
|
|
27
|
+
The old name stays visible until the **next user prompt** starts a run in the new context. That prompt, bounded worktree/branch hints, and relevant recent task discussion determine the replacement. A short approval can use discussion matching the new task, but unrelated original prompts and old tasks are excluded. Worktree changes during a running turn wait for another prompt. Naming provenance and the completed context survive restart/resume, so resuming unchanged work does not rename it.
|
|
26
28
|
|
|
27
29
|
Manual `/name` renames always win, including a manual rename to the same text as an automatic name. Existing named sessions without A1 automatic-name provenance are preserved. Automatic generation cannot overwrite a manual rename or apply to a different session/context after a late provider response.
|
|
28
30
|
|
|
@@ -30,7 +32,7 @@ Manual `/name` renames always win, including a manual rename to the same text as
|
|
|
30
32
|
|
|
31
33
|
- The first footer row shows the path, branch, and optional linked PR number.
|
|
32
34
|
- The second row shows stats/context, then ` • session-name`, with the model/thinking text still aligned right.
|
|
33
|
-
- If space is tight, the name is clipped
|
|
35
|
+
- If space is tight, detailed stats are trimmed first to preserve the full name beside the model/thinking segment. Optional provider/route text can be omitted; the name is clipped only if it still cannot fit after stats are reduced. Unnamed sessions and rows without stats have no dangling separator.
|
|
34
36
|
|
|
35
37
|
A changed automatic name reveals in the configured accent's **secondary color**: 600 ms tonal shimmer over the old name, 45 ms per grapheme to reveal the replacement, then 300 ms fade to ordinary dim text. Palette terminals use a plain typewriter reveal. Live accent changes recolor active frames without restarting them. Repeated redraws, resume, and an unchanged regenerated name do not replay the animation; manual names change immediately.
|
|
36
38
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Worktree commands
|
|
2
|
+
|
|
3
|
+
A1 owns worktree creation, attachment, cooperative editing claims, and ordinary recovery. Repository instructions only guide agents to these commands; they do not implement a second verification or lock-management procedure.
|
|
4
|
+
|
|
5
|
+
## Command contract
|
|
6
|
+
|
|
7
|
+
Run these commands through an active A1 session's shell tool:
|
|
8
|
+
|
|
9
|
+
| Command | Result |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `a1 worktree enter <type/short-description> [--base <branch>]` | Create or resume the matching task checkout and attach it. |
|
|
12
|
+
| `a1 worktree attach <absolute-path>` | Attach an existing registered task checkout in this session's repository. |
|
|
13
|
+
| `a1 worktree detach` | Release this session's attachment without deleting files or branches. |
|
|
14
|
+
| `a1 worktree list` | Informational same-repository inventory; never required after success. |
|
|
15
|
+
|
|
16
|
+
Successful enter/attach returns the canonical root and branch after acquiring the editing claim. It is the complete attachment result: agents do not run a second inventory approval gate or implement their own retry loop. Temporary registration/coordination contention is retried within an operation budget. Actual ownership conflicts and uncertain records produce actionable failures rather than unsafe takeovers. A failed switch preserves the prior attachment. No command removes worktrees, branches, user files, or private workspace data.
|
|
17
|
+
|
|
18
|
+
Enter creates `.worktrees/<short-description>` under the primary checkout. It fetches the selected origin base before creating a new topic branch. Base selection is explicit `--base`, local Git configuration `a1.worktreeBase`, then the origin default branch; local-only repositories fall back to the primary branch. Existing matching worktrees keep their local edits and history. Path/branch collisions, primary checkouts, foreign repositories, and Git-locked worktrees are retained, not forced or adopted. Setup commands, dependency installation, private-clone provisioning, and repository hooks are not executed by A1.
|
|
19
|
+
|
|
20
|
+
`a1 session link-worktree`, `unlink-worktree`, and `worktrees` remain compatible aliases for attach, detach, and list. They use the same authoritative results and internal retries.
|
|
21
|
+
|
|
22
|
+
## Working directories
|
|
23
|
+
|
|
24
|
+
After successful attachment, subsequent built-in read, bash, edit, write, grep, find, and ls calls resolve relative paths from the verified attached root. Detach returns those tools to the session's startup directory. The already-running shell that issued the attachment finishes in its original cwd; A1 does not rewrite shell commands or call process-global chdir. Explicit absolute paths retain their ordinary meaning. Project resources, settings, custom extensions, and independent terminals keep their own discovery/cwd behavior; use the returned explicit root for those integrations.
|
|
25
|
+
|
|
26
|
+
Background footer polling activates persisted claims once per session binding, then observes without rewriting healthy runtime registrations or claims. Informational listing waits for a consistent coordination snapshot rather than marking all owners unverifiable because an unrelated mutation happens to be running. Runtime shutdown releases its own claims. Crash recovery preserves durable attachment state and checks recorded process liveness before another runtime can acquire a claim.
|
|
27
|
+
|
|
28
|
+
Implementation completion and review handoff do not end the task attachment. Keep it active for review and follow-up fixes so built-in tools and footer PR discovery continue using the task checkout. Detach only when explicitly requested or switching tasks; runtime shutdown releases editing claims automatically. Repository cleanup handoff is independent and does not require runtime detach.
|
|
29
|
+
|
|
30
|
+
Claims coordinate participating A1 sessions. They are not a sandbox against arbitrary external editors, an editing lock in Git, repository cleanup ownership, or permission to merge/delete anything. Delivery and protected cleanup remain independent.
|
|
31
|
+
|
|
32
|
+
## Shared repository guidance
|
|
33
|
+
|
|
34
|
+
Use this identical block in repositories, without adding another inventory approval gate:
|
|
35
|
+
|
|
36
|
+
> In an active A1 session, use `a1 worktree enter <branch>` or `a1 worktree attach <absolute-path>`. Work in the returned directory; successful completion is the attachment confirmation. Keep the task attached after implementation completion and review handoff so follow-up fixes retain its checkout and PR. Use `a1 worktree detach` only when explicitly requested or switching tasks; it preserves files and branches. Runtime shutdown releases claims automatically. A1 owns coordination, retries, and recovery; `a1 worktree list` is informational. Outside A1, use ordinary Git worktrees.
|
|
37
|
+
|
|
38
|
+
Install an A1 release exposing this interface before integrating a repository's instruction migration. Older installations only expose the session-context aliases; unknown commands in those older releases may return quietly without performing an operation. A migration PR is not evidence that a compatible installed release is active.
|
|
@@ -6,6 +6,21 @@ The implementation is repository tooling, not part of the installed A1 product.
|
|
|
6
6
|
|
|
7
7
|
If the whole repository moves to another canonical path or Windows drive, a carried cleanup journal still names the old absolute paths. Read-only `status` and `preview` report `state-relocation-required` and never rewrite it. The next mutation-locked operation safely rebases the journal only when every recorded entry is completed terminal history, the repository and remote identities still match, and every historical path is beneath the old recorded worktree root. The migration is atomic and changes only repository/path fields; the requested current worktree is then captured afresh and must pass every ordinary cleanup gate. Any owned, released, partially deleting, malformed, escaped, or identity-mismatched entry blocks relocation without changing the journal or local resources.
|
|
8
8
|
|
|
9
|
+
## Cleanup decisions
|
|
10
|
+
|
|
11
|
+
Use one clear request for one identified scope; do not ask the maintainer to repeat a decision already supplied. Tool confirmation flags encode that authority and are not a reason for another conversational confirmation.
|
|
12
|
+
|
|
13
|
+
| Request | Action |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| Ordinary cleanup of completed work | Use `sweep` for released candidates or exact `complete`; retain every reported blocker. |
|
|
16
|
+
| Delete one identified export | Follow [export decisions](#export-decisions); preservation is not mandatory. |
|
|
17
|
+
| Preserve one identified export | Use optional [named-export preservation](#explicit-named-export-preservation). |
|
|
18
|
+
| Discard a rejected change and its remote branch | Use exact confirmed `discard` only when both rejection and remote deletion are authorized. One explicit request can supply both. |
|
|
19
|
+
| Stop development processes, remove a disposable link, retire a redundant checkout, or enable background cleanup | Use the corresponding exact authorized operation below; generic cleanup does not imply these extra permissions. |
|
|
20
|
+
| Ambiguous file, conflicting owner, dirty work, unavailable evidence, or a lock | Retain the affected scope and report the actionable blocker. Ask only for a missing decision; do not repeat an unchanged attempt without a reason. |
|
|
21
|
+
|
|
22
|
+
Automatic cleanup remains conservative. Explicit file decisions do not weaken worktree/branch eligibility, ownership, content, link, process, or compare-and-delete safeguards. Use integrated tooling from primary, not unmerged task tooling against live worktrees. Detailed journals, races, and recovery belong in tooling and the sections below; user-facing reports should state the result or blocker concisely.
|
|
23
|
+
|
|
9
24
|
## Hand-off and sweep: the ordinary agent path
|
|
10
25
|
|
|
11
26
|
The delivering agent's session usually ends before the maintainer merges, so cleanup is split into two commands that never need the same session. When the validated PR is handed to the maintainer, and again after any repair push, the owning agent parks the worktree from the primary checkout:
|
|
@@ -92,7 +107,7 @@ Agents do not manually remove generated content, call `git worktree remove`, or
|
|
|
92
107
|
|
|
93
108
|
## Explicit closed-unmerged discard
|
|
94
109
|
|
|
95
|
-
Closing a PR does not itself authorize deletion.
|
|
110
|
+
Closing a PR does not itself authorize deletion. Require explicit rejection of the exact PR and authority to delete its remote branch; one clear request may supply both. Then run the candidate-scoped command from the primary checkout:
|
|
96
111
|
|
|
97
112
|
```bash
|
|
98
113
|
node scripts/governance/local-worktree-cleanup.mjs discard \
|
|
@@ -119,11 +134,19 @@ Branch mode verifies the named same-repository PR is still closed-unmerged into
|
|
|
119
134
|
|
|
120
135
|
A branch-scoped `branch-discard-<ref-digest>.json` journal beside the ordinary cleanup state pins the repository, exact ref, change, PR, expected head, and deletion step without changing existing worktree records. After local preflight, the command journals intent, revalidates live evidence, expected-head deletes only the remote ref, verifies remote absence, and compare-and-deletes the unchanged local ref. Absent refs support resumption. Repeated completed requests report `already-discarded` only while both refs remain absent; a recreated ref is retained as `discard-ref-recreated`. Command reports, not the worktree-only registration list, describe this branch-scoped state. Sweep and queue never invoke branch-only discard.
|
|
121
136
|
|
|
122
|
-
##
|
|
137
|
+
## Export decisions
|
|
123
138
|
|
|
124
|
-
Default bare-A1 exports
|
|
139
|
+
Default bare-A1 exports live in `~/.a1/exports/`; see [session exports](features/session-exports.md). An existing worktree export is user data, not an automatic cleanup disposable.
|
|
140
|
+
|
|
141
|
+
- **Delete:** an explicit request to delete one identified export is sufficient. Its exact path or an unambiguous previously reported blocker in the same interaction identifies the file; do not demand a copy or another preservation confirmation. Verify the candidate and ownership, regular-file identity, untracked HTML/JSONL status, and real non-link ancestors within that worktree. Recheck identity immediately before non-recursively unlinking only that file. Do not follow links, delete directories, remove tracked content, or resolve another owner's blocker by deleting their files.
|
|
142
|
+
- **Preserve:** when chosen, use the optional confirmed operation below. Its verified-copy and journal safeguards remain unchanged.
|
|
143
|
+
- **Unspecified:** a generic cleanup request does not authorize deleting unknown exports. Report the file and ask only whether to retain, preserve, or delete it. Do not add a blanket filename pattern to ignored/disposable content.
|
|
144
|
+
|
|
145
|
+
Either file decision leaves subsequent worktree and branch removal to integrated cleanup tooling with every ordinary safeguard intact. A deletion request does not authorize overriding another blocker.
|
|
146
|
+
|
|
147
|
+
## Explicit named-export preservation
|
|
125
148
|
|
|
126
|
-
|
|
149
|
+
This optional operation is for a maintainer who wants to keep a named legacy export. It is not a prerequisite when deletion was explicitly requested. Run it from primary:
|
|
127
150
|
|
|
128
151
|
```bash
|
|
129
152
|
cd /d/Git/a1 && node scripts/governance/local-worktree-cleanup.mjs preserve-export --repo D:/Git/a1 --path D:/Git/a1/.worktrees/example-task --change example-change --pr 123 --file session.html --confirm-preserve-export
|
|
@@ -6,13 +6,39 @@ Unrelated standalone documentation remains separate: a non-draft unassociated PR
|
|
|
6
6
|
|
|
7
7
|
Version-1 and version-2 deliveries and their existing comments, acceptance PRs, archive PRs, receipts, retries, and bounded catch-up remain supported under [Legacy delivery](#legacy-delivery). Do not silently convert an in-flight legacy delivery.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Agent operating guide
|
|
10
|
+
|
|
11
|
+
This runbook owns the delivery lifecycle. The [worktree protocol](architecture/project-structure.md#development-worktrees) owns checkout creation, identity, ownership, and runtime adapters; [local cleanup](local-worktree-cleanup.md) owns removal decisions, commands, blockers, and recovery. `AGENTS.md`, the delivery skill, and OpenSpec context are concise entry points, not separate copies of these procedures. Detailed checks stay in their owning runbook and tooling.
|
|
12
|
+
|
|
13
|
+
### Authorization without repeated confirmation
|
|
14
|
+
|
|
15
|
+
A planning-only request authorizes planning only. Once a concrete plan has been presented, one explicit instruction approving it and requesting implementation satisfies both requirements; no separate messages or special approval phrase are required. Ask only about a genuinely missing scope or authorization decision, not an approval already given. Reconcile approved refinements in the same PR before corresponding implementation edits.
|
|
16
|
+
|
|
17
|
+
Implementation approval never grants merge permission, foreign-worktree ownership, unrelated user-file deletion, or background cleanup authority. Use the separate [exact-candidate merge procedure](#maintainer-requested-agent-merge) and [cleanup decisions](local-worktree-cleanup.md#cleanup-decisions). A named-export deletion request does not require preservation approval instead.
|
|
18
|
+
|
|
19
|
+
### Branches and validation
|
|
20
|
+
|
|
21
|
+
Keep unrelated changes out. Use `type/short-description` branches with `feature`, `fix`, `refactor`, `docs`, `test`, `chore`, or `style`, and `type(scope): subject` commits; mark incompatible changes with `BREAKING CHANGE:`.
|
|
22
|
+
|
|
23
|
+
Before pushing, run only quick targeted checks of what changed: typecheck, the test files covering the changed code, and strict OpenSpec validation. Do not run preflight, `test:fast`, `test:full`, `test:release`, or directory-wide suites unless reproducing a reported CI failure or explicitly requested by the maintainer. Preflight is diagnostic, not CI authority. Draft PRs run no Development test suites; ready finalized candidates receive the selected exact-head validation. Use [complete-regression ordering](#complete-regression-evidence-ordering) for trusted failed-Full repairs, not broader local test runs.
|
|
10
24
|
|
|
11
|
-
|
|
25
|
+
After a push, do not watch CI in the foreground. Read and report its current result before unrelated work; do not poll for completion. Repair routine failed checks in the same branch/PR without weakening behavior, assertions, coverage, or required checks. Ask for approval only when a repair adds substantive scope. A changed candidate or target requires renewed applicable validation.
|
|
12
26
|
|
|
13
|
-
|
|
27
|
+
### Generated proposals
|
|
28
|
+
|
|
29
|
+
Nightly regression repairs and Pi upgrades are ordinary implementation-bound changes. Continue the generated branch and PR. Check each generated Implementation outcome when its work is complete, including an outcome needing no code change; do not rewrite the generated items. Keep detailed report evidence in its existing comments/design; do not add commits solely to insert a final CI run ID or body edits solely to record lifecycle phase. Draft implementation runs no Development suites.
|
|
30
|
+
|
|
31
|
+
Failed-Full repair selection follows the immutable provenance checks in [complete-regression ordering](#complete-regression-evidence-ordering); labels or naming never select it. Regression repair templates retain two implementation outcomes, one acceptance outcome, and triage metadata under Automation. Pi-upgrade proposals retain four implementation outcomes and one acceptance outcome; their version delta, changelog excerpt, gate verdicts, and review items remain in sync report comments/design. Publishing recovery remains independent of PR validation. The existing post-publication `chore/release-X.Y.Z-dev` reopening exception is limited to `openspec-ci[bot]`, version-only manifests, and a note matching the published Release; it grants no implementation integration authority.
|
|
32
|
+
|
|
33
|
+
### Handoff and reporting
|
|
34
|
+
|
|
35
|
+
Provide the absolute worktree, branch/commit, change, PR, behavior, known gaps, applicable run or inspection command, and whether editing ownership is handed over. For interactive checkout tests, build first and use `./scripts/dev` or `./scripts/dev pi`, never a direct Node launcher such as `node scripts/development/dev-launch.mjs`. Follow `AGENTS.md` for pasteable user-command formatting. End runnable implementation reports with `🧪 Manual test:` and the applicable command; a documentation-only change needs inspection, not a product build. Say when nothing is runnable instead of inventing a test.
|
|
36
|
+
|
|
37
|
+
After exact-head required validation succeeds, park the exact candidate with the primary-checkout `handoff` command, and repeat after a validated repair. It registers/releases cleanup ownership without removing anything. Do not add a lifecycle body edit, rerun successful validation, wait for merge, or start a watcher. Leave integration to a current authorized maintainer decision. CI counts are not progress, and manual validation never blocks truthful task completion or readiness.
|
|
38
|
+
|
|
39
|
+
## Worktree context across agent environments
|
|
14
40
|
|
|
15
|
-
|
|
41
|
+
Follow the [development worktree protocol](architecture/project-structure.md#development-worktrees) before creating, resuming, or switching checkouts. It defines the common Git path and conditional A1/Claude Code adapters; external agents need no A1 installation or runtime link. Editing handoff, runtime association, cleanup ownership, and integration authority remain distinct.
|
|
16
42
|
|
|
17
43
|
## Version-3 lifecycle
|
|
18
44
|
|
|
@@ -8,9 +8,9 @@ Updated A1 holds a `proper-lockfile` gate, the `mutation.authority.gate` lock di
|
|
|
8
8
|
|
|
9
9
|
The next mutation safely recovers abandoned owner/pending metadata after taking the gate. Empty, truncated, NUL-filled, or otherwise malformed metadata does not prevent this recovery. One bounded `recovery.json` records the recovery reason/time, not the original bytes or session contents. A live gate holder remains protected. Acquisition waits at most two seconds by default and honors cancellation.
|
|
10
10
|
|
|
11
|
-
If startup registration fails temporarily, the running session retries on its
|
|
11
|
+
Worktree commands own bounded retries; agents do not implement a recovery preflight or confirm success through a second inventory command. If startup registration fails temporarily, the running session retries on its one-second recovery interval. Healthy registrations and claims are not rewritten by background polls. Slow recovery attempts are coalesced rather than queued indefinitely. Switching an agent's session replaces its publication identity, and disposal drains publication before releasing claims.
|
|
12
12
|
|
|
13
|
-
Inventory
|
|
13
|
+
Inventory reads editing claims under a bounded consistent snapshot and does not repair or acquire them. Ordinary global coordination contention produces internal waiting or an operation-level contention diagnostic, never a blanket unverifiable-ownership result for every worktree.
|
|
14
14
|
|
|
15
15
|
## Older lock files and mixed versions
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timurproko/a1",
|
|
3
|
-
"version": "0.2.7-dev.
|
|
3
|
+
"version": "0.2.7-dev.1285",
|
|
4
4
|
"description": "Standalone single-agent terminal UI on pinned Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"privateLaunchContract": "neutral-launch-v1",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"typecheck:bin": "tsgo -p tsconfig.bin.json"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@earendil-works/pi-coding-agent": "1.5.
|
|
73
|
-
"@earendil-works/pi-tui": "1.5.
|
|
72
|
+
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
73
|
+
"@earendil-works/pi-tui": "1.5.2",
|
|
74
74
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
75
75
|
"chalk": "5.6.2",
|
|
76
76
|
"cross-spawn": "7.0.6",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@mariozechner/clipboard": "^0.3.9"
|
|
114
114
|
},
|
|
115
115
|
"publication": {
|
|
116
|
-
"source": "
|
|
117
|
-
"pullRequest":
|
|
116
|
+
"source": "70c8ebe762cd38cfbdc1f87fe82e674b236671c3",
|
|
117
|
+
"pullRequest": 912
|
|
118
118
|
}
|
|
119
119
|
}
|