Using spec kit and copilot
Version 15.11.2025
Install
Install uv package and env manager
curl -LsSf https://astral.sh/uv/install.sh | sh
/root/.local/bin/uv tool update-shell
Don't forget toi close and open the terminal for loading the new setting. Install spec kit
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
Prepare the project
I made a new project
mkdir -p /data_1/dev_latex_editor
cd /data_1/dev_latex_editor
specify init --here
specify check
I selected the copilot (copilot modus) and the I am under linux (sh modus)
- /speckit.constitution - Establish project principles
- /speckit.specify - Create baseline specification
- /speckit.plan - Create implementation plan
- /speckit.tasks - Generate actionable tasks
- /speckit.implement - Execute implementation
Optional commands that you can use for your specs (improve quality & confidence)
- /speckit.clarify (optional) - Ask structured questions to de-risk ambiguous areas before planning (run before /speckit.plan if used)
- /speckit.analyze (optional) - Cross-artifact consistency & alignment report (after /speckit.tasks, before /speckit.implement)
- /speckit.checklist (optional) - Generate quality checklists to validate requirements completeness, clarity, and consistency (after /speckit.plan)
In VS Code:
More information about the spec kit is here: https://github.com/github/spec-kit
Using spec kit
Step 1: Establish project principles
/speckit.constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements
Sound for me like it should be default for all project.
Step 2: Create the spec
"Use the /speckit.specify command to describe what you want to build. Focus on the what and why, not the tech stack."
This is the moment where you will not write the text alone. Open the webpage of the AI chat of your chosing (Not Akinator!) -> Let's call it "Outsider AI". And tell it
I am working on the text for /speckit.specify of spec kit.
This is my text so far. Can you help me to improve the text? Thanks!
[your idea]
Removing all the tangents I had, I mainly used:
- What additional details would you suggest?
- Thanks a lot! Do you have any suggestions?
- Please show me the finished text. Thanks!
In the end I got this text:
# LaTeX Equation Editor Plugin Specification
## Overview
Build an Overleaf plugin that provides a LaTeX equation editor in a floating window. Users access this editor via a button in the main editor's toolbar.
## Core Components
### 1. Equation Display Area
- **Output Field**: Renders the current LaTeX equation as a typeset preview with live updates as the user types
- **Preview Size Control**: Toggle or slider to adjust the size of the rendered equation for better visibility of complex equations
- **Input Field**: Text area where users type LaTeX code
- **Clear Button**: Clears the equation input field
- **Error Handling**:
- Display a small warning icon or red border around the output field when LaTeX syntax is invalid
- Show specific error message below the preview (e.g., "Missing closing brace" or "Unknown command \xyz")
- If rendering fails, show the last valid preview or keep the output field empty
- Users can continue typing even with errors present (non-blocking)
### 2. Symbol Selection System
- **Symbol Group Selector**: Displays available symbol categories in a grid layout. Clicking a category updates the symbol palette below.
- **Recent Symbols Category**: Only displayed when window width exceeds 600px. Shows recently used symbols for quick access.
- **Symbol Palette**: Shows symbols from the selected group in a responsive grid layout
- Grid adapts to window width to use available space effectively
- Minimum symbol button size: 40x40px for usability
- Visual hover feedback on symbol buttons
- Clicking any symbol inserts its LaTeX code into the equation input field and updates the rendered preview
### 3. Symbol Database Structure
Located in the `symbolDB` directory:
- Each file represents one symbol group
- **Symbol Group properties**:
- Name (used for tooltip)
- Label (displayed on the category button)
- **Individual Symbol properties**:
- Label (displayed on the symbol button)
- LaTeX string (inserted when clicked)
- Description (used for tooltip and search)
### 4. Search Functionality
A search bar allows users to find symbols by searching through symbol descriptions.
### 5. Equation History
- Maintains a history of equations within the current session
- Previous/Next navigation buttons to cycle through equation history
- Allows users to revisit or restore previously entered equations
- History is independent of the main editor's undo system
## Window Behavior
### Positioning & Sizing
- **Default Size**: 500x400px (or ~30% of screen width/height)
- On screens smaller than 1024px wide, opens smaller or maximized for optimal use of space
- **Default Position**: Centered on first open, then remembers last position
- **Minimum Dimensions**:
- Width: 400px (accommodates equation input, 4-6 symbol buttons per row, and search bar)
- Height: 300px (ensures all components remain functional)
- **Movable**: Users can drag the window to any position
- **Resizable**: Users can scale the window size while respecting minimum dimensions
### Window Controls
- **Close Button**: Closes the LaTeX editor window completely
- **Minimize Button**: Collapses the window to the lower-left corner
- **Restore**: Clicking the minimized window returns it to its previous position and size
### Interaction Model
- **Non-blocking**: The window operates modally—users can continue editing in the main editor while the LaTeX editor is open
- **Compact Design**: Balance minimizing screen space usage with maintaining usability
- **Performance**: Must not slow down or interfere with main editor operations
## Integration with Main Editor
### Equation Insertion
- **Insert Button**: Inserts the current equation at the text cursor position in the main editor
- **Copy Button**: Copies the current LaTeX code to the clipboard for use elsewhere
- After insertion, the equation remains in the input field (not cleared)
- Window stays open after insertion to support continued editing workflow
### Equation Loading
- When users select text in the main editor **while the LaTeX window is already open**, that text replaces the content in the equation input field, allowing quick editing of existing equations
- The window does **not** automatically open when text is selected (to avoid disrupting user experience)
## Keyboard Shortcuts
- **Open/Close LaTeX Editor**: Ctrl+E (or Cmd+E on Mac)
- **Insert Equation**: Ctrl+Enter while focused in the LaTeX editor window
- **Close Window**: ESC key
- **Navigate Symbol Palette**: Arrow keys to move between symbols, Enter to select
- **Navigate History**: Alt+Left/Right (or Cmd+Left/Right on Mac) to cycle through equation history
## Accessibility
- **Keyboard Navigation**: Full keyboard support for navigating the symbol palette using arrow keys
- **Focus Indicators**: Clear visual indicators for keyboard navigation
- **Screen Reader Support**: Symbol descriptions are properly labeled for screen readers
- **High Contrast**: All UI elements maintain sufficient contrast ratios
## Theming
- The LaTeX editor window automatically adapts to Overleaf's current theme setting (light/dark mode)
- Rendered equations remain clearly visible in both themes
- All UI components respect the selected theme
## Design Philosophy
The LaTeX editor is a support tool meant to enhance workflow without disruption. The design anticipates that users will frequently minimize and restore the window as they work. Prioritize:
1. Non-obtrusiveness
2. Responsiveness and live feedback
3. Seamless integration with the main editing experience
4. Efficient use of screen space while maintaining functionality
I stuffed it into Copilot
/speckit.specify [BLA BLA lot of text]
