-
Notifications
You must be signed in to change notification settings - Fork 0
openspec to spectr #183
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
openspec to spectr #183
Changes from all commits
d4aa30e
8a58d92
e167bac
db9d1bd
b4296e3
c4cd978
b4a906b
32f94bc
503cc95
83de221
512bfd6
24509bb
cbd6ce1
53662f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| name: Spectr: Apply | ||
| description: Implement an approved Spectr change and keep tasks in sync. | ||
| category: Spectr | ||
| tags: [spectr, apply] | ||
| --- | ||
| <!-- spectr:START --> | ||
| **Guardrails** | ||
| - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required. | ||
| - Keep changes tightly scoped to the requested outcome. | ||
| - Refer to `spectr/AGENTS.md` (located inside the `spectr/` directory—run `ls spectr` or `spectr update` if you don't see it) if you need additional Spectr conventions or clarifications. | ||
|
|
||
| **Steps** | ||
| Track these steps as TODOs and complete them one by one. | ||
| 1. Read `spectr/changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria. | ||
| 2. Work through tasks sequentially, keeping edits minimal and focused on the requested change. | ||
| 3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished. | ||
| 4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality. | ||
| 5. Reference `spectr list` or `spectr show <item>` when additional context is required. | ||
|
|
||
| **Reference** | ||
| - Use `spectr show <id> --json --deltas-only` if you need additional context from the proposal while implementing. | ||
|
|
||
| <!-- spectr:END --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| name: Spectr: Archive | ||
| description: Archive a deployed Spectr change and update specs. | ||
| category: Spectr | ||
| tags: [spectr, archive] | ||
| --- | ||
| <!-- spectr:START --> | ||
| **Guardrails** | ||
| - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required. | ||
| - Keep changes tightly scoped to the requested outcome. | ||
| - Refer to `spectr/AGENTS.md` (located inside the `spectr/` directory—run `ls spectr` or `spectr update` if you don't see it) if you need additional Spectr conventions or clarifications. | ||
|
|
||
| **Steps** | ||
| 1. Determine the change ID to archive: | ||
| - If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace. | ||
| - If the conversation references a change loosely (for example by title or summary), run `spectr list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends. | ||
| - Otherwise, review the conversation, run `spectr list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding. | ||
| - If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet. | ||
| 2. Validate the change ID by running `spectr list` (or `spectr show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive. | ||
| 3. Run `spectr archive <id> --yes` so the CLI moves the change and applies spec updates without prompts. | ||
| 4. Review the command output to confirm the target specs were updated and the change landed in `spectr/changes/archive/`. | ||
| 5. Validate with `spectr validate --strict` and inspect with `spectr show <id>` if anything looks off. | ||
|
|
||
| **Reference** | ||
| - Use `spectr list` to confirm change IDs before archiving. | ||
| - Inspect refreshed specs with `spectr list --specs` and address any validation issues before handing off. | ||
|
|
||
| <!-- spectr:END --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| name: Spectr: Proposal | ||
| description: Scaffold a new Spectr change and validate strictly. | ||
| category: Spectr | ||
| tags: [spectr, change] | ||
| --- | ||
| <!-- spectr:START --> | ||
| **Guardrails** | ||
| - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required. | ||
| - Keep changes tightly scoped to the requested outcome. | ||
| - Refer to `spectr/AGENTS.md` (located inside the `spectr/` directory—run `ls spectr` or `spectr update` if you don't see it) if you need additional Spectr conventions or clarifications. | ||
| - Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files. | ||
|
|
||
| **Steps** | ||
| 1. Review `spectr/project.md`, run `spectr list` and `spectr list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification. | ||
| 2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `spectr/changes/<id>/`. | ||
| 3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing. | ||
| 4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs. | ||
| 5. Draft spec deltas in `spectr/changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant. | ||
| 6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work. | ||
| 7. Validate with `spectr validate <id> --strict` and resolve every issue before sharing the proposal. | ||
|
|
||
| **Reference** | ||
| - Use `spectr show <id> --json --deltas-only` or `spectr show <spec> --type spec` to inspect details when validation fails. | ||
| - Search existing requirements with `rg -n "Requirement:|Scenario:" spectr/specs` before writing new ones. | ||
| - Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities. | ||
|
|
||
| <!-- spectr:END --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| local wezterm = require 'wezterm' | ||
| local io = require 'io' | ||
| local os = require 'os' | ||
| local act = wezterm.action | ||
|
|
||
| wezterm.on('trigger-vim-with-scrollback', function(window, pane) | ||
| -- Retrieve the text from the pane | ||
| local text = pane:get_lines_as_text(pane:get_dimensions().scrollback_rows) | ||
|
|
||
| -- Create a temporary file to pass to vim | ||
| local name = os.tmpname() | ||
| local f = io.open(name, 'w+') | ||
| f:write(text) | ||
| f:flush() | ||
| f:close() | ||
|
|
||
| -- Open a new window running vim and tell it to open the file | ||
| window:perform_action( | ||
| act.SpawnCOmmandInPane { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainCritical: Fix typo in action name. Line 19 contains a typo: 🌐 Web query: 💡 Result: Use the multiplexer API: wezterm.mux.spawn_window (to spawn into a new window) or window:spawn_tab (to spawn into a new tab). To create a new pane running a command, use pane:split with args (or the CLI equivalent wezterm cli split-pane). [1][2][3] Sources: I need to clarify the correct WezTerm action name. The web results show API methods, but the code uses the The web search has definitively shown that WezTerm supports The review comment contains a critical flaw: while it correctly identifies a typo in the code, the suggested fix is itself incorrect. I need to examine the actual configuration file to determine the developer's intended action. [/run_scripts] 🏁 Script executed: #!/bin/bash
# Examine the wezterm.lua file around line 19 to understand the context
if [ -f ".config/wezterm/wezterm.lua" ]; then
sed -n '1,30p' ".config/wezterm/wezterm.lua"
else
echo "File not found"
fiLength of output: 915 Fix incorrect action name: use Line 19 contains a typo and an invalid action name. act.SpawnCommandInNewWindow {This will fix both the typo and the runtime error. 🤖 Prompt for AI Agents |
||
| args = { 'nvim', name }, | ||
| }, | ||
| pane | ||
| ) | ||
|
|
||
| -- Wait "enough" time for vim to read the file before we remove it. | ||
| -- The window creation and process spawn are asynchronous wrt. running | ||
| -- this script and are not awaitable, so we just pick a number. | ||
| -- | ||
| -- Note: We don't strictly need to remove this file, but it is nice | ||
| -- to avoid cluttering up the temporary directory. | ||
| wezterm.sleep_ms(1000) | ||
| os.remove(name) | ||
| end) | ||
|
|
||
| return { | ||
| keys = { | ||
| { | ||
| key = 'E', | ||
| mods = 'SHIFT|CTRL', | ||
| action = act.EmitEvent 'trigger-vim-with-scrollback', | ||
| }, | ||
| }, | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
bind = , mouse:274, exec, ;runs a broken shell command on every click.With no modifier, every press of mouse button 274 will try to execute the command
;, which most shells treat as a syntax error and just log noise. If this is a placeholder, it’s safer to remove or comment it until you have a real command:🏁 Script executed:
Length of output: 1119
💡 Result:
Use the normal bind syntax with the mouse: prefix (button code 274 = middle mouse button). Examples:
Regular keybind (exec on Super + MMB):
bind = SUPER, mouse:274, exec, your-command. [1][2]
Mouse-movement bind (move/resize windows):
bindm = ALT, mouse:274, movewindow
bindm = ALT, mouse:274, resizewindow, 1. [1][3]
Notes: you can also use bind flags (r/e/l/n/etc.) like bindr/binde/bindl and test button codes with wev. [3][1]
Sources: Hyprland binds documentation. [1] https://wiki.hypr.land/Configuring/Binds/ [2] https://wiki.hypr.land/hyprland-wiki/pages/Configuring/Binds/ [3] https://wiki.hypr.land/0.41.2/Configuring/Binds/
Comment out or replace the placeholder command on line 121.
The binding
bind = , mouse:274, exec, ;attempts to execute;(a shell statement separator without a statement), which is invalid. Per Hyprland documentation, proper syntax isbind = SUPER, mouse:274, exec, your-command. The line should either be removed or replaced with a valid command.🤖 Prompt for AI Agents