Skip to content

Commit 436d4f5

Browse files
committed
Merge branch 'agents-adoption' into 1.0
Adopt the shared Agents guidance repository, fix the packaging gaps its dzil audit surfaced, and clear the POD spelling failures that surfaced once the author tests were finally wired into the release.
2 parents 6b5a1c7 + d208ba6 commit 436d4f5

46 files changed

Lines changed: 1115 additions & 88 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ lastlog.*
3535
docs
3636
worktrees
3737
AI_DOCS/
38+
.immiscible-test.lock
39+
nytprof.out
40+
scratch
41+
/xxx/

AGENTS.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# AGENTS.md
2+
3+
## MANDATORY: read the universal agent rules first
4+
5+
This project opts into shared agent guidance while keeping its own documents
6+
authoritative for project-specific rules and design.
7+
8+
- Repository: `git@github.com:exodist/Agents.git`
9+
- Expected location: `~/projects/Agents`
10+
11+
If `~/projects/Agents` does not exist, clone it before doing anything else:
12+
13+
git clone git@github.com:exodist/Agents.git ~/projects/Agents
14+
15+
Then read `~/projects/Agents/AGENTS.md` and follow the shared guidance this
16+
project has adopted. It points at task-specific guides and procedures.
17+
18+
All documents in THIS repository take priority over the shared repository.
19+
Read the project documents named below; `AGENTS_OVERRIDE.md` records
20+
declarations and explicit shared-rule overrides when present.
21+
22+
---
23+
24+
## What this project is
25+
26+
`yath` version 1 — the Test2 test harness: a runner, a set of `yath`
27+
commands, event collection and rendering, and the `Test2::Harness::*`
28+
libraries behind them.
29+
30+
CPAN distribution name: `Test2-Harness`
31+
32+
This is the maintenance line. Version 2 of the harness is a separate rewrite
33+
in the `Test2-Harness2` distribution; this repository takes bug fixes and
34+
compatibility work, not new architecture.
35+
36+
---
37+
38+
## Canonical sources of truth
39+
40+
1. **`AGENTS_OVERRIDE.md`** — this project's declarations and overrides.
41+
2. **This file** — project context and conventions.
42+
43+
There is no `ARCHITECTURE.md`. The shipped POD and the code are the
44+
specification.
45+
46+
---
47+
48+
## Testing
49+
50+
The suite is large, forks heavily, and starts real `yath` runs. Take the
51+
shared concurrency lock for anything above `-j4`:
52+
53+
```
54+
~/projects/Agents/bin/agent-test-lock -- prove --timer -Ilib -j16 -r t/
55+
```
56+
57+
- `t/` is the main suite. `t2/` is a second suite that exercises the harness
58+
against its own bundled test libraries and needs `-It2/lib`:
59+
60+
```
61+
~/projects/Agents/bin/agent-test-lock -- prove --timer -Ilib -It2/lib -j16 -r t2/
62+
```
63+
64+
- `.yath.rc` is what a bare `yath test` in this repository uses:
65+
`-It2/lib` plus `--default-search glob(t/*)`. It does not cover `t2/`.
66+
- `xt/author/pod-spell.t` requires `Test::Spelling` and is not wired into
67+
`dist.ini`; run it by hand when POD changes.
68+
- `t/integration/` drives full harness runs and is the slow part of the
69+
suite. Individual files there can take minutes.
70+
- Crashed runs leave debris in `/tmp`; `~/projects/Agents/bin/sweep-test-debris`
71+
clears it.
72+
73+
---
74+
75+
## Related repositories
76+
77+
- **`Test-Simple`** (`~/projects/Test-More/test-more`) — this distribution
78+
pins `Test2`, `Test::Builder`, and `Test::More` at `1.302170`. A change
79+
that depends on newer Test2 behavior needs that floor raised here.
80+
- **`App-Yath-Script`** (`~/projects/Test-More/App-Yath-Script`) — supplies
81+
the shared `yath` executable; required at `App::Yath::Script` 2.000011 so
82+
both harness generations can dispatch through one script. Anything touching
83+
script detection, the `yath` entry point, or the `App::Yath::Script::V#`
84+
handshake must be checked against it.
85+
- **`Test2-Harness2`** (`~/projects/Test-More/Test2-Harness2`) — the version 2
86+
rewrite. It is a separate distribution; changes do not propagate either way,
87+
but a behavior decision made there is the one to match when both must agree.
88+
89+
---
90+
91+
## CPAN Testers
92+
93+
Distribution name for report queries: `Test2-Harness`. The query procedure is
94+
`~/projects/Agents/CPAN_TESTERS.md`.
95+
96+
---
97+
98+
## Architecture quick-reference
99+
100+
- Objects use the **in-tree** `Test2::Harness::Util::HashBase`, not
101+
`Object::HashBase`. It is a bundled copy so the harness has no external
102+
object dependency; do not swap it for the CPAN module.
103+
- `use parent` for inheritance.
104+
- `App::Yath::Command::*` is one class per `yath` subcommand;
105+
`App::Yath::Plugin::*` is the plugin surface. Both are public API — CPAN
106+
distributions subclass them.
107+
- The harness must keep working on perl 5.10 and on systems where the only
108+
requirement is real `fork`. `Makefile.PL` refuses to build without it.

