@neonwatty/limner 0.1.6 → 0.1.8

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.
Files changed (81) hide show
  1. package/README.md +31 -29
  2. package/dist/commands/compare-image-reference.d.ts +1 -0
  3. package/dist/commands/compare-image-reference.js +4 -0
  4. package/dist/commands/compare-image-reference.js.map +1 -1
  5. package/dist/commands/compare-output.js +2 -1
  6. package/dist/commands/compare-output.js.map +1 -1
  7. package/dist/commands/compare.d.ts +1 -0
  8. package/dist/commands/compare.js +4 -12
  9. package/dist/commands/compare.js.map +1 -1
  10. package/dist/commands/ledger.d.ts +3 -1
  11. package/dist/commands/loop-actions.d.ts +22 -0
  12. package/dist/commands/loop-actions.js +54 -0
  13. package/dist/commands/loop-actions.js.map +1 -0
  14. package/dist/commands/loop-cli.js +121 -2
  15. package/dist/commands/loop-cli.js.map +1 -1
  16. package/dist/commands/loop-comparison-adapters.d.ts +1 -0
  17. package/dist/commands/loop-comparison-adapters.js +7 -2
  18. package/dist/commands/loop-comparison-adapters.js.map +1 -1
  19. package/dist/commands/loop-response.d.ts +31 -0
  20. package/dist/commands/loop-response.js +84 -0
  21. package/dist/commands/loop-response.js.map +1 -0
  22. package/dist/commands/loop-task.d.ts +17 -0
  23. package/dist/commands/loop-task.js +98 -0
  24. package/dist/commands/loop-task.js.map +1 -0
  25. package/dist/commands/loop.d.ts +4 -1
  26. package/dist/commands/loop.js +26 -21
  27. package/dist/commands/loop.js.map +1 -1
  28. package/dist/core/agent-comparison-pack.d.ts +17 -0
  29. package/dist/core/agent-comparison-pack.js +25 -102
  30. package/dist/core/agent-comparison-pack.js.map +1 -1
  31. package/dist/core/agent-comparison-prompts.d.ts +1 -1
  32. package/dist/core/agent-comparison-prompts.js +4 -4
  33. package/dist/core/agent-comparison-prompts.js.map +1 -1
  34. package/dist/core/agent-comparison-report.js +2 -2
  35. package/dist/core/agent-comparison-report.js.map +1 -1
  36. package/dist/core/agent-comparison-response.d.ts +1 -0
  37. package/dist/core/agent-comparison-response.js +2 -0
  38. package/dist/core/agent-comparison-response.js.map +1 -0
  39. package/dist/core/agent-comparison-submit.d.ts +35 -0
  40. package/dist/core/agent-comparison-submit.js +113 -0
  41. package/dist/core/agent-comparison-submit.js.map +1 -0
  42. package/dist/core/agent-task-brief.d.ts +30 -0
  43. package/dist/core/agent-task-brief.js +158 -0
  44. package/dist/core/agent-task-brief.js.map +1 -0
  45. package/dist/core/comparison-artifacts.js +16 -7
  46. package/dist/core/comparison-artifacts.js.map +1 -1
  47. package/dist/core/current-artifacts.d.ts +14 -0
  48. package/dist/core/current-artifacts.js +16 -0
  49. package/dist/core/current-artifacts.js.map +1 -0
  50. package/dist/core/ledger-agent-responses.d.ts +22 -0
  51. package/dist/core/ledger-agent-responses.js +13 -0
  52. package/dist/core/ledger-agent-responses.js.map +1 -0
  53. package/dist/core/ledger-db.js +20 -0
  54. package/dist/core/ledger-db.js.map +1 -1
  55. package/dist/core/ledger-events.js +21 -1
  56. package/dist/core/ledger-events.js.map +1 -1
  57. package/dist/core/ledger-markdown.d.ts +21 -6
  58. package/dist/core/ledger-markdown.js +89 -6
  59. package/dist/core/ledger-markdown.js.map +1 -1
  60. package/dist/core/ledger-queries.d.ts +4 -1
  61. package/dist/core/ledger-queries.js +12 -3
  62. package/dist/core/ledger-queries.js.map +1 -1
  63. package/dist/core/ledger-store.d.ts +8 -1
  64. package/dist/core/ledger-store.js +4 -0
  65. package/dist/core/ledger-store.js.map +1 -1
  66. package/dist/core/loop-rerun-command.d.ts +4 -0
  67. package/dist/core/loop-rerun-command.js +36 -0
  68. package/dist/core/loop-rerun-command.js.map +1 -0
  69. package/dist/core/report-writer.js +1 -1
  70. package/dist/schemas/ledger.d.ts +23 -0
  71. package/dist/schemas/ledger.js +4 -0
  72. package/dist/schemas/ledger.js.map +1 -1
  73. package/docs/agent-workflow.md +39 -11
  74. package/docs/archive/visual-spec-workflow.md +23 -0
  75. package/docs/goals/db-native-agent-responses/goal.md +91 -0
  76. package/docs/goals/db-native-agent-responses/state.yaml +240 -0
  77. package/docs/superpowers/plans/2026-06-13-agent-response-sqlite.md +70 -0
  78. package/docs/superpowers/plans/2026-06-13-loop-action-ledger.md +257 -0
  79. package/package.json +1 -1
  80. package/skills/limner/SKILL.md +22 -21
  81. package/templates/target/AGENT_GUIDE.md +4 -4
