Skip to content

Commit 2fe9950

Browse files
committed
feat: implement PostgreSQL EXPLAIN visualizer plugin
Phases completed: - Phase 1: Setup (T001-T008) - Bootstrap plugin, dependencies, webpack config - Phase 2: Foundation (T009-T017) - Type definitions, utilities, error handling - Phase 3: User Story 1 (T018-T031) - Core visualization with Vue/PEV2 - Phase 4: User Story 4 (T032-T038) - Data source flexibility - Phase 6: User Story 3 (T050-T062) - Panel configuration options - Polish (T071-T087 partial) - Documentation, README, ignore files Features implemented: - Data extraction from Grafana DataFrame - JSON EXPLAIN validation - Vue 3 integration with React panel - PEV2 visualization (placeholder) - Comprehensive error handling - Panel options (field name, font size, dark mode, force JSON) - TypeScript strict mode - Webpack bundling with Vue support Bundle size: 218KB (under 2MB requirement)
1 parent e333d52 commit 2fe9950

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+20260
-1057
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
declare module 'replace-in-file-webpack-plugin' {
2+
import { Compiler } from 'webpack';
3+
class ReplaceInFileWebpackPlugin {
4+
constructor(rules: any[]);
5+
apply(compiler: Compiler): void;
6+
}
7+
export = ReplaceInFileWebpackPlugin;
8+
}

.dockerignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Build output
2+
dist/
3+
node_modules/
4+
5+
# Dependencies
6+
package-lock.json
7+
yarn.lock
8+
pnpm-lock.yaml
9+
10+
# IDE
11+
.vscode/
12+
.idea/
13+
14+
# Logs
15+
*.log
16+
17+
# Environment
18+
.env*
19+
!.env.example
20+
21+
# OS
22+
.DS_Store
23+
Thumbs.db

.github/agents/speckit.analyze.agent.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,16 @@ Output a Markdown report (no file writes) with the following structure:
126126

127127
## Specification Analysis Report
128128

129-
| ID | Category | Severity | Location(s) | Summary | Recommendation |
130-
|----|----------|----------|-------------|---------|----------------|
131-
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
129+
| ID | Category | Severity | Location(s) | Summary | Recommendation |
130+
| --- | ----------- | -------- | ---------------- | ---------------------------- | ------------------------------------ |
131+
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
132132

133133
(Add one row per finding; generate stable IDs prefixed by category initial.)
134134

135135
**Coverage Summary Table:**
136136

137137
| Requirement Key | Has Task? | Task IDs | Notes |
138-
|-----------------|-----------|----------|-------|
138+
| --------------- | --------- | -------- | ----- |
139139

140140
**Constitution Alignment Issues:** (if any)
141141

.github/agents/speckit.clarify.agent.md

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
3-
handoffs:
3+
handoffs:
44
- label: Build Technical Plan
55
agent: speckit.plan
66
prompt: Create a plan for the spec. I am building with...
@@ -86,69 +86,69 @@ Execution steps:
8686
- Information is better deferred to planning phase (note internally)
8787

8888
3. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
89-
- Maximum of 10 total questions across the whole session.
90-
- Each question must be answerable with EITHER:
91-
- A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR
92-
- A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words").
93-
- Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation.
94-
- Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved.
95-
- Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness).
96-
- Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests.
97-
- If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic.
89+
- Maximum of 10 total questions across the whole session.
90+
- Each question must be answerable with EITHER:
91+
- A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR
92+
- A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words").
93+
- Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation.
94+
- Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved.
95+
- Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness).
96+
- Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests.
97+
- If more than 5 categories remain unresolved, select the top 5 by (Impact \* Uncertainty) heuristic.
9898

