Skip to content

feat(harness): fail a project Skill that points at a path it invented - #155

Merged
harlan-zw merged 4 commits into
mainfrom
feat/project-skill-checks
Sep 22, 2026
Merged

harlan-zw merged 4 commits into
mainfrom
feat/project-skill-checks

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Related to #33

❓ Type of change

  • 👌 Enhancement

📚 Description

#154 gave generate-project-skill sharper navigation rules, and I had no way to know whether an Agent follows them. A project Skill that names src/server/routes.ts reads exactly like one that names a real file. The Agent cannot check its own pointers, and neither could we.

The Harness already prepares the project source, so it knows every path the Agent could have seen. Anything else in an inline code span is invention, and promotion fails with the path named.

evals/ scores the same Skills on the direct path, where no check runs. Three cases, each run with the Skills loaded and without, so the delta is the value the Skills add rather than the model's baseline.

Case With Without Δ
package-not-project 1.00 0.67 +0.33
project-skill-real-paths 1.00 0.75 +0.25
project-skill-rust 1.00 0.75 +0.25

Two runs per arm, Claude Code 2.1.278, $4.64. Not in CI: each run is a real Agent session.

The suite paid for itself on the first pass. Both Rust failures were a false positive I had written into the check: a run had reported that src/lib.rs is absent, which is a fact about the project, and the check called it an invented path. A line that denies a path now passes.

Loose ends:

  • package-not-project is the weakest case. Baseline scored 0.67 there, so it is close to measuring the model.
  • .claude-plugin/plugin.json exists so claude plugin eval can resolve skills/ as a target. It makes the repository loadable as a Claude Code plugin, which nothing else here relies on. Question: do you want that as a real distribution path, or should the manifest live somewhere that does not imply it?
  • The check reads inline code spans, which is a heuristic. I biased every rule towards accepting, since a false rejection blocks a correct Skill. The unit tests fix the conservative cases I know about.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-zw
harlan-zw added this pull request to stack #157 September 22, 2026 04:06
@harlan-zw
harlan-zw removed this pull request from stack #157 September 22, 2026 04:07
An Agent cannot verify its own file pointers. A project Skill that names
`src/server/routes.ts` reads exactly like one that names a real file, and
the Agent has no way to tell the difference after the fact.

The Harness already prepares the project source, so it knows every path
the Agent could have seen. Anything else in an inline code span is
invention, and promotion now fails with the path named.

A line that reports a path as missing passes. "The project has no
`src/lib.rs`" is a fact about the project, not a pointer.

Adds `evals/`, which scores the same Skills on the direct path, where no
check runs. Three cases, each run with and without the Skills loaded.
@harlan-zw
harlan-zw changed the base branch from feat/project-skill-discovery to main September 22, 2026 04:07
@harlan-zw
harlan-zw force-pushed the feat/project-skill-checks branch from 5a142dc to 3856000 Compare September 22, 2026 04:07
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 22, 2026
@harlan-github-agent

harlan-github-agent Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-09-22 08:21 UTC.

GitHub merged this pull request.

  • A prose mention of a bare file extension such as .md fails promotion as an invented path. Next: Reject tokens of the shape /^.[A-Za-z0-9]+$/ in pathCandidate, or require a non-dot character before the final extension dot when the token has no slash.
  • A search command outside backtick fences or inline spans fails the mandatory search-command check. Next: Run searchCommand over the full SKILL.md text instead of only fenced backtick blocks plus inline spans, since widening the scan can only reduce false rejections.

46fb9903-be57-4d90-a5e7-2c9ee44562da

@harlan-github-agent harlan-github-agent Bot added harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 22, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 22, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 22, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 22, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 22, 2026
@harlan-zw
harlan-zw merged commit 8cb8c15 into main Sep 22, 2026
3 checks passed
@harlan-zw
harlan-zw deleted the feat/project-skill-checks branch September 22, 2026 07:21
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-blocked The automated Review found a material defect in this head commit. label Sep 22, 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