agentplugged 0.0.0-stage → 1.0.0
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/LICENSE +110 -0
- package/LICENSE-METHOD +21 -0
- package/README.md +250 -2
- package/dist/agent-commands.js +46532 -0
- package/dist/bin.js +13 -0
- package/dist/cli.js +44 -0
- package/dist/esm.js +920 -0
- package/dist/forge-follow.js +231 -0
- package/dist/helpers.js +18526 -0
- package/dist/helpers2.js +1 -0
- package/dist/launcher-env.js +13 -0
- package/dist/launcher.js +308 -0
- package/dist/libsodium-wrappers.js +4384 -0
- package/dist/libsodium-wrappers2.js +4384 -0
- package/dist/main.js +17732 -0
- package/dist/method/LICENSE +21 -0
- package/dist/method/agents/alex/SKILL.md +87 -0
- package/dist/method/agents/alex/agent.yaml +94 -0
- package/dist/method/agents/chloe/SKILL.md +97 -0
- package/dist/method/agents/chloe/agent.yaml +87 -0
- package/dist/method/agents/ethan/SKILL.md +55 -0
- package/dist/method/agents/ethan/agent.yaml +94 -0
- package/dist/method/agents/hugo/SKILL.md +52 -0
- package/dist/method/agents/hugo/agent.yaml +93 -0
- package/dist/method/agents/iris/SKILL.md +69 -0
- package/dist/method/agents/iris/agent.yaml +86 -0
- package/dist/method/agents/izzy/SKILL.md +137 -0
- package/dist/method/agents/izzy/agent.yaml +104 -0
- package/dist/method/agents/jade/SKILL.md +54 -0
- package/dist/method/agents/jade/agent.yaml +94 -0
- package/dist/method/agents/julien/SKILL.md +96 -0
- package/dist/method/agents/julien/agent.yaml +95 -0
- package/dist/method/agents/lina/SKILL.md +54 -0
- package/dist/method/agents/lina/agent.yaml +94 -0
- package/dist/method/agents/lou/SKILL.md +67 -0
- package/dist/method/agents/lou/agent.yaml +84 -0
- package/dist/method/agents/maya/SKILL.md +82 -0
- package/dist/method/agents/maya/agent.yaml +98 -0
- package/dist/method/agents/milo/SKILL.md +79 -0
- package/dist/method/agents/milo/agent.yaml +80 -0
- package/dist/method/agents/noah/SKILL.md +80 -0
- package/dist/method/agents/noah/agent.yaml +73 -0
- package/dist/method/agents/noah/references/conduct.md +98 -0
- package/dist/method/agents/noah/references/decisions.md +122 -0
- package/dist/method/agents/noah/references/environment.md +72 -0
- package/dist/method/agents/noah/references/facts.md +13 -0
- package/dist/method/agents/noah/references/journey.md +80 -0
- package/dist/method/agents/noah/references/team.md +195 -0
- package/dist/method/agents/omar/SKILL.md +92 -0
- package/dist/method/agents/omar/agent.yaml +86 -0
- package/dist/method/agents/quentin/SKILL.md +78 -0
- package/dist/method/agents/quentin/agent.yaml +82 -0
- package/dist/method/agents/sam/SKILL.md +54 -0
- package/dist/method/agents/sam/agent.yaml +94 -0
- package/dist/method/agents/stella/SKILL.md +80 -0
- package/dist/method/agents/stella/agent.yaml +89 -0
- package/dist/method/agents/tess/SKILL.md +64 -0
- package/dist/method/agents/tess/agent.yaml +94 -0
- package/dist/method/agents/zoe/SKILL.md +85 -0
- package/dist/method/agents/zoe/agent.yaml +91 -0
- package/dist/method/doctor.yaml +1029 -0
- package/dist/method/models.yaml +73 -0
- package/dist/method/skills/.gitkeep +0 -0
- package/dist/method/skills/acceptance-qa/SKILL.md +40 -0
- package/dist/method/skills/acceptance-qa/references/run.md +54 -0
- package/dist/method/skills/acceptance-qa/references/scenarios.md +32 -0
- package/dist/method/skills/acceptance-qa/references/verdicts.md +43 -0
- package/dist/method/skills/api-e2e-tests/SKILL.md +61 -0
- package/dist/method/skills/api-e2e-tests/references/ci.md +33 -0
- package/dist/method/skills/api-e2e-tests/references/frameworks.md +58 -0
- package/dist/method/skills/api-e2e-tests/references/generate.md +67 -0
- package/dist/method/skills/audit-pillars/SKILL.md +28 -0
- package/dist/method/skills/audit-pillars/references/accessibility.md +13 -0
- package/dist/method/skills/audit-pillars/references/architecture.md +13 -0
- package/dist/method/skills/audit-pillars/references/dependencies.md +13 -0
- package/dist/method/skills/audit-pillars/references/format.md +20 -0
- package/dist/method/skills/audit-pillars/references/interface.md +13 -0
- package/dist/method/skills/audit-pillars/references/method.md +33 -0
- package/dist/method/skills/audit-pillars/references/performance.md +17 -0
- package/dist/method/skills/audit-pillars/references/quality.md +11 -0
- package/dist/method/skills/audit-pillars/references/security.md +13 -0
- package/dist/method/skills/audit-pillars/references/tests.md +17 -0
- package/dist/method/skills/chain-stories/SKILL.md +30 -0
- package/dist/method/skills/chain-stories/references/attempts.md +19 -0
- package/dist/method/skills/chain-stories/references/stops.md +27 -0
- package/dist/method/skills/check-readiness/SKILL.md +34 -0
- package/dist/method/skills/check-readiness/references/judge.md +21 -0
- package/dist/method/skills/check-readiness/references/settle.md +17 -0
- package/dist/method/skills/check-requirements/SKILL.md +97 -0
- package/dist/method/skills/check-requirements/references/engine-proofs.md +43 -0
- package/dist/method/skills/check-requirements/references/proofs-and-gaps.md +45 -0
- package/dist/method/skills/correct-course/SKILL.md +15 -0
- package/dist/method/skills/correct-course/references/gestures.md +20 -0
- package/dist/method/skills/correct-course/references/starts.md +18 -0
- package/dist/method/skills/correct-course/references/steps.md +14 -0
- package/dist/method/skills/critique-deliverable/SKILL.md +25 -0
- package/dist/method/skills/critique-deliverable/references/assumption-audit.md +11 -0
- package/dist/method/skills/critique-deliverable/references/choose.md +27 -0
- package/dist/method/skills/critique-deliverable/references/compare-existing.md +13 -0
- package/dist/method/skills/critique-deliverable/references/devils-advocate.md +13 -0
- package/dist/method/skills/critique-deliverable/references/divergence.md +15 -0
- package/dist/method/skills/critique-deliverable/references/domain-expert.md +14 -0
- package/dist/method/skills/critique-deliverable/references/extreme-user.md +13 -0
- package/dist/method/skills/critique-deliverable/references/failure-modes.md +13 -0
- package/dist/method/skills/critique-deliverable/references/first-principles.md +12 -0
- package/dist/method/skills/critique-deliverable/references/format.md +25 -0
- package/dist/method/skills/critique-deliverable/references/gestures.md +24 -0
- package/dist/method/skills/critique-deliverable/references/inversion.md +13 -0
- package/dist/method/skills/critique-deliverable/references/judgment.md +14 -0
- package/dist/method/skills/critique-deliverable/references/pre-mortem.md +12 -0
- package/dist/method/skills/critique-deliverable/references/reconcile.md +15 -0
- package/dist/method/skills/critique-deliverable/references/red-team.md +12 -0
- package/dist/method/skills/critique-deliverable/references/reframe.md +12 -0
- package/dist/method/skills/critique-deliverable/references/second-order.md +12 -0
- package/dist/method/skills/critique-deliverable/references/socratic.md +15 -0
- package/dist/method/skills/critique-deliverable/references/steelman.md +13 -0
- package/dist/method/skills/critique-deliverable/references/subtraction.md +12 -0
- package/dist/method/skills/deep-research/SKILL.md +43 -0
- package/dist/method/skills/deep-research/assets/page-template.md +37 -0
- package/dist/method/skills/deep-research/references/candidates.md +29 -0
- package/dist/method/skills/deep-research/references/external.md +37 -0
- package/dist/method/skills/deep-research/references/page-format.md +51 -0
- package/dist/method/skills/deep-research/references/types.md +31 -0
- package/dist/method/skills/develop-story/SKILL.md +211 -0
- package/dist/method/skills/develop-story/evals/cases.yaml +45 -0
- package/dist/method/skills/develop-story/references/acceptance-tests.md +73 -0
- package/dist/method/skills/develop-story/references/self-check.md +46 -0
- package/dist/method/skills/diagnose-bug/SKILL.md +73 -0
- package/dist/method/skills/diagnose-bug/references/hypotheses.md +45 -0
- package/dist/method/skills/diagnose-bug/references/probes.md +40 -0
- package/dist/method/skills/generate-knowledge-base/SKILL.md +251 -0
- package/dist/method/skills/generate-knowledge-base/assets/guide-template.md +49 -0
- package/dist/method/skills/generate-knowledge-base/assets/index-template.md +58 -0
- package/dist/method/skills/generate-knowledge-base/assets/page-template.md +61 -0
- package/dist/method/skills/generate-knowledge-base/assets/release-notes-template.md +38 -0
- package/dist/method/skills/generate-knowledge-base/references/kb-checklist.md +49 -0
- package/dist/method/skills/generate-knowledge-base/references/living-docs.md +81 -0
- package/dist/method/skills/generate-knowledge-base/references/repository-scan.md +48 -0
- package/dist/method/skills/generate-knowledge-base/references/reuse-map.md +21 -0
- package/dist/method/skills/ideation/SKILL.md +44 -0
- package/dist/method/skills/ideation/assets/session-template.md +46 -0
- package/dist/method/skills/ideation/references/choose.md +21 -0
- package/dist/method/skills/ideation/references/close.md +17 -0
- package/dist/method/skills/ideation/references/converge.md +24 -0
- package/dist/method/skills/ideation/references/gestures.md +15 -0
- package/dist/method/skills/ideation/references/stances.md +21 -0
- package/dist/method/skills/ideation/references/techniques-borrowed.md +8 -0
- package/dist/method/skills/ideation/references/techniques-deep.md +12 -0
- package/dist/method/skills/ideation/references/techniques-frames.md +12 -0
- package/dist/method/skills/ideation/references/techniques-futures.md +8 -0
- package/dist/method/skills/ideation/references/techniques-limits.md +9 -0
- package/dist/method/skills/ideation/references/techniques-people.md +7 -0
- package/dist/method/skills/ideation/references/techniques-sparks.md +10 -0
- package/dist/method/skills/ideation/references/techniques-together.md +11 -0
- package/dist/method/skills/improve-code/SKILL.md +74 -0
- package/dist/method/skills/improve-code/references/axes.md +45 -0
- package/dist/method/skills/improve-session/SKILL.md +47 -0
- package/dist/method/skills/order-merges/SKILL.md +71 -0
- package/dist/method/skills/pitch/SKILL.md +40 -0
- package/dist/method/skills/pitch/assets/deck-template.md +31 -0
- package/dist/method/skills/pitch/assets/design-template.md +45 -0
- package/dist/method/skills/pitch/assets/narrative-template.md +40 -0
- package/dist/method/skills/pitch/references/deck-types.md +17 -0
- package/dist/method/skills/pitch/references/deck.md +24 -0
- package/dist/method/skills/pitch/references/design-implementation.md +25 -0
- package/dist/method/skills/pitch/references/design-methods.md +45 -0
- package/dist/method/skills/pitch/references/design-thinking.md +28 -0
- package/dist/method/skills/pitch/references/story-frameworks.md +39 -0
- package/dist/method/skills/pitch/references/story.md +22 -0
- package/dist/method/skills/plan-sprint/SKILL.md +162 -0
- package/dist/method/skills/quick-lane/SKILL.md +143 -0
- package/dist/method/skills/resolve-merge-conflict/SKILL.md +83 -0
- package/dist/method/skills/review-story/SKILL.md +96 -0
- package/dist/method/skills/review-story/evals/cases.yaml +59 -0
- package/dist/method/skills/review-story/references/amend-story.md +16 -0
- package/dist/method/skills/review-story/references/export.md +20 -0
- package/dist/method/skills/review-story/references/format.md +33 -0
- package/dist/method/skills/review-story/references/free-review.md +22 -0
- package/dist/method/skills/review-story/references/judge.md +44 -0
- package/dist/method/skills/review-story/references/lens-adversarial.md +15 -0
- package/dist/method/skills/review-story/references/lens-edge-cases.md +24 -0
- package/dist/method/skills/review-story/references/lens-prose.md +11 -0
- package/dist/method/skills/review-story/references/lens-relevance.md +13 -0
- package/dist/method/skills/review-story/references/lens-security.md +10 -0
- package/dist/method/skills/review-story/references/lens-structure.md +16 -0
- package/dist/method/skills/review-story/references/lens-verification-gaps.md +13 -0
- package/dist/method/skills/review-story/references/pass-assertions.md +17 -0
- package/dist/method/skills/review-story/references/pass-removals.md +13 -0
- package/dist/method/skills/review-tests/SKILL.md +32 -0
- package/dist/method/skills/review-tests/references/check.md +25 -0
- package/dist/method/skills/review-tests/references/grid.md +27 -0
- package/dist/method/skills/round-table/SKILL.md +31 -0
- package/dist/method/skills/round-table/evals/cases.yaml +27 -0
- package/dist/method/skills/round-table/references/cast.md +14 -0
- package/dist/method/skills/round-table/references/gestures.md +24 -0
- package/dist/method/skills/round-table/references/guests.md +17 -0
- package/dist/method/skills/round-table/references/independence.md +21 -0
- package/dist/method/skills/round-table/references/rooms.md +29 -0
- package/dist/method/skills/round-table/references/three-views.md +17 -0
- package/dist/method/skills/round-table/references/turns.md +19 -0
- package/dist/method/skills/run-retrospective/SKILL.md +201 -0
- package/dist/method/skills/security-review-architecture/SKILL.md +129 -0
- package/dist/method/skills/security-review-architecture/assets/architecture-review-template.md +47 -0
- package/dist/method/skills/security-review-architecture/references/spec-review.md +48 -0
- package/dist/method/skills/setup-ci/SKILL.md +121 -0
- package/dist/method/skills/setup-ci/assets/github-actions.yml +52 -0
- package/dist/method/skills/setup-ci/assets/gitlab-ci.yml +34 -0
- package/dist/method/skills/split-into-stories/SKILL.md +205 -0
- package/dist/method/skills/split-into-stories/assets/epic.md.tmpl +31 -0
- package/dist/method/skills/split-into-stories/assets/story.md.tmpl +36 -0
- package/dist/method/skills/strategy/SKILL.md +44 -0
- package/dist/method/skills/strategy/assets/innovation-template.md +60 -0
- package/dist/method/skills/strategy/assets/problem-template.md +54 -0
- package/dist/method/skills/strategy/references/costs.md +28 -0
- package/dist/method/skills/strategy/references/gestures.md +24 -0
- package/dist/method/skills/strategy/references/innovate-frameworks.md +48 -0
- package/dist/method/skills/strategy/references/innovate.md +40 -0
- package/dist/method/skills/strategy/references/solve-methods.md +45 -0
- package/dist/method/skills/strategy/references/solve.md +35 -0
- package/dist/method/skills/test-idea/SKILL.md +29 -0
- package/dist/method/skills/test-idea/assets/forge-template.md +27 -0
- package/dist/method/skills/test-idea/assets/prfaq-template.md +33 -0
- package/dist/method/skills/test-idea/references/bets.md +14 -0
- package/dist/method/skills/test-idea/references/concept.md +24 -0
- package/dist/method/skills/test-idea/references/faq.md +34 -0
- package/dist/method/skills/test-idea/references/forge.md +36 -0
- package/dist/method/skills/test-idea/references/personas.md +23 -0
- package/dist/method/skills/test-idea/references/prfaq.md +33 -0
- package/dist/method/skills/test-idea/references/verdict.md +26 -0
- package/dist/method/skills/workshop/SKILL.md +40 -0
- package/dist/method/skills/workshop/references/analyze.md +36 -0
- package/dist/method/skills/workshop/references/create.md +45 -0
- package/dist/method/skills/workshop/references/customize.md +45 -0
- package/dist/method/skills/workshop/references/evaluate.md +44 -0
- package/dist/method/skills/workshop/references/rules.md +35 -0
- package/dist/method/skills/write-architecture/SKILL.md +233 -0
- package/dist/method/skills/write-architecture/assets/architecture-template.md +110 -0
- package/dist/method/skills/write-architecture/references/guard.md +40 -0
- package/dist/method/skills/write-architecture/references/self-check.md +47 -0
- package/dist/method/skills/write-brand/SKILL.md +36 -0
- package/dist/method/skills/write-brand/assets/brand-template.md +59 -0
- package/dist/method/skills/write-brand/assets/identity-page.html +141 -0
- package/dist/method/skills/write-brand/assets/identity-template.md +132 -0
- package/dist/method/skills/write-brand/references/identity.md +38 -0
- package/dist/method/skills/write-brand/references/platform.md +29 -0
- package/dist/method/skills/write-brand/references/rules.md +43 -0
- package/dist/method/skills/write-brief/SKILL.md +171 -0
- package/dist/method/skills/write-brief/assets/brief-template.md +87 -0
- package/dist/method/skills/write-brief/assets/research-note-template.md +43 -0
- package/dist/method/skills/write-brief/references/brief-checklist.md +37 -0
- package/dist/method/skills/write-content/SKILL.md +233 -0
- package/dist/method/skills/write-content/assets/campaign-template.md +94 -0
- package/dist/method/skills/write-content/assets/content-template.md +76 -0
- package/dist/method/skills/write-content/references/content-checklist.md +67 -0
- package/dist/method/skills/write-positioning/SKILL.md +218 -0
- package/dist/method/skills/write-positioning/assets/page-template.md +85 -0
- package/dist/method/skills/write-positioning/assets/positioning-template.md +79 -0
- package/dist/method/skills/write-positioning/references/positioning-checklist.md +44 -0
- package/dist/method/skills/write-positioning/references/seo-checklist.md +62 -0
- package/dist/method/skills/write-prd/SKILL.md +204 -0
- package/dist/method/skills/write-prd/assets/prd-template.md +121 -0
- package/dist/method/skills/write-prd/evals/cases.yaml +46 -0
- package/dist/method/skills/write-prd/references/prd-checklist.md +68 -0
- package/dist/method/skills/write-sales/SKILL.md +236 -0
- package/dist/method/skills/write-sales/assets/offer-template.md +93 -0
- package/dist/method/skills/write-sales/assets/sequence-template.md +110 -0
- package/dist/method/skills/write-sales/references/before-you-send.md +54 -0
- package/dist/method/skills/write-sales/references/sales-checklist.md +71 -0
- package/dist/method/skills/write-spec/SKILL.md +25 -0
- package/dist/method/skills/write-spec/assets/spec-template.md +59 -0
- package/dist/method/skills/write-spec/references/spec-guide.md +47 -0
- package/dist/method/skills/write-ux-spec/SKILL.md +191 -0
- package/dist/method/skills/write-ux-spec/assets/mockup-page.html +36 -0
- package/dist/method/skills/write-ux-spec/assets/ux-template.md +206 -0
- package/dist/method/skills/write-ux-spec/references/accessibility-check.md +74 -0
- package/dist/method/skills/write-ux-spec/references/mockups.md +71 -0
- package/dist/method/skills/write-ux-spec/references/tokens-and-sketches.md +83 -0
- package/dist/method/skills/write-ux-spec/references/ux-checklist.md +74 -0
- package/dist/product-root.js +21527 -0
- package/dist/rolldown-runtime.js +38 -0
- package/dist/webauthn-verify.js +1 -0
- package/dist/webauthn-verify2.js +107 -0
- package/dist/webauthn.js +9798 -0
- package/package.json +68 -3
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: develop-story
|
|
3
|
+
description: Build one validated story from the story alone, in its own branch, tests first, criterion by criterion, up to a result that moves it to review. Run by the developers.
|
|
4
|
+
metadata:
|
|
5
|
+
agent: sam ethan hugo lina jade
|
|
6
|
+
phase: build
|
|
7
|
+
---
|
|
8
|
+
# Develop a story
|
|
9
|
+
|
|
10
|
+
A story is written so that a developer who reads nothing else can build it. This skill holds you
|
|
11
|
+
to that: you start from a fresh context, read the story and only what it cites, build it in its
|
|
12
|
+
own working copy, prove each acceptance criterion with a test, and hand back a structured result.
|
|
13
|
+
What the story does not say is never filled from memory or from a conversation: it is a question
|
|
14
|
+
for the creator.
|
|
15
|
+
|
|
16
|
+
This skill belongs to the developers: Sam and Ethan (backend), Hugo and Lina (frontend), Jade
|
|
17
|
+
(mobile), and any developer the creator added with a specialty of their own. Run it under your
|
|
18
|
+
own id: `agent: <your id>` in every MCP call. Each run is one instance of a developer, the pair
|
|
19
|
+
(developer, story), for example "Sam · story 4-2". Work in the creator's language; keep
|
|
20
|
+
identifiers (`1-2`, `EF-n`, `AD-n`, `G-…`) as they are. Build in the stack the architecture and
|
|
21
|
+
the knowledge base describe, whatever it is.
|
|
22
|
+
|
|
23
|
+
- **Input:** one validated story of `.agentplugged/stories/`, and the documents it cites.
|
|
24
|
+
- **The creator's Git workflow, not the method's:** read `git` in `state.next` or `state.get` before you start. The story lands on the branch it names (the integration branch when there is one, else the main branch). With no branch per story, `story.start` returns the main working folder (`story_branch: false`): build and commit there, and there is no pull request. With `git.merge` `direct`, `story.pr` answers `not_wanted`: send the story to review, the engine merges the branch itself. With no CI (`git.ci` `none`) read none; with no review (`git.review` false) the story goes straight to its merge point.
|
|
25
|
+
- **Output:** the code and the tests of the story, committed on its branch (`feat/<id>-<slug>`),
|
|
26
|
+
and a structured result. No pull request, no push and no merge here: the pull request is a later
|
|
27
|
+
step, the review belongs to Quentin and Chloé, the merge to the creator.
|
|
28
|
+
- **Annex:** `references/self-check.md`, in this skill's folder (also under
|
|
29
|
+
`.agentplugged/skills/develop-story/`): the checks to pass before handing over.
|
|
30
|
+
|
|
31
|
+
## Before you start
|
|
32
|
+
|
|
33
|
+
- Forget the conversation that led here. What you know of the story comes from its file, the
|
|
34
|
+
documents it cites and the journal (`state.get`); anything else is an assumption, and an
|
|
35
|
+
assumption that changes what gets built is a decision for the creator.
|
|
36
|
+
- One story per run. When the creator names none, `npx agentplugged next --json` gives the story
|
|
37
|
+
and the agent (`step: build`); a story whose `agent` is not you is not yours to take.
|
|
38
|
+
- Not an active agent of the product (`state.get`)? Say so and go to step 9 with `partial`.
|
|
39
|
+
- A small change (one story, no public interface, no data migration, no dependency added, fewer
|
|
40
|
+
than 5 files touched) may take the quick lane instead, with the `quick-lane` skill: the story
|
|
41
|
+
then carries the mode (`fast_track` in `state.get`). A story that left the quick lane
|
|
42
|
+
(`fast_track.status` is `left`) is built here, in the full lane, once the creator answered the
|
|
43
|
+
checkpoint that explains the exit: the way back is final. Whichever lane, the tests, the
|
|
44
|
+
independent review and the creator's validation before the merge are the same.
|
|
45
|
+
|
|
46
|
+
## Decisions
|
|
47
|
+
|
|
48
|
+
The creator owns the intent of the story; you own how it is built.
|
|
49
|
+
|
|
50
|
+
- **Open:** when the story can be read two ways that lead to different code, when its intent,
|
|
51
|
+
its acceptance criteria, its context or a document it cites contradict each other, or when the
|
|
52
|
+
work needs a change of scope, a new dependency or anything irreversible: `checkpoint.open`
|
|
53
|
+
with `type: decision`, a risk, `story` set to the story, a title, a summary that quotes the
|
|
54
|
+
passages in conflict, two to four options (each with an `id`, a `label` and its
|
|
55
|
+
`consequence` for the people who use the product), your `recommendation`, and `blocks` with
|
|
56
|
+
`story.review` and `story.complete`. Never guess, never pick the option that is easiest to code.
|
|
57
|
+
- **Dependencies:** install what the work needs, without opening a decision; the creator's
|
|
58
|
+
setting (`installs.mode`), the plain form of the command in the story's working copy
|
|
59
|
+
(`cd <working copy> && <command>`, installations grouped) and what the architecture plans
|
|
60
|
+
(`installs.declared` of `state.get`) are in the constitution, "Installing dependencies". Say what you installed and why in your result.
|
|
61
|
+
A package the architecture does not plan and that lasts is an update of the architecture,
|
|
62
|
+
approved again: never edit its `dependencies` to get around that. A change of scope, or a
|
|
63
|
+
dependency that changes what the product is, stays a decision, as above.
|
|
64
|
+
- **Meanwhile:** go on with the criteria the decision does not touch, say which wait in
|
|
65
|
+
`story.progress`; when nothing else is left, end with `partial`.
|
|
66
|
+
- **Apply:** once `state.get` shows the checkpoint resolved, read its `resolution` in full (`state.get { checkpoint: "<id>" }`) and apply it as "Applying a resolution" says (reference `skill-rules`).
|
|
67
|
+
|
|
68
|
+
When you had marked the story `blocked` (`story.status`) while it waited, call `story.status`
|
|
69
|
+
with `in_progress` again before you go on: only a story in progress moves to review with your
|
|
70
|
+
result.
|
|
71
|
+
- **The intent stays as it is.** Never edit the `## Intent` section of the story (`## Intention`
|
|
72
|
+
in French), not even a typo: it belongs to the creator once the breakdown is approved, and
|
|
73
|
+
moving the story to review is refused while its branch changes it (`STORY_INTENT_CHANGED`).
|
|
74
|
+
When the intent itself is wrong, open a decision; when the creator changes it, a new `document`
|
|
75
|
+
checkpoint on the story makes it count. A gap in the other sections goes to Izzy through the
|
|
76
|
+
creator; never rewrite them to fit what you built.
|
|
77
|
+
|
|
78
|
+
## Resume
|
|
79
|
+
|
|
80
|
+
A story may take several runs. Each run starts fresh: never rely on what a previous run kept in
|
|
81
|
+
mind.
|
|
82
|
+
|
|
83
|
+
- `story.start` resumes a story you started (`status: resumed`) and gives its `workdir` again;
|
|
84
|
+
another developer's story is refused (`started_by_other`).
|
|
85
|
+
- Where it stands comes from `state.get` (`state.get { story: "<id>" }` gives all of `stories.<id>`) and from `git log` of its
|
|
86
|
+
branch: the commits say which criteria are done. Pick up at the first criterion without a
|
|
87
|
+
passing test.
|
|
88
|
+
- After a review or a red CI, fixing findings is another item of your menu (`FX`), on the same
|
|
89
|
+
branch. When a review pass is closed (`state.next` gives `review_triage`, or `state.get` shows
|
|
90
|
+
`review.untriaged` on the story), read its findings with `review.get` and sort each one with
|
|
91
|
+
`review.triage` before anything else: `fix` (you fix it on the branch), `defer` (record it
|
|
92
|
+
first with `plan.defer`, `origin: review`, the story, and give its `D-…`), or `reject` (with
|
|
93
|
+
your reason), each with its root cause in one line, the same words for findings of one cause.
|
|
94
|
+
The merge waits until every finding is sorted. Never review your own story. A deviation
|
|
95
|
+
reported on the story (`deviations` in `state.get`, `V-…`) is such a finding: fix it on the
|
|
96
|
+
same branch; the agent that reported it verifies the fix and lifts it.
|
|
97
|
+
- When the creator refused the story's merge or asked for changes (`state.next` gives
|
|
98
|
+
`merge_changes`, or `state.get` shows `merge_feedback`), nothing was merged: read their note
|
|
99
|
+
(`state.get { story: "<id>" }`, then `state.merge_feedback.note`), word for word, and take it up
|
|
100
|
+
as your instruction, within the story's intent, on the same branch (`story.start` resumes the
|
|
101
|
+
worktree). Then deliver again (`story.pr`), read the CI, and send the story to review. A note
|
|
102
|
+
that would change the story's intent is the creator's call: say so, never rewrite the intent.
|
|
103
|
+
- When `state.next` gives `merge_conflict` for your story, or a merge failed on a conflict
|
|
104
|
+
(`MERGE_FAILED` `conflict`, `conflict_unqualified`), the main branch moved under your story:
|
|
105
|
+
follow the `resolve-merge-conflict` skill, which qualifies the conflict, merges the main branch
|
|
106
|
+
into your story's branch and sends the story to review again. The merges of stories that touch
|
|
107
|
+
the same files are ordered by the engine (`state.merge_order`): never merge, never reorder.
|
|
108
|
+
|
|
109
|
+
## Steps
|
|
110
|
+
|
|
111
|
+
1. **Start.** Call `agent.status` (`working`, the story as `story`). Read `state.get`:
|
|
112
|
+
`phase.current` must be `build` (or null when the profile has no phases); otherwise say which
|
|
113
|
+
phase is current and what closes it, build nothing, and go to step 9 with `partial`. Run `npx agentplugged next --json`: when it
|
|
114
|
+
names a checkpoint waiting for the creator on this story, say so and go to step 9 with
|
|
115
|
+
`partial`.
|
|
116
|
+
2. **Take the working copy.** Call `story.start` with `agent: <your id>` and the story. Work only
|
|
117
|
+
in the `workdir` it returns, with your tool opened there: never in the main checkout, never
|
|
118
|
+
in another story's worktree. On `STORY_NOT_STARTABLE`, tell the creator the `reason` it gives; on
|
|
119
|
+
`STORY_LOCKED`, name the open item
|
|
120
|
+
of deferred work that locks it. Either way, build nothing and go to step 9 with `partial`.
|
|
121
|
+
3. **Read the story, and only what it cites.** In the `workdir`:
|
|
122
|
+
- the story file, entirely: its header (`requirements`, `links`, `depends_on`, `budget_usd`,
|
|
123
|
+
`branch`) and its four sections;
|
|
124
|
+
- each requirement it lists, in the PRD (`.agentplugged/docs/prd.md`): the `EF-n` and `ENF-n`
|
|
125
|
+
themselves and the journeys they belong to, not the whole document;
|
|
126
|
+
- each decision `AD-n` it cites, in `.agentplugged/docs/architecture.md`, and the stack and
|
|
127
|
+
conventions the code must follow; the test strategy, `.agentplugged/docs/test-strategy.md`,
|
|
128
|
+
when it exists;
|
|
129
|
+
- the screens and flows it names in `.agentplugged/docs/ux.md`, when the story has a UX link;
|
|
130
|
+
- the stories it depends on, only to know what they already deliver;
|
|
131
|
+
- the knowledge base: `.agentplugged/docs/index.md` first, then the pages about what the story
|
|
132
|
+
touches (conventions, the getting-started guide), each in full. A page with an
|
|
133
|
+
`agentplugged:late` notice, or listed in `late_pages` of `state.next` (look before you rely on
|
|
134
|
+
a page), is behind the code: read the code, assert nothing from that page. Read
|
|
135
|
+
`reference/reusable.md` (what can be reused) in full when it exists.
|
|
136
|
+
Then read the code the story will change, and nothing beyond what it needs; never another
|
|
137
|
+
story's branch. Run `npx agentplugged docs check` and report what it finds instead of working
|
|
138
|
+
around it.
|
|
139
|
+
4. **Check that the story can be built.** Every acceptance criterion is testable as written;
|
|
140
|
+
the intent, the criteria, the context and the documents cited agree with each other; nothing
|
|
141
|
+
needed is missing (an interface, a rule, a screen). Each gap that changes what gets built is a
|
|
142
|
+
decision (see "Decisions"); a small one is an assumption you write down for the result. A selector,
|
|
143
|
+
route or endpoint the code does not show yet: rate from 1 to 10 how sure you are of it; under 5,
|
|
144
|
+
stop and ask the creator the one question that blocks most; from 5 to 6, write it and state the
|
|
145
|
+
assumption.
|
|
146
|
+
5. **Plan.** First search what exists (the map `reference/reusable.md`, then the repository, by
|
|
147
|
+
name and by what the code does) for each piece the story needs; the plan says "I reuse X" or
|
|
148
|
+
"I create Y because…". The engine proves copied code, not two functions doing one job
|
|
149
|
+
written differently: that search is yours. List each acceptance criterion with a scenario drawn
|
|
150
|
+
from its words alone and the test that will prove it (its file, its name), and the files you
|
|
151
|
+
expect to change. A criterion with no result to observe through the interface is declared
|
|
152
|
+
untestable with its reason (`story.criterion`, `seen: untestable`): the review looks at it. Keep the plan inside the story's scope: what is
|
|
153
|
+
useful but out of scope becomes a note for the creator. When the plan collides with a story in
|
|
154
|
+
progress (`state.get`) on the same files, say so before you start.
|
|
155
|
+
6. **Build, criterion by criterion.** For each criterion, in order:
|
|
156
|
+
1. write the test from the criterion's words, never the code; name it `AC-4-2-1` (story 4-2,
|
|
157
|
+
criterion 1; `AC_4_2_1` where a name takes no dash) and cite the requirement it proves
|
|
158
|
+
(`EF-18`, `npx agentplugged trace EF-18`); `story.criterion`: the engine runs the project's
|
|
159
|
+
test command and records the red; watch it fail for the right reason
|
|
160
|
+
(`references/acceptance-tests.md`);
|
|
161
|
+
2. write the smallest code that makes it pass, following the conventions and the decisions,
|
|
162
|
+
then call `story.criterion` again: the green;
|
|
163
|
+
3. tidy up with every test still green;
|
|
164
|
+
4. commit on the story's branch with a message that cites the story and the requirements the
|
|
165
|
+
change touches, for example `feat(2-3): sign-in form (EF-12)` — the commit hook refuses any
|
|
166
|
+
other message; never skip it;
|
|
167
|
+
5. call `story.progress` with the percentage and the criterion done.
|
|
168
|
+
Three failed attempts at one criterion mean the plan is wrong: open a decision or end with
|
|
169
|
+
`blocked`, with what you tried.
|
|
170
|
+
7. **Verify everything.** Run the project's whole verification, as its CI does (type checks,
|
|
171
|
+
linter, every test suite, the build). Fix what fails within the story's scope; report what
|
|
172
|
+
fails outside it.
|
|
173
|
+
8. **Check before handing over.** Walk through `references/self-check.md` and fix what fails
|
|
174
|
+
(the intent untouched, `npx agentplugged docs check` passing, a passing test per criterion).
|
|
175
|
+
9. **Hand over.**
|
|
176
|
+
1. Everything you changed is committed: `git status` in the `workdir` is clean.
|
|
177
|
+
2. Announce no cost: the engine measures it from the tool's traces. `measure.cost` stays for
|
|
178
|
+
what the tool shows (a quota share).
|
|
179
|
+
3. Call `story.result` with the story: `complete` when every criterion passes and no decision
|
|
180
|
+
of the story waits; `partial` when something is left, with what; `blocked` when you cannot
|
|
181
|
+
go on without the creator (it opens a checkpoint for you). A short summary the creator reads
|
|
182
|
+
(800 characters at most, the outcome first: what is done, which test proves each criterion,
|
|
183
|
+
what remains, what you expect from them; the long account goes in `story.progress` and the
|
|
184
|
+
pull request; it never hides a failure); your assumptions, the open questions and the
|
|
185
|
+
conflicts (empty lists when there are none). On a story you started that is `in_progress`,
|
|
186
|
+
your `complete` result moves the story to review: refused with `CHECKPOINT_OPEN` while a checkpoint blocks the
|
|
187
|
+
review, with `STORY_INTENT_CHANGED` while the branch changes the intent, with `CRITERIA_NOT_PROVEN`
|
|
188
|
+
while a criterion lacks its red, its green or its declaration. Fix the cause,
|
|
189
|
+
never work around it.
|
|
190
|
+
4. Call `agent.status` (`idle`, or `waiting` when a decision waits).
|
|
191
|
+
5. Run `npx agentplugged next --json` and tell the creator what it says: once the story is in
|
|
192
|
+
review, the next step is its review, by Quentin, or by the creator when the profile has no
|
|
193
|
+
quality agent. You never call another agent.
|
|
194
|
+
|
|
195
|
+
## Budget
|
|
196
|
+
|
|
197
|
+
`budget_usd` is Izzy's estimate, never a ceiling; you never write your cost.
|
|
198
|
+
|
|
199
|
+
## Never
|
|
200
|
+
|
|
201
|
+
- Follow "Rules for skills and agents" (reference `skill-rules`): checkpoint before the question, ask once; a point the creator did not keep goes to `checkpoint.decide`; in French say « tu »; start with `memory.read`.
|
|
202
|
+
- Never edit the story's intent, nor rewrite its other sections to match the code.
|
|
203
|
+
- Never build from a conversation, a memory or another story: only from the story and what it
|
|
204
|
+
cites.
|
|
205
|
+
- Never work outside the story's `workdir`, never on the main branch, never in another story's
|
|
206
|
+
worktree; never push, force-push, open the pull request or merge in this skill. Only the
|
|
207
|
+
engine merges a story, once the creator approves its merge checkpoint; it then removes the
|
|
208
|
+
story's worktree.
|
|
209
|
+
- Never mark a criterion done without a test the engine saw failing, then passing
|
|
210
|
+
(`story.criterion`; your word is `reported`).
|
|
211
|
+
- Never call, direct or wait for another agent: hand back to Noah, who proposes what comes next; the creator decides (without Noah, the creator picks the next agent).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# How develop-story behaves. Run: agentplugged eval run develop-story --method
|
|
2
|
+
# The engine's tools and Git are not in the run: the state says what they answered, the work is done in the folder.
|
|
3
|
+
cases:
|
|
4
|
+
- id: tests-each-criterion
|
|
5
|
+
state: "state.get answered: you are Sam, an active developer, the story 1-1 is validated and yours. story.start answered: the working copy is this folder, no pull request. The engine's tools and Git are not available in this run: make no call to them, build in the folder and finish with your structured result as text."
|
|
6
|
+
input: "Build story 1-1."
|
|
7
|
+
files:
|
|
8
|
+
- path: .agentplugged/stories/1-1.md
|
|
9
|
+
text: |
|
|
10
|
+
# Story 1-1: slugify a title
|
|
11
|
+
As a writer I want a URL slug from a title.
|
|
12
|
+
Acceptance criteria:
|
|
13
|
+
1. slugify("Hello World") returns "hello-world".
|
|
14
|
+
2. slugify(" Déjà Vu ") returns "deja-vu" (accents removed, edges trimmed).
|
|
15
|
+
Stack: plain JavaScript (ES modules), node:test. Files: slug.js exports slugify; slug.test.js holds the tests.
|
|
16
|
+
checks:
|
|
17
|
+
- { kind: file_has, path: slug.test.js, text: "hello-world" }
|
|
18
|
+
- { kind: file_has, path: slug.test.js, text: "deja-vu" }
|
|
19
|
+
- { kind: file_has, path: slug.js, text: "slugify" }
|
|
20
|
+
rubric:
|
|
21
|
+
- "The folder holds a test that checks slugify('Hello World') returns 'hello-world' and a test that checks the accents and the trimmed edges of ' Déjà Vu ' give 'deja-vu'"
|
|
22
|
+
- "The folder holds an implementation that exports slugify and handles both criteria"
|
|
23
|
+
- "The final result gives each criterion of the story with a status (met or not) and says how it is proved"
|
|
24
|
+
- id: asks-instead-of-guessing
|
|
25
|
+
state: "state.get answered: you are Sam, an active developer, the story 1-2 is validated and yours. story.start answered: the working copy is this folder. The engine's tools and Git are not available in this run: make no call to them. Where the engine would open a checkpoint, write the question as text and stop there. The creator is away."
|
|
26
|
+
input: "Build story 1-2."
|
|
27
|
+
files:
|
|
28
|
+
- path: .agentplugged/stories/1-2.md
|
|
29
|
+
text: |
|
|
30
|
+
# Story 1-2: price with a discount
|
|
31
|
+
Acceptance criteria:
|
|
32
|
+
1. price(100, discount) applies the discount.
|
|
33
|
+
Note from the creator: "the discount is either a percentage or an amount, I'll tell you which later".
|
|
34
|
+
checks:
|
|
35
|
+
- { kind: answer_has, text: "percentage" }
|
|
36
|
+
- { kind: answer_has, text: "amount" }
|
|
37
|
+
rubric:
|
|
38
|
+
- "The answer states that the story can be read two ways (a percentage or an amount) that lead to different code, and asks the creator which, as a decision"
|
|
39
|
+
- "The folder holds no implementation of price that picks a percentage or an amount as if the story said so"
|
|
40
|
+
triggers:
|
|
41
|
+
- { query: "build story 4-2 from its spec, tests first, criterion by criterion", should_trigger: true }
|
|
42
|
+
- { query: "implement the validated story in its own branch", should_trigger: true }
|
|
43
|
+
- { query: "take story 2-3 and develop it up to a result that moves it to review", should_trigger: true }
|
|
44
|
+
- { query: "review the pull request of story 4-2 once the CI is green", should_trigger: false }
|
|
45
|
+
- { query: "split this validated PRD into stories, one criterion each", should_trigger: false }
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Acceptance tests first
|
|
2
|
+
|
|
3
|
+
Each acceptance criterion gets its test before the code; the engine sees it fail, then pass.
|
|
4
|
+
|
|
5
|
+
## Scenario, then test
|
|
6
|
+
|
|
7
|
+
- Write the scenario from the **words of the criterion alone**, as one line in a comment above the
|
|
8
|
+
test: "Given an empty cart, when Ada checks out, then she is told it is empty." Never from the
|
|
9
|
+
code you are about to write, nor from code that exists.
|
|
10
|
+
- At least one scenario per criterion; more for its cases (error, limit), all naming the criterion. A criterion lived through an API or a screen: `api-e2e-tests`.
|
|
11
|
+
- No result to observe through the interface (a sound, a look, a feeling, a duration measured by a
|
|
12
|
+
person)? Declare it, with the reason: `story.criterion` with `seen: untestable` and `note`. It is
|
|
13
|
+
no way out of a hard test: the review reads every reason.
|
|
14
|
+
|
|
15
|
+
## The name carries the id
|
|
16
|
+
|
|
17
|
+
The criterion is `AC-<story>-<n>`: story `4-2`, criterion 1 is `AC-4-2-1`. Write it where the
|
|
18
|
+
language allows, in the test's name or in a comment next to it, any case; with underscores where a
|
|
19
|
+
name takes no dash (`AC_4_2_1`). The engine finds the tests by it, in any language:
|
|
20
|
+
|
|
21
|
+
| Language | Example |
|
|
22
|
+
|---|---|
|
|
23
|
+
| TypeScript, JavaScript, Ruby | `it("AC-4-2-1 refuses an empty cart", ...)` |
|
|
24
|
+
| Python | `def test_AC_4_2_1_refuses_empty_cart():` |
|
|
25
|
+
| Go | `func TestAC_4_2_1_RefusesEmptyCart(t *testing.T)` |
|
|
26
|
+
| Rust, C | `fn ac_4_2_1_refuses_empty_cart()` / `void test_ac_4_2_1(void)` |
|
|
27
|
+
| Java, C#, PHP | `void AC_4_2_1_refusesEmptyCart()` |
|
|
28
|
+
| Shell (bats) | `@test "AC-4-2-1 refuses an empty cart" {` |
|
|
29
|
+
| Any other | `# AC-4-2-1` in a comment beside the test |
|
|
30
|
+
|
|
31
|
+
Also cite the requirement it proves (`EF-18`, for `npx agentplugged trace`). A test file's name may
|
|
32
|
+
carry the id (`tests/ac_4_2_1_test.go`). Only test files count (a path with
|
|
33
|
+
`test`, `spec` or `e2e`): a run whose test the engine cannot find is `no_test`.
|
|
34
|
+
|
|
35
|
+
## Red, then green: `story.criterion`
|
|
36
|
+
|
|
37
|
+
1. Write the test, no code yet. `story.criterion` with the `story` and the `criterion` number.
|
|
38
|
+
2. The engine starts the project's test command, filtered on the criterion, in your story's working
|
|
39
|
+
copy, and records the run itself. You get `result` (`red`), `status`, the few `lines` that say why
|
|
40
|
+
it failed, and `trace`, every criterion in one line. Read the lines: it must fail **for the right
|
|
41
|
+
reason** (the behaviour is missing), not because of a typo or a missing import. A test that
|
|
42
|
+
passes the first time (`never_red`) proves nothing: rewrite it until it fails without the code.
|
|
43
|
+
3. Write the code, commit it, `story.criterion` again: `green`. Same commit as the red, both
|
|
44
|
+
copies clean: `no_change`, no proof; commit the test, then the code.
|
|
45
|
+
4. If the test breaks later, `story.criterion` shows `red` again: fix it before handing over.
|
|
46
|
+
|
|
47
|
+
A filter matches by prefix (`AC-4-2-1` also runs `AC-4-2-10`): from ten criteria on, end the id with
|
|
48
|
+
a non-digit in the test's name and in the line (`-t "{criterion}:"`).
|
|
49
|
+
|
|
50
|
+
The command is the project's, declared once in `.agentplugged/proofs.yaml`, and accepted by the creator at the chat (one gesture, see `guard.creator_action` with
|
|
51
|
+
`kind: proof_commands`). You may propose it, never accept it. `{criterion}` is the id in its line:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
commands:
|
|
55
|
+
- name: criteria
|
|
56
|
+
run: npx vitest run -t {criterion} # AC-4-2-1
|
|
57
|
+
- name: py-criteria
|
|
58
|
+
run: python -m pytest -k {criterion_} # AC_4_2_1
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
No command accepted (or none declared)? Say what you saw: `seen: red` or `green`, and `note` with
|
|
62
|
+
the test you ran. It counts, marked `reported`; the trace and the review say it is your word.
|
|
63
|
+
|
|
64
|
+
## The quick lane
|
|
65
|
+
|
|
66
|
+
A one-line fix whose criterion a test already covers needs no red: run it, a passing test is
|
|
67
|
+
enough, and the status says `covered`. Anything that is not covered gets its red like any story.
|
|
68
|
+
|
|
69
|
+
## Before you hand over
|
|
70
|
+
|
|
71
|
+
The story goes to review only when every criterion is `green` or `untestable`
|
|
72
|
+
(`CRITERIA_NOT_PROVEN` lists what is missing). The review's judge receives
|
|
73
|
+
the same trace and does not recompute it.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Self-check before handing over a story
|
|
2
|
+
|
|
3
|
+
Run each check in the story's `workdir`. Fix what fails, then run the list again. A check you
|
|
4
|
+
cannot run is written in the result as an open question, never skipped in silence.
|
|
5
|
+
|
|
6
|
+
## The intent
|
|
7
|
+
|
|
8
|
+
- [ ] The `## Intent` section of the story is the one the creator approved, in its latest
|
|
9
|
+
approval: in `state.get`, the last approved `document` checkpoint listing the story file
|
|
10
|
+
gives its `blob_sha` (`state.get { checkpoints: { type: "document", status: "resolved" } }`,
|
|
11
|
+
newest first; `before` goes further back). `git show <blob_sha>` prints that version; its `## Intent` section and
|
|
12
|
+
the one of the story on your branch are the same, word for word. If they differ, copy the
|
|
13
|
+
approved section back over yours, and only that section (never restore the whole file:
|
|
14
|
+
the other sections may hold changes the creator asked for), then commit.
|
|
15
|
+
- [ ] `npx agentplugged docs check` reports no problem, and no `STORY_INTENT_CHANGED` above all.
|
|
16
|
+
|
|
17
|
+
## The scope
|
|
18
|
+
|
|
19
|
+
- [ ] Nothing is copied from elsewhere in the repository: each piece the plan said "I reuse" is
|
|
20
|
+
reused, each "I create" has its reason in the result.
|
|
21
|
+
- [ ] Every change serves an acceptance criterion of the story. What does not is removed, or
|
|
22
|
+
named in the result as a note for the creator.
|
|
23
|
+
- [ ] No file of `.agentplugged/` changed besides what the story asks for; no method file, no
|
|
24
|
+
generated file.
|
|
25
|
+
- [ ] No decision of the architecture is worked around; a decision that seemed wrong was raised,
|
|
26
|
+
not bypassed.
|
|
27
|
+
|
|
28
|
+
## The tests
|
|
29
|
+
|
|
30
|
+
- [ ] Each acceptance criterion maps to at least one test, named in the result.
|
|
31
|
+
- [ ] Each of those tests was seen failing before the code, then passing, by the engine
|
|
32
|
+
(`story.criterion`: `trace` shows every criterion `green`, or `untestable` with its reason).
|
|
33
|
+
- [ ] The whole verification passes: type checks, linter, every test suite, the build.
|
|
34
|
+
|
|
35
|
+
## The branch
|
|
36
|
+
|
|
37
|
+
- [ ] Every commit cites the story and at least one of its requirements.
|
|
38
|
+
- [ ] `git status` is clean: nothing left uncommitted, nothing outside the `workdir`.
|
|
39
|
+
- [ ] Nothing was pushed, and no pull request was opened by this skill.
|
|
40
|
+
|
|
41
|
+
## The result
|
|
42
|
+
|
|
43
|
+
- [ ] Every `decision` checkpoint opened on the story is resolved and its answer built; otherwise
|
|
44
|
+
the result is `partial`.
|
|
45
|
+
- [ ] No cost is announced: the engine measures it (`measure.cost` only for what the tool shows, never an amount).
|
|
46
|
+
- [ ] The result lists the assumptions, the open questions and the conflicts, each in one line.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diagnose-bug
|
|
3
|
+
description: Find a bug's cause by hypotheses the engine keeps, fix it behind a red-then-green test, leave no probe.
|
|
4
|
+
metadata:
|
|
5
|
+
agent: sam ethan hugo lina jade
|
|
6
|
+
phase: build
|
|
7
|
+
---
|
|
8
|
+
# Diagnose a bug
|
|
9
|
+
|
|
10
|
+
A bug is fixed once its cause is known, not once a change makes the symptom go away. This skill
|
|
11
|
+
holds you to the order: reproduce, a failing test, hypotheses tested one at a time, a minimal fix,
|
|
12
|
+
no probe left. The engine keeps the score; what you say of it does not count.
|
|
13
|
+
|
|
14
|
+
Run it under your own id (`agent: <your id>`), in the creator's language, in the stack the
|
|
15
|
+
architecture names. A bug that is plainly small and whose cause you see at once is the quick lane
|
|
16
|
+
(`quick-lane`); this skill is for the one whose cause you must search.
|
|
17
|
+
|
|
18
|
+
- **Input:** a story of `.agentplugged/stories/` that is yours: the symptom (what happens, what
|
|
19
|
+
should), a requirement it breaks, and an acceptance criterion written as `Given, when, then`. No
|
|
20
|
+
story: ask the creator to have Izzy write it (or to write it), never start without.
|
|
21
|
+
- **Output:** the cause, the test that proves it and the fix, committed on the story's branch,
|
|
22
|
+
and a result that moves the story to review. Then the usual path: review, the creator's merge.
|
|
23
|
+
- **Annexes** (`references/` of this skill): `hypotheses.md` (listing, confidence, evidence, when
|
|
24
|
+
every one is ruled out), `probes.md` (the marker and how to take it out).
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
1. **Start.** `agent.status` (`working`), `state.get` (`phase.current` must be `build`), then
|
|
29
|
+
`story.start` and work only in its `workdir`. Read the story, its requirements, the decisions
|
|
30
|
+
it cites and the code of the symptom, nothing beyond.
|
|
31
|
+
2. **Reproduce.** Find the smallest way to see the bug (an input, a call, a click) and say it in
|
|
32
|
+
one line in `story.progress`. Cannot reproduce it: tell the creator what you tried and what you
|
|
33
|
+
need (a log, a version, a dataset); never fix what you did not see.
|
|
34
|
+
3. **A test that fails.** Write the test from the criterion's words (the guide `acceptance-tests.md`
|
|
35
|
+
of `develop-story`), name it `AC-<story>-<n>`, call `story.criterion`: the engine runs it and
|
|
36
|
+
records the red. It must fail for the symptom's reason, not for another. Commit it alone, first.
|
|
37
|
+
4. **Hypotheses.** Write 3 to 5 in `story.progress`, each with a confidence and where to look
|
|
38
|
+
(`references/hypotheses.md`). Test them one at a time, the likeliest first, through `story.loop`:
|
|
39
|
+
- `seen: hypothesis`, `note: "7/10 <the hypothesis>"` puts one forward;
|
|
40
|
+
- `seen: ruled_out` or `seen: confirmed`, `note: <what you saw that settles it>` closes it.
|
|
41
|
+
The engine refuses a hypothesis already ruled out, two at once, and any fix before a cause is
|
|
42
|
+
confirmed (`cause_unconfirmed`). To look, read, run, bisect; a probe (a log, a print) carries
|
|
43
|
+
the marker of `references/probes.md`.
|
|
44
|
+
5. **Every hypothesis ruled out.** Do not guess further. Widen: 5 to 7 sources you had not
|
|
45
|
+
considered, none already ruled out, keep 1 or 2, and put probes on them before any fix
|
|
46
|
+
(`references/hypotheses.md`). Still nothing after that round: tell the creator what is known, in
|
|
47
|
+
a `decision` checkpoint, instead of a fourth round.
|
|
48
|
+
6. **The cause is confirmed.** Say it in one line. When it lies outside the story's scope (another
|
|
49
|
+
module, a decision to revisit), open a `decision` checkpoint before changing anything.
|
|
50
|
+
7. **Fix it, minimally.** Declare the fix with `story.loop` (`story`, `note: <the fix>`), write the
|
|
51
|
+
smallest change that removes the cause, call `story.criterion` for the green, then `story.loop`
|
|
52
|
+
`seen: green` (the engine checks the criteria) or `seen: failed` with `note` saying why.
|
|
53
|
+
**After three fixes that failed the engine opens a point for the creator** and refuses a fourth:
|
|
54
|
+
stop, end with `blocked`, say what the three taught you; it refuses new hypotheses too until they
|
|
55
|
+
answer. A failed fix is never tried again.
|
|
56
|
+
8. **Take the probes out,** then look for the marker (`references/probes.md`) in your own diff. The
|
|
57
|
+
engine refuses the review while a line you added still carries it in a comment
|
|
58
|
+
(`debug_instrumentation_left`); it cannot see a probe without the marker.
|
|
59
|
+
9. **Verify everything,** as the CI does, and read your diff: only this bug's change. What you
|
|
60
|
+
saw elsewhere goes to deferred work (`plan.defer`), never into this fix. Walk through
|
|
61
|
+
`self-check.md` of `develop-story`.
|
|
62
|
+
10. **Hand over** as `develop-story` does: commit (`fix(<story>): … (EF-n)`), `story.result`
|
|
63
|
+
(`complete`: the summary names the cause, the test and the fix in the first lines),
|
|
64
|
+
`agent.status` (`idle`), `npx agentplugged next --json`. The pull request and the review come after.
|
|
65
|
+
|
|
66
|
+
## Never
|
|
67
|
+
|
|
68
|
+
- Follow "Rules for skills and agents" (reference `skill-rules`): checkpoint before the question, ask once; a point the creator did not keep goes to `checkpoint.decide`; in French say « tu »; start with `memory.read`.
|
|
69
|
+
- Never fix before the failing test, nor before a cause is confirmed; never put forward again a cause that was ruled out.
|
|
70
|
+
- Never leave a probe in the code, nor commit one on purpose.
|
|
71
|
+
- Never write a hypothesis' result, nor a count of failures: the engine keeps them.
|
|
72
|
+
- Never edit the story's intent, never refactor in the same change, never push or merge.
|
|
73
|
+
- Never call, direct or wait for another agent: hand back to Noah.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Hypotheses
|
|
2
|
+
|
|
3
|
+
## List them before testing any
|
|
4
|
+
|
|
5
|
+
Three to five, written in `story.progress` before the first `story.loop`. Each one is a cause, not
|
|
6
|
+
a symptom, and says where it would show:
|
|
7
|
+
|
|
8
|
+
| Confidence | Hypothesis | Where to look | What would rule it out |
|
|
9
|
+
|---|---|---|---|
|
|
10
|
+
| 7/10 | the total is cached before a refund | `cart/total.ts`, the cache key | the test passes with the cache off |
|
|
11
|
+
| 4/10 | the tax rounds twice | `tax.ts`, line items and total | one cent off on one item only |
|
|
12
|
+
|
|
13
|
+
- A confidence from 1 to 10 says how likely it is given what you have seen so far (the symptom,
|
|
14
|
+
the recent changes, the logs), not how easy it is to check. Two hypotheses at the same level
|
|
15
|
+
are tested in the order that costs less.
|
|
16
|
+
- Ask "why" up to five times from the symptom to get from an effect to a cause: "the total is
|
|
17
|
+
wrong" is an effect; "the cache outlives the refund" is a cause.
|
|
18
|
+
- A hypothesis is a sentence another reader could contradict. "Something with the cache" is not.
|
|
19
|
+
|
|
20
|
+
## Test one, then say what you saw
|
|
21
|
+
|
|
22
|
+
`story.loop` with `seen: hypothesis` and `note: "7/10 the total is cached before a refund"` puts
|
|
23
|
+
one forward. Then look: read the path of the call, run the failing test with the suspect part
|
|
24
|
+
changed or switched off, bisect between a version that worked and the one that did not.
|
|
25
|
+
|
|
26
|
+
Close it with `seen: ruled_out` or `seen: confirmed`; `note` is the evidence, a fact someone
|
|
27
|
+
can check: a test name and its result, a line and what it holds, a commit. "Seems fine" is no
|
|
28
|
+
evidence. The engine refuses to close without one.
|
|
29
|
+
|
|
30
|
+
A cause is confirmed when changing only it changes the symptom, both ways: with it, the test
|
|
31
|
+
fails; without it, the test passes.
|
|
32
|
+
|
|
33
|
+
## When every hypothesis is ruled out
|
|
34
|
+
|
|
35
|
+
Your list was wrong; do not stretch it. Widen:
|
|
36
|
+
|
|
37
|
+
1. Write 5 to 7 sources you had not considered, from other layers (input, configuration, data,
|
|
38
|
+
timing, the environment, a dependency, a recent merge), none of them one `story.loop` answers
|
|
39
|
+
in `ruled_out`.
|
|
40
|
+
2. Keep the 1 or 2 most likely given the evidence so far, with their confidence.
|
|
41
|
+
3. Put probes on those sources before any other change (`probes.md`), run the failing test, read
|
|
42
|
+
what the probes say, then put the kept ones forward as above.
|
|
43
|
+
|
|
44
|
+
A second round that rules out everything is the creator's: a `decision` checkpoint that lists what
|
|
45
|
+
is known, what is ruled out and what you would try next.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Probes: temporary code that looks
|
|
2
|
+
|
|
3
|
+
A probe is a log, a print, an assertion or a timer written to see what the code does. It is
|
|
4
|
+
temporary and carries a marker, so that neither you nor the engine can forget it.
|
|
5
|
+
|
|
6
|
+
## The marker
|
|
7
|
+
|
|
8
|
+
Write `agentplugged:debug` in a comment on the same line, in the language's comment style, the
|
|
9
|
+
marker first in the comment (words may follow it):
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
console.log("total", total); // agentplugged:debug
|
|
13
|
+
print(f"total={total}") # agentplugged:debug
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
One line per probe; a probe that spans several lines has the marker on each. The engine reads the
|
|
17
|
+
lines your branch added.
|
|
18
|
+
|
|
19
|
+
## Where and what
|
|
20
|
+
|
|
21
|
+
- Each probe has a reason: which hypothesis it confirms or rules out, and what it prints that
|
|
22
|
+
settles it. Say it in `story.progress` when you add it.
|
|
23
|
+
- Print values and decisions (a branch taken, a key, a count), never a secret, a token or
|
|
24
|
+
personal data.
|
|
25
|
+
- Put them where the data crosses a boundary: input, call, result.
|
|
26
|
+
|
|
27
|
+
## Taking them out
|
|
28
|
+
|
|
29
|
+
1. Remove every line that carries the marker, and anything you added only to support them (an
|
|
30
|
+
import, a variable).
|
|
31
|
+
2. Look for what is left: search the repository for the marker (`git grep -n agentplugged:debug`).
|
|
32
|
+
Nothing may be found in the files you changed.
|
|
33
|
+
3. Commit the removal. Do not squash it into the fix to hide it: a probe committed and then removed
|
|
34
|
+
is fine; a probe left is not.
|
|
35
|
+
|
|
36
|
+
The engine refuses to move the story to review (`debug_instrumentation_left`) while a line your
|
|
37
|
+
branch added carries the marker in a comment, in the last commit; the message names the files.
|
|
38
|
+
It reads committed work only (commit before you ask again), skips files of words (`.md`, `.txt`)
|
|
39
|
+
and reads nothing it cannot read: a probe without the marker, or an unreadable diff, is not seen.
|
|
40
|
+
Look at your own diff before you hand over.
|