9999
4. Sequential questioning loop (interactive):
100-
- Present EXACTLY ONE question at a time.
101-
- For multiple‑choice questions:
102-
- **Analyze all options** and determine the **most suitable option** based on:
103-
- Best practices for the project type
104-
- Common patterns in similar implementations
105-
- Risk reduction (security, performance, maintainability)
106-
- Alignment with any explicit project goals or constraints visible in the spec
107-
- Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice).
108-
- Format as: `**Recommended:** Option [X] - <reasoning>`
109-
- Then render all options as a Markdown table:
110-
111-
| Option | Description |
112-
|--------|-------------|
113-
| A | <Option A description> |
114-
| B | <Option B description> |
115-
| C | <Option C description> (add D/E as needed up to 5) |
116-
| Short | Provide a different short answer (<=5 words) (Include only if free-form alternative is appropriate) |
117-
118-
- After the table, add: `You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.`
119-
- For short‑answer style (no meaningful discrete options):
120-
- Provide your **suggested answer** based on best practices and context.
121-
- Format as: `**Suggested:** <your proposed answer> - <brief reasoning>`
122-
- Then output: `Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.`
123-
- After the user answers:
124-
- If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer.
125-
- Otherwise, validate the answer maps to one option or fits the <=5 word constraint.
126-
- If ambiguous, ask for a quick disambiguation (count still belongs to same question; do not advance).
127-
- Once satisfactory, record it in working memory (do not yet write to disk) and move to the next queued question.
128-
- Stop asking further questions when:
129-
- All critical ambiguities resolved early (remaining queued items become unnecessary), OR
130-
- User signals completion ("done", "good", "no more"), OR
131-
- You reach 5 asked questions.
132-
- Never reveal future queued questions in advance.
133-
- If no valid questions exist at start, immediately report no critical ambiguities.
100+
- Present EXACTLY ONE question at a time.
101+
- For multiple‑choice questions:
102+
- **Analyze all options** and determine the **most suitable option** based on:
103+
- Best practices for the project type
104+
- Common patterns in similar implementations
105+
- Risk reduction (security, performance, maintainability)
106+
- Alignment with any explicit project goals or constraints visible in the spec
107+
- Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice).
108+
- Format as: `**Recommended:** Option [X] - <reasoning>`
109+
- Then render all options as a Markdown table:
110+
111+
| Option | Description |
112+
| ------ | --------------------------------------------------------------------------------------------------- |
113+
| A | <Option A description> |
114+
| B | <Option B description> |
115+
| C | <Option C description> (add D/E as needed up to 5) |
116+
| Short | Provide a different short answer (<=5 words) (Include only if free-form alternative is appropriate) |
117+
- After the table, add: `You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.`
118+
119+
- For short‑answer style (no meaningful discrete options):
120+
- Provide your **suggested answer** based on best practices and context.
121+
- Format as: `**Suggested:** <your proposed answer> - <brief reasoning>`
122+
- Then output: `Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.`
123+
- After the user answers:
124+
- If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer.
125+
- Otherwise, validate the answer maps to one option or fits the <=5 word constraint.
126+
- If ambiguous, ask for a quick disambiguation (count still belongs to same question; do not advance).
127+
- Once satisfactory, record it in working memory (do not yet write to disk) and move to the next queued question.
128+
- Stop asking further questions when:
129+
- All critical ambiguities resolved early (remaining queued items become unnecessary), OR
130+
- User signals completion ("done", "good", "no more"), OR
131+
- You reach 5 asked questions.
132+
- Never reveal future queued questions in advance.
133+
- If no valid questions exist at start, immediately report no critical ambiguities.
134134

135135
5. Integration after EACH accepted answer (incremental update approach):
136-
- Maintain in-memory representation of the spec (loaded once at start) plus the raw file contents.
137-
- For the first integrated answer in this session:
138-
- Ensure a `## Clarifications` section exists (create it just after the highest-level contextual/overview section per the spec template if missing).
139-
- Under it, create (if not present) a `### Session YYYY-MM-DD` subheading for today.
140-
- Append a bullet line immediately after acceptance: `- Q: <question> → A: <final answer>`.
141-
- Then immediately apply the clarification to the most appropriate section(s):
142-
- Functional ambiguity → Update or add a bullet in Functional Requirements.
143-
- User interaction / actor distinction → Update User Stories or Actors subsection (if present) with clarified role, constraint, or scenario.
144-
- Data shape / entities → Update Data Model (add fields, types, relationships) preserving ordering; note added constraints succinctly.
145-
- Non-functional constraint → Add/modify measurable criteria in Non-Functional / Quality Attributes section (convert vague adjective to metric or explicit target).
146-
- Edge case / negative flow → Add a new bullet under Edge Cases / Error Handling (or create such subsection if template provides placeholder for it).
147-
- Terminology conflict → Normalize term across spec; retain original only if necessary by adding `(formerly referred to as "X")` once.
148-
- If the clarification invalidates an earlier ambiguous statement, replace that statement instead of duplicating; leave no obsolete contradictory text.
149-
- Save the spec file AFTER each integration to minimize risk of context loss (atomic overwrite).
150-
- Preserve formatting: do not reorder unrelated sections; keep heading hierarchy intact.
151-
- Keep each inserted clarification minimal and testable (avoid narrative drift).
136+
- Maintain in-memory representation of the spec (loaded once at start) plus the raw file contents.
137+
- For the first integrated answer in this session:
138+
- Ensure a `## Clarifications` section exists (create it just after the highest-level contextual/overview section per the spec template if missing).
139+
- Under it, create (if not present) a `### Session YYYY-MM-DD` subheading for today.
140+
- Append a bullet line immediately after acceptance: `- Q: <question> → A: <final answer>`.
141+
- Then immediately apply the clarification to the most appropriate section(s):
142+
- Functional ambiguity → Update or add a bullet in Functional Requirements.
143+
- User interaction / actor distinction → Update User Stories or Actors subsection (if present) with clarified role, constraint, or scenario.
144+
- Data shape / entities → Update Data Model (add fields, types, relationships) preserving ordering; note added constraints succinctly.
145+
- Non-functional constraint → Add/modify measurable criteria in Non-Functional / Quality Attributes section (convert vague adjective to metric or explicit target).
146+
- Edge case / negative flow → Add a new bullet under Edge Cases / Error Handling (or create such subsection if template provides placeholder for it).
147+
- Terminology conflict → Normalize term across spec; retain original only if necessary by adding `(formerly referred to as "X")` once.
148+
- If the clarification invalidates an earlier ambiguous statement, replace that statement instead of duplicating; leave no obsolete contradictory text.
149+
- Save the spec file AFTER each integration to minimize risk of context loss (atomic overwrite).
150+
- Preserve formatting: do not reorder unrelated sections; keep heading hierarchy intact.
151+
- Keep each inserted clarification minimal and testable (avoid narrative drift).
152152

