Skip to content

feat: user-built subharness agents — personal-agent skill path, installable scaffolds, skill routing + cleanup#822

Merged
AbirAbbas merged 23 commits into
mainfrom
feat/user-built-subharness-agents
Jul 23, 2026
Merged

feat: user-built subharness agents — personal-agent skill path, installable scaffolds, skill routing + cleanup#822
AbirAbbas merged 23 commits into
mainfrom
feat/user-built-subharness-agents

Conversation

@AbirAbbas

@AbirAbbas AbirAbbas commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What this does

Lets users build personal agents — agents that live on their machine, installed through af, visible in AgentField Desktop — and gives coding agents a clean path to discover and delegate to them. Three pieces:

1. New agentfield-personal skill (0.1.0)

A standalone skill for the machine-installed deliverable: author real source in ~/agentfield-agents/<name>, package it with a config_version: v1 manifest, declare scoped secrets (global vs node) that surface as a keys form in Desktop, af install + af run, then verify actual control-plane registration and a live reasoner call before claiming success. Secrets are only ever set through the af CLI — never echoed, committed, or written into the manifest.

Skill selection happens at routing level via the skill description. The existing agentfield (repo builder) skill is unchanged in behavior: its body is byte-identical to main, with only a frontmatter version and a one-sentence description pointer to the new skill. An earlier revision of this PR added an in-skill coverage/routing gate to the builder; that was dropped as a regression for existing users in favor of this split.

agentfield-use gains a bounded fallback: after discovery conclusively finds no capable installed agent, it may offer to build one (naming both builder skills) — list/inspect/diagnose requests never authorize a build.

2. af init now emits agentfield-package.yaml

All three language templates (Python, Go, TypeScript) scaffold a v1 manifest, so a generated project is installable with af install ./dir out of the box. The TypeScript path also gains real dependency installation (npm install) in the package installer.

3. Skillkit alias-orphan reconciliation

agentfield-multi-reasoner-builder was folded into agentfield as an alias earlier; installs that predate that kept a stale standalone entry. af skill install/update now reconciles those orphans: removes recorded targets (symlinks / marker blocks, name-matched), the canonical store dir, and the state entry. It only touches state entries whose name is a catalog alias, so it cannot affect user skills.

Testing

  • Contract tests pin the split: the builder skill must keep its original workflow (routing-gate text is explicitly banned), the personal skill must carry the full lifecycle/secret-safety contract, and the use-skill offer must stay authorization-bounded.
  • Mirror tests keep skills/ and the embedded skill_data/ copies aligned (name/version/content).
  • Reconciliation has ~700 lines of table tests over recorded-state permutations, including failure injection via fs seams.
  • Rendered-manifest and scaffold tests verify every emitted agentfield-package.yaml parses with packages.ParsePackageMetadata.
  • Full control-plane suite green locally and in CI.

🤖 Generated with Claude Code

@AbirAbbas
AbirAbbas requested a review from a team as a code owner July 23, 2026 18:00
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 86.90% 87.40% ↓ -0.50 pp 🟡
sdk-go 92.50% 92.00% ↑ +0.50 pp 🟢
sdk-python 93.82% 93.73% ↑ +0.09 pp 🟢
sdk-typescript 91.05% 90.42% ↑ +0.63 pp 🟢
web-ui 84.76% 84.79% ↓ -0.03 pp 🟡
aggregate 85.55% 85.75% ↓ -0.20 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 123 91.00%
sdk-go 0 ➖ no changes
sdk-python 0 ➖ no changes
sdk-typescript 0 ➖ no changes
web-ui 0 ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@habibgurdov77-star

Copy link
Copy Markdown

53b6b75

@habibgurdov77-star

Copy link
Copy Markdown

@AbirAbbas
AbirAbbas force-pushed the feat/user-built-subharness-agents branch from 53b6b75 to 34aaa5e Compare July 23, 2026 18:25
…ersonal skill

The 0.6.0 builder skill routed every request through a coverage pre-check
and a deliverable question before the original repo workflow could start —
a behavior change for everyone already using the skill. Split instead:

- skills/agentfield: reverted to the pre-gate body (byte-identical to
  main); frontmatter gains version 0.5.1 and a one-sentence description
  pointer to agentfield-personal. Existing repo-builder behavior unchanged.
- skills/agentfield-personal (new, 0.1.0): standalone personal-agent
  skill — stable source in ~/agentfield-agents, v1 manifest, scoped
  secrets via the af CLI, install/run, registration + live-call
  verification, Desktop handoff. Selection happens at skill-routing
  level via its description, not via an in-skill gate.
- skills/agentfield-use: the no-coverage fallback keeps the offer and
  authorization boundaries but drops the coverage_precheck_complete
  marker protocol and bounce-limit that served the removed gate.

Catalog/embed register the new skill; contract tests pin the reverted
builder (routing-gate text banned), the personal lifecycle contract, and
the simplified use-skill offer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AbirAbbas
AbirAbbas merged commit f69b2c3 into main Jul 23, 2026
29 checks passed
@AbirAbbas
AbirAbbas deleted the feat/user-built-subharness-agents branch July 23, 2026 20:24
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.

2 participants