Repository navigation
feat(skills): add apm-lifecycle-tests authoring skill - #4127
Merged
Daniel Meppiel (danielmeppiel) merged 4 commits intoNov 20, 2026
Merged
Conversation
Add the repo-local apm-lifecycle-tests skill under .apm/skills and its deployed copy under .agents/skills. The skill guides authors from a named promise to an installed-CLI test with before/after snapshots, the I1-I9 cross-cutting oracles, a failing-before run and a bug-ledger row. References cover today's harness map and the target tests/lifecycle layout, oracle checks, and migrate/merge rules. Templates: a pytest skeleton for today's harness (validated green against the in-tree CLI), a replay row and a ledger row. Evals: 3 content and 20 trigger cases. Point tests.instructions.md (both byte-identical copies) at the skill. The lockfile diff only adds the new deployment rows and the updated instruction hash. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 08:08
…raft (#4077) Fold the approved base draft into the skill while keeping the Step 0-9 structure and every verified path: - SKILL.md: promise, cell factor tuple and owner in Step 1; search-first and extend-over-add in Step 2; instrument table split into today and target columns so machine and catalog names only apply when tests/lifecycle exists; PR evidence row output. - references: family.md TODAY table re-verified (kits, proxies, fixtures, markers); oracles.md strength ladder, anti-oracles, negative control; migrate-and-merge.md equal-copy checklist. - assets/templates.md replaces the three template files: runnable pytest skeleton (green against the in-tree CLI, negative control fails), replay row with CLI-verified commands, ledger row. - evals: approved content and trigger evals. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ger eval (#4077) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The review identified an incorrect locator-resolution recipe for user-scope and native deployments and an overly broad state-preservation rule that rejects supported partial failures.
1 open issue
What changed in this PR
Adds the repo-local apm-lifecycle-tests authoring skill for #4077, giving contributors a shared procedure for testing real CLI command sequences and durable state. It covers the current integration harness and documents the planned lifecycle test family without adding runtime infrastructure.
Changes:
- Defines promise-based test authoring, state assertions, failing-before evidence, and regression-ledger recording.
- Adds harness references, migration guidance, templates, and trigger/content evaluations.
- Deploys the skill, adds test-instruction pointers, and records deployment hashes.
| File | Description |
|---|---|
apm.lock.yaml |
Records skill deployments and updated instruction hashes. |
.github/instructions/tests.instructions.md |
Adds the deployed authoring-skill pointer. |
.apm/skills/apm-lifecycle-tests/SKILL.md |
Defines the lifecycle test authoring procedure. |
.apm/skills/apm-lifecycle-tests/references/oracles.md |
Describes state assertions and evidence requirements. |
.apm/skills/apm-lifecycle-tests/references/migrate-and-merge.md |
Defines migration and consolidation safeguards. |
.apm/skills/apm-lifecycle-tests/references/family.md |
Maps current helpers and the planned test layout. |
.apm/skills/apm-lifecycle-tests/evals/trigger-evals.json |
Adds 20 skill-selection evaluation cases. |
.apm/skills/apm-lifecycle-tests/evals/README.md |
Documents evaluation scoring and ship gates. |
.apm/skills/apm-lifecycle-tests/evals/content-evals.json |
Adds three authoring and scope-evaluation scenarios. |
.apm/skills/apm-lifecycle-tests/assets/templates/test_lifecycle_promise.py.txt |
Provides a non-collected pytest starter. |
.apm/skills/apm-lifecycle-tests/assets/templates/replay-row.yaml |
Provides a planned-family replay template. |
.apm/skills/apm-lifecycle-tests/assets/templates/ledger-row.json |
Provides a regression-ledger entry template. |
.apm/instructions/tests.instructions.md |
Adds the source authoring-skill pointer. |
.agents/skills/apm-lifecycle-tests/SKILL.md |
Deploys the authoring procedure. |
.agents/skills/apm-lifecycle-tests/references/oracles.md |
Deploys assertion and evidence guidance. |
.agents/skills/apm-lifecycle-tests/references/migrate-and-merge.md |
Deploys migration safeguards. |
.agents/skills/apm-lifecycle-tests/references/family.md |
Deploys the harness and family map. |
.agents/skills/apm-lifecycle-tests/evals/trigger-evals.json |
Deploys skill-selection evaluation cases. |
.agents/skills/apm-lifecycle-tests/evals/README.md |
Deploys evaluation instructions. |
.agents/skills/apm-lifecycle-tests/evals/content-evals.json |
Deploys content-evaluation scenarios. |
.agents/skills/apm-lifecycle-tests/assets/templates/test_lifecycle_promise.py.txt |
Deploys the pytest starter. |
.agents/skills/apm-lifecycle-tests/assets/templates/replay-row.yaml |
Deploys the replay template. |
.agents/skills/apm-lifecycle-tests/assets/templates/ledger-row.json |
Deploys the ledger-entry template. |
Review effort: Balanced
…arget branch (#4077) - evals/README.md: trigger evals run blind (train 6/6 and 0/6, validation 4/4 and 0/4; gate passes) and content evals C1 and C3 with and without the skill, scored per item with a delta verdict. - Target-family branch (only when tests/lifecycle is present): commands go through driver.run; replay rows live in tests/lifecycle/replay/rows and are run by rows.py (RowReplay); promise ids resolve as P-INV-I1..I9 and P-LAW-<ledger property id> until a catalog exists; the row template matches the row schema (run/exit and pair steps); the oracle note states the current family's oracle strength; model, oracles, receipts and obligations modules are named. Machines, scenarios, security tables and journeys are marked planned. The today-harness branch is unchanged. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
5 of 10 tasks
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-redesigned-doodle
branch
November 20, 2026 08:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds the repo-local skill
apm-lifecycle-tests: a shared authoring procedure for lifecycle tests (tests that drive the realapmCLI through command sequences and check durable state). It names the promise, picks the instrument, writes the failing-before test with snapshot and I1-I9 invariant oracles, and records the bug-ledger row. A one-paragraph pointer intests.instructions.mdroutes authors to it.Problem (WHY)
--no-policyby default, some patch the owner under test, and some files are named by phase or gap instead of promise or owner ([FEATURE] Lifecycle test authoring skill (apm-lifecycle-tests) #4077).tests/lifecycle/family.Approach (WHAT)
SKILL.md(251 lines, description 855 chars)tests/lifecycle/conftest.py), name promise + cell factor tuple + owner, derive cells and search first, pick instrument (today vs target columns), write test, run red, fix at owner, run green, ledger row, execute printed hints. I1-I9 table, PR evidence-row output.references/family.mdls/grep) and the TARGETtests/lifecycle/layout, marked in progress.references/oracles.mdreferences/migrate-and-merge.md*_lifecycle*.pyfiles.assets/templates.mdevals/docs-sync/evals. Run and recorded inevals/README.md: trigger train 6/6 + 0/6, validation 4/4 + 0/4 (gate passes); C1 shows a clear with/without delta; C3 shows no over-trigger.Implementation (HOW)
.apm/skills/apm-lifecycle-tests/**is the source;.agents/skills/apm-lifecycle-tests/**is the deployed copy produced byuv run apm install(identical;diff -rclean).assets/templates.md, so pytest never collects it from the skill tree. It was validated by extracting it intotests/integration/, running it green against the in-tree CLI, running ruff on it, running a negative control (deleting the user file makes it fail), then removing the copies.P-INV/P-LAWids) appear only inside "whentests/lifecycle/is present" branches; machines, scenarios, security tables and journeys are marked planned.apm.lock.yaml: only additive rows for the new skill plus the updated hash of.github/instructions/tests.instructions.md. The lockfile header stays at the committed generator version (the in-tree install offered a one-time format upgrade; that is left for a separate change).--help: the replay row usesapm approve <pkg>/apm deny <pkg>andapm installwithout--yes, which match the current CLI.Trade-offs
.pyfile: avoids an extra collected test and lint surface inside the skill tree, at the cost of not being collected by CI. Mitigated by the extract-and-run validation above.references/.tests/lifecycle/exists, so the skill is usable immediately.Benefits
tests.instructions.md.tests/fixtures/lifecycle_bug_ledger.json.tests/lifecycle/automatically when it lands.Issue and approved scope
Issue: Fixes #4077
Human scope-approval comment: #4077 (comment)
This PR completes the issue: skill + deployed copy, references, templates, evals, and the pointer in both
tests.instructions.mdcopies. Out of scope (per the record):src/, newtests/lifecycle/infrastructure, the test-coverage-expert persona (#4078), moving or deleting tests.Type of change
Testing
Validation commands and results
assets/templates.mdtotests/integration/test_zz_template_probe_lifecycle.py;APM_BINARY_PATH="$(uv run which apm)" uv run --extra dev pytest <it> -n 0 -q1 passed in 2.44s(copy removed)1 failed(FileNotFoundError on the sibling file)tests/,src/,.apm/,.github/path exists; 30+ symbols (_new_scenario,PolicyScopeWorld,requests_to,apm_engine_command,_EXPECTED_RULE_ID_TEXT,MutationCase, ...) found by grep; markers found inpyproject.tomlapm approve/deny/install/update/pack --helpapm packexit codes 3/4/5 confirmeduv run --extra dev ruff check <copy> && uv run --extra dev ruff format --check <copy>All checks passed!/1 file already formatteduv run apm installthendiff -r .apm/skills/apm-lifecycle-tests .agents/skills/apm-lifecycle-testsuv run --frozen apm audit --ciAll 11 check(s) passed(drift: no drift detected)cmp .apm/instructions/tests.instructions.md .github/instructions/tests.instructions.mdapm-lifecycle-testsvalid and equals dir nameisascii()over every new file and the added instruction linesmain; added lines are ASCII)json.loadon both eval filesuv run --extra dev pytest tests/quality tests/unit/test_project_licensing.py tests/unit/scripts/test_architecture_registry_conflicts.py -q242 passed, 1 failed; the failure was a temp-repogit commitblocked by this host's injected signing config. Rerun with the hostGIT_CONFIG_*variables unset:2 passed.pyfiles changedScenario evidence
apm uninstall,audit --cipassesdiff -rclean;apm audit --ci11/11How to test
uv run apm install && diff -r .apm/skills/apm-lifecycle-tests .agents/skills/apm-lifecycle-testsuv run --frozen apm audit --cipasses.assets/templates.mdtotests/integration/test_tmp_lifecycle.py, runAPM_BINARY_PATH="$(uv run which apm)" uv run --extra dev pytest tests/integration/test_tmp_lifecycle.py -n 0 -q, then delete the copy.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regeneratedCo-authored-by: Copilot [email protected]