@@ -17,13 +17,24 @@ Use `limner loop` for Ralph Loop-style polishing across one or more trajectories
17
17
 
18
18
  1. Start with `limner loop start --mode <mode> --target <name> --name <human-name> --max-iterations <count>`.
19
19
  2. Compare with `limner loop compare --trajectory <trajectory-id>`.
20
- 3. Read the generated comparison prompt and response target.
21
- 4. Write or validate the agent response.
22
- 5. Check state with `limner loop status --trajectory <trajectory-id>`.
23
- 6. Move to the next scoped fix with `limner loop next --trajectory <trajectory-id>`.
24
- 7. Close with `limner loop close --trajectory <trajectory-id>`.
20
+ 3. Read the generated comparison prompt.
21
+ 4. Submit the agent response with `limner loop response submit --trajectory <trajectory-id> --from-run <run-id> --file ./response.json`.
22
+ 5. After validation, prefer `limner loop task --trajectory <trajectory-id> --executor subagent`.
23
+ 6. Record `limner loop action start --trajectory <trajectory-id> --from-run <run-id> --kind polish --executor subagent --summary "<short edit intent>"` before edits.
24
+ 7. Make one scoped edit from the task brief.
25
+ 8. Record `limner loop action complete --trajectory <trajectory-id> --action <action-id> --executor subagent --summary "<what changed>" --files "<paths>"` after edits, then rerun `limner loop compare --trajectory <trajectory-id>`.
26
+ 9. For comparison-only smoke runs with no intended edit, record `limner loop action skip --trajectory <trajectory-id> --from-run <run-id> --summary "Comparison smoke only; no edit intended"`.
27
+ 10. Check state with `limner loop status --trajectory <trajectory-id>`.
28
+ 11. Move to the next scoped fix with `limner loop next --trajectory <trajectory-id>`.
29
+ 12. Close with `limner loop close --trajectory <trajectory-id>`.
25
30
 
26
- Every meaningful loop interaction writes a ledger event. Use `--feedback "<short note>"` for a 255-character `agentFeedback` note about improving the current process. Use `limner ledger export <trajectory-id> --format markdown` to hand a compact trajectory history to another agent.
31
+ The intended edit loop is `loop compare -> loop response submit -> loop task --executor subagent -> loop action start -> edit -> loop action complete -> loop compare`. Every meaningful loop interaction writes a ledger event. Agent responses are submitted to local SQLite with the full JSON body, hash, validation status, and freshness. Keep every action `--summary` under 255 characters. Use `--feedback "<short note>"` for a 255-character `agentFeedback` note about improving the current process. Use `limner ledger export <trajectory-id> --format markdown` to hand a compact trajectory history to another agent.
32
+
33
+ Use `limner loop task --trajectory <trajectory-id> --executor subagent --format json` when another tool needs machine-readable task data.
34
+
35
+ Limner records executor intent and action claims; it cannot prove an external orchestrator actually used a subagent.
36
+
37
+ Agents can discover the current command surface with `limner --help`, `limner loop --help`, `limner loop response --help`, `limner loop task --help`, and `limner ledger --help`.
27
38
 
28
39
  ## Image To Reference
29
40
 