AGENTS_OVERRIDE.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# AGENTS_OVERRIDE.md
2+
3+
This project's answers to the choices the universal agent rules deliberately
4+
leave open, plus every deliberate departure from them.
5+
6+
Universal rules live in `~/projects/Agents` (see `AGENTS.md` for the clone
7+
URL). Every project-local document already takes priority over shared rules;
8+
this file keeps declarations and explicit overrides easy to find.
9+
10+
---
11+
12+
## Declarations
13+
14+
### Minimum Perl version
15+
16+
> **Minimum: 5.10.0**
17+
18+
`dist.ini` declares `perl = 5.010000`. Shipped modules use `use strict` and
19+
`use warnings` rather than a version pragma.
20+
21+
Reason: this is a released distribution with a long-standing compatibility
22+
promise and active CPAN Testers coverage on old perls. Raising the floor is a
23+
release decision, not a cleanup.
24+
25+
### Subroutine signatures
26+
27+
> **Policy: disabled**
28+
29+
> **Enabling pragma: not applicable**
30+
31+
Argument handling follows the surrounding code using `@_`.
32+
33+
Reason: the declared floor is 5.10, which cannot express signatures at all.
34+
35+
### POD placement
36+
37+
> **Layout: all at bottom (default)**
38+
39+
One continuous POD document under `__END__`.
40+
41+
Reason: matches every module already in `lib/`.
42+
43+
### Test layout and provenance
44+
45+
> **Scheme: neither shared scheme — legacy layout, frozen**
46+
47+
`t/` holds `unit/` and `integration/` subtrees plus loose `.t` files at its
48+
root; `t2/` is a second suite with its own `lib/`. There are no
49+
`# Test origin:` headers and no `t/AI/` tree.
50+
51+
> **Layout audit: not run — `agent_scripts/audit-test-layout` is not copied
52+
> into this project.**
53+
54+
Reason: the layout predates the shared schemes and the suite is large. New
55+
tests go beside the existing tests they relate to. See the override below.
56+
57+
### perltidy
58+
59+
> **Config: shared**
60+
61+
`.perltidyrc` at the project root is byte-identical to
62+
`~/projects/Agents/templates/perltidyrc`.
63+
64+
Reason: no reason to differ.
65+
66+
---
67+
68+
## Overrides
69+
70+
### Object base class
71+
72+
Universal: `Object::HashBase` for objects.
73+
Here: the in-tree `Test2::Harness::Util::HashBase`.
74+
Reason: the harness bundles its own copy so it has no external object
75+
dependency. Swapping it for the CPAN module would add a prerequisite to a
76+
distribution whose whole job is to run before the rest of the toolchain is
77+
trusted.
78+
79+
### Test layout
80+
81+
Universal: category directories plus `# Test origin:` headers for new
82+
projects, or a `t/AI/` mirror tree.
83+
Here: neither. The existing layout is frozen.
84+
Reason: a released distribution with a large suite; reorganizing `t/` would
85+
churn every file for no shipped benefit and would break the `.yath.rc`
86+
`--default-search glob(t/*)` setting and the integration fixtures that
87+
reference their own paths.
88+
89+
---
90+
91+
## Prior rulings
92+
93+
Recorded in `RULINGS.md`, not here. This file holds declarations and
94+
shared-rule overrides; a ruling is neither. This project has no `RULINGS.md`
95+
— nothing has been ruled on that could be raised again.

AI_AND_LLM_POLICY.txt

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,41 @@ TL;DR:
99
in small chunks that are easy for a human to digest.
1010

1111
No 'vibe' coded contributions where no human understands what was produced
12-
or how it works will be accepted.
12+
or how it works will be accepted. Such things are fine for rapid
13+
experimentation, just not final product.
1314

14-
Can developers use AI/LLM tools to contribute to Test2-Harness?
15+
These rules exist to serve one goal: the humans who maintain this code
16+
later must be able to understand it. Proven contributors have some leeway
17+
where that goal is still met.
1518

