Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions skills/agent-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ description: >-

# Judge Autoform work as an agent

There is no `autoform` on `PATH` in a Lean project. Run every `autoform`
command, from the project under review, as
`uv run --project "<AUTOFORM_PLUGIN_ROOT>" autoform` followed by its arguments,
where `<AUTOFORM_PLUGIN_ROOT>` is the absolute plugin root: the directory that
holds this skill's `skills/` folder, along with `pyproject.toml` and
`autoform_cli/`. Give a subagent that root and this prefix with its task.

Select the rubric from the artifact under review.

- For a roadmap or blueprint, read [roadmap quality](references/roadmap-quality.md),
Expand Down
14 changes: 10 additions & 4 deletions skills/formalize/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ description: >-

# Formalize the Markdown roadmap

Treat `blueprint/roadmap/**/*.md` as the sole durable work graph. Resolve the
absolute installed plugin root and run commands through the invocation contract
in the [CLI reference](../../autoform_cli/README.md#commands), from the Lean
project. `<PROJECT>` is the absolute path of the checkout being edited; for a
There is no `autoform` on `PATH` in a Lean project. Run every `autoform`
command, from the Lean project, as
`uv run --project "<AUTOFORM_PLUGIN_ROOT>" autoform` followed by its arguments,
where `<AUTOFORM_PLUGIN_ROOT>` is the absolute plugin root: the directory that
holds this skill's `skills/` folder, along with `pyproject.toml` and
`autoform_cli/`. Give a subagent that root and this prefix with its task.

Treat `blueprint/roadmap/**/*.md` as the sole durable work graph. The
[CLI reference](../../autoform_cli/README.md#commands) documents the commands.
`<PROJECT>` is the absolute path of the checkout being edited; for a
subagent, that is its own worktree. Start by running `autoform work list
<PROJECT> --lean-root <PROJECT> --json` and inspect a selected leaf with
`autoform work context <NODE> <PROJECT> --lean-root <PROJECT> --json`. The
Expand Down
8 changes: 8 additions & 0 deletions skills/human-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ existing Autoform vault and site configuration; hand missing infrastructure to
Setup. Keep the Markdown vault as the source of truth and regenerate only
derived review views.

There is no `autoform` on `PATH` in a Lean project. Run every `autoform` and
`autoform-visualize` command, from `<PROJECT>`, as
`uv run --project "<AUTOFORM_PLUGIN_ROOT>" autoform` followed by its arguments
(with `autoform-visualize` in place of `autoform` for the graph), where
`<AUTOFORM_PLUGIN_ROOT>` is the absolute plugin root: the directory that holds
this skill's `skills/` folder, along with `pyproject.toml` and `autoform_cli/`.
Give a subagent that root and this prefix with its task.

Regenerate the review views from `<PROJECT>`: validate the blueprint, refresh
the Mermaid graph with `autoform-visualize` so Obsidian shows current
dependencies, render the site source, then strict-build the site. Follow the
Expand Down
7 changes: 7 additions & 0 deletions skills/roadmap/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ syntax or CLI usage is needed, and the
[worked example](references/cabannes-thesis-roadmap.md) only when a concrete
source-to-DAG pattern would help.

There is no `autoform` on `PATH` in a Lean project. Run every `autoform`
command, from the Lean project root, as
`uv run --project "<AUTOFORM_PLUGIN_ROOT>" autoform` followed by its arguments,
where `<AUTOFORM_PLUGIN_ROOT>` is the absolute plugin root: the directory that
holds this skill's `skills/` folder, along with `pyproject.toml` and
`autoform_cli/`. Give a subagent that root and this prefix with its task.

## Own the whole pass

Honor a request explicitly limited to inspection, audit, status, or
Expand Down
36 changes: 33 additions & 3 deletions tests/test_skill_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,20 +1174,25 @@ def test_cli_reference_documents_only_commands_that_exist(repo_root: Path) -> No
assert exit_info.value.code == 0, f"reference documents unknown command: {' '.join(invocation)}"


_LAUNCHER = 'uv run --project "<AUTOFORM_PLUGIN_ROOT>" autoform`'


def test_skills_delegate_the_command_line_to_the_reference(repo_root: Path) -> None:
"""Skills state intent and link to the reference; they do not restate flags.

Duplicated invocations are what let the CLI move underneath the agent's
instructions, so a skill that needs the command line must cite the
reference instead of copying it.
reference instead of copying it. The bare launcher is not a flag, so a skill
may state it once.
"""
citing = 0
for skill in sorted((repo_root / "skills").glob("*/SKILL.md")):
text = skill.read_text(encoding="utf-8")
text = " ".join(skill.read_text(encoding="utf-8").split())
if skill.parent.name == "setup":
assert text.count("uv run --project") == 3
else:
assert "uv run --project" not in text, (
invocations = re.findall(r"uv run --project[^`]*`", text)
assert invocations in ([], [_LAUNCHER]), (
f"{skill.relative_to(repo_root)} restates a CLI invocation; "
"link to autoform_cli/README.md#commands instead"
)
Expand All @@ -1196,6 +1201,31 @@ def test_skills_delegate_the_command_line_to_the_reference(repo_root: Path) -> N
assert citing >= 3


def test_skills_that_run_the_cli_state_how_to_launch_it(repo_root: Path) -> None:
"""A consumer project has no `autoform` on `PATH`.

Agents that read a bare `autoform work list` run `which autoform` and then
guess; in trials every fresh Roadmap and Formalize session did, and some
never reached the CLI. So every skill whose instructions or references name
a command states the launcher once, names the plugin root without relying
on how a host presents the skill, and hands both to its subagents. Setup
spells out its own full invocations; Develop Plugin works inside the plugin
checkout, where `uv run autoform` already resolves.
"""
running = {
skill.name
for skill in (repo_root / "skills").iterdir()
if any(re.search(r"`autoform[ -][a-z]", path.read_text(encoding="utf-8")) for path in skill.rglob("*.md"))
}
assert {"roadmap", "formalize", "agent-review", "human-review"} <= running
for name in sorted(running - {"setup", "develop-plugin"}):
flat = " ".join((repo_root / "skills" / name / "SKILL.md").read_text(encoding="utf-8").split())
assert f"`{_LAUNCHER}" in flat, f"{name} does not state the launcher"
assert "no `autoform` on `PATH`" in flat
assert "the directory that holds this skill's `skills/` folder, along with `pyproject.toml`" in flat
assert "Give a subagent that root and this prefix with its task." in flat


def test_skill_links_into_the_cli_reference_land_on_a_section(repo_root: Path) -> None:
"""A skill that cites a reference section must not point at a renamed one.

Expand Down
Loading