@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
package/AGENTS.md ADDED
@@ -0,0 +1,28 @@
1
+ # Etiquette Agent Guide
2
+
3
+ This repo is the Etiquette source repo. Keep the all-developer onboarding path small.
4
+
5
+ ## Default Rule
6
+
7
+ New engineers should start with:
8
+
9
+ 1. [README.md](README.md)
10
+ 2. [docs/SEAT_PROVISIONING.md](docs/SEAT_PROVISIONING.md)
11
+ 3. [templates/etiquette-vanilla-v0/README.md](templates/etiquette-vanilla-v0/README.md)
12
+
13
+ Do not send new seats through internal history, old coordination lanes, or maintainer-only notes.
14
+
15
+ ## Ownership
16
+
17
+ This repo owns:
18
+
19
+ - the minimal vanilla seat scaffold;
20
+ - optional runtime seat-pack scaffolds;
21
+ - shared task, readiness, and receipt contracts;
22
+ - validation scripts for release hygiene.
23
+
24
+ This repo does not own product repos, product lane state, secrets, hosted services, or runtime vendor setup.
25
+
26
+ ## Editing Rule
27
+
28
+ Release-facing docs must stay role-based and portable. Do not introduce person names, local machine paths, historical bus references, or project-specific lane IDs into the default onboarding surface.
package/QuickStart.md ADDED
@@ -0,0 +1,94 @@
1
+ # Quick Start
2
+
3
+ Use this for a clean repo, team canary, or new Etiquette developer. For private rollout, use [docs/TEAM_HANDOFF.md](docs/TEAM_HANDOFF.md).
4
+
5
+ Prereqs: Git and Bun `>=1.3.0`. The CLI shims refuse if `bun` is not on `PATH`.
6
+ The public hosted installer is parked until approval and signing complete.
7
+
8
+ ## 1. Get The CLI
9
+
10
+ Preferred private path is the signed native installer:
11
+
12
+ ```sh
13
+ sh install.sh --version 1.0.0 --base-url "$ETQ_RELEASES_URL" \
14
+ --public-key "$ETQ_PUBLIC_KEY" --install-root "$HOME/.etiquette"
15
+ export PATH="$HOME/.etiquette/bin:$PATH"
16
+ ```
17
+
18
+ If you only have the private `.tgz`, install it under a user-local prefix:
19
+
20
+ ```sh
21
+ ETQ_ROOT="$HOME/.etiquette"
22
+ ETQ_LIB="$ETQ_ROOT/lib/etiquette-1.0.0"
23
+ mkdir -p "$ETQ_LIB" "$ETQ_ROOT/bin" /tmp/etq-tgz
24
+ tar -xzf etiquette-1.0.0.tgz -C /tmp/etq-tgz
25
+ cp -R /tmp/etq-tgz/package/. "$ETQ_LIB/"
26
+ (cd "$ETQ_LIB" && bun install --production)
27
+ ln -sfn "$ETQ_LIB/bin/etiquette" "$ETQ_ROOT/bin/etiquette"
28
+ ln -sfn "$ETQ_LIB/bin/etiquette-core" "$ETQ_ROOT/bin/etiquette-core"
29
+ export PATH="$ETQ_ROOT/bin:$PATH"
30
+ ```
31
+
32
+ Source checkout fallback; replace `<company-etiquette-git-url>` with the
33
+ internal private repo URL supplied by your manager:
34
+
35
+ ```sh
36
+ git clone <company-etiquette-git-url> etiquette
37
+ cd etiquette
38
+ ./bin/etiquette help
39
+ ./bin/etiquette-core help
40
+ ```
41
+
42
+ ## 2. Initialize A Project
43
+
44
+ From the project repo:
45
+
46
+ ```sh
47
+ ETQ=${ETQ:-etiquette}
48
+ "$ETQ" setup --target codex --project "$PWD"
49
+ "$ETQ" handoff --project "$PWD" --profile codex-cc-gemini --task-prefix APP
50
+ "$ETQ" bootstrap local --project "$PWD" --profile codex-cc-gemini --task-prefix APP
51
+ "$ETQ" whereami --project "$PWD" --seat codex-seat --task APP-001
52
+ "$ETQ" doctor --project "$PWD"
53
+ "$ETQ" join --project "$PWD" --seat codex-seat
54
+ "$ETQ" pickup --project "$PWD" --seat codex-seat --task APP-001 --allow-current-project --text
55
+ "$ETQ" console board --project "$PWD" --text
56
+ ```
57
+
58
+ `bootstrap local` creates repo-local state, seats, task envelopes, pickup docs,
59
+ events, and runbooks. It does not grant, publish, merge, close, or promote.
60
+
61
+ ## 3. Orient The Live Seat
62
+
63
+ Run `whereami` whenever a developer or agent resumes, changes directories, or
64
+ inherits a worktree:
65
+
66
+ ```sh
67
+ "$ETQ" whereami --project "$PWD" --seat codex-seat --task APP-001
68
+ "$ETQ" pickup --project "$PWD" --seat codex-seat --task APP-001 --allow-current-project --text
69
+ ```
70
+
71
+ Runner resume recovers chat context; `whereami` confirms the repo, branch, task
72
+ envelope, and runbook. For branch hygiene, read [docs/WORKTREE_QOL.md](docs/WORKTREE_QOL.md).
73
+ For in-session pickup UX, use the `seat-session-bootstrap` skill.
74
+
75
+ ## 4. Check And Record Evidence
76
+
77
+ Create checkable dispatch examples, then run the generated command:
78
+
79
+ ```sh
80
+ "$ETQ" dispatch scaffold --project "$PWD" --task-id APP-001 --seat codex-seat
81
+ "$ETQ" dispatch check --project "$PWD" \
82
+ --mode docs/work/dispatch/APP-001/mode.yaml \
83
+ --task docs/work/dispatch/APP-001/task.yaml \
84
+ --sandbox-receipt docs/work/dispatch/APP-001/receipt.yaml \
85
+ --state docs/work/dispatch/APP-001/seat-readiness.json
86
+ ```
87
+
88
+ `dispatch record` writes local metadata and receipt refs; it does not merge,
89
+ close, publish, or grant.
90
+
91
+ ## 5. Stop Conditions
92
+
93
+ Seat packs: `provision-seat claude-code`, `provision-seat codex`, `provision-seat gemini`, `provision-seat ollama`, `provision-seat openrouter`.
94
+ Stop when authority is unclear, validation cannot run, writes exceed the envelope, a secret appears, or the session is unbounded.
package/README.md CHANGED
@@ -1,12 +1,80 @@
1
- # etq (reserved)
1
+ # Etiquette
2
2
 
