Skip to content

Simplify skills and add CLI#9

Open
codeisme621 wants to merge 15 commits into
mainfrom
simplify-skills
Open

Simplify skills and add CLI#9
codeisme621 wants to merge 15 commits into
mainfrom
simplify-skills

Conversation

@codeisme621

Copy link
Copy Markdown
Contributor

No description provided.

codeisme621 and others added 15 commits July 3, 2026 15:31
…c scripts

expert-sdd-creator still references the retired Signal concept and creates
outside experts — it will be redesigned separately. install-agents.sh is
absorbed by the upcoming context-specs CLI. implement-mainspec/scripts held
only orphaned __pycache__ bytecode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-10 drain protocol

The dispatcher family moves out of per-project installs into the harness repo
(scripts/) and takes the environment as an argument:

  scripts/poll-and-dispatch.sh <env-path> [env-name]
  scripts/learn-dispatch.sh    <env-path> [env-name]   (was learn-tick.sh)

- All env git ops go through 'git -C $ENV_PATH' against the developer's own
  clone (refs, fetches, pushes, sibling worktrees — never their working tree),
  so the host worktree and harness-tick.sh's sync-then-exec dance are deleted
  outright: the dispatcher no longer lives inside the repo it manages.
- Runtime state (counters, stuck sentinels, session TSVs) relocates to
  <harness>/state/<env-name>/; the env keeps only its committed .harness/env.
- flock moves from $0 (would contend across environments now that the script
  is shared) to a per-env state lock.
- New exit contract: 0 = idle (incl. STUCK-only ticks), 10 = advanced (the
  supervisor re-invokes immediately to drain), else error (backoff).
- gh calls go through ghe() so gh resolves the ENVIRONMENT repo from cwd.
- Cleanup also deletes the local feature/* branch worktree-add created in the
  developer's clone.
- The shim skills (poll-and-dispatch, learn-loop) die with harness-tick.sh:
  the CLI supervisor replaces the /loop startup path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Zero-dependency Node CLI (node >=18) at bin/context-specs. 'add <path>'
registers an environment in the gitignored environments.toml, symlinks every
canonical skill into <env>/.claude/skills/ (Claude Code follows skill-dir
symlinks) plus the subagents, and writes a marker-delimited managed block to
the env's .gitignore. 'link <path>' is the idempotent re-link used by
bootstrap-worktree.sh for fresh worktrees. Eject-by-shadowing: a real committed
directory with a skill's name is treated as the project's fork and left alone.
/intent is deliberately NOT symlinked — /env-init installs it as a committed,
project-owned copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- supervisor: one detached process per environment, two independent loops.
  Build tick every INTERVAL (default 5m) with drain-on-10 — real work re-invokes
  immediately instead of waiting out the poll; errors back off exponentially
  (capped 1h). Learn tick every LEARN_INTERVAL (default 10m), never drains.
  'run' is the foreground one-shot: drain to idle and exit, no daemon.
- status: deterministic table derived from committed sentinels + state files —
  no gh calls, works offline, phases mirror the dispatcher's if/elif chain.
- doctor: absorbs the old preflight.sh; adds the two-tier failure modes
  (broken/foreign symlinks, missing link header in bootstrap, leftover
  single-repo-era dispatcher artifacts in an environment).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
'init <name>' clones the template, renames origin→upstream (updates come from
upstream; origin stays free for the user's own remote), seeds the gitignored
environments.toml from the committed example, creates state/, and offers gh
repo create. 'init' with no args adopts the current clone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The deterministic steps (preflight, script installs, shim skills, host
worktree, dry-run, /loop startup) are gone — the context-specs CLI owns them.
What remains is renamed /env-init and runs inside the environment through its
symlink: .harness/env, a committed project-owned /intent (verbatim or
customized — one of the two developer-owned levers), the Expert skeleton
(structure-only, narrated as developer-OWNED long-term memory), AGENTS.md,
local-checks.sh, bootstrap-worktree.sh generated from a template whose
deterministic header re-links tier-1 skills via 'context-specs link', the
reviewer choice, and the feature/env-init PR.

References rewritten for the two-tier model (mental-model, dispatcher-explained,
invariants-to-preserve, config-options, worktree-bootstrap); preflight.sh is
absorbed by 'context-specs doctor'; counter-path wording updated in
fix-local-checks, address-feedback, evaluate-sessions, learn.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- README leads with the harness-engineering definition (deterministic code
  driving probabilistic code to a guaranteed output: PR ready-to-merge or
  STUCK-with-diagnosis, never 'maybe') and the CLI quickstart; the layer-1/2/3
  ladder becomes the harness-engineering arc with SDD reframed as the system's
  short-term memory and LTM-informs-STM as the organizing metaphor (Reflection
  in the hot path, /learn as post-merge 'dreaming'); light environment/goal
  vocabulary throughout.
- docs/3 rewritten for the two tiers, ref-only-ops trust story, exit-code
  drain protocol, and the CLI replacing the /loop startup.
- docs/invariants.md: Inv 1/5/6 reworded (state in state/<env>/, per-env lock +
  exit protocol, developer-clone sandbox via ref ops + sibling worktrees);
  tables and failure walkthroughs updated to the supervisor world.
- docs/2 Expert section no longer links the deleted expert-sdd-creator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
git clean -fd deletes the (untracked) tier-1 symlinks whenever a feature
branch's .gitignore predates the managed block — and bootstrap only runs at
worktree creation. Re-linking after every wipe is idempotent and cheap, and
guarantees no skill step ever runs skill-less. Found by the end-to-end drain
fixture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ED features

Branch existence is not liveness: a merged feature keeps its origin branch and
committed PRD forever, so status resurrected every finished feature. Mirror the
dispatcher's step-1 gate (gh pr view state, run in the env for repo resolution)
with the same fail-safe — no PR or transient gh failure counts as live, so
pre-PR work is never hidden. Drops the 'no gh calls' property; correctness and
consistency with the dispatcher win.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codeisme621 codeisme621 changed the title Simplify skills Simplify skills and add CL Jul 6, 2026
@codeisme621 codeisme621 changed the title Simplify skills and add CL Simplify skills and add CLI Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant