@turri-dev/cli 0.4.3-next.a60ada5 → 0.4.3-next.fd01774
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/README.md +23 -3
- package/dist/banner.js +248 -0
- package/dist/capture-cli.js +4 -4
- package/dist/capture-view.js +99 -0
- package/dist/chat-commands.js +6 -6
- package/dist/chat-models.js +17 -15
- package/dist/chat-tab-header.js +21 -9
- package/dist/chat-tabs.js +1 -1
- package/dist/chat-terminal.js +127 -67
- package/dist/chat-waiting.js +0 -20
- package/dist/cli-options.js +11 -7
- package/dist/cli-root.js +101 -0
- package/dist/cli.js +20 -26
- package/dist/conform-cli.js +4 -6
- package/dist/cultivate-cli.js +65 -97
- package/dist/doctor-cli.js +99 -0
- package/dist/drift-cli.js +2 -7
- package/dist/entry-renderers.js +107 -0
- package/dist/extension.js +14 -3355
- package/dist/init-config-cli.js +209 -0
- package/dist/launch-cli.js +55 -91
- package/dist/lineage-cli.js +2 -4
- package/dist/loop-cli.js +118 -237
- package/dist/panel-view.js +409 -0
- package/dist/parse-cli.js +5 -2
- package/dist/pi-launch.js +41 -13
- package/dist/pi-themes.js +2 -2
- package/dist/plain-code-blocks.js +1 -1
- package/dist/print-mode.js +20 -0
- package/dist/question-dialog.js +10 -6
- package/dist/quiet.js +7 -106
- package/dist/regenerate/diff-view.js +6 -87
- package/dist/regenerate/jobs-tree.js +2 -17
- package/dist/regenerate/spec-map-view.js +3 -68
- package/dist/regenerate-cli.js +7 -11
- package/dist/reopen.js +40 -7
- package/dist/skill-progress.js +25 -0
- package/dist/skill-report.js +52 -0
- package/dist/terminal-marks.js +21 -0
- package/dist/terminal-notifications.js +116 -31
- package/dist/terminal-view.js +275 -0
- package/dist/turri-versions.js +64 -6
- package/docs/README.md +2 -2
- package/docs/capture.md +47 -11
- package/docs/chats.md +7 -5
- package/docs/claude-subscription.md +1 -1
- package/docs/config.md +10 -7
- package/docs/development.md +30 -64
- package/docs/headless.md +3 -1
- package/docs/hosting.md +3 -251
- package/docs/installation.md +5 -3
- package/docs/launch.md +1 -1
- package/docs/sandbox.md +2 -0
- package/docs/sentinel.md +4 -4
- package/docs/using.md +3 -3
- package/package.json +13 -31
- package/dist/ask.d.ts +0 -90
- package/dist/ask.js +0 -170
- package/dist/background-skills.d.ts +0 -56
- package/dist/background-skills.js +0 -129
- package/dist/bedrock-region.d.ts +0 -66
- package/dist/bedrock-region.js +0 -144
- package/dist/brand.d.ts +0 -13
- package/dist/btw.d.ts +0 -69
- package/dist/btw.js +0 -174
- package/dist/capture/agents.d.ts +0 -361
- package/dist/capture/agents.js +0 -332
- package/dist/capture/area.d.ts +0 -58
- package/dist/capture/area.js +0 -197
- package/dist/capture/assemble.d.ts +0 -122
- package/dist/capture/assemble.js +0 -452
- package/dist/capture/capture.d.ts +0 -116
- package/dist/capture/capture.js +0 -1228
- package/dist/capture/chat.d.ts +0 -29
- package/dist/capture/chat.js +0 -94
- package/dist/capture/checks.d.ts +0 -142
- package/dist/capture/checks.js +0 -643
- package/dist/capture/config.d.ts +0 -13
- package/dist/capture/config.js +0 -60
- package/dist/capture/interface.d.ts +0 -71
- package/dist/capture/interface.js +0 -199
- package/dist/capture/map.d.ts +0 -56
- package/dist/capture/map.js +0 -530
- package/dist/capture/progress.d.ts +0 -108
- package/dist/capture/progress.js +0 -234
- package/dist/capture/report.d.ts +0 -75
- package/dist/capture/report.js +0 -267
- package/dist/capture/scripts.d.ts +0 -26
- package/dist/capture/scripts.js +0 -33
- package/dist/capture/state.d.ts +0 -296
- package/dist/capture/state.js +0 -43
- package/dist/capture/trial.d.ts +0 -34
- package/dist/capture/trial.js +0 -89
- package/dist/capture-cli.d.ts +0 -1
- package/dist/chat-commands.d.ts +0 -17
- package/dist/chat-idle.d.ts +0 -7
- package/dist/chat-idle.js +0 -20
- package/dist/chat-models.d.ts +0 -22
- package/dist/chat-records.d.ts +0 -50
- package/dist/chat-records.js +0 -107
- package/dist/chat-scope.d.ts +0 -14
- package/dist/chat-scope.js +0 -15
- package/dist/chat-skills.d.ts +0 -17
- package/dist/chat-skills.js +0 -18
- package/dist/chat-tab-header.d.ts +0 -15
- package/dist/chat-tabs.d.ts +0 -26
- package/dist/chat-terminal.d.ts +0 -24
- package/dist/chat-ui.d.ts +0 -33
- package/dist/chat-waiting.d.ts +0 -67
- package/dist/chats.d.ts +0 -343
- package/dist/chats.js +0 -1010
- package/dist/cli-options.d.ts +0 -24
- package/dist/cli.d.ts +0 -9
- package/dist/config-edit.d.ts +0 -83
- package/dist/config-edit.js +0 -391
- package/dist/config.d.ts +0 -428
- package/dist/config.js +0 -811
- package/dist/conform-cli.d.ts +0 -1
- package/dist/conformance-switch.d.ts +0 -25
- package/dist/conformance-switch.js +0 -86
- package/dist/cultivate-cli.d.ts +0 -1
- package/dist/doctor-tool.d.ts +0 -11
- package/dist/doctor-tool.js +0 -33
- package/dist/drift-cli.d.ts +0 -1
- package/dist/environment.d.ts +0 -37
- package/dist/environment.js +0 -109
- package/dist/extension.d.ts +0 -209
- package/dist/genome.d.ts +0 -77
- package/dist/genome.js +0 -288
- package/dist/graph.d.ts +0 -52
- package/dist/graph.js +0 -247
- package/dist/host-session.d.ts +0 -112
- package/dist/host-session.js +0 -103
- package/dist/host.d.ts +0 -40
- package/dist/host.js +0 -54
- package/dist/identity.d.ts +0 -7
- package/dist/identity.js +0 -75
- package/dist/init-config.d.ts +0 -169
- package/dist/init-config.js +0 -841
- package/dist/installed-providers.d.ts +0 -40
- package/dist/installed-providers.js +0 -98
- package/dist/jellyfish.d.ts +0 -40
- package/dist/judge.d.ts +0 -25
- package/dist/judge.js +0 -62
- package/dist/launch-agent.d.ts +0 -62
- package/dist/launch-agent.js +0 -339
- package/dist/launch-cli.d.ts +0 -1
- package/dist/launch-session.d.ts +0 -68
- package/dist/launch-session.js +0 -225
- package/dist/launch-tools.d.ts +0 -28
- package/dist/launch-tools.js +0 -72
- package/dist/launch-track.d.ts +0 -175
- package/dist/launch-track.js +0 -497
- package/dist/lineage-cli.d.ts +0 -1
- package/dist/loop-cli.d.ts +0 -35
- package/dist/loop-tools.d.ts +0 -103
- package/dist/loop-tools.js +0 -361
- package/dist/model-check.d.ts +0 -72
- package/dist/model-check.js +0 -162
- package/dist/module-report.d.ts +0 -9
- package/dist/new-project.d.ts +0 -10
- package/dist/new-project.js +0 -42
- package/dist/notice.d.ts +0 -115
- package/dist/notice.js +0 -61
- package/dist/parse-cli.d.ts +0 -1
- package/dist/parse-tool.d.ts +0 -9
- package/dist/parse-tool.js +0 -33
- package/dist/pi-launch.d.ts +0 -1
- package/dist/pi-settings.d.ts +0 -4
- package/dist/pi-themes.d.ts +0 -3
- package/dist/pi.d.ts +0 -248
- package/dist/pi.js +0 -889
- package/dist/picture-row.d.ts +0 -10
- package/dist/plain/check.d.ts +0 -63
- package/dist/plain/check.js +0 -236
- package/dist/plain/concepts.d.ts +0 -37
- package/dist/plain/concepts.js +0 -283
- package/dist/plain/cycles.d.ts +0 -21
- package/dist/plain/cycles.js +0 -190
- package/dist/plain/errors.d.ts +0 -26
- package/dist/plain/errors.js +0 -50
- package/dist/plain/files.d.ts +0 -47
- package/dist/plain/files.js +0 -161
- package/dist/plain/graph.d.ts +0 -107
- package/dist/plain/graph.js +0 -194
- package/dist/plain/highlight.d.ts +0 -43
- package/dist/plain/highlight.js +0 -196
- package/dist/plain/index.d.ts +0 -18
- package/dist/plain/index.js +0 -18
- package/dist/plain/liquid.d.ts +0 -22
- package/dist/plain/liquid.js +0 -124
- package/dist/plain/markdown.d.ts +0 -103
- package/dist/plain/markdown.js +0 -330
- package/dist/plain/module-concepts.d.ts +0 -32
- package/dist/plain/module-concepts.js +0 -80
- package/dist/plain/parser.d.ts +0 -163
- package/dist/plain/parser.js +0 -930
- package/dist/plain/plain.tmLanguage.json +0 -150
- package/dist/plain/project.d.ts +0 -48
- package/dist/plain/project.js +0 -155
- package/dist/plain/spec.d.ts +0 -152
- package/dist/plain/spec.js +0 -265
- package/dist/plain/stdlib.d.ts +0 -16
- package/dist/plain/stdlib.js +0 -48
- package/dist/plain/test-plain-file.d.ts +0 -59
- package/dist/plain/test-plain-file.js +0 -232
- package/dist/plain-code-blocks.d.ts +0 -14
- package/dist/plain-files.d.ts +0 -21
- package/dist/plain-files.js +0 -156
- package/dist/pointer-hover.d.ts +0 -12
- package/dist/question-dialog.d.ts +0 -60
- package/dist/questioning.d.ts +0 -55
- package/dist/questioning.js +0 -109
- package/dist/quiet.d.ts +0 -34
- package/dist/regenerate/activity.d.ts +0 -227
- package/dist/regenerate/activity.js +0 -250
- package/dist/regenerate/agent-env.d.ts +0 -51
- package/dist/regenerate/agent-env.js +0 -311
- package/dist/regenerate/agent-shell.d.ts +0 -54
- package/dist/regenerate/agent-shell.js +0 -121
- package/dist/regenerate/arbiter.d.ts +0 -68
- package/dist/regenerate/arbiter.js +0 -133
- package/dist/regenerate/audit.d.ts +0 -69
- package/dist/regenerate/audit.js +0 -212
- package/dist/regenerate/base-folder.d.ts +0 -70
- package/dist/regenerate/base-folder.js +0 -186
- package/dist/regenerate/cases.d.ts +0 -12
- package/dist/regenerate/cases.js +0 -149
- package/dist/regenerate/change-view.d.ts +0 -23
- package/dist/regenerate/change-view.js +0 -153
- package/dist/regenerate/chunk-plan.d.ts +0 -217
- package/dist/regenerate/chunk-plan.js +0 -937
- package/dist/regenerate/codebase.d.ts +0 -21
- package/dist/regenerate/codebase.js +0 -75
- package/dist/regenerate/command-check.d.ts +0 -66
- package/dist/regenerate/command-check.js +0 -577
- package/dist/regenerate/compaction.d.ts +0 -13
- package/dist/regenerate/compaction.js +0 -20
- package/dist/regenerate/confine.d.ts +0 -69
- package/dist/regenerate/confine.js +0 -311
- package/dist/regenerate/conform.d.ts +0 -66
- package/dist/regenerate/conform.js +0 -132
- package/dist/regenerate/conformance-agents.d.ts +0 -388
- package/dist/regenerate/conformance-agents.js +0 -1162
- package/dist/regenerate/conformance.d.ts +0 -191
- package/dist/regenerate/conformance.js +0 -1035
- package/dist/regenerate/conversation-writes.d.ts +0 -10
- package/dist/regenerate/conversation-writes.js +0 -100
- package/dist/regenerate/credentials.d.ts +0 -18
- package/dist/regenerate/credentials.js +0 -88
- package/dist/regenerate/debug-log.d.ts +0 -56
- package/dist/regenerate/debug-log.js +0 -236
- package/dist/regenerate/debugger.d.ts +0 -36
- package/dist/regenerate/debugger.js +0 -133
- package/dist/regenerate/delivery.d.ts +0 -2
- package/dist/regenerate/diagnose-job.d.ts +0 -2
- package/dist/regenerate/diagnose-job.js +0 -40
- package/dist/regenerate/diagnose.d.ts +0 -46
- package/dist/regenerate/diagnose.js +0 -92
- package/dist/regenerate/diff-view.d.ts +0 -64
- package/dist/regenerate/drift.d.ts +0 -120
- package/dist/regenerate/drift.js +0 -285
- package/dist/regenerate/environment-error.d.ts +0 -167
- package/dist/regenerate/environment-error.js +0 -342
- package/dist/regenerate/failure-reports.d.ts +0 -28
- package/dist/regenerate/failure-reports.js +0 -79
- package/dist/regenerate/job-log.d.ts +0 -30
- package/dist/regenerate/job-log.js +0 -105
- package/dist/regenerate/job-panel.d.ts +0 -20
- package/dist/regenerate/job-panel.js +0 -54
- package/dist/regenerate/jobs-tree.d.ts +0 -76
- package/dist/regenerate/jobs.d.ts +0 -231
- package/dist/regenerate/jobs.js +0 -522
- package/dist/regenerate/lanes.d.ts +0 -16
- package/dist/regenerate/lanes.js +0 -32
- package/dist/regenerate/launch.d.ts +0 -256
- package/dist/regenerate/launch.js +0 -689
- package/dist/regenerate/ledger-view.d.ts +0 -87
- package/dist/regenerate/ledger-view.js +0 -325
- package/dist/regenerate/ledger.d.ts +0 -368
- package/dist/regenerate/ledger.js +0 -357
- package/dist/regenerate/lineage.d.ts +0 -105
- package/dist/regenerate/lineage.js +0 -485
- package/dist/regenerate/list-arguments.d.ts +0 -21
- package/dist/regenerate/list-arguments.js +0 -121
- package/dist/regenerate/loop.d.ts +0 -423
- package/dist/regenerate/loop.js +0 -2087
- package/dist/regenerate/masking.d.ts +0 -19
- package/dist/regenerate/masking.js +0 -95
- package/dist/regenerate/model-names.d.ts +0 -33
- package/dist/regenerate/model-names.js +0 -92
- package/dist/regenerate/notes.d.ts +0 -159
- package/dist/regenerate/notes.js +0 -446
- package/dist/regenerate/os-sandbox.d.ts +0 -93
- package/dist/regenerate/os-sandbox.js +0 -283
- package/dist/regenerate/panel-dock.d.ts +0 -23
- package/dist/regenerate/paths.d.ts +0 -110
- package/dist/regenerate/paths.js +0 -190
- package/dist/regenerate/plain-palette.d.ts +0 -34
- package/dist/regenerate/prompt.d.ts +0 -230
- package/dist/regenerate/prompt.js +0 -741
- package/dist/regenerate/pulse-files.d.ts +0 -14
- package/dist/regenerate/pulse-files.js +0 -63
- package/dist/regenerate/records.d.ts +0 -132
- package/dist/regenerate/records.js +0 -327
- package/dist/regenerate/regenerate.d.ts +0 -106
- package/dist/regenerate/regenerate.js +0 -660
- package/dist/regenerate/regression.d.ts +0 -58
- package/dist/regenerate/regression.js +0 -188
- package/dist/regenerate/renames.d.ts +0 -42
- package/dist/regenerate/renames.js +0 -185
- package/dist/regenerate/requires.d.ts +0 -117
- package/dist/regenerate/requires.js +0 -377
- package/dist/regenerate/resources.d.ts +0 -57
- package/dist/regenerate/resources.js +0 -162
- package/dist/regenerate/scripts-being-written.d.ts +0 -19
- package/dist/regenerate/scripts-being-written.js +0 -30
- package/dist/regenerate/self-check.d.ts +0 -29
- package/dist/regenerate/self-check.js +0 -119
- package/dist/regenerate/services.d.ts +0 -28
- package/dist/regenerate/services.js +0 -158
- package/dist/regenerate/shell.d.ts +0 -91
- package/dist/regenerate/shell.js +0 -320
- package/dist/regenerate/side-panel.d.ts +0 -64
- package/dist/regenerate/spec-map-view.d.ts +0 -147
- package/dist/regenerate/spec-map.d.ts +0 -160
- package/dist/regenerate/spec-map.js +0 -596
- package/dist/regenerate/spec-steps.d.ts +0 -180
- package/dist/regenerate/spec-steps.js +0 -729
- package/dist/regenerate/standing.d.ts +0 -28
- package/dist/regenerate/standing.js +0 -30
- package/dist/regenerate/state.d.ts +0 -21
- package/dist/regenerate/state.js +0 -10
- package/dist/regenerate/steering.d.ts +0 -56
- package/dist/regenerate/steering.js +0 -119
- package/dist/regenerate/stop-report.d.ts +0 -43
- package/dist/regenerate/stop-report.js +0 -160
- package/dist/regenerate/submit-work.d.ts +0 -44
- package/dist/regenerate/submit-work.js +0 -76
- package/dist/regenerate/test-kinds.d.ts +0 -85
- package/dist/regenerate/test-kinds.js +0 -171
- package/dist/regenerate/test-scripts.d.ts +0 -240
- package/dist/regenerate/test-scripts.js +0 -847
- package/dist/regenerate/testing-steps.d.ts +0 -52
- package/dist/regenerate/testing-steps.js +0 -129
- package/dist/regenerate/testing.d.ts +0 -150
- package/dist/regenerate/testing.js +0 -438
- package/dist/regenerate/transcript-view.d.ts +0 -21
- package/dist/regenerate/unit-gate.d.ts +0 -27
- package/dist/regenerate/unit-gate.js +0 -20
- package/dist/regenerate/unit-review.d.ts +0 -152
- package/dist/regenerate/unit-review.js +0 -361
- package/dist/regenerate/web.d.ts +0 -61
- package/dist/regenerate/web.js +0 -256
- package/dist/regenerate/workspace.d.ts +0 -12
- package/dist/regenerate/workspace.js +0 -99
- package/dist/regenerate-cli.d.ts +0 -1
- package/dist/reopen.d.ts +0 -29
- package/dist/resume-line.d.ts +0 -5
- package/dist/review/live.d.ts +0 -72
- package/dist/review/live.js +0 -166
- package/dist/rules.d.ts +0 -20
- package/dist/rules.js +0 -47
- package/dist/run-report.d.ts +0 -88
- package/dist/run-report.js +0 -338
- package/dist/screen-padding.d.ts +0 -28
- package/dist/self-invocation.d.ts +0 -36
- package/dist/self-invocation.js +0 -137
- package/dist/sentinel-chat.d.ts +0 -19
- package/dist/sentinel-chat.js +0 -226
- package/dist/sentinel-check.d.ts +0 -36
- package/dist/sentinel-check.js +0 -78
- package/dist/sentinel.d.ts +0 -107
- package/dist/sentinel.js +0 -601
- package/dist/settings.d.ts +0 -45
- package/dist/settings.js +0 -378
- package/dist/setup.d.ts +0 -97
- package/dist/setup.js +0 -436
- package/dist/skill-progress.d.ts +0 -46
- package/dist/skill.d.ts +0 -102
- package/dist/skill.js +0 -147
- package/dist/skills.d.ts +0 -54
- package/dist/skills.js +0 -111
- package/dist/spawn-async.d.ts +0 -18
- package/dist/spawn-async.js +0 -35
- package/dist/stack.d.ts +0 -80
- package/dist/stack.js +0 -206
- package/dist/stdlib.d.ts +0 -43
- package/dist/stdlib.js +0 -118
- package/dist/surface.d.ts +0 -5
- package/dist/surface.js +0 -18
- package/dist/terminal-images.d.ts +0 -2
- package/dist/terminal-notifications.d.ts +0 -31
- package/dist/test-plain-files.d.ts +0 -41
- package/dist/test-plain-files.js +0 -172
- package/dist/tools.d.ts +0 -101
- package/dist/tools.js +0 -242
- package/dist/turri-versions.d.ts +0 -71
- package/genome/capture/capture.md +0 -26
- package/genome/capture/check-conventions.md +0 -5
- package/genome/capture/check-reference.md +0 -11
- package/genome/capture/concepts.md +0 -3
- package/genome/capture/divide.md +0 -9
- package/genome/capture/feature.md +0 -45
- package/genome/capture/interface.md +0 -9
- package/genome/capture/modules.md +0 -23
- package/genome/capture/outline.md +0 -11
- package/genome/capture/readability.md +0 -12
- package/genome/capture/reference.md +0 -10
- package/genome/capture/split.md +0 -9
- package/genome/capture/survey.md +0 -37
- package/genome/capture/trial.md +0 -18
- package/genome/capture/verify.md +0 -7
- package/genome/rules/bullet-continuation.md +0 -61
- package/genome/rules/concise-specs-examples.md +0 -460
- package/genome/rules/concise-specs-integration-examples.md +0 -281
- package/genome/rules/concise-specs.md +0 -80
- package/genome/rules/definitions.md +0 -107
- package/genome/rules/examples/integration-embedded-testing/run_conformance_tests_java.sh +0 -161
- package/genome/rules/examples/integration-embedded-testing/run_unittests_java.sh +0 -50
- package/genome/rules/exported-concepts.md +0 -39
- package/genome/rules/func-specs.md +0 -164
- package/genome/rules/impl-reqs.md +0 -68
- package/genome/rules/import-modules.md +0 -49
- package/genome/rules/integration-embedded-testing.md +0 -273
- package/genome/rules/integration-embedded.md +0 -171
- package/genome/rules/integration-standalone.md +0 -135
- package/genome/rules/integrations.md +0 -136
- package/genome/rules/linked-resources.md +0 -76
- package/genome/rules/module-structure.md +0 -112
- package/genome/rules/project-model.md +0 -69
- package/genome/rules/required-concepts.md +0 -44
- package/genome/rules/requires-modules.md +0 -81
- package/genome/rules/semantic-ids.md +0 -49
- package/genome/rules/stdlib.md +0 -37
- package/genome/rules/test-plain-files.md +0 -138
- package/genome/rules/test-reqs.md +0 -57
- package/genome/rules/turri-regeneration.md +0 -66
- package/genome/skills/analyze-2-func-specs/SKILL.md +0 -116
- package/genome/skills/analyze-func-specs/SKILL.md +0 -137
- package/genome/skills/break-down-func-spec/SKILL.md +0 -229
- package/genome/skills/consolidate-concepts/SKILL.md +0 -192
- package/genome/skills/convert-old-syntax/SKILL.md +0 -68
- package/genome/skills/convert-old-syntax/references/rubric.md +0 -11
- package/genome/skills/debug-specs/SKILL.md +0 -194
- package/genome/skills/implement-conformance-testing-script/SKILL.md +0 -247
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_cypress.ps1 +0 -337
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_golang.ps1 +0 -111
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh +0 -151
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.ps1 +0 -103
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh +0 -146
- package/genome/skills/implement-unit-testing-script/SKILL.md +0 -171
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_flutter.ps1 +0 -87
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_golang.ps1 +0 -73
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_java.sh +0 -82
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.ps1 +0 -81
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.sh +0 -102
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_react.ps1 +0 -87
- package/genome/skills/refactor-module/SKILL.md +0 -218
- package/genome/skills/resolve-section-ownership/SKILL.md +0 -64
- package/genome/skills/resolve-spec-conflict/SKILL.md +0 -102
- package/stdlib/backend/common.plain +0 -25
- package/stdlib/backend/conformance/common.plain +0 -12
- package/stdlib/backend/conformance/go-gin.plain +0 -9
- package/stdlib/backend/conformance/go-nethttp.plain +0 -9
- package/stdlib/backend/conformance/java-springboot.plain +0 -9
- package/stdlib/backend/conformance/python-django.plain +0 -9
- package/stdlib/backend/conformance/python-fastapi.plain +0 -9
- package/stdlib/backend/conformance/python-flask.plain +0 -9
- package/stdlib/backend/conformance/rust-axum.plain +0 -9
- package/stdlib/backend/conformance/typescript-express.plain +0 -9
- package/stdlib/backend/conformance/typescript-fastify.plain +0 -9
- package/stdlib/backend/conformance/typescript-nestjs.plain +0 -9
- package/stdlib/backend/go-gin.plain +0 -18
- package/stdlib/backend/go-nethttp.plain +0 -18
- package/stdlib/backend/java-springboot.plain +0 -19
- package/stdlib/backend/python-django.plain +0 -19
- package/stdlib/backend/python-fastapi.plain +0 -23
- package/stdlib/backend/python-flask.plain +0 -23
- package/stdlib/backend/rust-axum.plain +0 -17
- package/stdlib/backend/typescript-express.plain +0 -19
- package/stdlib/backend/typescript-fastify.plain +0 -19
- package/stdlib/backend/typescript-nestjs.plain +0 -19
- package/stdlib/cli/common.plain +0 -17
- package/stdlib/cli/conformance/common.plain +0 -11
- package/stdlib/cli/conformance/go-cobra.plain +0 -9
- package/stdlib/cli/conformance/go-flag.plain +0 -9
- package/stdlib/cli/conformance/java-picocli.plain +0 -9
- package/stdlib/cli/conformance/python-argparse.plain +0 -9
- package/stdlib/cli/conformance/python-click.plain +0 -9
- package/stdlib/cli/conformance/python-typer.plain +0 -9
- package/stdlib/cli/conformance/rust-clap.plain +0 -9
- package/stdlib/cli/conformance/typescript-commander.plain +0 -9
- package/stdlib/cli/go-cobra.plain +0 -14
- package/stdlib/cli/go-flag.plain +0 -14
- package/stdlib/cli/java-picocli.plain +0 -15
- package/stdlib/cli/python-argparse.plain +0 -18
- package/stdlib/cli/python-click.plain +0 -16
- package/stdlib/cli/python-typer.plain +0 -16
- package/stdlib/cli/rust-clap.plain +0 -14
- package/stdlib/cli/typescript-commander.plain +0 -17
- package/stdlib/frontend/angular.plain +0 -17
- package/stdlib/frontend/common.plain +0 -17
- package/stdlib/frontend/conformance/angular.plain +0 -5
- package/stdlib/frontend/conformance/common.plain +0 -11
- package/stdlib/frontend/conformance/react-vite.plain +0 -5
- package/stdlib/frontend/conformance/sveltekit-spa.plain +0 -5
- package/stdlib/frontend/conformance/vue-vite.plain +0 -5
- package/stdlib/frontend/react-vite.plain +0 -16
- package/stdlib/frontend/sveltekit-spa.plain +0 -16
- package/stdlib/frontend/vue-vite.plain +0 -16
- package/stdlib/lang/go.plain +0 -13
- package/stdlib/lang/java.plain +0 -12
- package/stdlib/lang/python.plain +0 -18
- package/stdlib/lang/rust.plain +0 -12
- package/stdlib/lang/typescript.plain +0 -13
- package/stdlib/library/common.plain +0 -15
- package/stdlib/library/conformance/common.plain +0 -9
- package/stdlib/library/conformance/go.plain +0 -9
- package/stdlib/library/conformance/java-gradle.plain +0 -9
- package/stdlib/library/conformance/java-maven.plain +0 -9
- package/stdlib/library/conformance/python.plain +0 -9
- package/stdlib/library/conformance/rust.plain +0 -9
- package/stdlib/library/conformance/typescript.plain +0 -9
- package/stdlib/library/go.plain +0 -12
- package/stdlib/library/java-gradle.plain +0 -13
- package/stdlib/library/java-maven.plain +0 -13
- package/stdlib/library/python.plain +0 -13
- package/stdlib/library/rust.plain +0 -12
- package/stdlib/library/typescript.plain +0 -15
package/dist/tools.js
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, resolve } from "node:path";
|
|
3
|
-
import { isWithin } from "./regenerate/paths.js";
|
|
4
|
-
import { defineTool } from "@earendil-works/pi-coding-agent";
|
|
5
|
-
import { Type } from "typebox";
|
|
6
|
-
/**
|
|
7
|
-
* Personal tools.
|
|
8
|
-
*
|
|
9
|
-
* `write_artifact` is the executor's only way to produce output: it can read the
|
|
10
|
-
* repo, but everything it makes lands in one sandboxed directory under a name the
|
|
11
|
-
* graph chose. That is what lets the gate know exactly what to review - there is
|
|
12
|
-
* no "find the thing the agent probably changed" step.
|
|
13
|
-
*/
|
|
14
|
-
export function createWriteArtifactTool(runDir) {
|
|
15
|
-
const root = resolve(runDir);
|
|
16
|
-
return defineTool({
|
|
17
|
-
name: "write_artifact",
|
|
18
|
-
label: "Write artifact",
|
|
19
|
-
description: "Write this step's deliverable. Path must be the artifact path given in the step instructions. " +
|
|
20
|
-
"Overwrites any previous attempt.",
|
|
21
|
-
promptSnippet: "write the current step's deliverable to its artifact path",
|
|
22
|
-
parameters: Type.Object({
|
|
23
|
-
path: Type.String({ description: "Artifact path, exactly as given in the step instructions" }),
|
|
24
|
-
content: Type.String({ description: "Full contents of the artifact" }),
|
|
25
|
-
}),
|
|
26
|
-
async execute(_id, params) {
|
|
27
|
-
const target = resolve(root, params.path);
|
|
28
|
-
if (!isWithin(target, root)) {
|
|
29
|
-
throw new Error(`write_artifact: '${params.path}' escapes the artifact directory`);
|
|
30
|
-
}
|
|
31
|
-
mkdirSync(dirname(target), { recursive: true });
|
|
32
|
-
writeFileSync(target, params.content, "utf8");
|
|
33
|
-
return {
|
|
34
|
-
content: [{ type: "text", text: `Wrote ${params.content.length} bytes to ${params.path}` }],
|
|
35
|
-
details: { path: params.path, bytes: params.content.length },
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
export const VerdictSchema = Type.Object({
|
|
41
|
-
verdict: Type.Union([Type.Literal("pass"), Type.Literal("fail")], {
|
|
42
|
-
description: "'fail' if ANY rubric criterion is violated. There is no partial credit.",
|
|
43
|
-
}),
|
|
44
|
-
violations: Type.Array(Type.Object({
|
|
45
|
-
criterion: Type.String({ description: "The rubric criterion, quoted" }),
|
|
46
|
-
evidence: Type.String({ description: "The exact text from the artifact that violates it" }),
|
|
47
|
-
fix: Type.String({ description: "One concrete instruction that would resolve it" }),
|
|
48
|
-
}), { description: "Empty when verdict is 'pass'. Never empty when verdict is 'fail'." }),
|
|
49
|
-
});
|
|
50
|
-
/**
|
|
51
|
-
* The judge's only tool. Forcing the verdict through a schema is the difference
|
|
52
|
-
* between a decision the graph can branch on and a paragraph someone has to read.
|
|
53
|
-
* `terminate` stops the judge session as soon as the verdict lands.
|
|
54
|
-
*/
|
|
55
|
-
export function createVerdictTool(onVerdict) {
|
|
56
|
-
return defineTool({
|
|
57
|
-
name: "submit_verdict",
|
|
58
|
-
label: "Submit verdict",
|
|
59
|
-
description: "Submit your review verdict. Call this exactly once. Do not reply with prose.",
|
|
60
|
-
parameters: VerdictSchema,
|
|
61
|
-
async execute(_id, params) {
|
|
62
|
-
onVerdict(params);
|
|
63
|
-
return {
|
|
64
|
-
content: [{ type: "text", text: "Verdict recorded." }],
|
|
65
|
-
details: params,
|
|
66
|
-
terminate: true,
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
import { isChat, runAsk } from "./ask.js";
|
|
72
|
-
import { describeFindings, describeQuestions } from "./review/live.js";
|
|
73
|
-
/**
|
|
74
|
-
* Lets a skill step put a question to the person running it.
|
|
75
|
-
*
|
|
76
|
-
* A gated skill otherwise runs to completion with nobody to ask, which is fine for work
|
|
77
|
-
* that is fully specified and useless for an interview. The harness still owns the
|
|
78
|
-
* sequence - the step decides what to ask, not whether the gate afterwards runs.
|
|
79
|
-
*/
|
|
80
|
-
/**
|
|
81
|
-
* `gate`, for an interview that holds its questions to rules - the questioning level's cap (questioning.ts), an answer
|
|
82
|
-
* written as a spec change before the next question: a question it refuses is not asked, and `confirms_phase` marks a
|
|
83
|
-
* phase's closing confirmation, which the cap never counts.
|
|
84
|
-
*
|
|
85
|
-
* `talks`: where the asker answers a person who chose "Chat about this" - `"reply"`, the conversation's agent, in its
|
|
86
|
-
* reply; `"context"`, a skill's agent, whose replies nobody sees, as the `context` of the question asked again. Such a
|
|
87
|
-
* choice is no answer: neither the cap nor `onAnswered` counts it.
|
|
88
|
-
*/
|
|
89
|
-
export function createAskUserTool(ask, onAnswered, said, gate, talks = "context") {
|
|
90
|
-
return defineTool({
|
|
91
|
-
name: "ask_user",
|
|
92
|
-
label: "Ask the user",
|
|
93
|
-
description: "Put one question to the user and wait for their answer. Ask exactly one thing at a time. " +
|
|
94
|
-
"Offer concrete options in `options` so the user can pick rather than type - that is the " +
|
|
95
|
-
"normal case, and a question with neither options nor free_form is refused rather than asked.",
|
|
96
|
-
promptSnippet: "ask the user one question, offering options to pick from",
|
|
97
|
-
promptGuidelines: [
|
|
98
|
-
"Every ask_user call should carry `options` unless the answer genuinely cannot be anticipated; picking from a list is far quicker for the user than typing. A free-form question needs free_form: true.",
|
|
99
|
-
"Use multi_select: true when several answers can apply at once, rather than asking the same question repeatedly.",
|
|
100
|
-
"The dialog shows the question, its options and `context` alone - nothing you wrote before it. When the user must read something to answer - the brief to confirm, the plan to approve - pass it as `context`; never put an account of your work there (what a probe returned, what a regeneration did).",
|
|
101
|
-
"Keep `context` short enough to take in at a glance - a heading or two and short bullets, a line each, about fifteen lines at most: what the person decides on, not every detail. The details are in the spec; say where, and they can ask.",
|
|
102
|
-
],
|
|
103
|
-
parameters: Type.Object({
|
|
104
|
-
question: Type.String({ description: "One question. Never bundle two." }),
|
|
105
|
-
options: Type.Optional(Type.Array(Type.String(), {
|
|
106
|
-
description: "Concrete choices to offer. The user can always pick \"Something else…\" and type instead, or " +
|
|
107
|
-
"\"Chat about this\" to talk the question over with you first, so offering options never traps them.",
|
|
108
|
-
})),
|
|
109
|
-
multi_select: Type.Optional(Type.Boolean({ description: "Let the user pick several of the options." })),
|
|
110
|
-
context: Type.Optional(Type.String({
|
|
111
|
-
description: "What the user must read to answer, shown above the question - the brief to confirm, the plan to approve. Only that: never an account of what you did.",
|
|
112
|
-
})),
|
|
113
|
-
free_form: Type.Optional(Type.Boolean({
|
|
114
|
-
description: "Ask without options, for a genuinely open question. Required when options is omitted.",
|
|
115
|
-
})),
|
|
116
|
-
...(gate !== undefined
|
|
117
|
-
? {
|
|
118
|
-
confirms_phase: Type.Optional(Type.Boolean({
|
|
119
|
-
description: "This asks the person to confirm the phase's summary before it ends. It is not counted among the phase's questions.",
|
|
120
|
-
})),
|
|
121
|
-
}
|
|
122
|
-
: {}),
|
|
123
|
-
}),
|
|
124
|
-
async execute(_id, params) {
|
|
125
|
-
const confirmsPhase = params.confirms_phase === true;
|
|
126
|
-
const refusal = gate?.refusal(confirmsPhase);
|
|
127
|
-
if (refusal !== undefined) {
|
|
128
|
-
return { content: [{ type: "text", text: refusal }], details: { question: params.question, answer: "" } };
|
|
129
|
-
}
|
|
130
|
-
const answer = await ask({
|
|
131
|
-
question: params.question,
|
|
132
|
-
options: params.options,
|
|
133
|
-
multiSelect: params.multi_select,
|
|
134
|
-
freeForm: params.free_form,
|
|
135
|
-
...(params.context !== undefined && params.context.trim() !== "" ? { context: params.context } : {}),
|
|
136
|
-
...(said !== undefined ? { said: said() } : {}),
|
|
137
|
-
chattable: true,
|
|
138
|
-
});
|
|
139
|
-
if (isChat(answer)) {
|
|
140
|
-
return { content: [{ type: "text", text: `${answer}\n\n${talkBack(talks)}` }], details: { question: params.question, answer } };
|
|
141
|
-
}
|
|
142
|
-
gate?.answered(confirmsPhase);
|
|
143
|
-
onAnswered?.(answer, confirmsPhase);
|
|
144
|
-
return {
|
|
145
|
-
content: [{ type: "text", text: answer }],
|
|
146
|
-
details: { question: params.question, answer },
|
|
147
|
-
};
|
|
148
|
-
},
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
export { runAsk };
|
|
152
|
-
/** What the asker is told to do when the person chose to talk about its question rather than answer it. */
|
|
153
|
-
function talkBack(talks) {
|
|
154
|
-
return talks === "reply"
|
|
155
|
-
? "Answer what they said in your reply, and end your turn there: they go on in the chat. Ask the question again " +
|
|
156
|
-
"with ask_user only once it is settled - changed, if what they said calls for it. It was not counted as answered."
|
|
157
|
-
: "Answer what they said, then ask the question again with ask_user - changed, if what they said calls for it. Put " +
|
|
158
|
-
"your answer to them in the question's `context`: nothing else you write reaches them. It was not counted as a " +
|
|
159
|
-
"question.";
|
|
160
|
-
}
|
|
161
|
-
/** Ends the questions of a phase the questioning level caps: what is left, the agent decides itself. */
|
|
162
|
-
export function createEndQuestionsTool(questioning) {
|
|
163
|
-
return defineTool({
|
|
164
|
-
name: "end_questions",
|
|
165
|
-
label: "End questions",
|
|
166
|
-
description: "End this phase's questions: you have asked what the person must decide, and you decide what is left " +
|
|
167
|
-
"yourself, saying what you chose. Afterwards ask_user asks only the phase's closing confirmation.",
|
|
168
|
-
promptSnippet: "end this phase's questions and decide what is left yourself",
|
|
169
|
-
parameters: Type.Object({}),
|
|
170
|
-
async execute() {
|
|
171
|
-
return { content: [{ type: "text", text: questioning.end() }], details: {} };
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Everything the reviewer has to say since the last tool call.
|
|
177
|
-
*
|
|
178
|
-
* It rides along on the tool results the interviewer is already getting, so a finding
|
|
179
|
-
* lands between two questions without the interviewer having to remember to go looking
|
|
180
|
-
* for one.
|
|
181
|
-
*/
|
|
182
|
-
export function reviewNote(liveReview) {
|
|
183
|
-
if (liveReview === undefined)
|
|
184
|
-
return "";
|
|
185
|
-
const parts = [];
|
|
186
|
-
const findings = liveReview.take();
|
|
187
|
-
if (findings.length > 0)
|
|
188
|
-
parts.push(describeFindings(findings));
|
|
189
|
-
const questions = liveReview.takeQuestions();
|
|
190
|
-
if (questions.length > 0)
|
|
191
|
-
parts.push(describeQuestions(questions));
|
|
192
|
-
return parts.length === 0 ? "" : `\n\n${parts.join("\n\n")}`;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* With a live reviewer, a way to answer the reviewer's questions. How the builds stand, a skill reads with the
|
|
196
|
-
* conversation's own drift (loop-tools.ts), the reviewer's findings riding along on it (`withReviewNote`).
|
|
197
|
-
*/
|
|
198
|
-
export function createReviewTools(liveReview) {
|
|
199
|
-
if (liveReview === undefined)
|
|
200
|
-
return [];
|
|
201
|
-
const reply = defineTool({
|
|
202
|
-
name: "reply_to_review",
|
|
203
|
-
label: "Reply to review",
|
|
204
|
-
description: "Answer a question the reviewer asked, after putting it to the user. The answer is carried " +
|
|
205
|
-
"into the reviewer's next pass. Use this only for questions the reviewer raised by id.",
|
|
206
|
-
promptSnippet: "hand the user's answer back to the reviewer",
|
|
207
|
-
parameters: Type.Object({
|
|
208
|
-
question_id: Type.String({ description: 'The id the reviewer gave, e.g. "q1"' }),
|
|
209
|
-
answer: Type.String({ description: "What the user decided, in their terms" }),
|
|
210
|
-
}),
|
|
211
|
-
async execute(_id, params) {
|
|
212
|
-
const accepted = liveReview.reply(params.question_id, params.answer);
|
|
213
|
-
return {
|
|
214
|
-
content: [
|
|
215
|
-
{
|
|
216
|
-
type: "text",
|
|
217
|
-
text: accepted
|
|
218
|
-
? `Answer to ${params.question_id} passed to the reviewer. Make sure the specs say the same thing.`
|
|
219
|
-
: `No open review question with id '${params.question_id}'.`,
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
details: { accepted },
|
|
223
|
-
};
|
|
224
|
-
},
|
|
225
|
-
});
|
|
226
|
-
return [reply];
|
|
227
|
-
}
|
|
228
|
-
/** A tool whose every result carries what the reviewer has said since the last one. */
|
|
229
|
-
export function withReviewNote(tool, liveReview) {
|
|
230
|
-
if (liveReview === undefined)
|
|
231
|
-
return tool;
|
|
232
|
-
return {
|
|
233
|
-
...tool,
|
|
234
|
-
async execute(id, params, signal, onUpdate, ctx) {
|
|
235
|
-
const result = await tool.execute(id, params, signal, onUpdate, ctx);
|
|
236
|
-
const note = reviewNote(liveReview);
|
|
237
|
-
if (note === "")
|
|
238
|
-
return result;
|
|
239
|
-
return { ...result, content: [...result.content, { type: "text", text: note.trimStart() }] };
|
|
240
|
-
},
|
|
241
|
-
};
|
|
242
|
-
}
|
package/dist/turri-versions.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Which turri runs, which is newest, and which others are on this machine - so a person who installed a new turri and
|
|
3
|
-
* is still running an old one is told so, and how to fix it, where they look: the banner as turri starts (from what the
|
|
4
|
-
* last check found, never waiting on the network), and `turri --version` and `turri doctor` (asking npm then and there).
|
|
5
|
-
* A turri run from a clone is the developer's: it is never told to update.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PACKAGE_NAME = "@turri-dev/cli";
|
|
8
|
-
/** Whether version `a` is newer than `b`: major, minor, patch - and a release over a prerelease of the same. */
|
|
9
|
-
export declare function newerThan(a: string, b: string): boolean;
|
|
10
|
-
/** The newest version npm had when it was last asked, and when - nothing when it never was. */
|
|
11
|
-
export declare function latestKnown(): {
|
|
12
|
-
version: string;
|
|
13
|
-
checkedAt: number;
|
|
14
|
-
} | undefined;
|
|
15
|
-
/** The newest version npm has now, kept for the next start - nothing when npm does not answer in time. */
|
|
16
|
-
export declare function fetchLatest(timeoutMs?: number): Promise<string | undefined>;
|
|
17
|
-
/**
|
|
18
|
-
* Ask npm again in the background when what it said last is old: what it says now, once it answers - undefined when it
|
|
19
|
-
* was not asked, or did not answer. Never waited for by what starts turri.
|
|
20
|
-
*/
|
|
21
|
-
export declare function refreshLatestLater(): Promise<string | undefined>;
|
|
22
|
-
/** A turri on this machine's PATH. */
|
|
23
|
-
export interface TurriOnPath {
|
|
24
|
-
/** The command, as the PATH has it. */
|
|
25
|
-
path: string;
|
|
26
|
-
/** The package it runs. */
|
|
27
|
-
root: string;
|
|
28
|
-
version?: string;
|
|
29
|
-
/** Run from a clone - npm link, or a script pointing into one. */
|
|
30
|
-
clone: boolean;
|
|
31
|
-
/** The one a bare `turri` runs: the first on the PATH. */
|
|
32
|
-
runs: boolean;
|
|
33
|
-
/** The one running now. */
|
|
34
|
-
self: boolean;
|
|
35
|
-
}
|
|
36
|
-
/** Every turri on the PATH, in its order - the first is what a bare `turri` runs. */
|
|
37
|
-
export declare function turrisOnPath(path?: string, self?: string, platform?: NodeJS.Platform): TurriOnPath[];
|
|
38
|
-
/** How to take a turri off the PATH, by where it is: another Node version of nvm, a linked clone, or an npm prefix. */
|
|
39
|
-
export declare function removalOf(turri: Pick<TurriOnPath, "path" | "clone" | "root">, platform?: NodeJS.Platform): string;
|
|
40
|
-
/** What is wrong with the turri running, and what to do: each a line, with its fixes. */
|
|
41
|
-
export interface VersionFinding {
|
|
42
|
-
/** Updating is all it needs. */
|
|
43
|
-
kind: "outdated" | "shadowed" | "behind";
|
|
44
|
-
text: string;
|
|
45
|
-
/** The same, as the banner says it in a line: what is newer, and what to run. */
|
|
46
|
-
short: string;
|
|
47
|
-
fixes: string[];
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* What the turri running, the newest npm has (`latest`, when known) and the turris on the PATH say together: nothing when
|
|
51
|
-
* all is well. A turri from a clone is told nothing of npm's.
|
|
52
|
-
*/
|
|
53
|
-
export declare function versionFindings(options?: {
|
|
54
|
-
latest?: string;
|
|
55
|
-
onPath?: TurriOnPath[];
|
|
56
|
-
self?: {
|
|
57
|
-
version?: string;
|
|
58
|
-
clone: boolean;
|
|
59
|
-
root: string;
|
|
60
|
-
};
|
|
61
|
-
}): VersionFinding[];
|
|
62
|
-
/** `turri --version`: the version line, then where this turri is, what npm has - asked now - and every turri on the PATH. */
|
|
63
|
-
export declare function describeVersion(versionLine: string): Promise<string>;
|
|
64
|
-
/**
|
|
65
|
-
* What the banner says as turri starts: a line a finding, short - what is newer and what to run - from what npm said at
|
|
66
|
-
* the last check and the turris on the PATH, never waiting on the network; the check for next time started behind it.
|
|
67
|
-
*/
|
|
68
|
-
export declare function bannerWarnings(): {
|
|
69
|
-
lines: string[];
|
|
70
|
-
later: Promise<string | undefined>;
|
|
71
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Capture
|
|
2
|
-
|
|
3
|
-
You are one of the agents of a capture: an existing codebase is captured into ***plain, and from then on the ***plain is the source of truth - the code is regenerated from it, and the original codebase is abandoned. Many agents capture it side by side, each a part, none the whole of it. The harness splits the work, assembles what each agent hands over into ***plain files, and checks it.
|
|
4
|
-
|
|
5
|
-
## You run offline
|
|
6
|
-
|
|
7
|
-
Nobody can be asked anything, and nobody watches. Where the code leaves something open, decide it yourself - the reading most consistent with the code, its tests and its docs - and say what you decided where your tool asks for assumptions. Never stop to ask.
|
|
8
|
-
|
|
9
|
-
## What you look at
|
|
10
|
-
|
|
11
|
-
The codebase is read only to you: read, grep, find and ls, no shell - but where your task gives you a shell on a copy of it. You are shown a map of your part of it - folders, files, their sizes and the surfaces the harness found in them: routes, commands, options, screens, environment variables, tables, test names, exports. The map is how you find your way; the code is what you read to answer a question, never what you read through. Follow a surface: a route into its handler, a command into what it runs, grep where the trail leads. Read the parts of a file you need with an offset and a limit, not the whole of a long one. You have a budget of tool calls: spend it on what decides the ***plain, then hand over.
|
|
12
|
-
|
|
13
|
-
## What the ***plain says
|
|
14
|
-
|
|
15
|
-
***plain a person has to review is ***plain a person can read. A capture that writes down everything the code does is as unreadable as the code, and nobody reviews it. So - but never at the cost of the interface:
|
|
16
|
-
|
|
17
|
-
- **The interface, whole and exact - never guessed, never obvious.** What a user, a client or a script calls is the contract the regenerated software must keep, call for call: every command and subcommand; every option and argument with each name it has, the value it takes, its choices and its default; every route with its method, path, parameters, the fields it takes and answers, and its status codes; every environment variable and configuration key read; every output format, message and exit code a user or a script sees. Read each from the code that defines it, and follow it to what it does - never infer it from a name, the help text or the docs, never fill it in from a convention, never leave it out as obvious or as the stack's: a stack says how errors are shaped, never which options exist or what they accept. Each part's interface is taken from the code as data, before any feature is written, into its interface reference - a linked resource every functional spec about it carries through the part's interface concept: there the details are exact, and the prose names them. Where the code leaves one open, read on until it does not; what you still cannot settle is said where your tool asks what is uncertain, never settled by guess. The rest of what follows is how short to be about everything else.
|
|
18
|
-
- **What someone sees, not what the code does.** Of each fact ask: *would a user or a client notice if it were different, and would they care?* Function names, file layout, helpers, internal data shapes, retries, logging and utility libraries are the code's business - left out. What a user can do, what they see, the boundary cases and the errors they meet are captured.
|
|
19
|
-
- **Only where the code departs from the default.** The default is what a competent developer builds with no instruction: the stack's conventions, the domain's ("a login rejects a wrong password"), and every functional spec before this one. Cookie-cutter behaviour is one line or none; an odd rule - deleting a list archives its items, an unusual sort order, a 30-day limit - is written down exactly.
|
|
20
|
-
- **Exact where exactness is the contract.** A response's fields, a file format, a command's flags, an error code a client checks: these are captured exactly, in the fewest words that keep them exact - terse, never cut. A literal - a URL, a path, a message - is code in backticks, never a link: ***plain refuses a link to anything but a file of the project.
|
|
21
|
-
- **Edge cases go in scenarios.** A functional spec states the rule; its scenarios pin its edge cases with concrete values - the examples, and what each wrong input answers. Neither is said again in the functional spec. Detail moved to a scenario is still captured, and still readable.
|
|
22
|
-
- **Terse is right.** Clipped bullets, no lead-ins, no rationale, no history, no "the system". Every rule of concise ***plain you are given applies.
|
|
23
|
-
|
|
24
|
-
## What is left out
|
|
25
|
-
|
|
26
|
-
Behaviour nothing relies on - an incidental order, a leftover endpoint, debug output, dead code - is left out, and said so where your tool asks what you dropped. What you could not make out is captured as best you can, and said so where your tool asks what is uncertain. Both reach the person in the capture's report: a judgement said is one they can check.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Check the conventions against the code
|
|
2
|
-
|
|
3
|
-
The survey settled the conventions below: what every feature of the part does the same way - how an error, a warning and a message are written, the exit code or status of each kind of failure, what changes when there is no terminal, what quiet and debug modes hide or add, and what reaches the other side of every call it makes or answers. Every feature is captured following them, so one that is wrong is wrong everywhere. Check each against the code: start at the files it names, follow the entry point to where it catches errors, writes to its streams and exits, and read the conditions exactly - which flag, which level, which stream, when a terminal matters, which name the program goes by. For what reaches the other side, follow a call to where it leaves - the request built and sent, the response written - and read what is added there: the headers set of its own, how a body is serialised and encoded, how header values are encoded, when a body is read or streamed. A declaration is no evidence, a help text or a docstring neither when the code does otherwise; two conventions that disagree cannot both hold.
|
|
4
|
-
|
|
5
|
-
Call `submit_capture_conventions` once, with every convention as the code has it: each that holds, word for word; each corrected; any the code shows that every feature follows and the survey missed. Each with `where`, the files whose code decides it. In `changes`, what you changed, a line each, with why - the file and what its code does. Never change one that holds.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Check the interface reference against the code
|
|
2
|
-
|
|
3
|
-
Below is part of the software's interface reference as an agent took it from the code, each entry with where it is defined. The reference is given whole to every agent that regenerates or tests the code, and it is the one place its details are written: what it lacks or gets wrong, the regenerated software lacks or gets wrong. Every literal in it was checked to be in the code - so nothing in it is invented; what is left to check is that it is whole and right. Read each entry where it is defined, and follow the code to where each detail is worked out:
|
|
4
|
-
|
|
5
|
-
- **Its help, whole:** the text the program prints for it with `--help` - every paragraph, word for word. Where the code keeps a short help and a long one, the one `--help` prints.
|
|
6
|
-
- **Its choices:** every value it accepts, from wherever the code lists them - a constant elsewhere, the letters of a format. Choices worked out when it runs - filtered by what the machine has, taken from what is installed - go in its details, saying how, never as a fixed list that is not always the list.
|
|
7
|
-
- **Its default, what it takes, whether it repeats, is required or is hidden** - as the code has them; a default worked out when it runs, in its details, saying how.
|
|
8
|
-
- **Before you say what a set, a list or a mapping holds,** grep every line that builds it or adds to it - a set defined in one place is often added to in another, a mapping filtered further down - and read each. Correct an entry only where the code shows it wrong, and say the file and the line that show it.
|
|
9
|
-
- **What was missed:** grep the part for interface no entry holds - environment variables read through a constant or a helper, subcommands, arguments, routes a router adds - and add each.
|
|
10
|
-
|
|
11
|
-
Call `submit_capture_reference_checked` once, with every entry as the code has it - each that holds, word for word; each corrected; each missed - and every exclusion; and in `changes` what you changed, a line each, with why: the file and the line, and what its code does there. Never change one that holds.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# Reconcile concepts
|
|
2
|
-
|
|
3
|
-
Agents capturing different features of the same codebase each defined some of the same concepts, in different words. Each concept below has every definition it was given, and the functional specs that use it. Give each concept one definition that serves every one of those uses: one plain sentence that starts with the concept and says what it is, with the attributes the specs rely on. Use only the concepts listed with it. Call `submit_capture_concepts` once, with a definition for every concept.
|
package/genome/capture/divide.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Divide the features
|
|
2
|
-
|
|
3
|
-
The part was outlined area by area, each area by an agent that saw only its own files - so one behaviour can be in two features: an option parsed in one area and acted on in another, a message built in a third, a command's help beside the command. Each feature is then written by an agent of its own, side by side; a behaviour in two features is written twice, in different words, and the two copies contradict each other. Below is every feature of the part, area by area, in build order, with what it is about and where it is built. Give each behaviour to one feature. Call `submit_capture_owners` once.
|
|
4
|
-
|
|
5
|
-
- `features`: every feature that stays, by its key as listed, with `owns`: one line naming what it alone captures - its commands, options, messages and behaviour - so its writer knows its edges and leaves the rest to the others. A behaviour two features would both capture is in the `owns` of one: the feature that is about it - where a user would look for it - never one that only parses it, passes it on or prints it.
|
|
6
|
-
- `merged`: a feature that is a slice of another's behaviour - the options of what another feature does, the printing of what another sends - is merged `into` the features that take it, with `why`: it is not written, and its files go to them. Merge for that, never because two features are small.
|
|
7
|
-
- Every option, command and route of the part is in the `owns` of one feature: the interface is captured whole, so name in `owns` the options and commands each feature takes.
|
|
8
|
-
- A feature builds only on the features before it: give a behaviour to one that comes after what it needs.
|
|
9
|
-
- You see the outline, not the code: decide from what each feature is about and where it is built. Most features stay as they are, owning what they were outlined for.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Capture a feature
|
|
2
|
-
|
|
3
|
-
Capture one feature of the codebase into ***plain: its functional specs, the concepts they need, and their scenarios. Agents capture the other features side by side; the features before yours in the outline are built before it. Call `submit_capture_feature` once.
|
|
4
|
-
|
|
5
|
-
## What is yours
|
|
6
|
-
|
|
7
|
-
Every feature of the part is listed with what it owns: each behaviour is one feature's. Capture all that yours owns - also where its code is in files you were not pointed to. Never capture what another feature owns, even where your code or your tests touch it: it is captured there, and your functional specs build on it, naming it at most. When your tests check another feature's behaviour along with yours, your scenarios check yours.
|
|
8
|
-
|
|
9
|
-
The part's conventions are settled: how errors are written, the exit code or status of each kind of failure, what changes without a terminal, what reaches the other side of a call. Every functional spec and scenario follows them; none decides them again. Where your feature departs from one, capture the departure.
|
|
10
|
-
|
|
11
|
-
## First, find out what it does
|
|
12
|
-
|
|
13
|
-
Start at the feature's paths and its surfaces. Follow each route, command or screen to what it does and what the user sees: the inputs it takes, what it answers or shows, what it refuses and how, what it keeps. Read the original's tests of the feature: what they assert is what someone cared about. Then stop reading and write from what you found out - never while reading code, never line by line.
|
|
14
|
-
|
|
15
|
-
## Then write the functional specs
|
|
16
|
-
|
|
17
|
-
- At most eight functional specs, in build order - each only builds on those before it, here and in the features before yours.
|
|
18
|
-
- `func_id`: short kebab-case from what it does (`add-task`), unique in your feature.
|
|
19
|
-
- `text`: what the software does once built, as a statement of fact with a concrete subject - `A :User: can archive a :List:.` - its first line the behaviour, then the detail that matters: inputs, outputs, boundaries, and the errors the stack does not settle. No line starts with `# ` or `***`.
|
|
20
|
-
- Each implies about two hundred lines of code at most: a larger one is two functional specs.
|
|
21
|
-
- The interface your feature owns, whole and exact. The interface in your files is listed - from the part's interface reference when it has one: taken from the code, every literal checked against it, and carried by every functional spec that uses the part's interface concept (`:<Part>Interface:`). Capture what each piece your feature owns does, by its exact name, using the concept; what it takes, its choices, its default and its help are the reference's - say them only where a behaviour turns on them, and never otherwise than it does. With no reference, capture each exactly yourself: every name it has, what it takes, its choices and default, what it does and what it answers - an endpoint's method, path, fields and status codes; a command's arguments and output; a message's exact text; a file's format. A client of the original must work against the code regenerated from your ***plain, call for call. Read each where it is defined - never from its name, its help text or what the stack would do.
|
|
22
|
-
- Everything else: as short as its facts allow. Leave out what a competent developer would build anyway on this stack, and anything only the code knows - never the interface.
|
|
23
|
-
- Nothing the stack says: what its templates and implementation reqs settle - settings, logging, request ids, error bodies, how it starts - is built already. Capture only where the original departs from them. A stack settles how; which options, routes and commands exist, and what each takes and answers, is always yours to capture.
|
|
24
|
-
- The rule, never its cases. A functional spec says what is refused - `The url is an absolute http or https URL with a host.` - and the stack says how: what invalid input, a missing record or no access answers, its status and its error code. So neither an example (`nope`, `ftp://example.com`) nor what one wrong input answers is a line of the functional spec: each is a scenario of it. Only a refusal the stack does not settle - a status or an error code of the original's own - is written in the functional spec, once, with its rule.
|
|
25
|
-
|
|
26
|
-
## Scenarios
|
|
27
|
-
|
|
28
|
-
A functional spec gets scenarios - `conformance` for its expected use, `acceptance` for use that is not expected: wrong input, a missing record, no access.
|
|
29
|
-
|
|
30
|
-
- **Where the original tests it.** The original's black-box tests are your evidence and your model: a test that runs the software through its interface - an HTTP call, the command run (in a process of its own or the test's), a page driven - is captured as a scenario that does what it does, with its values. A test that calls a function or a class directly is not. Spend your scenarios where the original's tests are densest: a functional spec it tests twenty ways gets several, one it tests once gets one, and error cases get no larger share than the original gives them. A functional spec the original tests through its interface never goes without a scenario.
|
|
31
|
-
- **Where it does not,** a functional spec gets scenarios only when a wrong implementation would give output that looks right, when two readings of it give different outputs, or when a bug in it costs money, security, data or users' trust.
|
|
32
|
-
|
|
33
|
-
Each scenario: a `scenario_id` in kebab-case, unique for its functional spec; one concrete, checkable outcome with concrete values (`named "Buy milk"`, `answers 404`); acting only through the interface; never more than its functional spec says. No more scenarios in all than your budget says - it grows with the original's tests of your feature.
|
|
34
|
-
|
|
35
|
-
A scenario runs as the part's test reqs say, so it expects what the original does then: its output is not a terminal unless they give it one - a scenario about colours passes the option that forces them; it talks to a local server, never a site on the internet; its width, its configuration and its home are the test's. A unit test of the original that mocks a library or calls a function is not a scenario recast: check its behaviour through the interface, or leave it out. What only your scenario needs set up - a file it sends, a session it starts from, a server that answers one exact body - it says itself: the test reqs are what every test of the part sets up.
|
|
36
|
-
|
|
37
|
-
Each feature's scenarios are tried on the original before the ***plain is written, and one the original fails is corrected - but write each to hold the first time.
|
|
38
|
-
|
|
39
|
-
## Concepts
|
|
40
|
-
|
|
41
|
-
Use the concepts you are given - the part's core ones - and the predefined ones. Define a new one in `definitions` only when your specs need a name the given ones do not have: one plain sentence that starts with the concept. Never define a given or predefined one again. Every concept in your specs, scenarios and definitions must be given, predefined or yours, and no definition names a concept whose definition names it back.
|
|
42
|
-
|
|
43
|
-
## Say what you decided
|
|
44
|
-
|
|
45
|
-
`assumptions`: what you decided where the code left it open. `uncertain`: what you captured without being sure of it. `dropped`: behaviour you judged incidental and left out. One line each; empty when there is nothing.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Capture the interface no feature captured
|
|
2
|
-
|
|
3
|
-
Every feature of the part is written, and the surfaces listed in `<the interface to capture>` are named in none of their ***plain: options, commands, routes, screens or environment variables the code defines, each with the file that defines it. A capture leaves no interface out - whoever calls one in the original must find it, the same, in what is regenerated - so they are yours, as a feature of their own in the module.
|
|
4
|
-
|
|
5
|
-
- Capture each exactly: what it does and what a user sees of it, by every name it has. One the part's interface reference holds is listed with its entry - what it takes, its choices, its default and its help are there, exact: use the part's interface concept, and say them only where a behaviour turns on them. One it does not hold, capture whole yourself: what it takes, its choices and its default too. Read each where it is defined and follow it to what it does - never from its name or its help text alone.
|
|
6
|
-
- Group them into functional specs by what they do, as any feature's: several options in one functional spec when they are one behaviour.
|
|
7
|
-
- Where one belongs with another feature's behaviour - an option of what another feature does - capture this part of the interface exactly, build on that feature, and name it; never write its behaviour again.
|
|
8
|
-
- One that is not the software's interface - an option of a development script, a variable only its tests or its build read - goes in `dropped`, by its name, with why. Nothing else is dropped: an option users rarely pass is still the interface.
|
|
9
|
-
- `title`: a few words for what they are, as a feature of the module - `Proxies and network options`.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Gather the features into modules
|
|
2
|
-
|
|
3
|
-
The part's ***plain is a chain of modules. Below is every feature of the part, area by area in the order of the code, with what it owns, the first line of each functional spec and its scenarios - and the modules as the code's areas make them, gathered by size alone. Gather the features into modules by concern, and put the modules in the order they are built. Call `submit_capture_modules` once.
|
|
4
|
-
|
|
5
|
-
## A module is a concern
|
|
6
|
-
|
|
7
|
-
A module is what a person looks for in one file: a command-line tool's request sending, its output formatting, its sessions, its downloads, its plugin manager; a backend's accounts, its orders, its payments. One module that holds everything is as hard to read as the code, and every change to it regenerates all of it; a concern split across modules is read in pieces.
|
|
8
|
-
|
|
9
|
-
- `modules`, each with a `name` - short kebab-case, the concern - an `about` line, and its `features` by key, in the order its functional specs are written. Every feature is in one module.
|
|
10
|
-
- A module of one feature is right when that feature is a concern of its own. Put a feature with another only when it is part of that concern - never to make a module larger.
|
|
11
|
-
- A concern too large to read in one file - past about 40 functional specs - is two modules, each a part of it.
|
|
12
|
-
- The areas are folders of the code - often a concern each, never binding: a module may take features of several areas, and an area's features may go to several modules. Where the code's areas are concerns already, keep them.
|
|
13
|
-
|
|
14
|
-
## The order they are built in
|
|
15
|
-
|
|
16
|
-
Each module is built on the code of the modules before it, and its conformance tests - its scenarios - run as soon as it is built, with nothing after it there. A module whose scenarios send a request, print a response or save a session needs the module that does that before it: built earlier, its scenarios cannot pass, and its coding agent invents what a later module captures.
|
|
17
|
-
|
|
18
|
-
The areas are in the order of the code's imports, which is not that order: the code that runs everything imports everything, yet everything else needs it built first - a command-line tool's request sending before the output formatting that prints what it answers, a backend's routes before the middleware that wraps them. List the modules in the order they are built: the core flow first, what extends it after.
|
|
19
|
-
|
|
20
|
-
- `needs`: for each module, the modules before it whose behaviour its functional specs build on and its scenarios run - the module where the command, the route or the screen its scenarios use does what they rely on. A scenario that runs a command needs the module that makes the command do it, not only the one that names its options.
|
|
21
|
-
- `rewrites`: a scenario that needs a module after its own whatever the order - two modules whose scenarios each need the other - is rewritten so it checks what it checks with only the modules before it: a scenario of output formatting that follows a redirect checks the formatting of a plain response instead. Its feature's key, its functional spec's func-id, its scenario's id, its whole new text, and `why`: the later module it needed. None when none: most orders need no rewrite. Never merge two modules to spare a rewrite.
|
|
22
|
-
|
|
23
|
-
You see the ***plain, not the code: decide from what each feature does and what its scenarios run.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Outline an area's features
|
|
2
|
-
|
|
3
|
-
Your area of the codebase becomes one module of ***plain. Outline it into features - each a thing a user or a client can do, or a part of what they see - which agents then capture side by side, one feature each. Call `submit_capture_features` once.
|
|
4
|
-
|
|
5
|
-
- A feature gets a short kebab-case `name`, a `title` of a few words, a line `about` what it lets someone do, and its `paths`: the folders and files where it is built, relative to the codebase - where its agent starts looking.
|
|
6
|
-
- A feature is about what a user sees: `sign-up`, `password-reset`, `invoice-export` - never a layer or a file (`models`, `utils`).
|
|
7
|
-
- Size: a feature is captured in up to eight functional specs, each about two hundred lines of code. A larger one is two features.
|
|
8
|
-
- List them in build order: each feature only builds on those before it - the first is the simplest thing the area does that can be seen working, and what everything else needs (the data it keeps) comes early. In a codebase that starts here, the first feature also brings up the project - its entry point, its first screen or endpoint.
|
|
9
|
-
- What the stack below already settles is not a feature: settings, logging, request ids, error bodies, middleware, how the app starts. Put such a file in `left_out` with why - settled by the stack - unless the original does something there that a user or a client would notice is different from what the stack says; then that difference alone is a feature.
|
|
10
|
-
- Every route, command, option, screen, environment variable and table of your area belongs to a feature, or the file it is in is in `left_out` with why: the interface is captured whole, so no option is too small to be a feature's. Shared helpers belong to no feature: what they do shows in the features that use them.
|
|
11
|
-
- The area's tests are where its features show: a test file belongs with the feature it tests.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Make the module readable
|
|
2
|
-
|
|
3
|
-
Below is a module's ***plain as a capture wrote it - feature by feature, by agents that each saw only their own feature - each functional spec with its scenarios. You read the ***plain alone, never the code: what you judge is whether a person can review it. Rewrite a functional spec only where it reads as code rather than as what the software does:
|
|
4
|
-
|
|
5
|
-
- a function, class, file, variable or internal data shape named, where the behaviour is what matters
|
|
6
|
-
- a default stated - that invalid input is rejected, that data is saved, that errors are reported - with nothing particular about it, or anything the stack below says already - never an option's default, choices or value, which are the interface
|
|
7
|
-
- a restatement of a functional spec before it, or of a concept's definition
|
|
8
|
-
- a case where the rule is stated - an example, what one wrong input or a missing record answers - that a scenario of it pins, or that the stack settles: the scenario and the stack keep it
|
|
9
|
-
- rationale, narration, history, hedges and adjectives no test can check
|
|
10
|
-
- one fact spread over several sentences, or several facts in one long sentence
|
|
11
|
-
|
|
12
|
-
A functional spec that says nothing the stack and the specs before it do not say already is cut down to what is left, or, when nothing is, to its first line. Keep every fact that is its own: every interface detail - a command, an option and each of its names, its choices and default, a method, path, field, status code, message, exit code, environment variable, format - however obvious it reads, every boundary, and every error the stack does not settle and no scenario pins. Scenarios are not yours to change. Keep its concepts, or use others its module has. A functional spec that reads well is left as it is: most are. Call `submit_capture_edits` once, with the new text of each functional spec you rewrote, by its func-id - none at all when none needs it.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Take the interface from the code
|
|
2
|
-
|
|
3
|
-
You take the software's interface from its code, as data: every command, argument, option, route and environment variable a user, a client or a script calls by name - in the files you are given, and any of their interface the map missed. It becomes the part's interface reference: kept beside the ***plain as a linked resource, given whole to every agent that regenerates the code or tests it, and the one place its details are written. So it is exact, whole, and taken from the code alone - never from a name, the docs, or what a framework would do. Call `submit_capture_reference` once.
|
|
4
|
-
|
|
5
|
-
- **Read each file you are given whole,** and follow what defines the interface to where it is worked out: a list of choices built elsewhere, a computed default, a group of options a helper adds. Then grep the part for interface the map missed: subcommands, positional arguments, routes a router adds, variables read through a helper.
|
|
6
|
-
- **One entry each,** of its kind: `command`, `argument` (positional), `option`, `route`, `env`, or `other` - a configuration key, a file it reads: what a user or a script names. Its `name` exactly as the code has it - a route as `METHOD /path` in the code's own parameter syntax - and every other name it has in `aliases`. For an argument or an option, `command`: the command it belongs to, as its users type it.
|
|
7
|
-
- **Exactly as the code has it:** `takes` (its metavar or type), `choices` (each value, from wherever the code lists them), `default`, `repeatable`, `required`, `hidden` when it is left out of its help, and `help` word for word, placeholders and all - the whole text `--help` prints, every paragraph: where the code keeps a short help and a long one, the one `--help` prints. Choices or a default the code works out when it runs - filtered by what the machine has, taken from what is installed - go in `details`, saying how, never as a fixed list that is not always the list. A route's parameters, the fields it takes and answers, and its statuses, a line each in `details`. Leave a field out rather than guess it: what the code does not say, the entry does not.
|
|
8
|
-
- **Before you say what a set, a list or a mapping holds,** grep every line that builds it or adds to it - a set defined in one place is often added to in another - and read each.
|
|
9
|
-
- **`where`: the file and the line it is defined on.** Every literal you give - each name, alias, choice, default, and the help - is checked against that file and the files you name in `also` (where a default or the choices are worked out): one the code does not have sends the entry back.
|
|
10
|
-
- **Whole:** every surface the map found in your files is an entry, or is in `excluded` with why - only what is not the software's interface: an option of a development script, a variable only its tests read. An option users rarely pass is the interface still.
|
package/genome/capture/split.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Split an area
|
|
2
|
-
|
|
3
|
-
Your area of the codebase is too large for one agent to outline: split it into smaller areas, each a cohesive part of what the software does - authentication, billing, the editor, the admin screens - so each can be captured on its own. Call `submit_capture_areas` once.
|
|
4
|
-
|
|
5
|
-
- Each area gets a short kebab-case `name` from what it does, a line `about` what it does, and its `paths`: folders or files of your area, relative to the codebase.
|
|
6
|
-
- Divide by what the software does, not by technical layer, where the code allows it: an area's routes, its data and its screens together. Where the code is layered - a `models/` folder for everything - follow the folders, and name an area by what it does.
|
|
7
|
-
- Every file of your area belongs to one area, or is in `left_out` with why: vendored, generated, tooling. A path in one area is in no other.
|
|
8
|
-
- At least two areas, each smaller than yours. Fewer, larger areas are better than many small ones: an area is worth an agent when it holds a few thousand lines.
|
|
9
|
-
- List them in build order: the foundations first - the data model, shared services - then what is built on them. The harness also orders them by what imports what.
|
package/genome/capture/survey.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Survey the codebase
|
|
2
|
-
|
|
3
|
-
You start the capture: from the map of the whole codebase, its manifests and its docs, you say what the software is built on and how it divides into parts, you settle the conventions every feature follows, and you write what every part's ***plain shares. Call `submit_capture_survey` once, with all of it.
|
|
4
|
-
|
|
5
|
-
## Parts
|
|
6
|
-
|
|
7
|
-
A part is software on one stack: a backend, a frontend, a command-line tool, a library. Most codebases are one part. A codebase with a Python backend and a React frontend is two - each captured as a chain of modules of its own, built and tested with its own toolchain. Two parts never share a folder.
|
|
8
|
-
|
|
9
|
-
- `name`: short kebab-case, what the part is - `api`, `web`, `cli`, or the product's name when there is one part.
|
|
10
|
-
- `paths`: the folders and files that are the part, relative to the codebase - `.` for the whole of it when there is one part.
|
|
11
|
-
- Leave out what is not the software: vendored code, generated code, build and deployment tooling, editor settings, the docs themselves - each in `left_out`, with why. A part's own tests are part of it, never left out: they are the evidence of what it does.
|
|
12
|
-
|
|
13
|
-
## The stack
|
|
14
|
-
|
|
15
|
-
The parts are captured on the stack they are on now - the same language, framework, storage and main libraries, with their versions from the manifests.
|
|
16
|
-
|
|
17
|
-
- `stdlib_stack`: turri's standard library has templates that settle a stack (the catalogue is below). Read the one that matches. Name it only when the original agrees with it - its framework, its layout, its libraries - since everything in it becomes a requirement. When it contradicts the original anywhere that matters, name none, and write the stack in `implementation_reqs` instead.
|
|
18
|
-
- `stdlib_conformance`: true to import the stack's conformance template too - when you named a stack that has one and the original's black-box tests, if it has any, run the way it says.
|
|
19
|
-
- `implementation_reqs`: how the part is built, one fact a line, without the `- `: the language and its version, the framework, storage, the libraries that shape behaviour or architecture - an ORM, an outside service such as a payment provider - and how it starts. Write :Implementation: as the subject. Not what a named `stdlib_stack` says already; not utility libraries. When the original has unit tests, how they run - their framework - with :UnitTests: as the subject.
|
|
20
|
-
- `test_reqs`: how the black-box conformance tests run, with :ConformanceTests: as the subject - the framework, how they reach the software (start the server and call it over HTTP, run the command, drive the page). Take it from the original's own black-box tests when it has them, and from how they run the software: read their harness - fixtures, helpers, `conftest` - for what standard input is (a terminal, empty, piped), the environment and the servers they start, and say it. A conformance test run any other way tests another program: a command that reads piped standard input as its body acts differently when its tests give it none.
|
|
21
|
-
- Then what every test sets up so the software acts the same on every run and every machine - read the code for what would otherwise vary: whatever it fetches or checks on its own - an update check, telemetry, a remote configuration - turned off, or pointed at a local stand-in; a home and a configuration folder of the test's own, empty unless the test fills them; the terminal width fixed (`COLUMNS`) where its output wraps or cuts to it; a pseudo-terminal where it prompts on one - a password - or acts otherwise on one; the servers it talks to started locally, never the internet. Each as one fact, with how: the variable and its value, the file and what it holds. Leave `test_reqs` empty only when the conformance template you named says it all.
|
|
22
|
-
|
|
23
|
-
## Conventions
|
|
24
|
-
|
|
25
|
-
`conventions`: what every feature of a part does the same way and a user or a script relies on, settled here once - the agents that capture each feature follow them, and never decide them again. Four agents each deciding a command's exit code on a usage error decide it differently. For a command-line tool: how an error is written - the stream, its exact form - the exit code of each kind of failure (a usage error, a failed request, a timeout, Ctrl-C), and what changes when standard input or output is not a terminal. For a backend: the error body, the status of each kind of failure, what every request needs. For a frontend: how errors and loading show.
|
|
26
|
-
|
|
27
|
-
For software that talks to other software - a client that sends requests, a server that answers them, a tool that writes files another program reads - also what reaches the other side, exactly, whichever feature makes the call: the headers it adds of its own and when (`User-Agent`, `Accept`, `Content-Type`, `Content-Length`); how a body is encoded - JSON's separators and whether non-ASCII is escaped, the charset, a form's encoding; how a header's value is encoded and trimmed; when a body is sent or read whole, streamed, or not read at all. No feature's writer looks at the wire; the other side sees it on every call.
|
|
28
|
-
|
|
29
|
-
- Settle each from the code that does it: follow the entry point to where it catches errors and exits, and read what it does there. A declaration is no evidence - an enum lists codes the code may never use - and neither is a framework's default the entry point changes: argparse exits 2 on a usage error unless the program catches it and exits otherwise.
|
|
30
|
-
- One fact a line, without the `- `, exact: the stream, the text, the code. In `where`, the files whose code decides it.
|
|
31
|
-
- Only what the stack you named does not say the same way: where the original departs from it, or what it leaves open.
|
|
32
|
-
|
|
33
|
-
## Concepts
|
|
34
|
-
|
|
35
|
-
`definitions`: the core concepts of each part's domain - what its data model, its tables and its screens are about: `:User:`, `:Order:`, `:Invoice:`. Each is one plain sentence that starts with the concept and says what it is, with its attributes when they matter to what users see. Only those used across the software; the agents that capture each feature define their own. Concept names are CamelCase between colons, and never one of the predefined ones (:Implementation:, :UnitTests:, :ConformanceTests:, :AcceptanceTests: and the rest).
|
|
36
|
-
|
|
37
|
-
Every concept your bullets use must be one of yours or a predefined one. Two definitions never name each other - `:Link:` naming `:LinkCode:` and `:LinkCode:` naming `:Link:` is a circle ***plain refuses: the one built on the other names it, and that one names nothing back.
|
package/genome/capture/trial.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Try the scenarios on the original
|
|
2
|
-
|
|
3
|
-
The scenarios below are what the conformance tests of the regenerated code will check. Agents wrote them from the original's code and tests, and never ran it - so one can expect a terminal its test will not give, a site on the internet, output wrapped at a width nobody set, a message the original never prints. A scenario the original itself fails is wrong: a coding agent builds to it and breaks what users rely on, or its module's conformance tests fail for good.
|
|
4
|
-
|
|
5
|
-
You have a shell. Your folder is a copy of the original codebase - its files, none of its dependencies installed. Install it there, as its manifests and README say, then run each scenario against it the way its conformance test will: from outside, through its interface - the command run, the request sent, the page driven - under the test reqs below: what standard input and output are, the environment, the servers it talks to. Never change the original's files to make a scenario hold.
|
|
6
|
-
|
|
7
|
-
Call `submit_capture_trial` once, with every scenario you were given, each with its `outcome`:
|
|
8
|
-
|
|
9
|
-
- `held`: the original does what it says. In `ran`, what you ran and what it answered, in a line.
|
|
10
|
-
- `corrected`: it does otherwise. Its whole new text in `text`, saying what the original does; `why`; and in `ran`, what you ran and what it answered. Keep what it checks - change its values, what it expects, or how it gets there: a local server for a site on the internet, the option that forces colour when its test's output is not a terminal. Never check less. Where its functional spec says the same wrong thing, correct the functional spec too, in `functional_specs`, its whole new text and why.
|
|
11
|
-
- `removed`: nothing outside the software can check it - it calls a function, mocks a library, needs a real terminal no test can give - with `why`. Rare: first look for a way to check it from outside.
|
|
12
|
-
- `untried`: you could not run it - the original would not install or start here, it needs a service this machine lacks - with `why`. It stays as written. Never `held` or `removed` for a scenario you did not run.
|
|
13
|
-
|
|
14
|
-
What every conformance test of the part must set up for the original to act as the scenarios say goes in `test_reqs`, one fact a line, with :ConformanceTests: as the subject, when the test reqs below do not say it already: an environment variable such as `COLUMNS`, a configuration folder of the test's own, an update check or telemetry turned off, how bodies are compared, a local server in place of the internet.
|
|
15
|
-
|
|
16
|
-
The test reqs are read by whoever writes any conformance test of the part, for every scenario of every module. So what only some scenarios need - a file one sends, a session file one starts from, a server that answers one exact body, a pseudo-terminal for the one password prompt, a variable unset for one case - is never a test req: it goes in those scenarios' own text. Return each `corrected`, its text saying the setup it needs as part of what it does, and `why`: the setup it did not say. A test req names no scenario and no functional spec.
|
|
17
|
-
|
|
18
|
-
You have a budget of tool calls: install once, then a command or two a scenario. Run several scenarios in one command where you can.
|
package/genome/capture/verify.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Check the interface against the code
|
|
2
|
-
|
|
3
|
-
Below is a module's ***plain - each functional spec with its scenarios - and the interface the code of its features defines. From now on the ***plain is the source of truth and the code is regenerated from it: what it says of the interface must be what the original does, exactly. Check every interface fact it states against the code that decides it - each option's names, the value it takes, its choices and default; each command; each route's method, path, parameters, fields and status codes; each message, output format and exit code a user or a script sees; each environment variable. Read the definition and follow it: never take the ***plain's word, a name, a help text or a docstring when the code does otherwise. The agents that wrote it were offline and read in a hurry; expect mistakes.
|
|
4
|
-
|
|
5
|
-
When the part has an interface reference, its entries are listed: taken from the code, every literal checked against it. The ***plain must agree with it - an option, a choice, a default it gives otherwise is wrong, unless the code shows the reference is - and an option the ***plain names that the reference does not have is listed for you to settle against the code.
|
|
6
|
-
|
|
7
|
-
Correct what is wrong, and add what is missing of the interface it already describes: a choice left out, a default unsaid, an alias, a message's exact text, a field. A scenario that would fail against the original is corrected too. Call `submit_capture_corrections` once, with each correction: the functional spec's func-id - and the scenario's id when the correction is to the scenario - its whole new text, and why, citing the code. Change nothing else: a functional spec that holds keeps its words, behaviour that is not interface is not yours, and no fact is cut. None at all when everything holds.
|