3
- This package name is reserved for **Etiquette** a local-first CLI that
4
- governs agent-assisted engineering work with seats, evidence, and promotion
5
- gates. Your repo is the ledger, receipts are the proof, and no server ever
6
- sees your code.
3
+ Etiquette is a governance and evidence CLI for agent-assisted engineering work.
7
4
 
8
- Releases begin at **https://etiquekit.com** including a signed installer
9
- that requires neither npm nor this package.
5
+ It answers the questions that matter when agents help write code: who acted,
6
+ under which seat, inside what scope, with what evidence, and who accepted the
7
+ result.
10
8
 
11
- Until a `1.x` version appears here, this package intentionally does nothing
12
- beyond printing a pointer.
9
+ Default loop: `setup -> handoff -> bootstrap local -> whereami -> doctor -> join -> pickup -> receipt -> promotion gate`.
10
+
11
+ Execution runtimes are optional; they return evidence and do not mint authority.
12
+
13
+ ## Start
14
+
15
+ Prereqs: Git and Bun `>=1.3.0`; the CLI shims require `bun` on `PATH`.
16
+ For a clean repo or a new seat, read [QuickStart.md](QuickStart.md). For private team rollout, use [docs/TEAM_HANDOFF.md](docs/TEAM_HANDOFF.md), then:
17
+
18
+ ```sh
19
+ ./bin/etiquette setup --target codex --project /tmp/etiquette-start
20
+ ./bin/etiquette handoff --project /tmp/etiquette-start --profile codex-cc-gemini --task-prefix APP
21
+ ./bin/etiquette bootstrap local --project /tmp/etiquette-start --profile codex-cc-gemini --task-prefix APP
22
+ ./bin/etiquette whereami --project /tmp/etiquette-start --seat codex-seat --task APP-001
23
+ ./bin/etiquette doctor --project /tmp/etiquette-start
24
+ ./bin/etiquette status --project /tmp/etiquette-start
25
+ ./bin/etiquette join --project /tmp/etiquette-start --seat codex-seat
26
+ ./bin/etiquette pickup --project /tmp/etiquette-start --seat codex-seat --task APP-001 --allow-current-project --text
27
+ ./bin/etiquette console board --project /tmp/etiquette-start --text
28
+ ```
29
+
30
+ `handoff` is a read-only guide: it prints install, bootstrap, and pickup commands without installing, bootstrapping, pushing, closing, or granting.
31
+
32
+ `bootstrap local` creates repo-local seats, task envelopes, bounded runbooks,
33
+ local packet events, and pickup docs without global bus writes or authority.
34
+ `whereami` is the context readback: runner resume restores conversation
35
+ history; `whereami` tells the seat which project, worktree, task, and runbook it
36
+ is actually operating in.
37
+
38
+ For the bare-bones Core surface:
39
+
40
+ ```sh
41
+ ./bin/etiquette-core help
42
+ ```
43
+
44
+ Use repo-local commands for now. The hosted public installer is parked.
45
+
46
+ ## Core Concepts
47
+
48
+ - Seat: durable work identity; the occupant or model can change.
49
+ - Task envelope: scope, allowed writes, validation, and stop conditions.
50
+ - Receipt: evidence of what happened; it proves but does not authorize.
51
+ - Promotion gate: the human/Git gate where candidate work becomes truth.
52
+ - Ledger: durable local record of sessions, receipts, and decisions.
53
+
54
+ Read next: [docs/README.md](docs/README.md), [docs/CONCEPTS.md](docs/CONCEPTS.md), [docs/CORE_PROFILE.md](docs/CORE_PROFILE.md), [docs/SEAT_PROVISIONING.md](docs/SEAT_PROVISIONING.md), and [docs/WORKTREE_QOL.md](docs/WORKTREE_QOL.md).
55
+
56
+ Provision runtime seats only after assignment:
57
+
58
+ ```sh
59
+ sh templates/seat-packs-v0/bin/provision-seat codex /tmp/dev-codex-seat
60
+ sh templates/seat-packs-v0/bin/provision-seat claude-code /tmp/dev-claude-code-seat
61
+ sh templates/seat-packs-v0/bin/provision-seat gemini /tmp/dev-gemini-seat
62
+ sh templates/seat-packs-v0/bin/provision-seat ollama /tmp/dev-ollama-seat
63
+ sh templates/seat-packs-v0/bin/provision-seat openrouter /tmp/dev-openrouter-seat
64
+ ```
65
+
66
+ ## Validate
67
+
68
+ ```sh
69
+ npm run release:scan
70
+ bun test
71
+ npm run typecheck
72
+ ```
73
+
74
+ ## Release Status
75
+
76
+ ```yaml
77
+ default_surface: templates/etiquette-vanilla-v0
78
+ optional_runtime_surface: templates/seat-packs-v0
79
+ public_installer: held
80
+ ```