@etiquekit/etq 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/AGENTS.md +28 -0
  2. package/QuickStart.md +94 -0
  3. package/README.md +77 -9
  4. package/bin/etiquette +1149 -0
  5. package/bin/etiquette-core +313 -0
  6. package/docs/ARCHITECTURE.md +100 -0
  7. package/docs/CODEX_CLIENT_COMPATIBILITY.md +83 -0
  8. package/docs/CONCEPTS.md +128 -0
  9. package/docs/CONCEPT_STATUS.md +67 -0
  10. package/docs/CORE_PROFILE.md +70 -0
  11. package/docs/LANE_PROVISIONING.md +157 -0
  12. package/docs/README.md +29 -0
  13. package/docs/RELEASE_SURFACE_AUDIT.md +156 -0
  14. package/docs/SEAT_DISCIPLINE.md +68 -0
  15. package/docs/SEAT_PROVISIONING.md +100 -0
  16. package/docs/TEAM_HANDOFF.md +190 -0
  17. package/docs/WORKTREE_QOL.md +92 -0
  18. package/docs/contracts/ledger-entry/README.md +83 -0
  19. package/docs/contracts/ledger-entry/ledger-entry.v0.1.md +116 -0
  20. package/docs/contracts/ledger-entry/ledger-entry.v0.2.md +90 -0
  21. package/docs/contracts/ledger-entry/ledger-entry.v0.md +123 -0
  22. package/docs/contracts/ledger-entry/ledger-query-cli.v0.1.md +64 -0
  23. package/package.json +42 -11
  24. package/scripts/install.sh +144 -0
  25. package/scripts/uninstall.sh +58 -0
  26. package/templates/etiquette-vanilla-v0/README.md +69 -0
  27. package/templates/etiquette-vanilla-v0/bin/stamp-vanilla +33 -0
  28. package/templates/etiquette-vanilla-v0/source/control-seat/.llm-substrate/HANDOFF.md +22 -0
  29. package/templates/etiquette-vanilla-v0/source/control-seat/README.md +16 -0
  30. package/templates/etiquette-vanilla-v0/source/control-seat/bin/_lib/http.sh +121 -0
  31. package/templates/etiquette-vanilla-v0/source/control-seat/bin/_lib/sanitize.sh +191 -0
  32. package/templates/etiquette-vanilla-v0/source/control-seat/bin/_lib/state.sh +67 -0
  33. package/templates/etiquette-vanilla-v0/source/control-seat/bin/access-assurance-check +55 -0
  34. package/templates/etiquette-vanilla-v0/source/control-seat/bin/compact-local-events +71 -0
  35. package/templates/etiquette-vanilla-v0/source/control-seat/bin/hooks/post-tool-use +64 -0
  36. package/templates/etiquette-vanilla-v0/source/control-seat/bin/hooks/session-end +64 -0
  37. package/templates/etiquette-vanilla-v0/source/control-seat/bin/hooks/session-start +64 -0
  38. package/templates/etiquette-vanilla-v0/source/control-seat/bin/hooks/stop +64 -0
  39. package/templates/etiquette-vanilla-v0/source/control-seat/bin/hooks/user-prompt-submit +64 -0
  40. package/templates/etiquette-vanilla-v0/source/control-seat/bin/local-event +53 -0
  41. package/templates/etiquette-vanilla-v0/source/control-seat/bin/post-receipt +143 -0
  42. package/templates/etiquette-vanilla-v0/source/control-seat/bin/post-telemetry +112 -0
  43. package/templates/etiquette-vanilla-v0/source/control-seat/bin/seat-consume-pass +115 -0
  44. package/templates/etiquette-vanilla-v0/source/control-seat/bin/seat-doctor +20 -0
  45. package/templates/etiquette-vanilla-v0/source/control-seat/bin/seat-init +86 -0
  46. package/templates/etiquette-vanilla-v0/source/control-seat/bin/seat-post-readiness +171 -0
  47. package/templates/etiquette-vanilla-v0/source/control-seat/bin/session-init +132 -0
  48. package/templates/etiquette-vanilla-v0/source/control-seat/docs/work/access/ACCESS-ASSURANCE.md +39 -0
  49. package/templates/etiquette-vanilla-v0/source/control-seat/docs/work/access/workspace-secure-profile.v0.json +53 -0
  50. package/templates/etiquette-vanilla-v0/source/control-seat/docs/work/ledger/LEDGER.md +7 -0
  51. package/templates/etiquette-vanilla-v0/source/control-seat/docs/work/playbacks/PLAYBACK_TEMPLATE.md +31 -0
  52. package/templates/etiquette-vanilla-v0/source/control-seat/docs/work/receipts/.gitkeep +1 -0
  53. package/templates/etiquette-vanilla-v0/source/control-seat/docs/work/tasks/CONTROL-001.yaml +13 -0
  54. package/templates/etiquette-vanilla-v0/source/etiquette-kernel/README.md +6 -0
  55. package/templates/etiquette-vanilla-v0/source/etiquette-kernel/bin/kernel-doctor +11 -0
  56. package/templates/etiquette-vanilla-v0/source/etiquette-kernel/contracts/playback.v0.md +37 -0
  57. package/templates/etiquette-vanilla-v0/source/etiquette-kernel/contracts/receipt.v0.md +25 -0
  58. package/templates/etiquette-vanilla-v0/source/etiquette-kernel/contracts/seat-readiness.v0.md +22 -0
  59. package/templates/etiquette-vanilla-v0/source/etiquette-kernel/contracts/task.v0.md +18 -0
  60. package/templates/etiquette-vanilla-v0/validate-vanilla.sh +43 -0
  61. package/templates/github-actions/README.md +30 -0
  62. package/templates/github-actions/w1-webhook-wake-canary.yml +111 -0
  63. package/templates/hosted-receiver/README.md +41 -0
  64. package/templates/hosted-receiver/w1-github-webhook-receiver.mjs +129 -0
  65. package/templates/seat-packs-v0/README.md +72 -0
  66. package/templates/seat-packs-v0/bin/provision-seat +70 -0
  67. package/templates/seat-packs-v0/source/claude-code-seat/.llm-substrate/HANDOFF.md +24 -0
  68. package/templates/seat-packs-v0/source/claude-code-seat/README.md +19 -0
  69. package/templates/seat-packs-v0/source/claude-code-seat/bin/seat-doctor +8 -0
  70. package/templates/seat-packs-v0/source/codex-seat/.llm-substrate/HANDOFF.md +25 -0
  71. package/templates/seat-packs-v0/source/codex-seat/README.md +22 -0
  72. package/templates/seat-packs-v0/source/codex-seat/bin/seat-doctor +8 -0
  73. package/templates/seat-packs-v0/source/gemini-seat/.llm-substrate/HANDOFF.md +23 -0
  74. package/templates/seat-packs-v0/source/gemini-seat/README.md +19 -0
  75. package/templates/seat-packs-v0/source/gemini-seat/bin/seat-doctor +8 -0
  76. package/templates/seat-packs-v0/source/ollama-seat/.llm-substrate/HANDOFF.md +24 -0
  77. package/templates/seat-packs-v0/source/ollama-seat/README.md +19 -0
  78. package/templates/seat-packs-v0/source/ollama-seat/bin/seat-doctor +8 -0
  79. package/templates/seat-packs-v0/source/openrouter-seat/.llm-substrate/HANDOFF.md +24 -0
  80. package/templates/seat-packs-v0/source/openrouter-seat/README.md +19 -0
  81. package/templates/seat-packs-v0/source/openrouter-seat/bin/seat-doctor +8 -0
  82. package/templates/seat-packs-v0/validate-seat-packs.sh +27 -0
  83. package/bin/etq +0 -4
