claude-dev-env 2.28.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/AGENTS.md +0 -31
- package/.agents/agents/clean-coder.md +1 -1
- package/.agents/agents/test_agent_frontmatter.py +3 -1
- package/.agents/skills/AGENTS.md +0 -70
- package/.agents/skills/_shared/AGENTS.md +0 -44
- package/.agents/skills/_shared/advisor/AGENTS.md +0 -8
- package/.agents/skills/_shared/pr-loop/AGENTS.md +0 -57
- package/.agents/skills/_shared/pr-loop/prompts/AGENTS.md +0 -8
- package/.agents/skills/_shared/pr-loop/scripts/AGENTS.md +0 -34
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +0 -23
- package/.agents/skills/autoconverge/AGENTS.md +0 -35
- package/.agents/skills/autoconverge/reference/AGENTS.md +0 -15
- package/.agents/skills/autoconverge/workflow/AGENTS.md +0 -25
- package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +0 -15
- package/.agents/skills/everything-search/AGENTS.md +0 -16
- package/.agents/skills/fresh-branch/AGENTS.md +0 -13
- package/.agents/skills/grok-spawn/AGENTS.md +0 -27
- package/.agents/skills/orchestrator/.claude/CLAUDE.md +1 -0
- package/.agents/skills/orchestrator/AGENTS.md +1 -0
- package/.agents/skills/orchestrator/SKILL.md +44 -53
- package/.agents/skills/orchestrator/reference/.claude/CLAUDE.md +1 -0
- package/.agents/skills/orchestrator/reference/AGENTS.md +1 -0
- package/.agents/skills/orchestrator/reference/consult-the-orchestrator.md +70 -0
- package/.agents/skills/orchestrator/reference/executor-consult-block.md +62 -0
- package/.agents/skills/orchestrator/reference/host-detect.md +15 -0
- package/.agents/skills/orchestrator/test_orchestrator_skill_contract.py +62 -0
- package/.agents/skills/orchestrator-refresh/SKILL.md +16 -34
- package/.agents/skills/rebase/AGENTS.md +0 -31
- package/.agents/skills/session-log/AGENTS.md +0 -31
- package/.agents/skills/session-tidy/AGENTS.md +0 -35
- package/.agents/skills/skill-builder/AGENTS.md +0 -48
- package/.agents/skills/skill-builder/references/AGENTS.md +0 -24
- package/.agents/skills/skill-builder/templates/AGENTS.md +0 -13
- package/.agents/skills/skill-builder/workflows/AGENTS.md +0 -18
- package/.agents/skills/task-build/AGENTS.md +0 -28
- package/.agents/skills/update/AGENTS.md +0 -37
- package/.agents/skills-archived/AGENTS.md +0 -44
- package/.agents/skills-archived/anthropic-plan/AGENTS.md +0 -33
- package/.agents/skills-archived/anthropic-plan/scripts/AGENTS.md +0 -10
- package/.agents/skills-archived/anthropic-plan/scripts/anthropic_plan_scripts_constants/AGENTS.md +0 -15
- package/.agents/skills-archived/anthropic-plan/templates/AGENTS.md +0 -12
- package/.agents/skills-archived/anthropic-plan/workflow/AGENTS.md +0 -13
- package/.agents/skills-archived/auditing-claude-config/AGENTS.md +0 -20
- package/.agents/skills-archived/bugteam/AGENTS.md +0 -29
- package/.agents/skills-archived/bugteam/reference/AGENTS.md +0 -19
- package/.agents/skills-archived/bugteam/reference/obstacles/AGENTS.md +0 -23
- package/.agents/skills-archived/bugteam/scripts/AGENTS.md +0 -29
- package/.agents/skills-archived/bugteam/scripts/bugteam_scripts_constants/AGENTS.md +0 -17
- package/.agents/skills-archived/codex-review/AGENTS.md +0 -45
- package/.agents/skills-archived/codex-review/reference/AGENTS.md +0 -14
- package/.agents/skills-archived/codex-review/scripts/codex_review_scripts_constants/AGENTS.md +0 -17
- package/.agents/skills-archived/codex-review/test_skill_scaffold.py +13 -3
- package/.agents/skills-archived/copilot-review/AGENTS.md +0 -17
- package/.agents/skills-archived/pr-converge/AGENTS.md +0 -31
- package/.agents/skills-archived/pr-converge/pr_converge_skill_constants/AGENTS.md +0 -25
- package/.agents/skills-archived/pr-converge/reference/AGENTS.md +0 -27
- package/.agents/skills-archived/pr-converge/reference/obstacles/AGENTS.md +0 -22
- package/.agents/skills-archived/pr-converge/scripts/AGENTS.md +0 -45
- package/.agents/skills-archived/pr-converge/scripts/pr_converge_scripts_constants/AGENTS.md +0 -17
- package/.agents/skills-archived/pr-converge/workflows/AGENTS.md +0 -15
- package/.agents/skills-archived/pr-loop-cloud-transport/reference/identity-and-hooks.md +1 -1
- package/.agents/skills-archived/recall/AGENTS.md +0 -29
- package/.agents/skills-archived/remember/AGENTS.md +0 -30
- package/AGENTS.md +0 -112
- package/_shared/AGENTS.md +0 -16
- package/_shared/advisor/AGENTS.md +0 -21
- package/_shared/advisor/advisor-protocol.md +4 -1
- package/_shared/advisor/reference/consult-format.md +4 -2
- package/_shared/pr-loop/AGENTS.md +0 -27
- package/_shared/pr-loop/scripts/AGENTS.md +0 -49
- package/_shared/pr-loop/scripts/code_rules_gate_parts/AGENTS.md +0 -41
- package/_shared/pr-loop/scripts/codex_review_scripts_constants/AGENTS.md +0 -17
- package/_shared/pr-loop/scripts/pr_converge_scripts_constants/AGENTS.md +0 -17
- package/_shared/pr-loop/scripts/pr_converge_skill_constants/AGENTS.md +0 -25
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/AGENTS.md +0 -25
- package/_shared/pr-loop/scripts/tests/AGENTS.md +0 -43
- package/_shared/process-tree/AGENTS.md +0 -40
- package/audit-rubrics/AGENTS.md +0 -42
- package/audit-rubrics/category_rubrics/AGENTS.md +0 -36
- package/audit-rubrics/category_rubrics/category-o-docstring-vs-impl-drift.md +16 -29
- package/audit-rubrics/prompts/AGENTS.md +0 -36
- package/audit-rubrics/prompts/category-o-docstring-vs-impl-drift.md +2 -2
- package/bin/AGENTS.md +0 -118
- package/bin/install.test.mjs +1 -1
- package/commands/AGENTS.md +0 -14
- package/docs/AGENTS.md +0 -31
- package/docs/CODE_RULES.md +3 -3
- package/docs/agent-spawn-protocol.md +1 -1
- package/docs/references/AGENTS.md +0 -16
- package/docs/references/prose-style-enforcement.md +5 -9
- package/hooks/AGENTS.md +0 -27
- package/hooks/advisory/AGENTS.md +0 -15
- package/hooks/blocking/AGENTS.md +0 -122
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/AGENTS.md +0 -27
- package/hooks/blocking/code_rules_docstrings.py +10 -2138
- package/hooks/blocking/code_rules_enforcer.py +0 -121
- package/hooks/blocking/code_rules_imports_logging.py +1 -236
- package/hooks/blocking/code_rules_shared.py +23 -0
- package/hooks/blocking/code_rules_test_layout.py +8 -8
- package/hooks/blocking/config/AGENTS.md +0 -9
- package/hooks/blocking/config/prose_style_enforcement_constants.py +4 -2
- package/hooks/blocking/config/test_prose_style_enforcement_constants.py +5 -1
- package/hooks/blocking/inventory_intent_records/AGENTS.md +0 -25
- package/hooks/blocking/package_inventory_stale_blocker_parts/AGENTS.md +0 -25
- package/hooks/blocking/pii_prevention_blocker_parts/AGENTS.md +0 -23
- package/hooks/blocking/precommit_code_rules_gate.py +8 -43
- package/hooks/blocking/state_description_blocker.py +1 -7
- package/hooks/blocking/tdd_enforcer_parts/AGENTS.md +0 -29
- package/hooks/blocking/test_code_rules_enforcer_cap_meta.py +0 -1
- package/hooks/blocking/test_code_rules_enforcer_dispatch_wiring.py +0 -8
- package/hooks/blocking/test_code_rules_enforcer_module_docstring_roster.py +11 -112
- package/hooks/blocking/test_code_rules_enforcer_narrow_edit.py +0 -1
- package/hooks/blocking/test_code_rules_enforcer_split_entry_1.py +1 -18
- package/hooks/blocking/test_code_rules_shared.py +12 -0
- package/hooks/blocking/test_precommit_code_rules_gate.py +32 -179
- package/hooks/blocking/test_precommit_code_rules_gate_native_owner.py +0 -1
- package/hooks/blocking/test_state_description_blocker.py +6 -4
- package/hooks/blocking/test_stop_dispatcher.py +5 -29
- package/hooks/git-hooks/AGENTS.md +0 -31
- package/hooks/git-hooks/git_hooks_constants/AGENTS.md +0 -20
- package/hooks/hooks_constants/AGENTS.md +0 -104
- package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +0 -1
- package/hooks/hooks_constants/code_rules_enforcer_constants.py +3 -0
- package/hooks/hooks_constants/messages.py +0 -2
- package/hooks/hooks_constants/precommit_code_rules_gate_constants.py +3 -17
- package/hooks/hooks_constants/stop_dispatcher_constants.py +0 -2
- package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +0 -1
- package/hooks/hooks_constants/test_code_rules_enforcer_constants.py +7 -0
- package/hooks/hooks_constants/test_messages.py +5 -3
- package/hooks/hooks_constants/test_stop_dispatcher_constants.py +0 -2
- package/hooks/lifecycle/AGENTS.md +0 -17
- package/hooks/observability/AGENTS.md +0 -19
- package/hooks/session/AGENTS.md +0 -37
- package/hooks/validation/AGENTS.md +0 -19
- package/hooks/validators/AGENTS.md +0 -51
- package/hooks/workflow/AGENTS.md +0 -15
- package/output-styles/AGENTS.md +0 -14
- package/package.json +1 -1
- package/rules/AGENTS.md +0 -58
- package/rules/claims-as-quotes.md +0 -10
- package/rules/code-standards.md +6 -6
- package/rules/explore-thoroughly.md +0 -1
- package/rules/failure-blast-radius.md +0 -8
- package/rules/falsify-before-green.md +0 -8
- package/rules/file-global-constants.md +2 -2
- package/rules/filesystem-search.md +1 -1
- package/rules/git-workflow.md +1 -9
- package/rules/hedging-claims.md +2 -6
- package/rules/long-horizon-autonomy.md +1 -1
- package/rules/measurement-denominators.md +0 -9
- package/rules/research-mode.md +0 -6
- package/rules/verify-before-asking.md +0 -5
- package/rules/verify-runtime-state.md +0 -5
- package/scripts/AGENTS.md +0 -55
- package/scripts/codex_compat_materializer.py +0 -12
- package/scripts/dev_env_scripts_constants/AGENTS.md +0 -20
- package/scripts/sync_to_cursor/AGENTS.md +0 -22
- package/scripts/sync_to_cursor/rules.py +0 -10
- package/scripts/tests/AGENTS.md +0 -34
- package/scripts/tests/test_engine.py +0 -1
- package/scripts/tests/test_rules.py +0 -1
- package/scripts/tests/test_sync_to_cursor.py +0 -1
- package/system-prompts/AGENTS.md +0 -24
- package/system-prompts/software-engineer.xml +3 -3
- package/hooks/blocking/code_rules_dead_argparse_argument.py +0 -554
- package/hooks/blocking/code_rules_dead_config_field.py +0 -568
- package/hooks/blocking/code_rules_dead_dataclass_field.py +0 -348
- package/hooks/blocking/code_rules_dead_module_constant.py +0 -757
- package/hooks/blocking/code_rules_dead_split_branch.py +0 -225
- package/hooks/blocking/code_rules_mock_completeness.py +0 -295
- package/hooks/blocking/code_rules_scope_binding.py +0 -151
- package/hooks/blocking/code_rules_unused_imports.py +0 -197
- package/hooks/blocking/hedging_language_blocker.py +0 -221
- package/hooks/blocking/intent_only_ending_blocker.py +0 -148
- package/hooks/blocking/test_code_rules_enforcer_dead_argparse_argument.py +0 -534
- package/hooks/blocking/test_code_rules_enforcer_dead_config_field.py +0 -846
- package/hooks/blocking/test_code_rules_enforcer_dead_dataclass_field.py +0 -507
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +0 -679
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant_alias.py +0 -133
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant_read_cap.py +0 -103
- package/hooks/blocking/test_code_rules_enforcer_dead_split_branch.py +0 -105
- package/hooks/blocking/test_code_rules_enforcer_docstring_args_span_scope.py +0 -425
- package/hooks/blocking/test_code_rules_enforcer_docstring_cardinal_family.py +0 -176
- package/hooks/blocking/test_code_rules_enforcer_docstring_delegation_summary.py +0 -385
- package/hooks/blocking/test_code_rules_enforcer_docstring_fallback_branch.py +0 -398
- package/hooks/blocking/test_code_rules_enforcer_docstring_field_runmode_outcome.py +0 -129
- package/hooks/blocking/test_code_rules_enforcer_docstring_inline_literal_claim.py +0 -93
- package/hooks/blocking/test_code_rules_enforcer_docstring_length_constant_superlative.py +0 -198
- package/hooks/blocking/test_code_rules_enforcer_docstring_mark_glyph_enumeration.py +0 -262
- package/hooks/blocking/test_code_rules_enforcer_docstring_no_consumer.py +0 -93
- package/hooks/blocking/test_code_rules_enforcer_docstring_no_network.py +0 -115
- package/hooks/blocking/test_code_rules_enforcer_docstring_raises_largezipfile.py +0 -226
- package/hooks/blocking/test_code_rules_enforcer_docstring_returns_plural_cardinality.py +0 -207
- package/hooks/blocking/test_code_rules_enforcer_docstring_step_dispatch.py +0 -262
- package/hooks/blocking/test_code_rules_enforcer_docstring_type_checking_gate.py +0 -164
- package/hooks/blocking/test_code_rules_enforcer_docstring_unguarded_payload.py +0 -188
- package/hooks/blocking/test_code_rules_enforcer_import_block_sort.py +0 -157
- package/hooks/blocking/test_code_rules_enforcer_split_mocks_1.py +0 -303
- package/hooks/blocking/test_code_rules_enforcer_split_mocks_2.py +0 -111
- package/hooks/blocking/test_code_rules_enforcer_unused_imports.py +0 -656
- package/hooks/blocking/test_hedging_language_blocker.py +0 -261
- package/hooks/blocking/test_intent_only_ending_blocker.py +0 -209
- package/hooks/hooks_constants/dead_argparse_argument_constants.py +0 -28
- package/hooks/hooks_constants/dead_config_field_constants.py +0 -39
- package/hooks/hooks_constants/dead_dataclass_field_constants.py +0 -25
- package/hooks/hooks_constants/dead_module_constant_constants.py +0 -30
- package/hooks/hooks_constants/hedging_uncertainty_constants.py +0 -42
- package/hooks/hooks_constants/test_dispatcher_constants_docstrings.py +0 -44
- package/rules/conservative-action.md +0 -17
- package/rules/context7.md +0 -8
- package/rules/few-words.md +0 -3
- package/rules/parallel-tools.md +0 -23
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
name: orchestrator
|
|
3
3
|
description: >-
|
|
4
4
|
Orchestrator mode: plan and delegate while workflow-backed agents
|
|
5
|
-
execute;
|
|
6
|
-
|
|
7
|
-
strategy', 'run with an orchestrator',
|
|
8
|
-
'orchestrator enforcement', 'agent routing',
|
|
5
|
+
execute; this session is the advisor those executors consult. Hard
|
|
6
|
+
questions this session cannot settle go to the human. Triggers:
|
|
7
|
+
'/orchestrator', 'orchestrator strategy', 'run with an orchestrator',
|
|
8
|
+
'executor-advisor mode', 'orchestrator enforcement', 'agent routing',
|
|
9
|
+
'orchestrate'.
|
|
9
10
|
disable-model-invocation: true
|
|
10
11
|
---
|
|
11
12
|
|
|
@@ -26,7 +27,8 @@ Under this skill the session is the orchestrator. It spawns and resumes
|
|
|
26
27
|
executor subagents — `clean-coder` and the like — and those executors do
|
|
27
28
|
every bit of the execution: the code edits, the build runs, the test
|
|
28
29
|
runs. The orchestrating session drives the plan, keeps the run artifacts
|
|
29
|
-
and the ledger current, and
|
|
30
|
+
and the ledger current, and answers executor consults. Hard questions
|
|
31
|
+
this session cannot settle go to the human.
|
|
30
32
|
The moment it edits a file or runs a test itself, the pairing breaks —
|
|
31
33
|
its own tool use stays orchestration, run-artifact writes, and light
|
|
32
34
|
verification reads.
|
|
@@ -115,47 +117,33 @@ pending, or when the tool is `CronCreate`.
|
|
|
115
117
|
|
|
116
118
|
1. **Invocation guard.** One `/orchestrator` per session. When a refresh
|
|
117
119
|
one-shot is already queued (`should-reschedule` exits 1 with
|
|
118
|
-
`rearm_already_pending`), do not stack a second:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
2. **
|
|
125
|
-
|
|
126
|
-
end to end: name the session identity, compute the floor from the
|
|
127
|
-
orchestrator consumer set — this session plus every tier in the
|
|
128
|
-
routing table (its Model floor section) — walk the ladder for that
|
|
129
|
-
host (Claude: Fable first, then Sol when Fable is out of usage;
|
|
130
|
-
Codex: Sol in-session; ThirdParty: headless Fable then Sol),
|
|
131
|
-
and fail closed when nothing binds. This session owns the advisor's
|
|
132
|
-
whole lifecycle (its Lifecycle ownership section); executors only ever
|
|
133
|
-
message the warm agent or report here, and an executor that finds the
|
|
134
|
-
advisor unreachable reports that upward — it never spawns a
|
|
135
|
-
replacement itself. A **Fable**-tier attempt carries the exact token
|
|
136
|
-
`FABLE-SPAWN-AUTHORIZED` in its spawn prompt, as the protocol's
|
|
137
|
-
warm-up rule states; `hooks/blocking/fable_spawn_gate.py` denies a
|
|
138
|
-
fable spawn whose prompt lacks it.
|
|
139
|
-
3. **Write the run artifacts** (next section) before the first spawn.
|
|
140
|
-
4. **Activate status_gate** when the first open ledger task exists:
|
|
120
|
+
`rearm_already_pending`), do not stack a second: skip the re-arm
|
|
121
|
+
half of step 4, and carry on from step 4's dispatch — status is
|
|
122
|
+
already active and a re-arm is already latched, so a second
|
|
123
|
+
registration would stack a duplicate host schedule. (Re-asserting
|
|
124
|
+
`set --status active` preserves `rearm_pending` when already
|
|
125
|
+
active, but still do not re-arm.)
|
|
126
|
+
2. **Write the run artifacts** (next section) before the first spawn.
|
|
127
|
+
3. **Activate status_gate** when the first open ledger task exists:
|
|
141
128
|
`python scripts/status_gate.py set --status active`.
|
|
142
|
-
|
|
129
|
+
4. **Dispatch the first task with its ticket** (Spawn ticket section),
|
|
143
130
|
**then register the discipline reminder** via the single-pending
|
|
144
131
|
re-arm protocol (cancel matching → `should-reschedule` → one
|
|
145
132
|
non-recurring delayed wake → `claim-rearm`; default delay about
|
|
146
133
|
2700s). Spawn before you arm, so the run is already moving, and go
|
|
147
|
-
straight on to step
|
|
134
|
+
straight on to step 5 in the same turn — the armed wake is a later
|
|
148
135
|
reminder, not the next thing to wait for.
|
|
149
|
-
|
|
136
|
+
5. **Orchestrate.** Hold the plan and the user conversation. Spawn each
|
|
150
137
|
remaining task with a ticket (Spawn ticket section), keep driving while
|
|
151
138
|
executors work, and keep the ledger reconciled (Task ledger
|
|
152
139
|
discipline).
|
|
153
|
-
|
|
154
|
-
format, and reply handling live in
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
140
|
+
6. **Answer executor consults.** Executors consult this session. The
|
|
141
|
+
trigger list, consult format, and reply handling live in
|
|
142
|
+
[`reference/consult-the-orchestrator.md`](reference/consult-the-orchestrator.md).
|
|
143
|
+
Replies open with one of ENDORSE, CORRECTION, PLAN, or STOP. When
|
|
144
|
+
this session cannot settle a question, ask the human, then reply to
|
|
145
|
+
the executor.
|
|
146
|
+
7. **Terminate when done.** When every ledger task is completed or
|
|
159
147
|
cancelled and no executor is running: run
|
|
160
148
|
`set --status done`, cancel matching host schedules, report
|
|
161
149
|
completion, and stop. Do not re-arm.
|
|
@@ -165,8 +153,8 @@ pending, or when the tool is `CronCreate`.
|
|
|
165
153
|
Write these before the first spawn, default home `docs/plans/<run-slug>/`
|
|
166
154
|
in the repo the run works on (working files, not committed):
|
|
167
155
|
|
|
168
|
-
- **Run charter** — the goal, the repo root,
|
|
169
|
-
profile. One file every ticket points at.
|
|
156
|
+
- **Run charter** — the goal, the repo root, this session's name as
|
|
157
|
+
advisor, and the host profile. One file every ticket points at.
|
|
170
158
|
- **One assignment file per task** — scope, file list, constraints, the
|
|
171
159
|
acceptance check, baseline command output. The thick context goes
|
|
172
160
|
here. `/prompt-generator` authors the assignment once at plan time,
|
|
@@ -196,7 +184,7 @@ Touch only: <files or globs>
|
|
|
196
184
|
Done when: <one mechanical check — a command, a test, a diff scope>
|
|
197
185
|
Return: status, artifact paths, blockers — nothing else.
|
|
198
186
|
|
|
199
|
-
<
|
|
187
|
+
<Consult block assembled per reference/executor-consult-block.md — orchestrator name filled in>
|
|
200
188
|
```
|
|
201
189
|
|
|
202
190
|
- **Size the task by its done-check.** The right task is the largest
|
|
@@ -219,11 +207,11 @@ Return: status, artifact paths, blockers — nothing else.
|
|
|
219
207
|
slice of work and the done-check — it does not restate the assignment.
|
|
220
208
|
- **Do not restate what the agent definition carries.** The routing
|
|
221
209
|
table picks the definition, and `clean-coder` already holds the code
|
|
222
|
-
discipline. The ticket adds the task, the pointers, and the
|
|
210
|
+
discipline. The ticket adds the task, the pointers, and the consult
|
|
223
211
|
block only.
|
|
224
|
-
- **The
|
|
225
|
-
time from the parts in
|
|
226
|
-
[`
|
|
212
|
+
- **The consult block is pasted, assembled text.** Assemble it at ticket
|
|
213
|
+
write time from the parts in
|
|
214
|
+
[`reference/executor-consult-block.md`](reference/executor-consult-block.md)
|
|
227
215
|
and paste the assembled text itself into the ticket.
|
|
228
216
|
|
|
229
217
|
## Workflow Agent Routing
|
|
@@ -263,9 +251,9 @@ Routing rules:
|
|
|
263
251
|
only; a host where no resolver is available fails closed the same
|
|
264
252
|
way — the coding spawn stops and the orchestrator reports it.
|
|
265
253
|
- Host detection follows
|
|
266
|
-
[`
|
|
267
|
-
(
|
|
268
|
-
|
|
254
|
+
[`reference/host-detect.md`](reference/host-detect.md)
|
|
255
|
+
(`resolve_session_identity` then `detect_host_profile`) — the sole
|
|
256
|
+
detection system, with no second one.
|
|
269
257
|
- Resume a warm workflow agent before creating a new workflow run when
|
|
270
258
|
the warm agent holds the relevant context.
|
|
271
259
|
- Review and verification workflows apply the [review guide](../reviews/SKILL.md#review-workflow).
|
|
@@ -290,7 +278,7 @@ Routing rules:
|
|
|
290
278
|
context, or a genuine task switch needs a clean context.
|
|
291
279
|
- **Reuse is a cost rule, not a correctness dependency.** The run
|
|
292
280
|
artifacts keep every executor replaceable (Run state section).
|
|
293
|
-
- **Name the agent to resume.** When a PLAN from
|
|
281
|
+
- **Name the agent to resume.** When a PLAN from this session fits
|
|
294
282
|
a warm agent, name which agent to resume and where.
|
|
295
283
|
|
|
296
284
|
## Task ledger discipline
|
|
@@ -325,8 +313,8 @@ no open work remains, run `set --status done` before any re-arm attempt.
|
|
|
325
313
|
run-artifact writes, and light verification reads.
|
|
326
314
|
- Every delegated task carries a ledger entry, an assignment artifact,
|
|
327
315
|
and a workflow-backed spawn with a ticket, routed by the table.
|
|
328
|
-
-
|
|
329
|
-
|
|
316
|
+
- This session is the advisor for every executor it spawns. The human
|
|
317
|
+
is this session's advisor.
|
|
330
318
|
|
|
331
319
|
## Gotchas
|
|
332
320
|
|
|
@@ -351,17 +339,20 @@ no open work remains, run `set --status done` before any re-arm attempt.
|
|
|
351
339
|
| File | Purpose |
|
|
352
340
|
|---|---|
|
|
353
341
|
| `SKILL.md` | Orchestrator strategy; pointers to run-control scripts. |
|
|
342
|
+
| `reference/consult-the-orchestrator.md` | When executors consult this session; four-signal replies. |
|
|
343
|
+
| `reference/executor-consult-block.md` | Paste parts for every executor spawn ticket. |
|
|
344
|
+
| `reference/host-detect.md` | Host profile for worker-model routing. |
|
|
354
345
|
| `scripts/status_gate.py` | Status file, latch, and re-arm gate (exit codes). |
|
|
355
346
|
| `scripts/status_gate_constants/config/constants.py` | Named constants for status_gate. |
|
|
356
347
|
| `scripts/test_status_gate.py` | Gate tests. |
|
|
348
|
+
| `test_orchestrator_skill_contract.py` | Skill-text contract: local consult files only. |
|
|
357
349
|
|
|
358
350
|
## Folder Map
|
|
359
351
|
|
|
360
352
|
- `SKILL.md` — orchestration process and routing.
|
|
361
353
|
- `scripts/` — deterministic status_gate.
|
|
362
|
-
-
|
|
363
|
-
[`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md).
|
|
354
|
+
- `reference/` — consult contract and ticket paste parts.
|
|
364
355
|
|
|
365
356
|
## File-backed run ledger
|
|
366
357
|
|
|
367
|
-
When host task tools are absent, reconcile delegated work through `scripts/grok_run_ledger.py` under the run-state directory (stable task ids, one live owner, unique
|
|
358
|
+
When host task tools are absent, reconcile delegated work through `scripts/grok_run_ledger.py` under the run-state directory (stable task ids, one live owner, unique consult threads, dependency blocking, snapshot-drift reopening).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../AGENTS.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Consult the orchestrator
|
|
2
|
+
|
|
3
|
+
The orchestrating session is the advisor. The human operating that session is the next hop when the orchestrator cannot decide.
|
|
4
|
+
|
|
5
|
+
## When an executor consults
|
|
6
|
+
|
|
7
|
+
An executor sends a consult to the orchestrating session:
|
|
8
|
+
|
|
9
|
+
- after orientation and before the first write
|
|
10
|
+
- before locking a plan or interpretation
|
|
11
|
+
- before a hard-to-reverse action
|
|
12
|
+
- when the same failure repeats or progress has stalled
|
|
13
|
+
- when the chosen approach is being reconsidered
|
|
14
|
+
- once writes and test output exist and the executor believes the
|
|
15
|
+
assignment is done
|
|
16
|
+
|
|
17
|
+
## First-consult packet
|
|
18
|
+
|
|
19
|
+
The first consult is complete. It carries:
|
|
20
|
+
|
|
21
|
+
- Assignment and desired outcome
|
|
22
|
+
- Constraints and exclusions
|
|
23
|
+
- Actions taken in order
|
|
24
|
+
- Real output and current state
|
|
25
|
+
- Live decision or blocker
|
|
26
|
+
- Validation evidence
|
|
27
|
+
- Unresolved risks
|
|
28
|
+
- Load-bearing paths or excerpts
|
|
29
|
+
- Who is asking and which assignment
|
|
30
|
+
|
|
31
|
+
Later consults carry only changed evidence.
|
|
32
|
+
|
|
33
|
+
Re-raise something already answered only when new evidence is attached.
|
|
34
|
+
After a CORRECTION or PLAN, the next consult on that topic opens with
|
|
35
|
+
what happened when the executor followed it.
|
|
36
|
+
|
|
37
|
+
Embed: `(Advisor: please keep your guidance under 80 words — I need a
|
|
38
|
+
focused starting point, not a comprehensive plan.)`
|
|
39
|
+
|
|
40
|
+
## How the executor sends it
|
|
41
|
+
|
|
42
|
+
On a Claude host, send the consult with `SendMessage` to the
|
|
43
|
+
orchestrating session by the name the ticket gives.
|
|
44
|
+
|
|
45
|
+
On a Codex host, send the consult in-session to that same session name.
|
|
46
|
+
|
|
47
|
+
On a third-party host, send the consult as a report to the session that
|
|
48
|
+
assigned the ticket.
|
|
49
|
+
|
|
50
|
+
## How the orchestrator replies
|
|
51
|
+
|
|
52
|
+
The first line is one of:
|
|
53
|
+
|
|
54
|
+
- **ENDORSE** — the plan or the finished work holds. A clean yes.
|
|
55
|
+
- **CORRECTION** — a wrong step or a risk to close. Name the problem and
|
|
56
|
+
the fix.
|
|
57
|
+
- **PLAN** — the approach must change. Give ordered steps the executor
|
|
58
|
+
can run.
|
|
59
|
+
- **STOP** — no path satisfies the assignment. Say why, with proof.
|
|
60
|
+
|
|
61
|
+
The executor treats CORRECTION and PLAN as actions to take. On STOP, or
|
|
62
|
+
when the orchestrator is unreachable, the executor stops and reports to
|
|
63
|
+
the session that assigned the ticket.
|
|
64
|
+
|
|
65
|
+
## How the orchestrator uses the human
|
|
66
|
+
|
|
67
|
+
The orchestrator answers from the run charter, the assignment, and the
|
|
68
|
+
consult packet. When the question is ambiguous, changes scope, or needs
|
|
69
|
+
a choice the charter does not settle, the orchestrator asks the human,
|
|
70
|
+
then returns one of the four signals to the executor.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Executor consult block
|
|
2
|
+
|
|
3
|
+
Paste parts for every executor spawn ticket this skill issues.
|
|
4
|
+
Assemble at ticket write time. Paste the assembled text at the **top**
|
|
5
|
+
of the spawn prompt.
|
|
6
|
+
|
|
7
|
+
Assembly order: transport preamble for the host, then the shared core,
|
|
8
|
+
then — for an executor at Sonnet or below — the weak-executor add-on.
|
|
9
|
+
|
|
10
|
+
Fill `<orchestrator-name>` with the name the executor can address.
|
|
11
|
+
|
|
12
|
+
## Transport preamble — Claude host
|
|
13
|
+
|
|
14
|
+
> The orchestrating session named `<orchestrator-name>` is your advisor.
|
|
15
|
+
> Send each consult to it with SendMessage, by that name.
|
|
16
|
+
|
|
17
|
+
## Transport preamble — Codex host
|
|
18
|
+
|
|
19
|
+
> The orchestrating session named `<orchestrator-name>` is your advisor.
|
|
20
|
+
> Send each consult to it in-session by that name.
|
|
21
|
+
|
|
22
|
+
## Transport preamble — third-party host
|
|
23
|
+
|
|
24
|
+
> The orchestrating session that assigned this ticket is your advisor.
|
|
25
|
+
> Send each consult as a report to that session.
|
|
26
|
+
|
|
27
|
+
## Shared core — every host
|
|
28
|
+
|
|
29
|
+
> Consult before locking a nontrivial approach, once you believe your
|
|
30
|
+
> assignment is done, before any hard-to-reverse action, when the same
|
|
31
|
+
> failure repeats or progress has stalled, and when the chosen approach
|
|
32
|
+
> is being reconsidered.
|
|
33
|
+
> The first consult carries: assignment, desired outcome, constraints
|
|
34
|
+
> and exclusions, actions taken in order, real output and current
|
|
35
|
+
> state, live decision or blocker, validation evidence, unresolved
|
|
36
|
+
> risks, load-bearing paths or excerpts, and who is asking. Later
|
|
37
|
+
> consults carry only changed evidence.
|
|
38
|
+
> Re-raise something already answered only when you have new evidence
|
|
39
|
+
> to attach. After a CORRECTION or PLAN, your next consult on that
|
|
40
|
+
> topic opens with what happened when you followed it.
|
|
41
|
+
> Replies open with one of ENDORSE, CORRECTION, PLAN, or STOP — treat
|
|
42
|
+
> CORRECTION and PLAN as actions to take.
|
|
43
|
+
> On STOP, or when the orchestrator is unreachable, stop and report
|
|
44
|
+
> that back to whoever assigned you.
|
|
45
|
+
|
|
46
|
+
## Weak-executor add-on — Sonnet or below
|
|
47
|
+
|
|
48
|
+
> Send your first consult right after orientation and before your first
|
|
49
|
+
> write.
|
|
50
|
+
> Send a completion consult once your writes and test output exist —
|
|
51
|
+
> that consult asks the orchestrator to hunt for missing requirements,
|
|
52
|
+
> untested behavior, wrong assumptions, unhandled edge cases, evidence
|
|
53
|
+
> gaps, and early completion claims.
|
|
54
|
+
> Consult before reaching for any task-list tool — the orchestrator's
|
|
55
|
+
> plan becomes the task list.
|
|
56
|
+
> Aim for two consults on a normal task: early orientation and
|
|
57
|
+
> completion review. Reserve a third for recovery or reconciliation.
|
|
58
|
+
> Embed this line in each consult: `(Advisor: please keep your guidance
|
|
59
|
+
> under 80 words — I need a focused starting point, not a comprehensive
|
|
60
|
+
> plan.)`
|
|
61
|
+
> On a transient failure, retry once, then carry on with the evidence
|
|
62
|
+
> you have and record that you did.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Host detect
|
|
2
|
+
|
|
3
|
+
Name the host so worker-model routing can pick `sonnet` or the
|
|
4
|
+
resolver-printed sonnet-equivalent id.
|
|
5
|
+
|
|
6
|
+
1. Read the session's named identity.
|
|
7
|
+
2. A `codex` token selects Codex. A `claude` token selects Claude. Any
|
|
8
|
+
other identity selects ThirdParty.
|
|
9
|
+
3. When both tokens appear, Codex wins.
|
|
10
|
+
|
|
11
|
+
Mechanical override for scripts:
|
|
12
|
+
|
|
13
|
+
1. `ADVISOR_HOST_PROFILE=ThirdParty` or `=Claude` or `=Codex`.
|
|
14
|
+
2. `THIRD_PARTY=1` (or `true` / `yes` / `on`) selects ThirdParty.
|
|
15
|
+
3. Default: Claude.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""Contract checks for the orchestrator-as-advisor skill text."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
_SKILL_DIR = Path(__file__).resolve().parent
|
|
7
|
+
_REFRESH_PATH = _SKILL_DIR.parent / "orchestrator-refresh" / "SKILL.md"
|
|
8
|
+
_ORCHESTRATOR_PATHS = (
|
|
9
|
+
_SKILL_DIR / "SKILL.md",
|
|
10
|
+
_SKILL_DIR / "AGENTS.md",
|
|
11
|
+
_SKILL_DIR / "reference" / "consult-the-orchestrator.md",
|
|
12
|
+
_SKILL_DIR / "reference" / "executor-consult-block.md",
|
|
13
|
+
_SKILL_DIR / "reference" / "host-detect.md",
|
|
14
|
+
_SKILL_DIR / "reference" / "AGENTS.md",
|
|
15
|
+
_REFRESH_PATH,
|
|
16
|
+
)
|
|
17
|
+
_FOREIGN_MARKERS = (
|
|
18
|
+
"advisor-protocol",
|
|
19
|
+
"session-advisor",
|
|
20
|
+
"advisor-block.md",
|
|
21
|
+
"consult-format.md",
|
|
22
|
+
"advisor-tool.md",
|
|
23
|
+
"_shared/advisor",
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_orchestrator_docs_omit_foreign_advisor_paths() -> None:
|
|
28
|
+
for path in _ORCHESTRATOR_PATHS:
|
|
29
|
+
text = path.read_text(encoding="utf-8")
|
|
30
|
+
for marker in _FOREIGN_MARKERS:
|
|
31
|
+
assert marker not in text, f"{path.name} names {marker}"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_orchestrator_skill_points_at_local_consult_files() -> None:
|
|
35
|
+
text = (_SKILL_DIR / "SKILL.md").read_text(encoding="utf-8")
|
|
36
|
+
assert "Bind the shared advisor" not in text
|
|
37
|
+
assert "reference/consult-the-orchestrator.md" in text
|
|
38
|
+
assert "reference/executor-consult-block.md" in text
|
|
39
|
+
assert "This session is the advisor" in text
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def test_refresh_routes_consults_to_this_session() -> None:
|
|
43
|
+
text = _REFRESH_PATH.read_text(encoding="utf-8")
|
|
44
|
+
assert "This session is the advisor." in text
|
|
45
|
+
assert "Hard decisions go to the shared advisor." not in text
|
|
46
|
+
assert "consult-the-orchestrator.md" in text
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_consult_contract_names_human_as_next_hop() -> None:
|
|
50
|
+
text = (_SKILL_DIR / "reference" / "consult-the-orchestrator.md").read_text(
|
|
51
|
+
encoding="utf-8"
|
|
52
|
+
)
|
|
53
|
+
assert "orchestrating session is the advisor" in text
|
|
54
|
+
assert "human operating that session" in text
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_executor_consult_block_names_orchestrating_session() -> None:
|
|
58
|
+
text = (_SKILL_DIR / "reference" / "executor-consult-block.md").read_text(
|
|
59
|
+
encoding="utf-8"
|
|
60
|
+
)
|
|
61
|
+
assert "<orchestrator-name>" in text
|
|
62
|
+
assert "your advisor" in text
|
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
name: orchestrator-refresh
|
|
3
3
|
description: >-
|
|
4
4
|
Re-assert orchestrator discipline on a one-shot delayed wake: ledger
|
|
5
|
-
reconcile,
|
|
6
|
-
via status_gate. Terminates when the
|
|
7
|
-
'/orchestrator-refresh', orchestrator-refresh,
|
|
8
|
-
loop, re-arm orchestrator.
|
|
5
|
+
reconcile, executor consult routing to this session, warm executor
|
|
6
|
+
reuse, single-pending re-arm via status_gate. Terminates when the
|
|
7
|
+
gate says stop. Triggers: '/orchestrator-refresh', orchestrator-refresh,
|
|
8
|
+
refresh the orchestrator loop, re-arm orchestrator.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Orchestrator Refresh
|
|
12
12
|
|
|
13
|
-
Name the session identity first (see
|
|
14
|
-
[
|
|
15
|
-
Re-assert the discipline for that host only
|
|
16
|
-
Claude `session-advisor` spawn on a Codex or third-party host.
|
|
13
|
+
Name the session identity first (see
|
|
14
|
+
[`../orchestrator/reference/host-detect.md`](../orchestrator/reference/host-detect.md)).
|
|
15
|
+
Re-assert the discipline for that host only.
|
|
17
16
|
|
|
18
17
|
## 0. status_gate first (deterministic)
|
|
19
18
|
|
|
@@ -62,9 +61,7 @@ cancelled; either way the session keeps orchestrating in the same turn.
|
|
|
62
61
|
Two stops end the whole firing, and both leave running executors alone:
|
|
63
62
|
`begin-firing` exit 1 (step 0a) and the done branch (step 0b). Each means the
|
|
64
63
|
run is finished, not active, or has no readable status file, so the refresh
|
|
65
|
-
reports and adds nothing further.
|
|
66
|
-
advisor consultation alone; the firing still reconciles the ledger, re-arms
|
|
67
|
-
once, and reports the unreachable advisor.
|
|
64
|
+
reports and adds nothing further.
|
|
68
65
|
|
|
69
66
|
## Discipline steps
|
|
70
67
|
|
|
@@ -85,28 +82,13 @@ once, and reports the unreachable advisor.
|
|
|
85
82
|
- **Focused tickets.** One mechanical done-check per ticket; resume a
|
|
86
83
|
warm agent with a thin next-slice ticket rather than a fresh cold
|
|
87
84
|
spawn, and keep thick context in the assignment file.
|
|
88
|
-
3. **
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
the exact token `FABLE-SPAWN-AUTHORIZED` in its fresh prompt, as
|
|
94
|
-
the protocol's warm-up rule states;
|
|
95
|
-
`hooks/blocking/fable_spawn_gate.py` denies a fable spawn whose
|
|
96
|
-
prompt lacks it.
|
|
97
|
-
- **Codex host:** advisor is a native in-session Sol subagent owned
|
|
98
|
-
by this session. Do **not** spawn Claude `session-advisor` via
|
|
99
|
-
Agent. Executors consult that Sol subagent in-session. If Sol does
|
|
100
|
-
not bind, fail closed.
|
|
101
|
-
- **Third-party host:** advisor is a Claude CLI bind owned
|
|
102
|
-
by this session (`claude_chain_runner.py`, Fable then Sol when Fable
|
|
103
|
-
is out of usage, both at `ADVISOR_EFFORT`). Do **not** spawn `session-advisor` via Agent. Executors
|
|
104
|
-
report blockers here; consult the CLI advisor and relay signals.
|
|
105
|
-
If the CLI bind is unreachable, fail closed — do not answer the
|
|
106
|
-
four signals as this third-party session.
|
|
85
|
+
3. **This session is the advisor.** Executors consult here. Follow
|
|
86
|
+
[`../orchestrator/reference/consult-the-orchestrator.md`](../orchestrator/reference/consult-the-orchestrator.md).
|
|
87
|
+
Reply with ENDORSE / CORRECTION / PLAN / STOP. When this session
|
|
88
|
+
cannot settle a question, ask the human, then reply. Keep tool use
|
|
89
|
+
to orchestration and light verification reads.
|
|
107
90
|
4. **Resume before you spawn.** `SendMessage` an existing *executor* by
|
|
108
|
-
name or `agentId` before a cold spawn.
|
|
109
|
-
only — advisor stays on the CLI chain.)
|
|
91
|
+
name or `agentId` before a cold spawn.
|
|
110
92
|
5. **Fresh spawn only for a genuine task switch.** Never tell an agent
|
|
111
93
|
to compact for a clean context.
|
|
112
94
|
6. **Single-pending re-arm only.** Same protocol as the orchestrator
|
|
@@ -147,5 +129,5 @@ once, and reports the unreachable advisor.
|
|
|
147
129
|
|
|
148
130
|
- `SKILL.md` — this skill (thin); gate implementation lives under
|
|
149
131
|
`skills/orchestrator/scripts/`.
|
|
150
|
-
-
|
|
151
|
-
[
|
|
132
|
+
- Consult contract:
|
|
133
|
+
[`../orchestrator/reference/consult-the-orchestrator.md`](../orchestrator/reference/consult-the-orchestrator.md).
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
# rebase
|
|
2
1
|
|
|
3
|
-
Rebase a branch onto its base ref with verification gates that catch logically broken results before pushing.
|
|
4
|
-
|
|
5
|
-
**Trigger:** `/rebase`, "rebase this branch", "PR has merge conflicts", "rebase onto main", force-push to update remote branch history.
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
The default failure mode for a rebase is shipping code that compiled but does not run. This skill prevents that by running real import checks, test collection, and symbol scans after every rebase — not just syntax validation.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | The complete skill — four phases (pre-rebase analysis, during rebase, verification gates, push). No companion files. |
|
|
16
|
-
|
|
17
|
-
## Four phases
|
|
18
|
-
|
|
19
|
-
| Phase | Key actions |
|
|
20
|
-
|---|---|
|
|
21
|
-
| 1 — Pre-rebase analysis | Resolve base via `gh pr view`, classify scenario (stacked/squash/long-lived), fetch fresh, scan commit messages for deleted/renamed symbols |
|
|
22
|
-
| 2 — During rebase | Verify `--skip` with a diff, audit auto-merged files with `git diff --name-only --diff-filter=M ORIG_HEAD` |
|
|
23
|
-
| 3 — Verification gates | `python -m compileall`, `pytest --collect-only -q`, targeted test run, reference scan for removals |
|
|
24
|
-
| 4 — Push | Explicit authorization required; `--force-with-lease=<branch>:<sha>` only; verify mergeability after push |
|
|
25
|
-
|
|
26
|
-
## Conventions
|
|
27
|
-
|
|
28
|
-
- Force-push requires explicit operator authorization every time — auto mode does not bypass this.
|
|
29
|
-
- `--force-with-lease=<branch>:<sha>` only; bare `--force` is refused.
|
|
30
|
-
- Never force-push `main`, `master`, `release/*`, `production`, or any multi-author branch.
|
|
31
|
-
- Symbol scans prefer Serena (`find_referencing_symbols`) then the Grep tool, then shell grep as a last resort.
|
|
32
|
-
- `ORIG_HEAD` is the correct ref for auto-merged file audits mid-rebase; `HEAD@{1}` shifts per step.
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
# session-log
|
|
2
1
|
|
|
3
|
-
Logs a session report as a self-contained HTML page in the Obsidian vault, publishes it with the `Artifact` tool, extracts unrecorded decisions, tidies the project session folder, and outputs a `/rename` command.
|
|
4
|
-
|
|
5
|
-
**Trigger:** `/session-log`, "journal this session", "log this work", "session report", "save session", "capture session", "document what we did".
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Produces a self-contained HTML session report shaped to the session's character (feature build, incident, research, etc.) rather than a fixed template. The skill owns the vault path, session numbering, frontmatter contract, HTML composition and publishing, decision extraction, and folder hygiene.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | Hub — six steps, gotchas, backend detection, run-and-report checklist. |
|
|
16
|
-
| `templates/frontmatter.md` | The session-page frontmatter contract and the Step 3 notes block. |
|
|
17
|
-
|
|
18
|
-
## Six steps
|
|
19
|
-
|
|
20
|
-
1. **Backend detection** — headless vault (`ob --version` + `OBSIDIAN_VAULT_PATH`) then local vault (`~/.claude/vault/`). Session number from `[N]. *.html` and `[N]. *.md` files in the project folder.
|
|
21
|
-
2. **Session metadata** — project name, session number, session ID from `CLAUDE_CODE_SESSION_ID`, date, title.
|
|
22
|
-
3. **Compose and publish via the Artifact tool** — loads the `artifact-design` skill first, designs the shape for the session's character (e.g., a PR-writeup shape for feature builds, a timeline shape for incidents), writes the HTML, then publishes it with the `Artifact` tool using the fixed favicon `📓`.
|
|
23
|
-
4. **Vault context tracking** — two Edit calls set `vault_context_retrieved` and append a vault-context line, then redeploy via `Artifact` on the same `file_path` so the URL stays the same.
|
|
24
|
-
5. **Decision extraction** — scans conversation for unrecorded decisions; prompts user via `AskUserQuestion` before invoking `/remember`.
|
|
25
|
-
6. **Session tidy** — audits `.html` files in the project folder for naming and frontmatter; auto-fixes minor issues and redeploys via `Artifact`.
|
|
26
|
-
|
|
27
|
-
## Conventions
|
|
28
|
-
|
|
29
|
-
- Session reports use HTML — the Artifact tool publishes HTML or Markdown, and HTML gives the report designer more visual structure.
|
|
30
|
-
- `write_existing_file_blocker` rejects Write on existing paths — use Edit for all vault-context updates.
|
|
31
|
-
- The `Artifact` tool redeploys to the same URL on repeat calls with the same `file_path` within the current run — edits made in steps 3 and 5 to the session created this run never mint a new URL.
|
|
32
|
-
- Final step copies `/rename [Project] - [Primary Outcome]` to the clipboard via `pwsh Set-Clipboard`.
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
# session-tidy
|
|
2
1
|
|
|
3
|
-
Audits, cleans, and consolidates session logs in the Obsidian vault — fixes format drift, resolves orphaned next-steps, updates stale statuses, and generates project rollup summaries.
|
|
4
|
-
|
|
5
|
-
**Trigger:** `/session-tidy`, "tidy sessions", "clean up session logs", "session audit".
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Maintenance utility for the `sessions/[Project]/` vault directories. Enforces the session-log format contract, moves uncategorized files into project subfolders, and generates `Summary.md` rollup files for projects with 3+ sessions.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | The complete skill — four phases (preflight, audit, propose changes, execute + verify). No companion files. |
|
|
16
|
-
|
|
17
|
-
## Format contract enforced
|
|
18
|
-
|
|
19
|
-
- **Path:** `sessions/[Project]/[N]. [Title].md`
|
|
20
|
-
- **Frontmatter:** `type`, `project`, `session`, `date`, `status`, `blocked`, `tags` — all needed.
|
|
21
|
-
- **Status rules:** `completed` + `blocked: true` is contradictory; `in-progress` or `blocked` older than 7 days is stale.
|
|
22
|
-
- **Content:** outcome-oriented `###` headers with one emoji; no play-by-play narration.
|
|
23
|
-
|
|
24
|
-
## Four phases
|
|
25
|
-
|
|
26
|
-
1. **Preflight** — resolve backend (headless vault, Obsidian MCP, or local vault).
|
|
27
|
-
2. **Audit** — check each file for naming, frontmatter completeness, status coherence, orphaned next-steps, and categorization.
|
|
28
|
-
3. **Propose changes** — report findings; wait for user approval before changing anything.
|
|
29
|
-
4. **Execute + verify** — rename files, fix frontmatter, update statuses, clean orphaned next-steps, generate `Summary.md` rollups.
|
|
30
|
-
|
|
31
|
-
## Conventions
|
|
32
|
-
|
|
33
|
-
- `disable-model-invocation: true` is set.
|
|
34
|
-
- Changes need explicit user approval from Phase 2's report — the skill never auto-applies without approval.
|
|
35
|
-
- Companion to `/session-log` (creates sessions) and `/recall` (reads vault).
|
|
36
|
-
- `/session-tidy` targets Markdown session format; HTML sessions from `/session-log` may be mis-audited or get incorrect rename proposals.
|
|
@@ -1,49 +1 @@
|
|
|
1
|
-
# skill-builder
|
|
2
1
|
|
|
3
|
-
Orchestrates the skill-building lifecycle: classify type, scaffold folders, write via the `skill-writer-agent` agent, enforce modularity (sub-skills / composition), write description as a trigger catalog, require deterministic steps as code, self-audit, and refine from real usage.
|
|
4
|
-
|
|
5
|
-
**Trigger:** build a skill, new skill workflow, improve this skill, optimize skill description, skill development lifecycle, skill modularity, description trigger catalog, deterministic skill scripts.
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Enforces craft standards for new and existing skills. For quick one-off SKILL.md edits, spawn the `skill-writer-agent` agent directly. This skill classifies, scaffolds, gathers context (composition plan, description triggers, deterministic inventory), delegates writing, and self-audits.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | Hub — routing, principles, file index |
|
|
16
|
-
| `references/skill-types.md` | 9-type taxonomy with folder structures per type |
|
|
17
|
-
| `references/progressive-disclosure.md` | Hub pattern, folder conventions, hard rules |
|
|
18
|
-
| `references/skill-modularity.md` | Cross-skill modularity, sub-skills, composition plan |
|
|
19
|
-
| `references/description-field.md` | Description as trigger catalog (not story prose) |
|
|
20
|
-
| `references/deterministic-elements.md` | Deterministic steps as code/task seeds; no markdown checkbox boards |
|
|
21
|
-
| `references/self-audit-checklist.md` | Post-build audit task seeds (TaskCreate / TodoWrite) |
|
|
22
|
-
| `references/delegation-map.md` | Subagent handoff patterns and transcript guidance |
|
|
23
|
-
| `references/thariq-x-post-skills.json` | Source reference — lessons from building Claude Code skills |
|
|
24
|
-
| `workflows/new-skill.md` | Full lifecycle for new skills (6 steps) |
|
|
25
|
-
| `workflows/improve-skill.md` | Observation-first flow for existing skills (6 steps) |
|
|
26
|
-
| `workflows/polish-skill.md` | Description trigger-catalog audit and final validation (5 steps) |
|
|
27
|
-
| `templates/gap-analysis.md` | Gaps, composition plan, description triggers, deterministic inventory |
|
|
28
|
-
|
|
29
|
-
## Subdirectories
|
|
30
|
-
|
|
31
|
-
| Directory | Purpose |
|
|
32
|
-
|---|---|
|
|
33
|
-
| `references/` | Best-practice specs and the audit checklist |
|
|
34
|
-
| `workflows/` | Step-by-step workflows for each lifecycle phase |
|
|
35
|
-
| `templates/` | Reusable templates for skill artifacts |
|
|
36
|
-
|
|
37
|
-
## Routing
|
|
38
|
-
|
|
39
|
-
- **New skill** → `workflows/new-skill.md`
|
|
40
|
-
- **Improve existing** → `workflows/improve-skill.md`
|
|
41
|
-
- **Final polish only** → `workflows/polish-skill.md`
|
|
42
|
-
- **Ambiguous** → ask the user which one applies
|
|
43
|
-
|
|
44
|
-
## Conventions
|
|
45
|
-
|
|
46
|
-
- Every build ends with the self-audit at `references/self-audit-checklist.md`; fix failures before delivery.
|
|
47
|
-
- Modularity items, description trigger-catalog items, and deterministic-element classification are mandatory on every delivery.
|
|
48
|
-
- `skill-builder` orchestrates; the `skill-writer-agent` agent authors. Handoff packet must include type, gap analysis, composition plan, description trigger catalog, deterministic inventory, degree-of-freedom assessment, and constraints.
|
|
49
|
-
- Claude A / Claude B: Claude A (this session) designs; Claude B (subagents) tests the built skill on real tasks.
|