153153
6. Validation (performed after EACH write plus final pass):
154154
- Clarifications session contains exactly one bullet per accepted answer (no duplicates).

.github/agents/speckit.constitution.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
3-
handoffs:
3+
handoffs:
44
- label: Build Specification
55
agent: speckit.specify
66
prompt: Implement the feature specification based on the updated constitution. I want to build...
@@ -22,7 +22,7 @@ Follow this execution flow:
2222

2323
1. Load the existing constitution template at `.specify/memory/constitution.md`.
2424
- Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
25-
**IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
25+
**IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
2626

2727
2. Collect/derive values for placeholders:
2828
- If user input (conversation) supplies a value, use it.

.github/agents/speckit.implement.agent.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ You **MUST** consider the user input before proceeding (if not empty).
6363
git rev-parse --git-dir 2>/dev/null
6464
```
6565
66-
- Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
67-
- Check if .eslintrc* exists → create/verify .eslintignore
68-
- Check if eslint.config.* exists → ensure the config's `ignores` entries cover required patterns
69-
- Check if .prettierrc* exists → create/verify .prettierignore
66+
- Check if Dockerfile\* exists or Docker in plan.md → create/verify .dockerignore
67+
- Check if .eslintrc\* exists → create/verify .eslintignore
68+
- Check if eslint.config.\* exists → ensure the config's `ignores` entries cover required patterns
69+
- Check if .prettierrc\* exists → create/verify .prettierignore
7070
- Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
71-
- Check if terraform files (*.tf) exist → create/verify .terraformignore
71+
- Check if terraform files (\*.tf) exist → create/verify .terraformignore
7272
- Check if .helmignore needed (helm charts present) → create/verify .helmignore
7373
7474
**If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
@@ -105,7 +105,7 @@ You **MUST** consider the user input before proceeding (if not empty).
105105
106106
6. Execute implementation following the task plan:
107107
- **Phase-by-phase execution**: Complete each phase before moving to the next
108-
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
108+
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
109109
- **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
110110
- **File-based coordination**: Tasks affecting the same files must run sequentially
111111
- **Validation checkpoints**: Verify each phase completion before proceeding

.github/agents/speckit.plan.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Execute the implementation planning workflow using the plan template to generate design artifacts.
3-
handoffs:
3+
handoffs:
44
- label: Create Tasks
55
agent: speckit.tasks
66
prompt: Break the plan into tasks
@@ -81,7 +81,7 @@ You **MUST** consider the user input before proceeding (if not empty).
8181
- Add only new technology from current plan
8282
- Preserve manual additions between markers
8383

84-
**Output**: data-model.md, /contracts/*, quickstart.md, agent-specific file
84+
**Output**: data-model.md, /contracts/\*, quickstart.md, agent-specific file
8585

8686
## Key rules
8787

0 commit comments

Comments
 (0)