@sentropic/h2a 0.84.0 → 0.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +18 -1
- package/dist/bin.js.map +1 -1
- package/dist/cli-contract.js +2 -2
- package/dist/cli-contract.js.map +1 -1
- package/dist/cli.js +9 -9
- package/dist/cli.js.map +1 -1
- package/dist/vendor/harness/artifacts/validate-verification-run.d.ts +18 -0
- package/dist/vendor/harness/artifacts/validate-verification-run.d.ts.map +1 -0
- package/dist/vendor/harness/artifacts/validate-verification-run.js +160 -0
- package/dist/vendor/harness/artifacts/validate-verification-run.js.map +1 -0
- package/dist/vendor/harness/artifacts/verification-run.d.ts +2 -0
- package/dist/vendor/harness/artifacts/verification-run.d.ts.map +1 -0
- package/dist/vendor/harness/artifacts/verification-run.js +12 -0
- package/dist/vendor/harness/artifacts/verification-run.js.map +1 -0
- package/dist/vendor/harness/artifacts/work-event.d.ts +2 -0
- package/dist/vendor/harness/artifacts/work-event.d.ts.map +1 -0
- package/dist/vendor/harness/artifacts/work-event.js +9 -0
- package/dist/vendor/harness/artifacts/work-event.js.map +1 -0
- package/dist/vendor/harness/bin/harness.d.ts +3 -0
- package/dist/vendor/harness/bin/harness.d.ts.map +1 -0
- package/dist/vendor/harness/bin/harness.js +5 -0
- package/dist/vendor/harness/bin/harness.js.map +1 -0
- package/dist/vendor/harness/branch-md/parse.d.ts +9 -0
- package/dist/vendor/harness/branch-md/parse.d.ts.map +1 -0
- package/dist/vendor/harness/branch-md/parse.js +100 -0
- package/dist/vendor/harness/branch-md/parse.js.map +1 -0
- package/dist/vendor/harness/checks/branch-check.d.ts +15 -0
- package/dist/vendor/harness/checks/branch-check.d.ts.map +1 -0
- package/dist/vendor/harness/checks/branch-check.js +23 -0
- package/dist/vendor/harness/checks/branch-check.js.map +1 -0
- package/dist/vendor/harness/checks/scope-check.d.ts +22 -0
- package/dist/vendor/harness/checks/scope-check.d.ts.map +1 -0
- package/dist/vendor/harness/checks/scope-check.js +34 -0
- package/dist/vendor/harness/checks/scope-check.js.map +1 -0
- package/dist/vendor/harness/cli/args.d.ts +8 -0
- package/dist/vendor/harness/cli/args.d.ts.map +1 -0
- package/dist/vendor/harness/cli/args.js +32 -0
- package/dist/vendor/harness/cli/args.js.map +1 -0
- package/dist/vendor/harness/cli/mechanical-verbs.d.ts +7 -0
- package/dist/vendor/harness/cli/mechanical-verbs.d.ts.map +1 -0
- package/dist/vendor/harness/cli/mechanical-verbs.js +124 -0
- package/dist/vendor/harness/cli/mechanical-verbs.js.map +1 -0
- package/dist/vendor/harness/cli/method-verbs.d.ts +18 -0
- package/dist/vendor/harness/cli/method-verbs.d.ts.map +1 -0
- package/dist/vendor/harness/cli/method-verbs.js +174 -0
- package/dist/vendor/harness/cli/method-verbs.js.map +1 -0
- package/dist/vendor/harness/cli/run.d.ts +10 -0
- package/dist/vendor/harness/cli/run.d.ts.map +1 -0
- package/dist/vendor/harness/cli/run.js +101 -0
- package/dist/vendor/harness/cli/run.js.map +1 -0
- package/dist/vendor/harness/cli/scope.d.ts +9 -0
- package/dist/vendor/harness/cli/scope.d.ts.map +1 -0
- package/dist/vendor/harness/cli/scope.js +31 -0
- package/dist/vendor/harness/cli/scope.js.map +1 -0
- package/dist/vendor/harness/index.d.ts +13 -0
- package/dist/vendor/harness/index.d.ts.map +1 -0
- package/dist/vendor/harness/index.js +23 -0
- package/dist/vendor/harness/index.js.map +1 -0
- package/dist/vendor/harness/profile/profile.d.ts +2 -0
- package/dist/vendor/harness/profile/profile.d.ts.map +1 -0
- package/dist/vendor/harness/profile/profile.js +10 -0
- package/dist/vendor/harness/profile/profile.js.map +1 -0
- package/dist/vendor/harness/profile/sentropic.d.ts +8 -0
- package/dist/vendor/harness/profile/sentropic.d.ts.map +1 -0
- package/dist/vendor/harness/profile/sentropic.js +12 -0
- package/dist/vendor/harness/profile/sentropic.js.map +1 -0
- package/dist/vendor/harness/profile/stub.d.ts +8 -0
- package/dist/vendor/harness/profile/stub.d.ts.map +1 -0
- package/dist/vendor/harness/profile/stub.js +13 -0
- package/dist/vendor/harness/profile/stub.js.map +1 -0
- package/dist/vendor/harness/run/emit.d.ts +22 -0
- package/dist/vendor/harness/run/emit.d.ts.map +1 -0
- package/dist/vendor/harness/run/emit.js +32 -0
- package/dist/vendor/harness/run/emit.js.map +1 -0
- package/dist/vendor/harness/run/work-event.d.ts +20 -0
- package/dist/vendor/harness/run/work-event.d.ts.map +1 -0
- package/dist/vendor/harness/run/work-event.js +27 -0
- package/dist/vendor/harness/run/work-event.js.map +1 -0
- package/dist/vendor/harness/scope/scope-boundary.d.ts +17 -0
- package/dist/vendor/harness/scope/scope-boundary.d.ts.map +1 -0
- package/dist/vendor/harness/scope/scope-boundary.js +50 -0
- package/dist/vendor/harness/scope/scope-boundary.js.map +1 -0
- package/dist/vendor/harness/skills/manifest.d.ts +16 -0
- package/dist/vendor/harness/skills/manifest.d.ts.map +1 -0
- package/dist/vendor/harness/skills/manifest.js +25 -0
- package/dist/vendor/harness/skills/manifest.js.map +1 -0
- package/package.json +4 -4
- package/schema/harness/verification-run.schema.json +154 -0
- package/skills/harness/adopt/SKILL.md +32 -0
- package/skills/harness/brainstorm/SKILL.md +39 -0
- package/skills/harness/debug/SKILL.md +33 -0
- package/skills/harness/plan/SKILL.md +35 -0
- package/skills/harness/review/SKILL.md +33 -0
- package/skills/harness/test/SKILL.md +44 -0
- package/skills/harness/using-harness/SKILL.md +46 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test
|
|
3
|
+
description: Use when adding or evolving tests for a feature/bugfix — applies the sentropic test-pyramid, scoped-test loop, environment isolation, and AI-flaky policy.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# harness/test
|
|
7
|
+
|
|
8
|
+
Native sentropic testing discipline (NOT "tdd" ritual — the act is `test`). Open it with
|
|
9
|
+
`harness test [<scope>] [--category unit|integration|e2e] [--watch]` (records a WorkEvent), then follow
|
|
10
|
+
the loop.
|
|
11
|
+
|
|
12
|
+
## Pyramid
|
|
13
|
+
|
|
14
|
+
70% unit · 20% integration · 10% e2e. Test behaviour, not implementation — query by user-visible
|
|
15
|
+
elements (text/role/label) over test ids. Names: "should <behaviour> when <condition>".
|
|
16
|
+
|
|
17
|
+
## Scoped-test loop (while developing)
|
|
18
|
+
|
|
19
|
+
Run ONLY the test under evolution, on a dedicated test ENV — never `dev`:
|
|
20
|
+
|
|
21
|
+
- API: `make test-api-<suite> SCOPE=tests/<file>.spec.ts ENV=test-<slug>`
|
|
22
|
+
- UI: `make test-ui SCOPE=tests/<file>.spec.ts ENV=test-<slug>`
|
|
23
|
+
- E2E: `make test-e2e E2E_SPEC=tests/<file>.spec.ts API_PORT=… UI_PORT=… MAILDEV_UI_PORT=… ENV=e2e-<slug>`
|
|
24
|
+
|
|
25
|
+
Full gates only at end of lot/branch: `make test-api`, `make test-ui`, `make clean test-e2e`.
|
|
26
|
+
|
|
27
|
+
## Environment isolation (MANDATORY)
|
|
28
|
+
|
|
29
|
+
- NEVER run test campaigns on `ENV=dev` — afterEach hooks purge real data.
|
|
30
|
+
- Branch tests live in the isolated worktree on `ENV=test-<slug>` / `ENV=e2e-<slug>`; `ENV` is the LAST
|
|
31
|
+
make argument.
|
|
32
|
+
- NEVER add timeouts to make a flaky e2e pass — a timeout failure is a real bug (bad selector, race,
|
|
33
|
+
regression). UI waits are <2s except AI generation.
|
|
34
|
+
|
|
35
|
+
## AI-flaky allowlist (non-blocking)
|
|
36
|
+
|
|
37
|
+
Only accept non-systematic provider/network/model nondeterminism, and only with ≥1 success on the same
|
|
38
|
+
commit + command. Record the exact command + failing file + failure signature in `BRANCH.md` and get
|
|
39
|
+
explicit user sign-off before merge. Everything else is blocking.
|
|
40
|
+
|
|
41
|
+
## CI is authority
|
|
42
|
+
|
|
43
|
+
CI was green on main → any branch failure IS a branch problem; never claim "pre-existing". Decide:
|
|
44
|
+
evolution (adapt the test) or regression (fix the code). Local-green / CI-red → trust CI.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-harness
|
|
3
|
+
description: Load FIRST in any sentropic repo — establishes the harness method (branch/scope/test/debug/review/brainstorm/plan) and supersedes superpowers for those acts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Using harness
|
|
7
|
+
|
|
8
|
+
`@sentropic/harness` is the native dev-discipline layer for sentropic repos. Its verbs and `harness/*`
|
|
9
|
+
skills are the SINGLE front door for code-work and PR-workflow. This skill is the index — load it
|
|
10
|
+
before any other so the supersede directive below is in effect.
|
|
11
|
+
|
|
12
|
+
## Supersede directive (MANDATORY)
|
|
13
|
+
|
|
14
|
+
When superpowers (or any other discipline pack) is installed, **`harness/*` takes precedence** for the
|
|
15
|
+
acts it covers. Do NOT invoke the superpowers skill for these — use the harness equivalent:
|
|
16
|
+
|
|
17
|
+
| Act | Use | NOT |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| ideation / spec design | `harness/brainstorm` | superpowers:brainstorming |
|
|
20
|
+
| tests | `harness/test` | superpowers:test-driven-development |
|
|
21
|
+
| debugging | `harness/debug` | superpowers:systematic-debugging |
|
|
22
|
+
| code review | `harness/review` | superpowers:requesting/receiving-code-review |
|
|
23
|
+
| planning | `harness/plan` | superpowers:writing-plans / executing-plans |
|
|
24
|
+
| branch lifecycle | `harness branch init|close` | superpowers:using-git-worktrees / finishing-a-development-branch |
|
|
25
|
+
| scope / verification | `harness verify` · `harness check scope|branch` | superpowers:verification-before-completion |
|
|
26
|
+
| repo onboarding | `harness/adopt` | — |
|
|
27
|
+
|
|
28
|
+
The user may opt to keep superpowers per repo (a profile policy) — absent that opt-out, harness wins.
|
|
29
|
+
superpowers is never a dependency or backend of harness.
|
|
30
|
+
|
|
31
|
+
## The CLI
|
|
32
|
+
|
|
33
|
+
`harness <verb> [<subject>] [--<option>]` — homogeneous with the sibling sentropic CLIs (`stp harness …`):
|
|
34
|
+
|
|
35
|
+
- **Producers** (compute → emit a neutral `VerificationRun`): `check scope|branch`, `verify --category`,
|
|
36
|
+
`audit`, `init`.
|
|
37
|
+
- **Recorders** (emit a neutral `WorkEvent` + point to a skill): `brainstorm`, `test`, `debug`, `review`,
|
|
38
|
+
`plan`, `branch init|close`, `skills install`.
|
|
39
|
+
|
|
40
|
+
A recorder verb does NOT do the thinking — it scaffolds + records, and the `harness/<verb>` skill carries
|
|
41
|
+
the reasoning. Run the verb to open the act, then follow its skill.
|
|
42
|
+
|
|
43
|
+
## Discipline first
|
|
44
|
+
|
|
45
|
+
Process skills (`harness/brainstorm`, `harness/debug`) decide HOW to approach the task — invoke them
|
|
46
|
+
before implementation skills. "Let's build X" → brainstorm first. "Fix this bug" → debug first.
|