Skip to content

refactor(droid-control): read atoms as files, not listed skills - #53

Merged
factory-ain3sh merged 1 commit into
masterfrom
ain3sh/droid-control-atoms
Oct 7, 2026
Merged

factory-ain3sh merged 1 commit into
masterfrom
ain3sh/droid-control-atoms

Conversation

@factory-ain3sh

Copy link
Copy Markdown
Contributor

Description

What

droid-control's ten atoms (terminal-use, true-input, browser-use, desktop-use, droid-cli, pty-capture, capture, compose, verify, showcase) are no longer skills. They move to skills/droid-control/atoms/<atom>/ATOM.md, and droid-control reads them by absolute path. A session with the plugin installed now lists one skill instead of eleven, which frees about 1,680 characters of the skill listing.

Why

The CLI caps the skill listing at 1.5% of the compaction limit: 21,000 characters at 350k, and 15,000 at the 250k default. A skill whose description doesn't fit is listed as a bare name, and droids rarely load a bare name. The atoms used about 1,680 characters, although each description said "not invoked directly" and only droid-control's routing loads them. In a factory-mono session that space came out of the user's own skills: 55 of them were listed without descriptions.

How

Skill discovery stops at a directory that has a SKILL.md, and the atom files are named ATOM.md, so no loader lists them. Ground rule 3 in droid-control/SKILL.md now says atoms are files:

  • Read ${DROID_PLUGIN_ROOT}/skills/droid-control/atoms/<atom>/ATOM.md, and never use the Skill tool for one.
  • Where an atom writes the plugin-root variable, substitute the root.

The plugin loader expands ${DROID_PLUGIN_ROOT} in skill bodies to the installed path. The atom paths therefore hold for ~/.factory or ~/.factory-dev, for user, project, or org scope, and for any cache version. The platforms/*.md docs were already loaded this way.

Adding disable-model-invocation: true would also hide the atoms. The Skill tool would then still load them only because SkillExecutor doesn't enforce that flag, while the flag's documented contract says it blocks the tool. That would break as soon as the flag is enforced.

Related Issue

No ticket. This came up while measuring skill-listing budget use for Factory-AI/factory-mono#24262.

Reviewer Guide

Diff shape: 16 renames that only drop frontmatter, routing wording in droid-control/SKILL.md and the three commands, and path updates in the docs.
Review depth: Standard. It changes how prompts route to atoms, and that routing was verified in live sessions.
Read order:

  1. plugins/droid-control/skills/droid-control/SKILL.md: ground rule 3 and the new Atoms index.
  2. plugins/droid-control/commands/*.md: "read listed atoms".
  3. plugins/droid-control/ARCHITECTURE.md: the atoms section and platform paths.

Open for pushback: atoms/<atom>/ATOM.md keeps each atom's relative platforms/ links unchanged. A flat atoms/<atom>.md layout would be shorter, but those links would need rewriting.

Risk & Impact

  • A droid that ignores ground rule 3 may call the Skill tool for an atom and get "not found". No model did in the runs below, even when an older droid-control in the same session still listed atom skills.
  • Atom files are read raw, so the plugin-root variable inside them is not expanded. Ground rule 3 gives the substitution. The platforms/*.md files already worked this way.
  • Anything that loaded an atom by skill name would break. user-invocable: false already hid the atoms from slash commands. Nothing in this repo, factory-mono, or ain3sh/.agents names them as skills.
  • The change reverts as a single commit.

Verification

Behavior verified @ 07208ee: The plugin was installed through a local marketplace at project scope, into a cache path that contains spaces (~/.factory/plugins/cache/dc atoms mp-…/droid-control-…/e48ab4de515c/). Three models (Opus 5.5, GPT-6.1 Sol, GLM 5.3 Flash) were each asked to plan a single-clip htop demo through droid-control and stop before launching anything.

master This PR
Atoms loaded terminal-use, capture, compose, verify (Sol through the Skill tool, Opus by reading the SKILL.md files) The same four, read from atoms/<atom>/ATOM.md in the installed cache, on all three models
Skill tool calls for atoms 4 (Sol) 0
tctl Resolved Resolved and quoted under the spaced cache path
Skill listing with only this version active droid-control and 10 atoms droid-control only

Not tested: Recording and rendering, because tctl and render-showcase.sh are unchanged. Windows and macOS hosts.
Standard validators: droid-control tests pass (17 passed, 3 skipped). The check-skills workflow script passes locally, and every relative Markdown link under the plugin resolves.

The ten atom skills (terminal-use, capture, compose, verify, ...) were
listed in every session's skill catalog even though only droid-control's
routing loads them. That cost about 1,700 characters of the listing
budget in every session with the plugin installed and pushed other
skills' descriptions out of it.

Atoms now live at skills/droid-control/atoms/<atom>/ATOM.md, which skill
discovery does not scan, and droid-control reads them by absolute path
through ${DROID_PLUGIN_ROOT}. The loader expands that variable to the
installed cache path, so the paths hold for any home directory, scope,
or cache version. Marking the atoms disable-model-invocation instead
would rely on the Skill tool not enforcing a flag whose documented
contract says it blocks the tool.

Bump the plugin to 1.2.0.
@factory-ain3sh
factory-ain3sh merged commit 7166a07 into master Oct 7, 2026
1 check passed
@factory-ain3sh
factory-ain3sh deleted the ain3sh/droid-control-atoms branch October 7, 2026 12:56
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