Skip to content

feat: add Cline harness support - #266

Merged
slowdini merged 2 commits into
devfrom
feat/cline-support
Aug 8, 2026
Merged

feat: add Cline harness support#266
slowdini merged 2 commits into
devfrom
feat/cline-support

Conversation

@slowdini

@slowdini slowdini commented Aug 8, 2026

Copy link
Copy Markdown
Owner

What

Adds Cline as a fourth supported harness, and sets up Cline's own tooling (rules + Memory Bank) for working on this repo with Cline.

Cline plugin

  • cline/plugins/slow-powers.js — dependency-free JS AgentPlugin, declared via the cline field in package.json (which is already version-locked). Install with cline plugin install https://github.com/slowdini/slow-powers.git.
  • Bootstrap injection: setup() registers bootstrap.md as a session rule via registerRule, so the skill-enforcement block is in every session's system prompt — the Cline equivalent of the Claude/Codex SessionStart hook and the OpenCode system-prompt transform.
  • Plan gate: hooks.beforeTool skips the first switch_to_act_mode of each conversation with a reason pointing at hardening-plans, keyed by a per-conversation tmp marker — the same deny-once, fail-open, can't-hard-lock-plan-mode argument as hooks/exit-plan-mode. The skip + reason semantics match the runtime's own core.plan-mode-command-guard extension.
  • Skills: auto-discovered from the package root by Cline's plugin loader — no wiring needed.

Repo-local Cline setup

  • .clinerules/memory-bank.md — Cline's canonical Memory Bank instructions.
  • memory-bank/ — the six core files, seeded; activeContext.md records this work and the verification results.
  • AGENTS.md — four-harness update + live-testing instructions. (Cline reads AGENTS.md natively — no symlink needed.)
  • .gitignore — excludes .cline/plugins/ install artifacts.

Tests

  • tests/harness/spec.ts gains the Cline harness entry; manifests.test.ts asserts cline.plugins[] paths resolve inside the repo with hooks+rules capabilities.
  • New tests/harness/cline-plugin.test.ts: plugin shape, bootstrap registration, gate behavior (skip-once, per-conversation independence, missing-id fallback, fail-open on malformed contexts).

Harness tested

Cline CLI 3.0.51 (per PR requirements). Live verification on headless sessions:

  • cline plugin install <repo> --cwd <scratch> installs and registers the plugin; --force reinstall picks up edits.
  • All 8 skills are discovered and listed in-session; the <EXTREMELY-IMPORTANT> bootstrap block is present in the agent's instructions, and the bootstrap was behaviorally active (agent invoked a skill on a ~1% match, per the bootstrap rule).
  • The tool pipeline runs cleanly with the plugin's hook attached; plugin uninstalled and scratch dir removed afterward.

One check remains manual: switch_to_act_mode is not exposed in headless one-shot sessions, so the gate firing end-to-end needs one interactive cline -i plan-mode run (present plan → approve → first mode-switch is skipped with the hardening instruction). The gate logic itself is unit-tested against the documented AgentBeforeToolResult contract, and the runtime's skip handling + hook context shape were confirmed against the shipped CLI source.

Evals

Not applicable — no skill content changed (no behavior-shaping prose touched); this PR adds harness infrastructure only.

Notes for reviewers

  • Cline plugins load only in the CLI, SDK, and Kanban — not the VSCode/JetBrains extensions. The README documents the IDE fallback (manual skills copy into .cline/skills/ or ~/.cline/skills/; no bootstrap/gate there).
  • Known follow-ups (recorded in memory-bank/progress.md): the already-hardened short-circuit (upstream Claude hook causes issues if hardening-plans is invoked autonomously #153 analogue) for the Cline gate, and a cross-harness exploration of installed-plugin-vs-repo skill precedence (Cline's skill registry is last-wins with plugin dirs scanned after workspace dirs).

Ship slow-powers as a Cline plugin (CLI/SDK/Kanban) and set up Cline
tooling for working on this repo.

- cline/plugins/slow-powers.js: registers bootstrap.md as a session
  rule (registerRule) and gates the first switch_to_act_mode of each
  conversation on hardening-plans (skip-once + per-conversation
  marker, mirroring hooks/exit-plan-mode's deny-once argument)
- package.json: cline.plugins manifest field; cline/ added to files.
  Skills are auto-discovered from the package root, no wiring needed.
- tests: Cline entry in tests/harness/spec.ts, manifest assertions in
  manifests.test.ts, and cline-plugin.test.ts covering plugin shape
  and gate behavior
- docs: README Cline install section with the IDE-extension caveat;
  AGENTS.md four-harness update + live-testing instructions
- repo setup: .clinerules/memory-bank.md + seeded memory-bank/;
  .gitignore excludes .cline/plugins/ install artifacts

No skill content changed, so no evals are required.
@slowdini
slowdini merged commit b5444d4 into dev Aug 8, 2026
1 check passed
@slowdini
slowdini deleted the feat/cline-support branch August 8, 2026 03:04
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