@@ -0,0 +1,156 @@
1
+ # Release Surface Audit
2
+
3
+ This audit keeps the all-developer default surface to the minimum needed to claim and validate a seat.
4
+
5
+ ## Result
6
+
7
+ ```yaml
8
+ default_for_all_devs:
9
+ template: templates/etiquette-vanilla-v0
10
+ posture: keep
11
+ reason: minimal kernel plus one generic control seat
12
+
13
+ optional_runtime_seat_packs:
14
+ template: templates/seat-packs-v0
15
+ posture: optional
16
+ reason: lets a control seat add Codex, Claude Code, Gemini, OpenRouter, or Ollama guidance after the base install
17
+
18
+ advanced_internal_docs:
19
+ path: internal/docs
20
+ posture: advanced/internal
21
+ reason: source history and maintainer doctrine; not required for a new seat
22
+
23
+ advanced_internal_templates:
24
+ path: internal/templates
25
+ posture: advanced/internal
26
+ reason: rehearsal and legacy workflow assets; not part of default onboarding
27
+ ```
28
+
29
+ ## Default Docs Allowlist
30
+
31
+ ```yaml
32
+ docs_default:
33
+ - docs/README.md
34
+ - docs/ARCHITECTURE.md
35
+ - docs/CODEX_CLIENT_COMPATIBILITY.md
36
+ - docs/CONCEPTS.md
37
+ - docs/CONCEPT_STATUS.md
38
+ - docs/CORE_PROFILE.md
39
+ - docs/LANE_PROVISIONING.md
40
+ - docs/SEAT_DISCIPLINE.md
41
+ - docs/SEAT_PROVISIONING.md
42
+ - docs/TEAM_HANDOFF.md
43
+ - docs/WORKTREE_QOL.md
44
+ - docs/RELEASE_SURFACE_AUDIT.md
45
+ ```
46
+
47
+ Any other default doc is a release-surface expansion and must be intentional.
48
+
49
+ ## Shipped Docs Decisions
50
+
51
+ - `TEAM_HANDOFF.md` ships as the private team rollout guide; the old
52
+ maintainer-oriented title is not part of the package.
53
+ - `CODEX_CLIENT_COMPATIBILITY.md` ships because Codex is a supported runner.
54
+ - `RELEASE_SURFACE_AUDIT.md` ships as the visible package-surface control.
55
+ - Maintainer history, hosted parity, and portal docs remain excluded.
56
+
57
+ ## Current Size Snapshot
58
+
59
+ ```yaml
60
+ docs_default:
61
+ files: 12
62
+ posture: all-developer
63
+
64
+ vanilla_template:
65
+ purpose: all-dev default
66
+ includes:
67
+ - etiquette-kernel
68
+ - control-seat
69
+ excludes:
70
+ - runtime-specific seat packs
71
+ - sample product
72
+ - backplane
73
+ - historical local workflow docs
74
+
75
+ seat_packs_template:
76
+ purpose: optional runtime adapter templates
77
+ includes:
78
+ - Codex seat
79
+ - Claude Code seat
80
+ - Gemini seat
81
+ - OpenRouter seat
82
+ - Ollama seat
83
+ default_install: false
84
+
85
+ internal_docs:
86
+ path: internal/docs
87
+ posture: excluded from new-seat onboarding
88
+
89
+ internal_templates:
90
+ path: internal/templates
91
+ posture: excluded from new-seat onboarding
92
+
93
+ package_surface:
94
+ npm_pack_entries: 182
95
+ max_budget: 190
96
+ posture: local devkit package plus signed user-local installer
97
+ distribution_origin: https://etiquette.example.com
98
+ excludes: workspace package metadata, workspace fixtures, internal, conformance, apps, site, dist, hosted parity docs, portal docs, root kernel manuals
99
+ ```
100
+
101
+ ## What Is Necessary For All Developers
102
+
103
+ ```yaml
104
+ required:
105
+ - README.md + AGENTS.md
106
+ - the Default Docs Allowlist above (verbatim)
107
+ - templates/etiquette-vanilla-v0/README.md
108
+ - etiquette-kernel contracts
109
+ - control-seat handoff + doctor
110
+ - one starter ledger task
111
+ ```
112
+
113
+ ## What Is Not Necessary For All Developers
114
+
115
+ Runtime seat packs, sample-product rehearsals, v3 workflow helper docs, satellite
116
+ operator docs, supervision phase docs, advisory-signal experiments, and internal
117
+ templates may remain in the repo for maintainers. The default onboarding path
118
+ must not require them.
119
+
120
+ ## Release Hygiene Proof
121
+
122
+ The release scan blocks:
123
+
124
+ ```yaml
125
+ blocked:
126
+ - personal absolute paths
127
+ - local username markers
128
+ - old repo name
129
+ - shop-persona markers in the release rollout package
130
+ - prior-run markers in all-developer docs
131
+ - extra files under docs/
132
+ - unexpected public template directories
133
+ - unexpected public scripts
134
+ - unexpected public substrate files
135
+ ```
136
+
137
+ Command:
138
+
139
+ ```sh
140
+ npm run release:scan
141
+ ```
142
+
143
+ ## Package Readiness Check
144
+
145
+ Use `etiquette release readiness --json` before changing distribution settings. It reports private-package, files allowlist, pack-canary, checksum/signature, shell-installer presence, pinned public-key bootstrap support, Codex compatibility, and wrapper gaps; it cannot publish, flip `private`, update Codex, or create a channel.
146
+ Codex-backed remote-runtime, plugin-MCP, and hook/action-auth canaries require CLI `0.141.0`+ (`docs/CODEX_CLIENT_COMPATIBILITY.md`). GA additionally runs `etiquette release ga-readiness --channel shell-installer,npm --tag-free-confirmed --json`; it requires a non-prerelease version, final tarball checksums, trusted RSA signature, private-compatible channels, and explicit remote-tag uniqueness confirmation, while still unable to publish, sign, tag, or create a channel. Git source archives must exclude maintainer-only `internal/`, `conformance/`, `site/`, `fixtures/`, `apps/`, local state, and `dist/`.
147
+
148
+ ## Local-Thin Purge (v0.2.1)
149
+
150
+ ```yaml
151
+ excluded_cli_commands: [remote, agent-plane, mcp, parity, linear, integration] # guarded stubs explain absence
152
+ excluded_source_dirs: [agent-plane/, integration/, linear/, mcp/] # parity/ ships (console dependency)
153
+ excluded_templates: [hosted-receiver/]
154
+ removed_from_templates: [codex-seat etiquette-monitor-pull] # use `etiquette notify poll`
155
+ doctrine: local set stays thin and provider-neutral; remote/hosted surfaces are source-only until remote lanes open; zero coordination-bus coupling ships
156
+ ```
@@ -0,0 +1,68 @@
1
+ # Seat Discipline
2
+
3
+ Seat discipline keeps agent work useful, attributable, and portable across
4
+ runtimes.
5
+
6
+ ## Operating Rules
7
+
8
+ - Read the repo state before forming a plan.
9
+ - Use a task envelope before product edits.
10
+ - Keep each session bounded.
11
+ - Write useful runbook notes, not raw transcript dumps.
12
+ - Run validation before returning a receipt.
13
+ - Keep receipts compact and cited.
14
+ - Treat accepted review as different from integrated work.
15
+ - Promote only through the policy-resolved gate.
16
+ - Stop when authority, secrets, scope, or validation are unclear.
17
+
18
+ ## Identity Split
19
+
20
+ ```yaml
21
+ operator_principal: human accountable for intent or approval
22
+ execution_seat: durable work identity or runtime capability
23
+ runtime: tool or model that executed
24
+ session: bounded run that produced evidence
25
+ repo_substrate: source, ledger, receipts, validation, commits
26
+ ```
27
+
28
+ ## Work Boundaries
29
+
30
+ A seat should know:
31
+
32
+ - allowed writes;
33
+ - forbidden writes;
34
+ - validation commands;
35
+ - stop conditions;
36
+ - expected receipt;
37
+ - next owner.
38
+
39
+ If any of those are missing, ask for a sharper task.
40
+
41
+ ## Session Hygiene
42
+
43
+ Sessions are for bounded work. Restoring a session restores context, not
44
+ authority.
45
+
46
+ ## Review Discipline
47
+
48
+ Review seats should pressure-test hidden authority changes, missing validation,
49
+ oversized write sets, stale assumptions, unbounded sessions, evidence that
50
+ cannot be reproduced, and claims that should be receipts.
51
+
52
+ Reviewers contribute evidence. The routed owner mutates truth.
53
+
54
+ ## Tool Discipline
55
+
56
+ Use chat for conversation, planning tools for intent, code review tools for
57
+ diffs and CI, incident tools for runtime evidence, and identity providers for
58
+ authentication.
59
+
60
+ Do not let any of them become acceptance.
61
+
62
+ ## Failure Signals
63
+
64
+ Open a follow-up or stop the run when a seat edits outside allowed writes,
65
+ validation repeatedly fails, the runbook grows without a receipt, a task spans
66
+ unrelated repos, a runtime claims success without evidence, a projection
67
+ disagrees with git, a grant owner is unclear, or an integration tries to close
68
+ or promote work.
@@ -0,0 +1,100 @@
1
+ # Seat Provisioning
2
+
3
+ Start with one project owner and one review seat. Add runtime-specific seats only when a concrete task needs them. Use [LANE_PROVISIONING.md](LANE_PROVISIONING.md) when a manager needs to route active work, park future work, or give a new agent a complete pickup bulletin.
4
+
5
+ ## Minimal Flow
6
+
7
+ 1. Install project-local agent guidance with `setup`.
8
+ 2. Initialize the project with `bootstrap local`.
9
+ 3. Read `AGENTS.md`, `BOARD.md`, `SESSION_PICKUP.md`, and `SEAT_OPERATING_MANUAL.md`.
10
+ 4. Run `whereami`, `doctor`, and `status`.
11
+ 5. Confirm the lead and review seats.
12
+ 6. Use `$etiquette-seat-lifecycle` before pickup after stale context, resume, runner/model/profile swaps, or workflow migration.
13
+ 7. Have the lead seat `join` and `pickup` the first generated task.
14
+ 8. Add extra sessions only when starter sessions are not enough.
15
+ 9. Give each seat its allowed writes and validation.
16
+ 10. Record a receipt before asking for promotion.
17
+
18
+ ```sh
19
+ etiquette setup --target codex --project "$PWD"
20
+ etiquette bootstrap local --project "$PWD" --profile codex-cc-gemini --task-prefix APP
21
+ etiquette whereami --project "$PWD" --seat codex-seat --task APP-001
22
+ etiquette doctor --project "$PWD"
23
+ etiquette status --project "$PWD"
24
+ etiquette join --project "$PWD" --seat codex-seat
25
+ etiquette pickup --project "$PWD" --seat codex-seat --task APP-001 --text
26
+ etiquette console board --project "$PWD" --text
27
+ ```
28
+
29
+ ## Seat Types
30
+
31
+ Use `control_seat` for local workflow ownership, `execution_seat` for bounded implementation, `review_seat` for pressure testing, and `seat_maintainer` for runtime-specific guidance. Seats are roles. People and model sessions occupy them.
32
+
33
+ ## Greenfield Setup
34
+
35
+ ```sh
36
+ etiquette bootstrap local --project "$PWD" --profile codex-cc-gemini --task-prefix FOOD \
37
+ --lead-seat impl-seat --lead-principal developer-1 --review-seat review-seat --review-principal reviewer-1
38
+ ```
39
+
40
+ ```sh
41
+ etiquette whereami --project "$PWD" --seat impl-seat --task FOOD-001
42
+ etiquette join --project "$PWD" --seat impl-seat
43
+ etiquette pickup --project "$PWD" --seat impl-seat --task FOOD-001 --text
44
+ ```
45
+
46
+ The starter runbook is enough for normal pickup. Use `session create` only when an extra ad hoc session needs a different scope.
47
+
48
+ The lead seat coordinates. The review seat pressure-tests. Neither gets merge or promotion authority unless policy grants it.
49
+
50
+ Hooks, readiness, and lifecycle preflight are evidence only. The task envelope and allowed writes remain the active work authority.
51
+
52
+ ## Child Runners
53
+
54
+ Use node delegation when a lead seat or runner needs bounded child work without creating a new durable seat.
55
+
56
+ The parent issues an explicit child lease. The child lease must be a subset of the parent lease: same workflow and lane, shorter or equal TTL, narrower or equal authority scope, subset tools, subset write paths, inherited forbidden actions, reduced child budget, and reduced depth.
57
+
58
+ Child runners return to their immediate parent. The parent synthesizes one upstream receipt and owns cleanup. A child or headless node is disposable by default; durable seat status still requires enrollment and readiness.
59
+
60
+ ## Runtime Seats
61
+ Runtime-specific seats are optional adapters. Add them after task assignment:
62
+
63
+ ```sh
64
+ sh templates/seat-packs-v0/bin/provision-seat codex /tmp/dev-codex-seat
65
+ sh templates/seat-packs-v0/bin/provision-seat claude-code /tmp/dev-claude-code-seat
66
+ sh templates/seat-packs-v0/bin/provision-seat gemini /tmp/dev-gemini-seat
67
+ sh templates/seat-packs-v0/bin/provision-seat ollama /tmp/dev-ollama-seat
68
+ sh templates/seat-packs-v0/bin/provision-seat openrouter /tmp/dev-openrouter-seat
69
+ ```
70
+
71
+ Use `auto` only when exactly one runtime is obvious; use `seat-session-bootstrap` inside a live agent session.
72
+
73
+ For bounded, cursor-based wake checks on any seat, use the portable core command: `etiquette notify poll --seat <id> --after-seq <n>`. It is read-only and does not grant authority. Seat packs do not bundle coordination-bus monitor skills; monitoring stays operator-armed.
74
+
75
+ ## Readiness
76
+
77
+ ```sh
78
+ etiquette seat readiness \
79
+ --project "$PWD" \
80
+ --seat codex-seat \
81
+ --seat-type execution_seat \
82
+ --execution-surface codex \
83
+ --capability-source local_validation \
84
+ --operational-status operational \
85
+ --model-tier frontier_high_reasoning
86
+
87
+ etiquette seat status --project "$PWD"
88
+ ```
89
+
90
+ Agent confidence is not readiness. Readiness is declared capability plus local evidence.
91
+
92
+ ## Managed Runtime Infrastructure
93
+ Remote execution is a later layer. Plane provisioning is infra-admin scoped. Workspace provisioning is bounded to the verified initiator and owner. Neither grants workflow authority by itself.
94
+
95
+ ## Rules
96
+ - Start with the smallest useful topology.
97
+ - Add seats because work requires them.
98
+ - Product-write authority requires a task, allowed writes, validation, and the right promotion gate.
99
+ - Chat is not canonical record.
100
+ - Runtime packs are adapters, not doctrine.
@@ -0,0 +1,190 @@
1
+ # Team Handoff
2
+
3
+ Use this when a manager gives Etiquette to developers from a private release
4
+ asset before public hosted distribution is approved.
5
+
6
+ Target loop:
7
+
8
+ ```text
9
+ install once -> clone or create repo -> bootstrap local -> seat pickup -> receipt
10
+ ```
11
+
12
+ Prereqs: Git and Bun `>=1.3.0`; installer use also needs curl, openssl,
13
+ shasum, and tar. The project repo should not depend on Etiquette as an npm
14
+ package. The CLI lives in the developer's user-local install root.
15
+
16
+ ## Inputs
17
+
18
+ The manager provides release version, installer URL or path, release base URL
19
+ or local release directory, release public key, project repo or greenfield
20
+ name, lead seat, review seat, and first task prefix.
21
+
22
+ Default starter profile: lead `codex-seat`, review `cc-seat`, bootstrap
23
+ `manager-seat`, task prefix `APP`.
24
+
25
+ ## Install CLI
26
+
27
+ Public hosted install is parked. Use a private release asset or signed team
28
+ bundle. Required bundle files:
29
+
30
+ ```text
31
+ install.sh
32
+ releases/<version>/etiquette-<version>.tgz
33
+ releases/<version>/SHA256SUMS
34
+ releases/<version>/SHA256SUMS.sig
35
+ ```
36
+
37
+ The manager may also provide `releases/<version>/etiquette-release.pub` and its
38
+ SHA-256. The private signing key is never distributed.
39
+
40
+ Remote private asset:
41
+
42
+ ```sh
43
+ curl -fsSL "$ETQ_INSTALLER_URL" -o "${TMPDIR:-.}/etiquette-install.sh"
44
+ sh "${TMPDIR:-.}/etiquette-install.sh" \
45
+ --version "$ETQ_VERSION" \
46
+ --base-url "$ETQ_RELEASES_URL" \
47
+ --public-key "$ETQ_PUBLIC_KEY" \
48
+ --install-root "$HOME/.etiquette" \
49
+ --modify-profile
50
+ ```
51
+
52
+ Local signed bundle:
53
+
54
+ ```sh
55
+ ETQ_RELEASES_DIR=/path/to/dist/releases
56
+ ETQ_PUBLIC_KEY=/path/to/dist/releases/1.0.0/etiquette-release.pub
57
+
58
+ sh /path/to/dist/install.sh \
59
+ --version 1.0.0 \
60
+ --base-url "file://$ETQ_RELEASES_DIR" \
61
+ --public-key "$ETQ_PUBLIC_KEY" \
62
+ --install-root "$HOME/.etiquette" \
63
+ --modify-profile
64
+ ```
65
+
66
+ If needed:
67
+
68
+ ```sh
69
+ export PATH="$HOME/.etiquette/bin:$PATH"
70
+ etiquette help
71
+ etiquette-core help
72
+ ```
73
+
74
+ Uninstall: run `sh scripts/uninstall.sh --dry-run`, then `--yes`; project `.etiquette` and `docs/work` stay.
75
+
76
+ This is still a private team canary. Do not upload the bundle, create a public
77
+ tag, publish to npm, or replace the public placeholder installer until the
78
+ release owner explicitly grants that distribution step.
79
+
80
+ ## Prepare Repo
81
+
82
+ Existing repo:
83
+
84
+ ```sh
85
+ git clone "$PROJECT_REPO" app
86
+ cd app
87
+ ```
88
+
89
+ Greenfield repo:
90
+
91
+ ```sh
92
+ mkdir app
93
+ cd app
94
+ git init -b main
95
+ printf 'node_modules/\n.DS_Store\nnpm-debug.log*\n' > .gitignore
96
+ git add .gitignore
97
+ git commit -m "chore: baseline empty workspace"
98
+ ```
99
+
100
+ ## Bootstrap Local Etiquette
101
+
102
+ ```sh
103
+ etiquette handoff --project "$PWD" --profile codex-cc-gemini --task-prefix APP
104
+ etiquette bootstrap local --project "$PWD" --profile codex-cc-gemini --task-prefix APP
105
+ etiquette doctor --project "$PWD"
106
+ etiquette console board --project "$PWD" --text
107
+ ```
108
+
109
+ `handoff` executes nothing. `bootstrap local` creates repo-local `.etiquette`
110
+ state, `docs/work` task envelopes, seat cards, bounded session runbooks, local
111
+ packet events, and pickup docs. It does not write a global bus, publish, push,
112
+ merge, close, promote, or grant authority.
113
+
114
+ Commit the bootstrap baseline when the project owner is ready:
115
+
116
+ ```sh
117
+ git add .etiquette docs/work AGENTS.md
118
+ git commit -m "chore: bootstrap etiquette workspace"
119
+ ```
120
+
121
+ ## Seat Pickup
122
+
123
+ Lead seat:
124
+
125
+ ```sh
126
+ etiquette whereami --project "$PWD" --seat codex-seat --task APP-001
127
+ etiquette join --project "$PWD" --seat codex-seat
128
+ etiquette pickup --project "$PWD" --seat codex-seat --task APP-001 --text
129
+ ```
130
+
131
+ Review seat:
132
+
133
+ ```sh
134
+ etiquette whereami --project "$PWD" --seat cc-seat --task APP-002
135
+ etiquette join --project "$PWD" --seat cc-seat
136
+ etiquette pickup --project "$PWD" --seat cc-seat --task APP-002 --text
137
+ ```
138
+
139
+ Inside Codex sessions that have the pickup skill installed:
140
+
141
+ ```sh
142
+ ~/.codex/skills/etiquette-seat-pickup/scripts/seat-pickup.sh \
143
+ --project "$PWD" \
144
+ --seat codex-seat \
145
+ --task APP-001 \
146
+ --etq "$(command -v etiquette)"
147
+ ```
148
+
149
+ The wrapper prints board, feed, inbox, task envelope, and session runbook. It is
150
+ a convenience reader, not authority.
151
+
152
+ ## Local Wake
153
+
154
+ Seats can refresh their repo-local queue before pickup or review:
155
+
156
+ ```sh
157
+ etiquette notify poll --project "$PWD" --seat codex-seat --text
158
+ ```
159
+
160
+ The queue is a local pointer cache over `.etiquette/events/local.ndjson`. It is
161
+ not a webhook, hosted relay, external bus, workflow ack, or authority source.
162
+
163
+ ## Boundaries
164
+
165
+ - Use the project repo's `.etiquette` and `docs/work` for routine execution.
166
+ - Keep detailed attempts in `docs/work/sessions/session-<task>/RUNBOOK.md`.
167
+ - Write receipts under `docs/work/receipts/`.
168
+ - Do not use an external global ledger for routine local work.
169
+ - Do not merge, push, close, promote, sign, or grant authority from readiness or
170
+ pickup alone.
171
+ - Stop when the task needs writes outside its envelope, a secret appears,
172
+ validation cannot run, or authority is unclear.
173
+
174
+ ## Runtime And Hosted Surfaces
175
+
176
+ The local devkit intentionally omits infra/runtime commands. If a developer
177
+ runs `etiquette runtime`, the expected result is:
178
+
179
+ ```text
180
+ runtime commands are not included in the local devkit package; use an infra/runtime source workspace.
181
+ ```
182
+
183
+ Remote execution, webhooks, Slack/Teams bots, EKS/Kube, and hosted projection
184
+ are later layers. They must not be treated as part of the local handoff.
185
+
186
+ ## Proven Canary
187
+
188
+ The native-install canary verified this flow with a signed local release
189
+ fixture, fake `HOME`, user-local install root, clean repo, bootstrap, lead-seat
190
+ pickup, review-seat pickup, runtime quarantine, and clean baseline commit.
@@ -0,0 +1,92 @@
1
+ # Worktree QoL
2
+
3
+ Use this when a seat works in a branch, a detached worktree, or a resumed agent
4
+ session. The goal is to avoid losing work to ephemeral directories and to keep
5
+ project context separate from runner chat history.
6
+
7
+ ## Stable Lane Worktrees
8
+
9
+ Prefer durable worktrees for lane work:
10
+
11
+ ```sh
12
+ mkdir -p ../_worktrees
13
+ git worktree add ../_worktrees/APP-001-impl-seat lane/APP-001-domain-foundation
14
+ cd ../_worktrees/APP-001-impl-seat
15
+ ```
16
+
17
+ Use `/tmp` only for disposable experiments. If a task needs review, return, or
18
+ resumption, put the worktree under a predictable project-owned or sibling
19
+ directory such as `_worktrees/`.
20
+
21
+ Recommended naming:
22
+
23
+ ```text
24
+ _worktrees/<task-id>-<seat-id>
25
+ _worktrees/APP-001-impl-seat
26
+ _worktrees/APP-002-review-seat
27
+ ```
28
+
29
+ ## Resume Discipline
30
+
31
+ Agent resume restores conversation context. It does not prove repo context.
32
+
33
+ After any resume, run:
34
+
35
+ ```sh
36
+ etiquette whereami --project "$PWD" --seat <seat> --task <task>
37
+ git status -sb
38
+ git branch --show-current
39
+ ```
40
+
41
+ If the runner asks whether to resume in the old session directory or the
42
+ current directory, choose the current directory only when it is the intended
43
+ project worktree for the task. Do not resume a repo-local task inside a global
44
+ coordination repo or unrelated workspace.
45
+
46
+ ## If A Worktree Is Gone
47
+
48
+ Do not reconstruct from chat. Recreate from Git:
49
+
50
+ ```sh
51
+ git worktree list
52
+ git branch --list 'lane/*'
53
+ mkdir -p ../_worktrees
54
+ git worktree add ../_worktrees/APP-001-impl-seat lane/APP-001-domain-foundation
55
+ cd ../_worktrees/APP-001-impl-seat
56
+ etiquette whereami --project "$PWD" --seat impl-seat --task APP-001
57
+ ```
58
+
59
+ If the branch was never committed or pushed, treat the lost worktree as lost
60
+ work unless there is a durable receipt, patch, or runbook artifact. Do not claim
61
+ completion from memory.
62
+
63
+ ## Evidence And Return
64
+
65
+ Keep detailed execution notes in the session runbook:
66
+
67
+ ```text
68
+ docs/work/sessions/session-<task>/RUNBOOK.md
69
+ ```
70
+
71
+ Return through the repo-local packet/event flow. Before asking a reviewer to
72
+ pick up the task, verify:
73
+
74
+ ```sh
75
+ etiquette return check --project "$PWD" --task <task> --seat <seat>
76
+ etiquette diagnostics no-return --project "$PWD" --task <task> --seat <seat>
77
+ ```
78
+
79
+ For remote/headless runners, use the hard gate:
80
+
81
+ ```sh
82
+ etiquette return check --project "$PWD" --task <task> --seat <seat> --remote-runner
83
+ ```
84
+
85
+ ## Forbidden Shortcuts
86
+
87
+ - Do not treat an agent transcript as the branch, task, or receipt.
88
+ - Do not use a global handshake bus for routine repo-local execution.
89
+ - Do not keep long-running implementation work only in `/tmp`.
90
+ - Do not ask a reviewer to act until the branch and repo-local return are
91
+ visible.
92
+ - Do not merge, close, publish, or promote because a worktree exists.
@@ -0,0 +1,83 @@
1
+ # Ledger Entry Contracts
2
+
3
+ This contract keeps the ledger-query-mode work narrow. It hardens the spine first:
4
+ typed ledger entries that later reflex queries can read without guessing.
5
+
6
+ It does not ship a ledger query engine, sabbatical dossier engine, capsule
7
+ promotion loop, or remote ledger authority.
8
+
9
+ ## Shape
10
+
11
+ ```text
12
+ raw local ledger entry
13
+ -> typed spine-eligible metadata
14
+ -> optional compact projection
15
+ -> later sabbatical capsule only after operator promotion
16
+ ```
17
+
18
+ ## Core Rule
19
+
20
+ ```text
21
+ Reflex routes the present.
22
+ Sabbatical understands the arc.
23
+ Capsules compress the arc back into reflex context.
24
+ ```
25
+
26
+ The brain may recommend. The spine may route. Grants authorize. Execution
27
+ mutates. Receipts prove. Audit accounts.
28
+
29
+ ## Contracts
30
+
31
+ - [`ledger-entry.v0.md`](./ledger-entry.v0.md)
32
+ - [`ledger-entry.v0.1.md`](./ledger-entry.v0.1.md)
33
+ - [`ledger-query-cli.v0.1.md`](./ledger-query-cli.v0.1.md)
34
+
35
+ ## V0.1 Retrieval Amendment
36
+
37
+ This contract keeps the amendment narrow:
38
+
39
+ - `topic_hints[]` gives compact, advisory retrieval hints.
40
+ - `status_effect` gives compact, advisory status-effect classification.
41
+ - Missing fields default to `topic_hints: []` and `status_effect: none`.
42
+ - The generated SQLite/FTS5 index is local, regenerable, and authority-false.
43
+ - The optional verbatim store is explicit-opt-in and local-private.
44
+
45
+ The amendment did not promote a query CLI by itself. The compact-first CLI
46
+ became eligible only after three manual topic snapshots showed stable
47
+ structure and repeated operator friction.
48
+
49
+ ## V0.1 Query CLI
50
+
51
+ `etiquette ledger index/search/show` is the first promoted reader over the
52
+ generated cache. It stays compact-first:
53
+
54
+ - `search` returns ids, types, topic hints, status effect, refs, and
55
+ authority-false flags.
56
+ - `show` fetches one exact ledger entry by entry id or durable ref.
57
+ - search/show refuse a missing or stale cache.
58
+ - the CLI does not synthesize, score, rank, export, grant, close, or execute.
59
+
60
+ ## Reserved Surfaces
61
+
62
+ These names are reserved vocabulary, not V0 machinery:
63
+
64
+ - `sqlite-vec-ledger-search` — reserved with vector, Chroma, and Postgres
65
+ search adapters; SQLite FTS5 is the only V0.1 retrieval accelerator.
66
+ - `ledger-topic-dossier.v0` — unlock only when an operator asks for a durable
67
+ long-horizon dossier over a real topic.
68
+ - `sabbatical-ledger-query` — reserved as the deliberate brain posture; it
69
+ cannot write the reflex spine directly.
70
+ - `capsule-to-spine-feedback` — unlock only when reviewed capsules have a human
71
+ promotion surface.
72
+
73
+ Deferred surfaces must name an operational consumer before implementation.
74
+
75
+ ## Boundary
76
+
77
+ - The brain cannot write the spine directly. It may produce a capsule or
78
+ dossier that an operator later promotes.
79
+ - `spine_eligible: true` is explicit; reflex indexes do not infer eligibility
80
+ from entry type.
81
+ - Existing ledger lines remain readable as `pre_v0: true` legacy entries.
82
+ - Ledger entries do not authorize work unless a valid grant path says so.
83
+ - Remote projection remains metadata-only and cannot replace the local ledger.