agent-issues 0.0.119
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/.github/agents/agent-issues.agent.md +54 -0
- package/.github/agents/agent-issues.claude.md +51 -0
- package/dist/agent-installer.d.ts +49 -0
- package/dist/agent-installer.js +171 -0
- package/dist/agent-installer.js.map +1 -0
- package/dist/auth-session.d.ts +40 -0
- package/dist/auth-session.js +107 -0
- package/dist/auth-session.js.map +1 -0
- package/dist/body-backfill.d.ts +26 -0
- package/dist/body-backfill.js +219 -0
- package/dist/body-backfill.js.map +1 -0
- package/dist/build-mode.d.ts +1 -0
- package/dist/build-mode.js +1 -0
- package/dist/build-mode.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +61 -0
- package/dist/cli/commands/auth.js +134 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/backfill.d.ts +8 -0
- package/dist/cli/commands/backfill.js +36 -0
- package/dist/cli/commands/backfill.js.map +1 -0
- package/dist/cli/commands/comments.d.ts +34 -0
- package/dist/cli/commands/comments.js +124 -0
- package/dist/cli/commands/comments.js.map +1 -0
- package/dist/cli/commands/context.d.ts +13 -0
- package/dist/cli/commands/context.js +156 -0
- package/dist/cli/commands/context.js.map +1 -0
- package/dist/cli/commands/entities.d.ts +91 -0
- package/dist/cli/commands/entities.js +420 -0
- package/dist/cli/commands/entities.js.map +1 -0
- package/dist/cli/commands/export.d.ts +20 -0
- package/dist/cli/commands/export.js +98 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/fallback.d.ts +6 -0
- package/dist/cli/commands/fallback.js +10 -0
- package/dist/cli/commands/fallback.js.map +1 -0
- package/dist/cli/commands/handoff.d.ts +1 -0
- package/dist/cli/commands/handoff.js +2 -0
- package/dist/cli/commands/handoff.js.map +1 -0
- package/dist/cli/commands/installers.d.ts +37 -0
- package/dist/cli/commands/installers.js +78 -0
- package/dist/cli/commands/installers.js.map +1 -0
- package/dist/cli/commands/kanban.d.ts +8 -0
- package/dist/cli/commands/kanban.js +83 -0
- package/dist/cli/commands/kanban.js.map +1 -0
- package/dist/cli/commands/meta.d.ts +14 -0
- package/dist/cli/commands/meta.js +33 -0
- package/dist/cli/commands/meta.js.map +1 -0
- package/dist/cli/commands/plan-entries.d.ts +30 -0
- package/dist/cli/commands/plan-entries.js +94 -0
- package/dist/cli/commands/plan-entries.js.map +1 -0
- package/dist/cli/commands/site.d.ts +29 -0
- package/dist/cli/commands/site.js +89 -0
- package/dist/cli/commands/site.js.map +1 -0
- package/dist/cli/commands/sql.d.ts +6 -0
- package/dist/cli/commands/sql.js +21 -0
- package/dist/cli/commands/sql.js.map +1 -0
- package/dist/cli/commands/synchronize.d.ts +12 -0
- package/dist/cli/commands/synchronize.js +31 -0
- package/dist/cli/commands/synchronize.js.map +1 -0
- package/dist/cli/commands/tenants.d.ts +29 -0
- package/dist/cli/commands/tenants.js +101 -0
- package/dist/cli/commands/tenants.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +120 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/renderers.d.ts +250 -0
- package/dist/cli/renderers.js +286 -0
- package/dist/cli/renderers.js.map +1 -0
- package/dist/cli/shared.d.ts +97 -0
- package/dist/cli/shared.js +192 -0
- package/dist/cli/shared.js.map +1 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.js +41 -0
- package/dist/cli.js.map +1 -0
- package/dist/context-cli.d.ts +16 -0
- package/dist/context-cli.js +131 -0
- package/dist/context-cli.js.map +1 -0
- package/dist/daemon/daemon-lifecycle.d.ts +1 -0
- package/dist/daemon/daemon-lifecycle.js +2 -0
- package/dist/daemon/daemon-lifecycle.js.map +1 -0
- package/dist/daemon/daemon-main.d.ts +14 -0
- package/dist/daemon/daemon-main.js +30 -0
- package/dist/daemon/daemon-main.js.map +1 -0
- package/dist/daemon/local-daemon-store.d.ts +21 -0
- package/dist/daemon/local-daemon-store.js +31 -0
- package/dist/daemon/local-daemon-store.js.map +1 -0
- package/dist/entity-projection.d.ts +141 -0
- package/dist/entity-projection.js +147 -0
- package/dist/entity-projection.js.map +1 -0
- package/dist/entra-device-login.d.ts +12 -0
- package/dist/entra-device-login.js +40 -0
- package/dist/entra-device-login.js.map +1 -0
- package/dist/export-files.d.ts +24 -0
- package/dist/export-files.js +230 -0
- package/dist/export-files.js.map +1 -0
- package/dist/export-markdown.d.ts +24 -0
- package/dist/export-markdown.js +343 -0
- package/dist/export-markdown.js.map +1 -0
- package/dist/help.d.ts +112 -0
- package/dist/help.js +1430 -0
- package/dist/help.js.map +1 -0
- package/dist/kanban/assets.d.ts +3 -0
- package/dist/kanban/assets.js +37 -0
- package/dist/kanban/assets.js.map +1 -0
- package/dist/kanban/index.d.ts +1 -0
- package/dist/kanban/index.js +2 -0
- package/dist/kanban/index.js.map +1 -0
- package/dist/kanban/server.d.ts +28 -0
- package/dist/kanban/server.js +118 -0
- package/dist/kanban/server.js.map +1 -0
- package/dist/mcp-installer.d.ts +32 -0
- package/dist/mcp-installer.js +118 -0
- package/dist/mcp-installer.js.map +1 -0
- package/dist/mcp-server/index.d.ts +11 -0
- package/dist/mcp-server/index.js +504 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/dist/mcp-server/index.test.d.ts +1 -0
- package/dist/mcp-server/index.test.js +746 -0
- package/dist/mcp-server/index.test.js.map +1 -0
- package/dist/mcp-server/mcp-tool-audit.d.ts +6 -0
- package/dist/mcp-server/mcp-tool-audit.js +47 -0
- package/dist/mcp-server/mcp-tool-audit.js.map +1 -0
- package/dist/mcp-server/stdio.d.ts +2 -0
- package/dist/mcp-server/stdio.js +7 -0
- package/dist/mcp-server/stdio.js.map +1 -0
- package/dist/mcp.d.ts +2 -0
- package/dist/mcp.js +19 -0
- package/dist/mcp.js.map +1 -0
- package/dist/open-storage-driver.d.ts +53 -0
- package/dist/open-storage-driver.js +71 -0
- package/dist/open-storage-driver.js.map +1 -0
- package/dist/open-synchronize-stores.d.ts +24 -0
- package/dist/open-synchronize-stores.js +34 -0
- package/dist/open-synchronize-stores.js.map +1 -0
- package/dist/project-identity.d.ts +23 -0
- package/dist/project-identity.js +121 -0
- package/dist/project-identity.js.map +1 -0
- package/dist/runtime-access-boundary.d.ts +7 -0
- package/dist/runtime-access-boundary.js +182 -0
- package/dist/runtime-access-boundary.js.map +1 -0
- package/dist/service-discovery.d.ts +10 -0
- package/dist/service-discovery.js +64 -0
- package/dist/service-discovery.js.map +1 -0
- package/dist/site/assets.d.ts +4 -0
- package/dist/site/assets.js +46 -0
- package/dist/site/assets.js.map +1 -0
- package/dist/site/cloud-events-relay.d.ts +18 -0
- package/dist/site/cloud-events-relay.js +78 -0
- package/dist/site/cloud-events-relay.js.map +1 -0
- package/dist/site/index.d.ts +1 -0
- package/dist/site/index.js +2 -0
- package/dist/site/index.js.map +1 -0
- package/dist/site/server.d.ts +42 -0
- package/dist/site/server.js +320 -0
- package/dist/site/server.js.map +1 -0
- package/dist/skill-installer.d.ts +35 -0
- package/dist/skill-installer.js +174 -0
- package/dist/skill-installer.js.map +1 -0
- package/dist/vitest-setup.d.ts +1 -0
- package/dist/vitest-setup.js +7 -0
- package/dist/vitest-setup.js.map +1 -0
- package/package.json +42 -0
- package/site/dist/assets/index-DKEVC0aQ.css +1 -0
- package/site/dist/assets/index-DSR4mIml.js +4396 -0
- package/site/dist/index.html +14 -0
- package/skills/agent-issues-language.md +5 -0
- package/skills/agent-issues-operating-contract.md +208 -0
- package/skills/ai-agent-issues/SKILL.md +127 -0
- package/skills/ai-domain-modeling/ADR-FORMAT.md +48 -0
- package/skills/ai-domain-modeling/CONTEXT-FORMAT.md +54 -0
- package/skills/ai-domain-modeling/SKILL.md +45 -0
- package/skills/ai-grill-with-docs/SKILL.md +28 -0
- package/skills/ai-handoff/SKILL.md +41 -0
- package/skills/ai-implement/SKILL.md +98 -0
- package/skills/ai-migrate-docs/SKILL.md +65 -0
- package/skills/ai-next-work/SKILL.md +43 -0
- package/skills/ai-plan/SKILL.md +41 -0
- package/skills/ai-prepare/SKILL.md +79 -0
- package/skills/ai-prototype/LOGIC.md +67 -0
- package/skills/ai-prototype/SKILL.md +31 -0
- package/skills/ai-prototype/UI.md +112 -0
- package/skills/ai-recipe-migration/SKILL.md +49 -0
- package/skills/ai-start-work/SKILL.md +56 -0
- package/skills/ai-tdd/SKILL.md +99 -0
- package/skills/ai-tdd/deep-modules.md +33 -0
- package/skills/ai-tdd/interface-design.md +20 -0
- package/skills/ai-tdd/mocking.md +28 -0
- package/skills/ai-tdd/refactoring.md +10 -0
- package/skills/ai-tdd/tests.md +74 -0
- package/skills/ai-to-issues/SKILL.md +70 -0
- package/skills/ai-to-prd/SKILL.md +33 -0
- package/skills/ai-wayfinder/SKILL.md +110 -0
- package/skills/recipes/README.md +29 -0
- package/skills/recipes/adr.md +21 -0
- package/skills/recipes/context-summary.md +17 -0
- package/skills/recipes/context-term.md +3 -0
- package/skills/recipes/debt.md +21 -0
- package/skills/recipes/epic.md +21 -0
- package/skills/recipes/handoff.md +29 -0
- package/skills/recipes/initiative.md +21 -0
- package/skills/recipes/issue-comment.md +15 -0
- package/skills/recipes/issue.md +33 -0
- package/skills/recipes/prd.md +29 -0
- package/skills/recipes/project.md +21 -0
- package/skills/recipes/user-story.md +15 -0
- package/skills/recipes/version.md +13 -0
- package/skills/recipes/wayfinder-map.md +25 -0
- package/skills/recipes/wayfinder-ticket.md +17 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-start-work
|
|
3
|
+
description: Start work on an initiative. Find the next workable issue, decide how to approach it, then drive the build with ai-tdd or ai-implement.
|
|
4
|
+
argument-hint: Initiative or issue ID to start working on (optional)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Follow the shared [language standard](../agent-issues-language.md).
|
|
8
|
+
Follow the shared [skill operating contract](../agent-issues-operating-contract.md).
|
|
9
|
+
|
|
10
|
+
# Start Work
|
|
11
|
+
|
|
12
|
+
Pick up an initiative that is already planned: grilled, captured as a PRD, broken into issues, and handed off. Begin the real build. This skill answers two questions, *what to work on next* and *how to approach it*, then hands the active issue to the `ai-tdd` skill to build.
|
|
13
|
+
|
|
14
|
+
This skill is the bridge between planning and coding.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. Select the active initiative
|
|
19
|
+
|
|
20
|
+
Find the scope you were asked to work on.
|
|
21
|
+
|
|
22
|
+
- If the user gave an initiative or issue ID, start there. If not, ask one routing question to find the initiative.
|
|
23
|
+
|
|
24
|
+
### 2. Select the next workable issue
|
|
25
|
+
|
|
26
|
+
Start the `ai-next-work` skill for the active scope. It runs the **Next Work** recipe. If the user supplied an explicit issue, treat it as confirmed and continue to step 3. Otherwise, show its result and confirm the selected issue with the user before you write code. If it reports the work is complete or blocked, stop and return that result.
|
|
27
|
+
|
|
28
|
+
### 3. Decide how to approach it
|
|
29
|
+
|
|
30
|
+
Once the issue is selected, work out the approach before you start the build.
|
|
31
|
+
|
|
32
|
+
- Explore the codebase to understand the current state of the area the issue touches.
|
|
33
|
+
- Run the **Relation Query** recipe for the selected issue with its complete relation set. Use the result to identify constraining ADRs, fixed user stories, open blockers, and parent or sub-issue boundaries. Do not repeat relation queries per relation type when one complete result provides them.
|
|
34
|
+
- Find the public interface the slice must expose and the behavior the user stories require.
|
|
35
|
+
- Surface any assumption the plan left open. If a real, hard-to-reverse design question comes up, send it to `/ai-grill-with-docs`. Do not decide it on your own.
|
|
36
|
+
|
|
37
|
+
Summarize the approach in a few lines: the interface, the behaviors that matter, and the layers the slice cuts through.
|
|
38
|
+
|
|
39
|
+
### 4. Hand off to a build skill
|
|
40
|
+
|
|
41
|
+
Begin the build under test-driven development. Use incremental implementation instead when the change does not fit a red-green-refactor loop, for example a broad refactor, a config or infrastructure change, or a multi-file migration.
|
|
42
|
+
|
|
43
|
+
- Run the **Entity State And Structure** recipe to set the selected issue to `in-progress`.
|
|
44
|
+
- Start `ai-tdd` with the selected issue and approach, or `ai-implement` when the change has no fast test seam. Wait for its completion result and its next-workable-issue result before you continue.
|
|
45
|
+
- Do not write production code outside that loop. This skill chooses the work. The build skill builds it.
|
|
46
|
+
|
|
47
|
+
### 5. Continue or stop
|
|
48
|
+
|
|
49
|
+
When the build skill reports the finished issue and its next-workable-issue result:
|
|
50
|
+
|
|
51
|
+
- If it recommends an issue, show that issue and ask whether to continue with it.
|
|
52
|
+
- If the user agrees, treat the recommendation as the selected issue and return to step 3 to decide the approach. Do not repeat step 2.
|
|
53
|
+
- If no issue is workable, report whether the initiative's issue work is complete, or show the remaining blocker chain that the build skill reported.
|
|
54
|
+
- If the user declines, or when the work is complete, blocked, or out of scope, leave the tracker accurate. Offer `/ai-handoff` so the next session can start cleanly.
|
|
55
|
+
|
|
56
|
+
Do not run more than one issue through one tdd run. One issue at a time keeps the tracker and the slices honest.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-tdd
|
|
3
|
+
description: Test-driven development with a red-green-refactor loop, anchored to the active agent-issues issue.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the shared [language standard](../agent-issues-language.md).
|
|
7
|
+
Follow the shared [skill operating contract](../agent-issues-operating-contract.md).
|
|
8
|
+
|
|
9
|
+
# Test-Driven Development
|
|
10
|
+
|
|
11
|
+
## Philosophy
|
|
12
|
+
|
|
13
|
+
Test observable behavior through public interfaces. Prefer integration-style tests that survive internal refactors.
|
|
14
|
+
|
|
15
|
+
See [tests.md](tests.md) for examples. See [mocking.md](mocking.md) for mocking rules.
|
|
16
|
+
|
|
17
|
+
## Removed behavior
|
|
18
|
+
|
|
19
|
+
When an issue removes a feature, constraint, or compatibility path, remove or update its obsolete tests. Do not add a new test whose only purpose is to confirm that deleted code or an obsolete restriction has not returned. That test has no current behavior contract and adds maintenance cost. Test a replacement or newly supported observable behavior when the change creates one. Add an absence test only when the active issue or a relevant ADR makes the absence an explicit, observable requirement.
|
|
20
|
+
|
|
21
|
+
## Static declarations
|
|
22
|
+
|
|
23
|
+
Do not add a test that reads a static declaration and restates its literal shape or values. Examples include object trees, route tables, dependency lists, manifests, schema entries, and constant maps. Such a test duplicates the implementation and fails on an intentional edit without protecting caller behavior.
|
|
24
|
+
|
|
25
|
+
For a static declaration change, test the behavior that consumes the declaration through its public interface. If no distinct behavior can fail, do not force a red-green cycle. Use the existing behavioral suite, type-check, lint, build, or focused inspection as validation instead. Test the declaration directly only when its serialized shape is itself a supported external contract.
|
|
26
|
+
|
|
27
|
+
## Anti-pattern: horizontal slices
|
|
28
|
+
|
|
29
|
+
Use vertical tracer bullets. Do not write all the tests first and all the implementation second.
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
|
|
33
|
+
### 1. Planning
|
|
34
|
+
|
|
35
|
+
Run the **Entity Read** recipe, the **Relation Query** recipe, and the **Context Read** recipe for the active issue and its scope. Read every linked `planEntries` item returned by the issue; its current body can contain implementation decisions and constraints. Confirm the public interface, the priority behaviors, and the approach. Resolve any hard-to-reverse question before you code. See [deep modules](deep-modules.md) and [interface design](interface-design.md) when these concerns matter.
|
|
36
|
+
|
|
37
|
+
Treat the issue's `planEntries` as planning inputs. Do not create or change Plan-entry links. Report missing Plan-entry provenance to the issue creator.
|
|
38
|
+
|
|
39
|
+
### 2. Tracer bullet
|
|
40
|
+
|
|
41
|
+
Write one test that confirms one thing about the system.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
RED: Write test for first behavior -> test fails
|
|
45
|
+
GREEN: Write minimal code to pass -> test passes
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Confirm the test fails for the expected reason before you write the implementation.
|
|
49
|
+
|
|
50
|
+
### 3. Incremental loop
|
|
51
|
+
|
|
52
|
+
For each remaining behavior:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
RED: Write next test -> fails
|
|
56
|
+
GREEN: Minimal code to pass -> passes
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Run one test at a time. Write only enough code to pass it. Then move to the next behavior.
|
|
60
|
+
|
|
61
|
+
### 4. Refactor
|
|
62
|
+
|
|
63
|
+
Refactor only while the tests are green. Use the [refactoring guidance](refactoring.md). Run the focused tests again after each step.
|
|
64
|
+
|
|
65
|
+
### 5. Implementation review gate
|
|
66
|
+
|
|
67
|
+
You, the visible `ai-tdd` agent, own the TDD cycles, the focused validation, and any repairs. Do not hand the build to a subagent: you hold the context on what the active `ai-*` skills expect, and a subagent does not have it. Do not treat the first passing test as the end of the work.
|
|
68
|
+
|
|
69
|
+
After your first focused validation passes, start one read-only review subagent. This is the only step that runs as a subagent. Give the reviewer the active issue context, the changed-file diff, the validation you already ran, and the shared [language standard](../agent-issues-language.md). The reviewer's report, its findings, and every message it writes must follow that standard.
|
|
70
|
+
|
|
71
|
+
The reviewer must cover both of these:
|
|
72
|
+
|
|
73
|
+
- **Behavior and contract:** Compare the implementation and tests against the active issue, the linked user stories, the relevant ADRs, and the observable public behavior. Find missing behaviors, wrong semantics, and gaps in behavior coverage.
|
|
74
|
+
- **Code and regression risk:** Inspect the changed code for correctness defects, unplanned scope, regressions, gaps in error handling, maintainability concerns, and gaps in validation.
|
|
75
|
+
|
|
76
|
+
The reviewer must not edit files. It must return either no findings, or structured findings with a severity, a file and location, evidence, and a concrete fix.
|
|
77
|
+
|
|
78
|
+
`ai-tdd` rejects a finding only when it can explain why the finding is invalid or out of scope. For every valid, material finding, fix it yourself. Then run the focused validation that covers the fix. Do not hand repairs to a subagent. If there are no material findings, `ai-tdd` records the reviewer report before the final validation. Do not mark the issue done until this gate is complete.
|
|
79
|
+
|
|
80
|
+
### 6. Complete and report
|
|
81
|
+
|
|
82
|
+
After the review gate and the final focused validation pass, mark the active issue `done`. Start the `ai-next-work` skill with the active initiative. Include its result in the completion report. Do not start the selected issue.
|
|
83
|
+
|
|
84
|
+
## Implementer standards
|
|
85
|
+
|
|
86
|
+
If you need a paragraph-long comment to justify a workaround, the code is wrong. Fix the code.
|
|
87
|
+
|
|
88
|
+
## Checklist per cycle
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
[ ] Test describes behavior, not implementation
|
|
92
|
+
[ ] Test uses public interface only
|
|
93
|
+
[ ] Test would survive internal refactor
|
|
94
|
+
[ ] Test does not restate a static declaration unless that shape is an external contract
|
|
95
|
+
[ ] Test covers current or newly supported behavior, not only the absence of removed behavior
|
|
96
|
+
[ ] Obsolete tests were removed or updated
|
|
97
|
+
[ ] Code is minimal for this test
|
|
98
|
+
[ ] No speculative features added
|
|
99
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Deep Modules
|
|
2
|
+
|
|
3
|
+
From *A Philosophy of Software Design*:
|
|
4
|
+
|
|
5
|
+
**Deep module**: a small interface with a lot of implementation behind it.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────┐
|
|
9
|
+
│ Small Interface │
|
|
10
|
+
├─────────────────────┤
|
|
11
|
+
│ │
|
|
12
|
+
│ │
|
|
13
|
+
│ Deep Implementation│
|
|
14
|
+
│ │
|
|
15
|
+
│ │
|
|
16
|
+
└─────────────────────┘
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Shallow module**: a large interface with little implementation behind it.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
┌─────────────────────────────────┐
|
|
23
|
+
│ Large Interface │
|
|
24
|
+
├─────────────────────────────────┤
|
|
25
|
+
│ Thin Implementation │
|
|
26
|
+
└─────────────────────────────────┘
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
When you design an interface, ask:
|
|
30
|
+
|
|
31
|
+
- Can you reduce the number of methods?
|
|
32
|
+
- Can you simplify the parameters?
|
|
33
|
+
- Can you hide more complexity inside?
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Interface Design for Testability
|
|
2
|
+
|
|
3
|
+
A good interface makes testing easy:
|
|
4
|
+
|
|
5
|
+
1. Accept dependencies. Do not create them inside the function.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
function processOrder(order, paymentGateway) {}
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
2. Return a result. Do not rely on a side effect.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
function calculateDiscount(cart): Discount {}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
3. Keep the surface area small.
|
|
18
|
+
|
|
19
|
+
- Fewer methods need fewer tests.
|
|
20
|
+
- Fewer parameters need simpler test setup.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# When to Mock
|
|
2
|
+
|
|
3
|
+
Mock only at system boundaries:
|
|
4
|
+
|
|
5
|
+
- External APIs.
|
|
6
|
+
- Databases, when a test database is not practical.
|
|
7
|
+
- Time and randomness.
|
|
8
|
+
- File system access, when you need it.
|
|
9
|
+
|
|
10
|
+
Do not mock:
|
|
11
|
+
|
|
12
|
+
- Your own classes or modules.
|
|
13
|
+
- Internal collaborators.
|
|
14
|
+
- Anything you control.
|
|
15
|
+
|
|
16
|
+
## Design for Mockability
|
|
17
|
+
|
|
18
|
+
At system boundaries, design an interface that is easy to mock.
|
|
19
|
+
|
|
20
|
+
1. Use dependency injection.
|
|
21
|
+
2. Prefer an SDK-style interface over a generic fetcher.
|
|
22
|
+
|
|
23
|
+
The SDK approach gives you:
|
|
24
|
+
|
|
25
|
+
- One specific shape per mock.
|
|
26
|
+
- No conditional logic in test setup.
|
|
27
|
+
- A clear view of which endpoints a test uses.
|
|
28
|
+
- Better type safety for each endpoint.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Refactor Candidates
|
|
2
|
+
|
|
3
|
+
After a TDD cycle, look for:
|
|
4
|
+
|
|
5
|
+
- Duplication: extract a function or a class.
|
|
6
|
+
- Long methods: break them into private helpers. Keep the tests on the public interface.
|
|
7
|
+
- Shallow modules: combine them or add depth.
|
|
8
|
+
- Feature envy: move the logic to where the data lives.
|
|
9
|
+
- Primitive obsession: introduce value objects.
|
|
10
|
+
- Existing code that the new work shows is a problem.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Good and Bad Tests
|
|
2
|
+
|
|
3
|
+
## Good tests
|
|
4
|
+
|
|
5
|
+
An integration-style test goes through a real interface. It does not mock internal parts.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
test("user can checkout with valid cart", async () => {
|
|
9
|
+
const cart = createCart();
|
|
10
|
+
cart.add(product);
|
|
11
|
+
const result = await checkout(cart, paymentMethod);
|
|
12
|
+
expect(result.status).toBe("confirmed");
|
|
13
|
+
});
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Look for these traits:
|
|
17
|
+
|
|
18
|
+
- Tests behavior that users or callers care about.
|
|
19
|
+
- Uses the public API only.
|
|
20
|
+
- Survives an internal refactor.
|
|
21
|
+
- Describes what the code does, not how.
|
|
22
|
+
- Has one logical assertion per test.
|
|
23
|
+
|
|
24
|
+
## Bad tests
|
|
25
|
+
|
|
26
|
+
An implementation-detail test is tied to the internal structure.
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
test("checkout calls paymentService.process", async () => {
|
|
30
|
+
const mockPayment = jest.mock(paymentService);
|
|
31
|
+
await checkout(cart, payment);
|
|
32
|
+
expect(mockPayment.process).toHaveBeenCalledWith(cart.total);
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Watch for these warning signs:
|
|
37
|
+
|
|
38
|
+
- Mocking internal collaborators.
|
|
39
|
+
- Testing private methods.
|
|
40
|
+
- Asserting on call counts or call order.
|
|
41
|
+
- Breaking on a refactor with no behavior change.
|
|
42
|
+
- Test names that describe how, not what.
|
|
43
|
+
- Checking through an external system instead of through the interface.
|
|
44
|
+
- Restating a static object, manifest, route table, schema, or constant map.
|
|
45
|
+
- Failing on an intentional declaration edit when no caller behavior changed.
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
test("groups accounting setup modules", () => {
|
|
49
|
+
expect(moduleTree).toMatchObject({
|
|
50
|
+
setup: {
|
|
51
|
+
accountingsetup: {
|
|
52
|
+
codingtemplate: {},
|
|
53
|
+
invoiceagreement: {},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This test copies the declaration into the assertion. Test behavior that resolves or inherits modules from this hierarchy. If there is no distinct consumer behavior to test, use a type-check, lint, build, or focused inspection instead.
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
test("createUser saves to database", async () => {
|
|
64
|
+
await createUser({ name: "Alice" });
|
|
65
|
+
const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]);
|
|
66
|
+
expect(row).toBeDefined();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("createUser makes user retrievable", async () => {
|
|
70
|
+
const user = await createUser({ name: "Alice" });
|
|
71
|
+
const retrieved = await getUser(user.id);
|
|
72
|
+
expect(retrieved.name).toBe("Alice");
|
|
73
|
+
});
|
|
74
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-to-issues
|
|
3
|
+
description: Break a plan or PRD into independently grabbable issues, then create and link those issues in agent-issues.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the shared [language standard](../agent-issues-language.md).
|
|
7
|
+
Follow the shared [skill operating contract](../agent-issues-operating-contract.md).
|
|
8
|
+
|
|
9
|
+
# To Issues
|
|
10
|
+
|
|
11
|
+
Break a plan into sequenced, independently verifiable issues. Use tracer-bullet vertical slices.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### 1. Gather context
|
|
16
|
+
|
|
17
|
+
Work from what is already in the conversation context. If the user gives an entity ID, run the **Entity Read** recipe to resolve it. If the user gives a file path, read the file first.
|
|
18
|
+
|
|
19
|
+
Run the **Initiative Read** recipe and the **Relation Query** recipe for the active scope to find:
|
|
20
|
+
|
|
21
|
+
- the parent initiative that must structurally own the new issues
|
|
22
|
+
- the PRD and user stories the issues must satisfy
|
|
23
|
+
- the active Plan entries that each new issue implements, when the work comes from a Plan
|
|
24
|
+
- any existing issues or blockers you must reuse instead of duplicate
|
|
25
|
+
|
|
26
|
+
### 2. Explore the codebase
|
|
27
|
+
|
|
28
|
+
If you have not explored the codebase yet, do so now to understand the current state of the code. Issue titles and descriptions must use the established vocabulary and respect the ADRs in the area you touch.
|
|
29
|
+
|
|
30
|
+
### 3. Draft vertical slices
|
|
31
|
+
|
|
32
|
+
List every testable behavior, contract, state, integration, and verification change in the plan. Draft one tracer-bullet issue per change. Dependencies remain linked issues; a shared feature outcome is not a reason to merge them.
|
|
33
|
+
|
|
34
|
+
A slice can be `HITL` or `AFK`. Prefer `AFK` over `HITL` when you can. If the choice matters to the user, state it in the text you present. Do not invent unsupported tracker fields.
|
|
35
|
+
|
|
36
|
+
Rules:
|
|
37
|
+
|
|
38
|
+
- Each slice delivers one narrow, complete change through the affected behavior.
|
|
39
|
+
- A finished slice is demoable or verifiable on its own.
|
|
40
|
+
- Merge changes only when they share one implementation boundary and one acceptance check.
|
|
41
|
+
- Use sub-issues when related changes must roll up under one parent issue. In this shape, leaf sub-issues normally carry the `fixes` links to user stories.
|
|
42
|
+
|
|
43
|
+
### 4. Quiz the user
|
|
44
|
+
|
|
45
|
+
Present the proposed breakdown as a numbered list. For each slice, show:
|
|
46
|
+
|
|
47
|
+
- Title
|
|
48
|
+
- Type: `HITL` or `AFK`
|
|
49
|
+
- Blocked by
|
|
50
|
+
- User stories covered
|
|
51
|
+
|
|
52
|
+
Ask whether the size of each slice and the dependencies feel right, whether to merge or split any slices, and whether the `HITL` and `AFK` split is correct.
|
|
53
|
+
|
|
54
|
+
Repeat until the user approves the breakdown.
|
|
55
|
+
|
|
56
|
+
### 5. Publish the issues in agent-issues
|
|
57
|
+
|
|
58
|
+
For each approved slice:
|
|
59
|
+
|
|
60
|
+
1. Write a short markdown issue body from the [Issue recipe](../recipes/issue.md) before you publish it. Keep the substance of the approved slice in the body, not just in the title. Include the slice type (`AFK` or `HITL`), the user-visible outcome, the main implementation seam, the acceptance criteria, and any explicit blocker or dependency from the approved breakdown.
|
|
61
|
+
2. The **Entity Create And Edit** recipe sends the body as direct MCP text. Its CLI fallback reads the body from standard input; do not place multiline text in a shell argument.
|
|
62
|
+
3. Run the **Entity Create And Edit** recipe to create the issue under the correct structural parent: the initiative for top-level work or the parent issue for a sub-issue.
|
|
63
|
+
4. If you reuse an existing issue whose body is missing or old, run the **Entity Create And Edit** recipe to update its body before you link anything else.
|
|
64
|
+
5. Run the **Entity Relations** recipe to link each leaf issue to every user story it satisfies with `fixes`.
|
|
65
|
+
6. For Plan-based work, run the **Plan Entry Issue Link** recipe to link each issue to every active Plan entry it implements with `informs`. Issue creation owns these links.
|
|
66
|
+
7. Run the **Entity Relations** recipe to record dependencies with `blocks`.
|
|
67
|
+
|
|
68
|
+
Publish blockers first, so later issues can link to real issue IDs.
|
|
69
|
+
|
|
70
|
+
Return a short summary that shows each created issue ID, its linked Plan entries and user stories, and its blockers.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-to-prd
|
|
3
|
+
description: Turn an explicit ready Plan into a PRD, create the tracked PRD in agent-issues, and create the user stories that the PRD commits to.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the shared [language standard](../agent-issues-language.md).
|
|
7
|
+
Follow the shared [skill operating contract](../agent-issues-operating-contract.md).
|
|
8
|
+
|
|
9
|
+
This skill turns an explicit ready Plan and relevant codebase knowledge into a PRD. Do not run an open-ended interview.
|
|
10
|
+
|
|
11
|
+
A PRD is not created until the `prd` entity exists and its user stories exist as child `userStory` entities.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Require one explicit ready Plan reference. If it is missing or resolves to more than one Plan, stop and ask for the reference. Do not infer a Plan from conversation context.
|
|
16
|
+
|
|
17
|
+
2. Run the **Entity Read** recipe for the Plan and the **Relation Query** recipe for its direct incoming `owns` relation. Reject a record that is not a Plan or is not `ready`. The Plan must have one initiative owner.
|
|
18
|
+
|
|
19
|
+
3. Run the **Plan Entry Read** recipe to read the Plan entries. Select active entries by excluding an entry with `tombstone: true` and an entry whose ID occurs in another entry's `supersededEntryIds`. Use only active Plan entries as the source for the PRD and user stories. Do not copy obsolete entry history.
|
|
20
|
+
|
|
21
|
+
4. If you have not explored the repo yet, do so now to understand the current state of the code. Choose seams where you will test the feature. Use the established vocabulary throughout the PRD and respect applicable ADRs.
|
|
22
|
+
|
|
23
|
+
5. Write the PRD from the [PRD recipe](../recipes/prd.md). Write each user story from the [User Story recipe](../recipes/user-story.md). Map active entry roles into the relevant product requirements, decisions, scope, constraints, preferences, considerations, and unresolved implementation questions. The child `userStory` entities are authoritative. Do not duplicate their story text in the PRD body.
|
|
24
|
+
|
|
25
|
+
6. Save the full PRD markdown from the template in the tracked record body. Run the **Entity Create And Edit** recipe to create the `prd` with its initiative parent and direct body text. This preserves initiative ownership of the PRD.
|
|
26
|
+
|
|
27
|
+
7. Run the **Entity Create And Edit** recipe to create one `userStory` entity for each approved numbered user story with the PRD as parent. The title can be short, but the body must keep the full committed user story sentence and any essential note tied to that story.
|
|
28
|
+
|
|
29
|
+
8. Run the **Plan Entry Issue Link** recipe to create the non-structural Plan `informs` PRD provenance relation. The MCP operation supports issue targets. If this Plan link targets a PRD, use the explicit CLI fallback in that recipe. Verify that the PRD has initiative ownership and Plan provenance.
|
|
30
|
+
|
|
31
|
+
9. Return the PRD content together with the tracked IDs you created. Do not create or update a markdown PRD file. The tracked `prd` and `userStory` records are the only canonical PRD representation for this workflow.
|
|
32
|
+
|
|
33
|
+
Do not treat a markdown document, chat response, or external issue as the source of truth on its own. Do not create a side markdown PRD as part of this workflow. Do not infer a Plan or reuse an existing PRD during conversion.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-wayfinder
|
|
3
|
+
description: Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Follow the shared [language standard](../agent-issues-language.md).
|
|
8
|
+
Follow the shared [skill operating contract](../agent-issues-operating-contract.md).
|
|
9
|
+
|
|
10
|
+
A loose idea has arrived — too big for one agent session, and wrapped in fog: the way from here to the **destination** isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a **shared map** in `agent-issues`, then works its **decision tickets** — questions whose resolution is a decision, not slices of a build to execute — one at a time until the route is clear.
|
|
11
|
+
|
|
12
|
+
The destination varies per effort, and naming it is the first act of charting — it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic — engineering work, course content, whatever fits the shape.
|
|
13
|
+
|
|
14
|
+
## Plan, don't do
|
|
15
|
+
|
|
16
|
+
Wayfinder is **planning** by default: each ticket resolves a decision, and the map is done when the way is clear — nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its **Notes** — carrying execution into the map itself — but absent that, produce decisions, not deliverables.
|
|
17
|
+
|
|
18
|
+
## Refer by title
|
|
19
|
+
|
|
20
|
+
Every map and ticket is an issue, so it has a **title**. In everything the human reads — narration and the map's Decisions-so-far — refer to it by title, not by an internal id, number, or slug. Include the complete `reference` returned by `agent-issues` in its link. Do not abbreviate or replace that reference.
|
|
21
|
+
|
|
22
|
+
## The Map
|
|
23
|
+
|
|
24
|
+
The map is a single `agent-issues` issue under the active initiative — the canonical artifact. Its tickets are child issues of the map.
|
|
25
|
+
|
|
26
|
+
The map is an **index**, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links.
|
|
27
|
+
|
|
28
|
+
Use `agent-issues` as the source of truth. Run the **Entity Create And Edit** recipe to create the map as a `wayfinder-map` issue under the initiative and each ticket as a `wayfinder-ticket` child of the map. Run the **Entity Relations** recipe to add dependencies after creation with `blocks` relations.
|
|
29
|
+
|
|
30
|
+
### The map body
|
|
31
|
+
|
|
32
|
+
The whole map at low resolution, loaded once per session. Open tickets are **not** listed — run the **Entity List** recipe for child issues under the map when needed.
|
|
33
|
+
Use the [Wayfinder Map recipe](../recipes/wayfinder-map.md). It preserves the current map format.
|
|
34
|
+
|
|
35
|
+
### Tickets
|
|
36
|
+
|
|
37
|
+
Each ticket is a **child issue** of the map. Its body contains one question, sized to one 100K token agent session:
|
|
38
|
+
Use the [Wayfinder Ticket recipe](../recipes/wayfinder-ticket.md). It preserves the current ticket format.
|
|
39
|
+
|
|
40
|
+
The `## Ticket type` value is one of `research`, `prototype`, `grilling`, or `task`; see Ticket Types below.
|
|
41
|
+
|
|
42
|
+
A session **claims** a ticket before work by running the **Entity State And Structure** recipe to set its status to `in-progress`. If this fails because another session changed the ticket, reload the frontier and select another ticket. An open `todo` or `ready` ticket is unclaimed.
|
|
43
|
+
|
|
44
|
+
Blocking uses the native `blocks` relation. A ticket is **unblocked** when every blocker has status `done`; the **frontier** is the open, unblocked, unclaimed child issues. Run the **Entity List** recipe and use each child issue's `openBlockers` to identify it.
|
|
45
|
+
|
|
46
|
+
Run the **Entity Create And Edit** recipe to record the answer in `## Resolution` when the ticket is complete, then run the **Entity State And Structure** recipe to set the ticket status to `done`. Link assets created while resolving a ticket from the issue body; do not paste them into the map.
|
|
47
|
+
|
|
48
|
+
### Plan-backed ticket planning
|
|
49
|
+
|
|
50
|
+
For a grilling ticket, give `ai-plan` the complete ticket reference. It runs the **Entity Create And Edit** recipe to create an initiative-owned Plan for a new effort, or resumes only an explicit Plan reference. Every Plan entry from that session uses the **Plan Entry Write** recipe to link back to the ticket reference.
|
|
51
|
+
|
|
52
|
+
The Plan is the canonical detailed resolution. When the ticket is done, retain its Question and status, and use a concise Resolution link to the Plan. Do not copy the detailed reasoning into the ticket. A Plan does not inform a Wayfinder map.
|
|
53
|
+
|
|
54
|
+
## Ticket Types
|
|
55
|
+
|
|
56
|
+
Every ticket is either **HITL** — human in the loop, worked _with_ a human who speaks for themselves — or **AFK**, driven by the agent alone. A HITL ticket only resolves through that live exchange; the agent never stands in for the human's side of it (a grilling agent that answers its own questions has broken this).
|
|
57
|
+
|
|
58
|
+
- **Research** (AFK): Read documentation, third-party APIs, or local resources to find a fact that a decision needs. Resolve it with a read-only research subagent. Use this type when knowledge outside the current working directory is required.
|
|
59
|
+
- **Prototype** (HITL): Raise the fidelity of the discussion with a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI or logic code through `ai-prototype`. Link the prototype as an asset. Use this type when "how should it look" or "how should it behave" is the key question.
|
|
60
|
+
- **Grilling** (HITL): Conversation. This is the default type. Always use `ai-plan` with `ai-domain-modeling` active.
|
|
61
|
+
- **Task** (HITL or AFK): Manual work that must happen before a _decision_ can be made — nothing to decide, prototype, or research, but the discussion is blocked until it's done. Signing up for a service so its API can be judged, provisioning access, moving data so its shape can be seen. This is the one type that _does_ rather than decides — and it earns its place by unblocking a decision, not by delivering the destination. The agent drives it alone where it can (AFK); otherwise it hands the human a precise checklist (HITL). Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on.
|
|
62
|
+
|
|
63
|
+
## Fog of war
|
|
64
|
+
|
|
65
|
+
The map is _deliberately_ incomplete: don't chart what you can't yet see. Beyond the live tickets lies the **fog of war** — the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets — one at a time, until the way to the destination is clear and no tickets remain.
|
|
66
|
+
|
|
67
|
+
The map's **Not yet specified** section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier _toward_ the destination — everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed.
|
|
68
|
+
|
|
69
|
+
**Fog or ticket?** The test is whether you can state the question precisely now — _not_ whether you can answer it now.
|
|
70
|
+
|
|
71
|
+
- **Ticket when** the question is already sharp — even if it's blocked and you can't act on it yet.
|
|
72
|
+
- **Not yet specified when** you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it.
|
|
73
|
+
|
|
74
|
+
**Not yet specified** excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section).
|
|
75
|
+
|
|
76
|
+
## Out of scope
|
|
77
|
+
|
|
78
|
+
Fog only ever gathers _toward_ the destination. The destination fixes the scope, so work beyond it is **out of scope** — it isn't fog, and it doesn't belong in **Not yet specified**. It gets its own **Out of scope** section on the map: work you've consciously ruled out of _this_ effort. Scope, not sharpness, lands it here.
|
|
79
|
+
|
|
80
|
+
Out-of-scope work never graduates — the frontier stops at the destination — so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption.
|
|
81
|
+
|
|
82
|
+
Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination — mis-scoped in while charting, or exposed by a resolution — **close it** (a closed ticket is unambiguously off the frontier) and leave one line in the **Out of scope** section: the gist plus why it's out of scope, linking the closed ticket. It stays out of **Decisions so far**, which records the route actually walked — a scope boundary isn't a step on it.
|
|
83
|
+
|
|
84
|
+
## Invocation
|
|
85
|
+
|
|
86
|
+
Two modes. Either way, **never resolve more than one ticket per session** — with the exception of research tickets.
|
|
87
|
+
|
|
88
|
+
### Chart the map
|
|
89
|
+
|
|
90
|
+
User invokes with a loose idea.
|
|
91
|
+
|
|
92
|
+
1. **Resolve the tracked scope.** Run the **Entity Read** recipe and the **Context Read** recipe to find the active initiative and read its context. For a new feature, run the **Entity Create And Edit** recipe to create a new initiative by default. Do not create a map outside an initiative.
|
|
93
|
+
2. **Name the destination.** Run `ai-plan` with `ai-domain-modeling` active to pin down what this map is finding its way to — the spec, decision, or change. The destination fixes the scope, so settle it first.
|
|
94
|
+
3. **Map the frontier.** Grill again, **breadth-first** this time: fan out across the whole space rather than deep on any one thread, surface the open decisions and the first steps that are possible now. **If this finds no fog** — the way to the destination is already clear and small enough for one session — do not create a map. Ask the user how to proceed.
|
|
95
|
+
4. **Create the map** as a `wayfinder-map` child issue of the initiative: Destination and Notes filled in, Decisions-so-far empty, and the fog recorded in **Not yet specified**.
|
|
96
|
+
5. **Create the tickets you can specify now** as `wayfinder-ticket` child issues of the map. Then wire `blocks` relations in a second pass, because issues need references before they can link to each other. This separates the frontier from blocked tickets. Keep everything you cannot yet specify in **Not yet specified**.
|
|
97
|
+
6. **Start research subagents.** For each new `research` ticket, start a read-only research subagent. It returns its findings to the current agent, which records the resolution and updates the ticket. Do not create a branch unless the research needs a prototype or another tracked artifact.
|
|
98
|
+
7. Stop — charting is one session's work; it does not resolve a HITL ticket.
|
|
99
|
+
|
|
100
|
+
### Work through the map
|
|
101
|
+
|
|
102
|
+
User invokes with a map (URL or number). A ticket is **optional** — without one, you pick the next decision, not the user.
|
|
103
|
+
|
|
104
|
+
1. Run the **Entity Read** recipe to load the **map**, then run the **Context Read** recipe for its scoped context. Do not load every ticket body.
|
|
105
|
+
2. Choose the ticket. If the user named one, use it. Otherwise select the first frontier ticket. **Claim it** by setting it to `in-progress` before work.
|
|
106
|
+
3. Resolve it — **zoom as needed**: run the **Entity Read** recipe or the **Relation Query** recipe to load related or closed tickets only when needed. Use the skills named in `## Notes`. For a grilling ticket, use `ai-plan` with `ai-domain-modeling` active and follow Plan-backed ticket planning.
|
|
107
|
+
4. Record the resolution: for a Plan-backed grilling ticket, retain its Ticket type and Question and use the **Entity Create And Edit** recipe to update only `## Resolution` with the concise Plan link. For other tickets, use that recipe to replace the ticket body with its completed `## Resolution`. Run the **Entity State And Structure** recipe to set the ticket status to `done`, and append a title-and-reference link with a one-line gist to the map's Decisions-so-far.
|
|
108
|
+
5. Add newly surfaced tickets with the **Entity Create And Edit** recipe, then link them with the **Entity Relations** recipe; graduate any fog that the answer made specific. Remove each graduated patch from **Not yet specified** so it exists only in its new ticket. If the answer shows that a ticket sits beyond the destination, **rule it out of scope** instead of resolving it on the route. If the decision invalidates other map parts, update or delete those tickets. When no open tickets or in-scope fog remain, run the **Entity State And Structure** recipe to set the map status to `done`.
|
|
109
|
+
|
|
110
|
+
The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Record Body Recipe Catalog
|
|
2
|
+
|
|
3
|
+
Use the recipe for the record that you create or edit.
|
|
4
|
+
|
|
5
|
+
## Shared Rules
|
|
6
|
+
|
|
7
|
+
- Keep typed facts outside body prose. Typed facts include status, parentage, timestamps, revisions, and references.
|
|
8
|
+
- Keep graph relations outside body prose.
|
|
9
|
+
- Keep committed user stories in child `userStory` entities. Do not duplicate them in a PRD body.
|
|
10
|
+
- Use `<angle brackets>` for authored placeholders. Replace them with authored content before you save the body.
|
|
11
|
+
- Use `Not derived from tracker metadata.` only in generated bodies when tracker metadata cannot supply content. Do not use it as an authored placeholder.
|
|
12
|
+
|
|
13
|
+
## Recipes
|
|
14
|
+
|
|
15
|
+
- [Context Summary](./context-summary.md)
|
|
16
|
+
- [Context Term](./context-term.md)
|
|
17
|
+
- [Project](./project.md)
|
|
18
|
+
- [Epic](./epic.md)
|
|
19
|
+
- [Version](./version.md)
|
|
20
|
+
- [Initiative](./initiative.md)
|
|
21
|
+
- [PRD](./prd.md)
|
|
22
|
+
- [User Story](./user-story.md)
|
|
23
|
+
- [Issue](./issue.md)
|
|
24
|
+
- [Debt](./debt.md)
|
|
25
|
+
- [ADR](./adr.md)
|
|
26
|
+
- [Handoff](./handoff.md)
|
|
27
|
+
- [Issue Comment](./issue-comment.md)
|
|
28
|
+
- [Wayfinder Map](./wayfinder-map.md)
|
|
29
|
+
- [Wayfinder Ticket](./wayfinder-ticket.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ADR Recipe
|
|
2
|
+
|
|
3
|
+
Use this recipe for an architecture decision record body.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
## Status
|
|
7
|
+
|
|
8
|
+
<Accepted | Superseded | Archived>
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
<The decision context and constraints.>
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
<The decision that this ADR records.>
|
|
17
|
+
|
|
18
|
+
## Consequences
|
|
19
|
+
|
|
20
|
+
- <A result of this decision.>
|
|
21
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Context Summary Recipe
|
|
2
|
+
|
|
3
|
+
Use this recipe for an initiative-scoped context summary.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
<The shared domain purpose for this scope.>
|
|
9
|
+
|
|
10
|
+
## Boundaries
|
|
11
|
+
|
|
12
|
+
- <A durable scope boundary.>
|
|
13
|
+
|
|
14
|
+
## Working Agreements
|
|
15
|
+
|
|
16
|
+
- <A shared rule that applies to work in this scope.>
|
|
17
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Debt Recipe
|
|
2
|
+
|
|
3
|
+
Use this recipe for a debt record body. Keep category, priority, lifecycle, ownership, resolver links, and context links in typed fields and graph relations.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
## Description
|
|
7
|
+
|
|
8
|
+
<The accepted cost or risk that this record describes.>
|
|
9
|
+
|
|
10
|
+
## Impact
|
|
11
|
+
|
|
12
|
+
<The effect if this debt remains open.>
|
|
13
|
+
|
|
14
|
+
## Evidence
|
|
15
|
+
|
|
16
|
+
<The facts that support this debt record.>
|
|
17
|
+
|
|
18
|
+
## Suggested Remediation
|
|
19
|
+
|
|
20
|
+
<A possible way to reduce or remove the debt.>
|
|
21
|
+
```
|