16-
Developers who contribute to Test2-Harness are allowed to use whatever
17-
tools they decide are necessary for their work. The project will not
18-
micromanage a contributor's workflow. This includes AI/LLM tools.
19+
Who these rules are for, and how strict they are
20+
21+
The bar every contribution must clear is that the humans maintaining the
22+
code going forward can understand it. The rest of this policy is a guide
23+
for getting new contributors and new contributions over that bar. It is
24+
not an unbreakable law.
25+
26+
Active project members with a track record of quality work have more
27+
freedom. They may deviate from the specifics below — how work is chunked,
28+
whether corrections land as their own commit, how AI use is noted — as
29+
long as what they contribute stays high quality and understandable to the
30+
people who will maintain it.
31+
32+
How much flexibility applies depends on the contribution itself and on
33+
proven contributors being willing to do the review. A larger or looser
34+
contribution is acceptable when someone trusted has actually read it and
35+
stands behind it. When that is not the case, follow the rules as written.
36+
37+
Can developers use AI/LLM tools to contribute?
38+
39+
Developers who contribute are allowed to use whatever tools they decide are
40+
necessary for their work. The project will not micromanage a contributor's
41+
workflow. This includes AI/LLM tools.
1942

2043
AI/LLM code MUST be human vetted
2144

22-
Any code that goes into Test2::Harness should be vetted by a human.
23-
Maintainers who merge pull requests MUST verify the accuracy and utility of
24-
any PR.
45+
Any code that goes in should be vetted by a human. Maintainers who merge
46+
pull requests MUST verify the accuracy and utility of any PR.
2547

2648
If the AI/LLM generated code needs additional edits or corrections
2749
before/during merge, those MUST be a separate commit indicating what human
@@ -42,6 +64,13 @@ No 'vibe' coding
4264
assist, and be used as a tool. But it cannot do all the work, and it cannot
4365
replace your own understanding of the code you are contributing.
4466

67+
Documentation follows the project's documentation policy
68+
69+
Documentation may be AI written, and may even be identifiably so, but it
70+
must meet the same readability and content standards as human-written
71+
documentation. It must be concise, natural to read, useful to its audience,
72+
and free of needless repetition.
73+
4574
Significant AI/LLM code MUST be noted as such.
4675

4776
Code from an LLM/AI should be noted as such, either in the commit, the
@@ -66,10 +95,10 @@ Significant AI/LLM code MUST be noted as such.
6695

6796
The reason for noting it is so that we know if there is a human who
6897
understands it that can be asked questions about the code later. Such a
69-
human does exist when AI is an assistant, it does not exit when AI is the
98+
human does exist when AI is an assistant, it does not exist when AI is the
7099
primary author.
71100

72-
This is entirly due to maintaner preference, it is not intended for an
101+
This is entirely due to maintainer preference, it is not intended for an
73102
exhaustive audit or to single-out contributors who use or reject AI
74103
assistance. Using this rule as an excuse to troll or attack a contributor
75104
will not be tolerated. If you think someone missed the mark on noting AI

CLAUDE.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# Test2-Harness (Legacy)
1+
# MANDATORY
22

3-
Project directory is named `-Legacy` because the harness is being rewritten elsewhere. The CPAN distribution name is still `Test2-Harness`.
3+
You MUST read `AGENTS.md` at the root of this repository before doing ANY
4+
work in this project. This is not optional. No exceptions.
45

5-
## CPAN Testers
6-
Dist name on https://mcp.cpantesters.org/ (MCP server with CPAN Testers data): `Test2-Harness`
7-
See ~/CLAUDE.md for MCP query protocol.
6+
`AGENTS.md` contains the authoritative project instructions, conventions,
7+
and constraints. CLAUDE.md exists solely to point you there.
8+
9+
Do not answer questions, make edits, run commands, or plan work until you
10+
have read `AGENTS.md` in the current session.

CODEX.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# MANDATORY
2+
3+
Read `AGENTS.md` at the root of this repository before doing any work in this
4+
project. It contains the authoritative project instructions, conventions, and
5+
constraints. Follow only the critical documents it references for the task at
6+
hand; do not scan every Markdown file for possible instructions.

Changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
- Add [PruneCruft] to dist.ini so build artifacts (blib/,
44
pm_to_blib, MYMETA.*) no longer leak into release tarballs.
55

6+
- Keep .yath.rc in the release tarball; [PruneCruft] drops every root
7+
dotfile and was undoing the [GatherFile] that ships it.
8+
9+
- Run xt/ author tests at release via [RunExtraTests].
10+
611
1.000172 2026-04-28 21:15:51-07:00 America/Los_Angeles
712

813
- Fix t/integration/help.t to strip the App::Yath::Script::V# detection

Makefile.PL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if ($ENV{AUTOMATED_TESTING}) {
2424

2525
my %WriteMakefileArgs = (
2626
"ABSTRACT" => "A new and improved test harness with better Test2 integration.",
27-
"AUTHOR" => "Chad Granum <exodist\@cpan.org>",
27+
"AUTHOR" => "Chad Granum <exodist7\@gmail.com>",
2828
"CONFIGURE_REQUIRES" => {
2929
"ExtUtils::MakeMaker" => 0
3030
},

0 commit comments

Comments
 (0)