@@ -33,32 +44,22 @@ Every meaningful loop interaction writes a ledger event. Use `--feedback "<short
33
44
  4. Edit `reference/index.html` and `reference/styles.css`.
34
45
  5. Run `limner compare image-reference --target <name>`.
35
46
  6. Read `captures/image-reference/agent-comparison/agent-prompt.codex.md`.
36
- 7. Write `captures/image-reference/agent-comparison/agent-response.json`.
37
- 8. Rerun `limner compare image-reference --target <name>` so Limner validates `image-comparison.json` and `comparison-summary.json`.
47
+ 7. Submit JSON with `limner loop response submit --trajectory <trajectory-id> --from-run <run-id> --file ./response.json`.
48
+ 8. Use the validated `image-comparison.json` and `comparison-summary.json`.
38
49
  9. Use the validated next-iteration guidance for one scoped mockup fix.
39
50
 
40
- Optional structured spec layer:
41
-
42
- - Run `limner compare image-reference --target <name> --spec`.
43
- - Edit `contract/visual-spec-instructions.md` to customize the agent prompt for this target, or pass `--spec-instructions <path>` for a shared policy file.
44
- - Use `captures/image-reference/spec/agent-prompt.codex.md` for Codex or `captures/image-reference/spec/agent-prompt.claude.md` for Claude.
45
- - Use the generated `captures/image-reference/spec/agent-response.schema.json` for strict structured output when the agent supports it.
46
- - The agent should inspect the ideal image and reference screenshot separately. The side-by-side is comparison context, not the image to parse.
47
- - Have the agent write `captures/image-reference/spec/agent-response.json`.
48
- - Rerun the same command so Limner can validate the response and emit the spec and diff JSON artifacts.
49
-
50
51
  ## Reference To Implementation
51
52
 
52
53
  1. Confirm the reference HTML is approved.
53
54
  2. Ensure every important region has both `referenceSelector` and an implementation selector in `appSelector`.
54
55
  3. Run `limner compare reference-implementation --target <name> --url <implementation-url>`.
55
56
  4. Read `captures/reference-implementation/agent-comparison/agent-prompt.codex.md`.
56
- 5. Write `captures/reference-implementation/agent-comparison/agent-response.json`.
57
- 6. Rerun the same command so Limner validates image, structure, and summary comparison artifacts.
57
+ 5. Submit JSON with `limner loop response submit --trajectory <trajectory-id> --from-run <run-id> --file ./response.json`.
58
+ 6. Use the validated image, structure, and summary comparison artifacts.
58
59
  7. Use the validated next-iteration guidance for one scoped implementation fix.
59
60
 
60
61
  ## Constraints
61
62
 
62
- - Limner does not call an AI vision model itself. Agent comparison and the `--spec` workflow require an external agent.
63
+ - Limner does not call an AI vision model itself. Agent comparison requires an external agent.
63
64
  - Limner does not make final pass/fail judgments.
64
65
  - Limner logs only local JSONL events under `.limner/runs/`.
@@ -11,8 +11,8 @@ Prompt profiles: `ideal-to-mockup` for Loop 1, and `mockup-to-implementation` fo
11
11
  3. Edit `reference/index.html` and `reference/styles.css` until the reference is a faithful HTML facsimile.
12
12
  4. Run `limner compare image-reference --target <target>`.
13
13
  5. Read `captures/image-reference/agent-comparison/agent-prompt.codex.md`.
14
- 6. Write `captures/image-reference/agent-comparison/agent-response.json`.
15
- 7. Rerun the comparison and use the validated next-iteration guidance for one scoped mockup fix.
14
+ 6. Submit JSON with `limner loop response submit --trajectory <trajectory-id> --from-run <run-id> --file ./response.json`.
15
+ 7. Use the validated next-iteration guidance for one scoped mockup fix.
16
16
 
17
17
  ## Loop 2: Reference To Implementation
18
18
 
@@ -20,8 +20,8 @@ Prompt profiles: `ideal-to-mockup` for Loop 1, and `mockup-to-implementation` fo
20
20
  2. Add implementation selectors to `contract/regions.json` using `appSelector`.
21
21
  3. Run `limner compare reference-implementation --target <target> --url <implementation-url>`.
22
22
  4. Read `captures/reference-implementation/agent-comparison/agent-prompt.codex.md`.
23
- 5. Write `captures/reference-implementation/agent-comparison/agent-response.json`.
24
- 6. Rerun the comparison and use the validated next-iteration guidance for one scoped implementation fix.
23
+ 5. Submit JSON with `limner loop response submit --trajectory <trajectory-id> --from-run <run-id> --file ./response.json`.
24
+ 6. Use the validated next-iteration guidance for one scoped implementation fix.
25
25
 
26
26
  ## Rule
27
27