-
Notifications
You must be signed in to change notification settings - Fork 0
chore(openspec): archive generator-payload-alignment #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # cli-generated-rule-delivery Specification | ||
|
|
||
| ## Purpose | ||
|
|
||
| TBD - created by archiving change generator-payload-alignment. Update Purpose after archive. | ||
|
|
||
| ## Requirements | ||
|
|
||
| ### Requirement: A delivered rule is a file set | ||
|
|
||
| The CLI SHALL accept a generated rule as a set of files, each with a path relative to | ||
| `.taskless/rules/<engine>/<id>/` and its content as text. One shape SHALL serve every engine, | ||
| validated against `ENGINE_LAYOUTS` — the table the CLI already holds — so that "is this a complete | ||
| rule" is answered from data rather than from per-engine prose. | ||
|
|
||
| A response entry carrying the legacy single `content` object SHALL remain valid and SHALL continue | ||
| to be filed as an ast-grep rule. `files` and `content` SHALL be mutually exclusive. | ||
|
|
||
| #### Scenario: A runtime rule arrives complete | ||
|
|
||
| - **WHEN** a delivered rule declares engine `runtime` and carries `check.ts` and `captures/*.yml` | ||
| - **THEN** the CLI SHALL write them under `.taskless/rules/runtime/<id>/` | ||
| - **AND** the rule SHALL be discoverable and verifiable without further input | ||
|
|
||
| #### Scenario: A Vale rule arrives with its config | ||
|
|
||
| - **WHEN** a delivered rule declares engine `vale` and carries `<id>.yml` and `.vale.ini` | ||
| - **THEN** the CLI SHALL write both | ||
| - **AND** the rule SHALL be scoped by its own `.vale.ini` rather than by a synthesized default | ||
|
|
||
| #### Scenario: An incomplete file set is refused | ||
|
|
||
| - **WHEN** a delivered file set omits a file the engine layout requires | ||
| - **THEN** the CLI SHALL refuse the rule and name what is missing | ||
| - **AND** SHALL NOT write a partial rule directory | ||
|
|
||
| ### Requirement: Delivered paths are refused before they are written | ||
|
|
||
| The CLI SHALL reject an absolute path, any `..` segment, and any path the engine layout does not | ||
| account for, **before** creating any directory or file. Writing server-supplied paths is a | ||
| directory-traversal surface that did not exist while the response carried one structured object | ||
| whose destination the client computed itself. | ||
|
|
||
| #### Scenario: A traversing path is refused | ||
|
|
||
| - **WHEN** a delivered file declares a path containing `..` or an absolute path | ||
| - **THEN** the CLI SHALL refuse the entire rule | ||
| - **AND** SHALL NOT have created any file or directory for it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # cli-layout-export Specification | ||
|
|
||
| ## Purpose | ||
|
|
||
| TBD - created by archiving change generator-payload-alignment. Update Purpose after archive. | ||
|
|
||
| ## Requirements | ||
|
|
||
| ### Requirement: The rule layout is published as data | ||
|
|
||
| The CLI SHALL publish its rule-layout table — the known engines, each engine's rule file, config | ||
| file and captures directory, and the rules and tests directory names — as an importable module, | ||
| so that a service building a rule payload validates against the table rather than transcribing it. | ||
|
|
||
| A shape documented in prose drifts: the same layout was described in seven stale code comments and | ||
| in the runtime-execution spec, all naming a pre-migration path. A shape published as data does not. | ||
|
|
||
| #### Scenario: The layout is importable | ||
|
|
||
| - **WHEN** a consumer imports the published layout entry | ||
| - **THEN** it SHALL receive the engine list and each engine's layout as values | ||
| - **AND** the values SHALL be the same ones the CLI itself dispatches on | ||
|
|
||
| ### Requirement: The published layout carries no CLI runtime | ||
|
|
||
| The published entry SHALL NOT reach the filesystem, the network, telemetry, or the command tree, | ||
| so a Worker can import it. This SHALL be enforced by the build — the published chunk graph is | ||
| checked at build time, failing the build rather than relying on review — matching how the prompts | ||
| entry is already constrained. | ||
|
|
||
| #### Scenario: A runtime import fails the build | ||
|
|
||
| - **WHEN** the published layout graph reaches a host capability | ||
| - **THEN** the build SHALL fail | ||
| - **AND** the artifact SHALL NOT be emitted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.