@nforma.ai/nforma 0.2.1
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/LICENSE +22 -0
- package/README.md +1024 -0
- package/agents/qgsd-codebase-mapper.md +764 -0
- package/agents/qgsd-debugger.md +1201 -0
- package/agents/qgsd-executor.md +472 -0
- package/agents/qgsd-integration-checker.md +443 -0
- package/agents/qgsd-phase-researcher.md +502 -0
- package/agents/qgsd-plan-checker.md +643 -0
- package/agents/qgsd-planner.md +1182 -0
- package/agents/qgsd-project-researcher.md +621 -0
- package/agents/qgsd-quorum-orchestrator.md +628 -0
- package/agents/qgsd-quorum-slot-worker.md +41 -0
- package/agents/qgsd-quorum-synthesizer.md +133 -0
- package/agents/qgsd-quorum-test-worker.md +37 -0
- package/agents/qgsd-quorum-worker.md +161 -0
- package/agents/qgsd-research-synthesizer.md +239 -0
- package/agents/qgsd-roadmapper.md +660 -0
- package/agents/qgsd-verifier.md +628 -0
- package/bin/accept-debug-invariant.cjs +165 -0
- package/bin/account-manager.cjs +719 -0
- package/bin/aggregate-requirements.cjs +466 -0
- package/bin/analyze-assumptions.cjs +757 -0
- package/bin/analyze-state-space.cjs +921 -0
- package/bin/attribute-trace-divergence.cjs +150 -0
- package/bin/auth-drivers/gh-cli.cjs +93 -0
- package/bin/auth-drivers/index.cjs +46 -0
- package/bin/auth-drivers/pool.cjs +67 -0
- package/bin/auth-drivers/simple.cjs +95 -0
- package/bin/autoClosePtoF.cjs +110 -0
- package/bin/blessed-terminal.cjs +350 -0
- package/bin/build-phase-index.cjs +472 -0
- package/bin/call-quorum-slot.cjs +541 -0
- package/bin/ccr-secure-config.cjs +99 -0
- package/bin/ccr-secure-start.cjs +83 -0
- package/bin/check-bundled-sdks.cjs +177 -0
- package/bin/check-coverage-guard.cjs +112 -0
- package/bin/check-liveness-fairness.cjs +95 -0
- package/bin/check-mcp-health.cjs +123 -0
- package/bin/check-provider-health.cjs +395 -0
- package/bin/check-results-exit.cjs +24 -0
- package/bin/check-spec-sync.cjs +360 -0
- package/bin/check-trace-redaction.cjs +271 -0
- package/bin/check-trace-schema-drift.cjs +99 -0
- package/bin/compareDrift.cjs +21 -0
- package/bin/conformance-schema.cjs +12 -0
- package/bin/count-scenarios.cjs +420 -0
- package/bin/debt-dedup.cjs +144 -0
- package/bin/debt-ledger.cjs +61 -0
- package/bin/debt-retention.cjs +76 -0
- package/bin/debt-state-machine.cjs +80 -0
- package/bin/detect-coverage-gaps.cjs +204 -0
- package/bin/detect-project-intent.cjs +362 -0
- package/bin/export-prism-constants.cjs +164 -0
- package/bin/extract-annotations.cjs +633 -0
- package/bin/extractFormalExpected.cjs +104 -0
- package/bin/fingerprint-drift.cjs +24 -0
- package/bin/fingerprint-issue.cjs +46 -0
- package/bin/formal-core.cjs +519 -0
- package/bin/formal-ref-linker.cjs +141 -0
- package/bin/formal-test-sync.cjs +788 -0
- package/bin/generate-formal-specs.cjs +588 -0
- package/bin/generate-petri-net.cjs +397 -0
- package/bin/generate-phase-spec.cjs +249 -0
- package/bin/generate-proposed-changes.cjs +194 -0
- package/bin/generate-tla-cfg.cjs +122 -0
- package/bin/generate-traceability-matrix.cjs +701 -0
- package/bin/generate-triage-bundle.cjs +300 -0
- package/bin/gh-account-rotate.cjs +34 -0
- package/bin/initialize-model-registry.cjs +105 -0
- package/bin/install-formal-tools.cjs +382 -0
- package/bin/install.js +2424 -0
- package/bin/isNumericThreshold.cjs +34 -0
- package/bin/issue-classifier.cjs +151 -0
- package/bin/levenshtein.cjs +74 -0
- package/bin/lint-formal-models.cjs +580 -0
- package/bin/load-baseline-requirements.cjs +275 -0
- package/bin/manage-agents-core.cjs +815 -0
- package/bin/migrate-formal-dir.cjs +172 -0
- package/bin/migrate-planning.cjs +206 -0
- package/bin/migrate-to-slots.cjs +255 -0
- package/bin/nForma.cjs +2726 -0
- package/bin/observe-config.cjs +353 -0
- package/bin/observe-debt-writer.cjs +140 -0
- package/bin/observe-handler-grafana.cjs +128 -0
- package/bin/observe-handler-internal.cjs +301 -0
- package/bin/observe-handler-logstash.cjs +153 -0
- package/bin/observe-handler-prometheus.cjs +185 -0
- package/bin/observe-handlers.cjs +436 -0
- package/bin/observe-registry.cjs +131 -0
- package/bin/observe-render.cjs +168 -0
- package/bin/planning-paths.cjs +167 -0
- package/bin/polyrepo.cjs +560 -0
- package/bin/prism-priority.cjs +153 -0
- package/bin/probe-quorum-slots.cjs +167 -0
- package/bin/promote-model.cjs +225 -0
- package/bin/propose-debug-invariants.cjs +165 -0
- package/bin/providers.json +392 -0
- package/bin/pty-proxy.py +129 -0
- package/bin/qgsd-solve.cjs +2477 -0
- package/bin/quorum-consensus-gate.cjs +238 -0
- package/bin/quorum-formal-context.cjs +183 -0
- package/bin/quorum-slot-dispatch.cjs +934 -0
- package/bin/read-policy.cjs +60 -0
- package/bin/requirement-map.cjs +63 -0
- package/bin/requirements-core.cjs +247 -0
- package/bin/resolve-cli.cjs +101 -0
- package/bin/review-mcp-logs.cjs +294 -0
- package/bin/run-account-manager-tlc.cjs +188 -0
- package/bin/run-account-pool-alloy.cjs +158 -0
- package/bin/run-alloy.cjs +153 -0
- package/bin/run-audit-alloy.cjs +187 -0
- package/bin/run-breaker-tlc.cjs +181 -0
- package/bin/run-formal-check.cjs +395 -0
- package/bin/run-formal-verify.cjs +701 -0
- package/bin/run-installer-alloy.cjs +188 -0
- package/bin/run-oauth-rotation-prism.cjs +132 -0
- package/bin/run-oscillation-tlc.cjs +202 -0
- package/bin/run-phase-tlc.cjs +228 -0
- package/bin/run-prism.cjs +446 -0
- package/bin/run-protocol-tlc.cjs +201 -0
- package/bin/run-quorum-composition-alloy.cjs +155 -0
- package/bin/run-sensitivity-sweep.cjs +231 -0
- package/bin/run-stop-hook-tlc.cjs +188 -0
- package/bin/run-tlc.cjs +467 -0
- package/bin/run-transcript-alloy.cjs +173 -0
- package/bin/run-uppaal.cjs +264 -0
- package/bin/secrets.cjs +134 -0
- package/bin/sensitivity-report.cjs +219 -0
- package/bin/sensitivity-sweep-feedback.cjs +194 -0
- package/bin/set-secret.cjs +29 -0
- package/bin/setup-telemetry-cron.sh +36 -0
- package/bin/sweepPtoF.cjs +63 -0
- package/bin/sync-baseline-requirements.cjs +290 -0
- package/bin/task-envelope.cjs +360 -0
- package/bin/telemetry-collector.cjs +229 -0
- package/bin/unified-mcp-server.mjs +735 -0
- package/bin/update-agents.cjs +369 -0
- package/bin/update-scoreboard.cjs +1134 -0
- package/bin/validate-debt-entry.cjs +207 -0
- package/bin/validate-invariant.cjs +419 -0
- package/bin/validate-memory.cjs +389 -0
- package/bin/validate-requirements-haiku.cjs +435 -0
- package/bin/validate-traces.cjs +438 -0
- package/bin/verify-formal-results.cjs +124 -0
- package/bin/verify-quorum-health.cjs +273 -0
- package/bin/write-check-result.cjs +106 -0
- package/bin/xstate-to-tla.cjs +483 -0
- package/bin/xstate-trace-walker.cjs +205 -0
- package/commands/qgsd/add-phase.md +43 -0
- package/commands/qgsd/add-requirement.md +24 -0
- package/commands/qgsd/add-todo.md +47 -0
- package/commands/qgsd/audit-milestone.md +37 -0
- package/commands/qgsd/check-todos.md +45 -0
- package/commands/qgsd/cleanup.md +18 -0
- package/commands/qgsd/close-formal-gaps.md +33 -0
- package/commands/qgsd/complete-milestone.md +136 -0
- package/commands/qgsd/debug.md +166 -0
- package/commands/qgsd/discuss-phase.md +83 -0
- package/commands/qgsd/execute-phase.md +117 -0
- package/commands/qgsd/fix-tests.md +27 -0
- package/commands/qgsd/formal-test-sync.md +32 -0
- package/commands/qgsd/health.md +22 -0
- package/commands/qgsd/help.md +22 -0
- package/commands/qgsd/insert-phase.md +32 -0
- package/commands/qgsd/join-discord.md +18 -0
- package/commands/qgsd/list-phase-assumptions.md +46 -0
- package/commands/qgsd/map-codebase.md +71 -0
- package/commands/qgsd/map-requirements.md +20 -0
- package/commands/qgsd/mcp-restart.md +176 -0
- package/commands/qgsd/mcp-set-model.md +134 -0
- package/commands/qgsd/mcp-setup.md +1371 -0
- package/commands/qgsd/mcp-status.md +274 -0
- package/commands/qgsd/mcp-update.md +238 -0
- package/commands/qgsd/new-milestone.md +44 -0
- package/commands/qgsd/new-project.md +42 -0
- package/commands/qgsd/observe.md +260 -0
- package/commands/qgsd/pause-work.md +38 -0
- package/commands/qgsd/plan-milestone-gaps.md +34 -0
- package/commands/qgsd/plan-phase.md +44 -0
- package/commands/qgsd/polyrepo.md +50 -0
- package/commands/qgsd/progress.md +24 -0
- package/commands/qgsd/queue.md +54 -0
- package/commands/qgsd/quick.md +133 -0
- package/commands/qgsd/quorum-test.md +275 -0
- package/commands/qgsd/quorum.md +707 -0
- package/commands/qgsd/reapply-patches.md +110 -0
- package/commands/qgsd/remove-phase.md +31 -0
- package/commands/qgsd/research-phase.md +189 -0
- package/commands/qgsd/resume-work.md +40 -0
- package/commands/qgsd/set-profile.md +34 -0
- package/commands/qgsd/settings.md +39 -0
- package/commands/qgsd/solve.md +565 -0
- package/commands/qgsd/sync-baselines.md +119 -0
- package/commands/qgsd/triage.md +233 -0
- package/commands/qgsd/update.md +37 -0
- package/commands/qgsd/verify-work.md +38 -0
- package/hooks/dist/config-loader.js +297 -0
- package/hooks/dist/conformance-schema.cjs +12 -0
- package/hooks/dist/gsd-context-monitor.js +64 -0
- package/hooks/dist/qgsd-check-update.js +62 -0
- package/hooks/dist/qgsd-circuit-breaker.js +682 -0
- package/hooks/dist/qgsd-precompact.js +156 -0
- package/hooks/dist/qgsd-prompt.js +653 -0
- package/hooks/dist/qgsd-session-start.js +122 -0
- package/hooks/dist/qgsd-slot-correlator.js +58 -0
- package/hooks/dist/qgsd-spec-regen.js +86 -0
- package/hooks/dist/qgsd-statusline.js +91 -0
- package/hooks/dist/qgsd-stop.js +553 -0
- package/hooks/dist/qgsd-token-collector.js +133 -0
- package/hooks/dist/unified-mcp-server.mjs +669 -0
- package/package.json +95 -0
- package/scripts/build-hooks.js +46 -0
- package/scripts/postinstall.js +48 -0
- package/scripts/secret-audit.sh +45 -0
- package/templates/qgsd.json +49 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qgsd:sync-baselines
|
|
3
|
+
description: Sync baseline requirements into .planning/formal/requirements.json (auto-detects project intent by default)
|
|
4
|
+
argument-hint: [--profile <web|mobile|desktop|api|cli|library>]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Sync baseline requirements from the QGSD defaults into `.planning/formal/requirements.json`. Auto-detects project intent by default by scanning the repo for framework, deployment, and configuration signals. Supports explicit `--profile` override. Runs `node bin/sync-baseline-requirements.cjs`, displays results, and commits if requirements were added.
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<process>
|
|
16
|
+
|
|
17
|
+
## Step 1: Detect Intent
|
|
18
|
+
|
|
19
|
+
If `--profile` in $ARGUMENTS, skip detection and jump to Step 3.
|
|
20
|
+
|
|
21
|
+
Otherwise, run auto-detection first (read-only, no sync yet):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node bin/detect-project-intent.cjs --root . --json > /tmp/detection.json
|
|
25
|
+
DETECTION=$(cat /tmp/detection.json)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Display signals table to user from `signals` array (dimension, confidence, evidence).
|
|
29
|
+
Display suggested profile: `Detected profile: <base_profile>`.
|
|
30
|
+
|
|
31
|
+
## Step 2: Confirm Intent
|
|
32
|
+
|
|
33
|
+
If `needs_confirmation` array is non-empty, ask user:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
AskUserQuestion([{
|
|
37
|
+
header: "Confirm Project Intent",
|
|
38
|
+
question: "Auto-detected base profile: <base_profile>. Is this correct?",
|
|
39
|
+
multiSelect: false,
|
|
40
|
+
options: [
|
|
41
|
+
{ label: "Accept", description: "Use auto-detected intent as-is" },
|
|
42
|
+
{ label: "Customize", description: "Choose a different profile" },
|
|
43
|
+
{ label: "Cancel", description: "Skip baseline sync" }
|
|
44
|
+
]
|
|
45
|
+
}])
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If "Customize", ask for profile selection (same AskUserQuestion as below), then use `--profile` in Step 3.
|
|
49
|
+
If "Cancel", exit.
|
|
50
|
+
If "Accept", proceed to Step 3 with no flags (auto-detect default).
|
|
51
|
+
|
|
52
|
+
If `needs_confirmation` is empty (all high confidence), proceed directly to Step 3 without asking.
|
|
53
|
+
|
|
54
|
+
## Step 3: Run Sync
|
|
55
|
+
|
|
56
|
+
If --profile was given or chosen via customize:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
node bin/sync-baseline-requirements.cjs --profile "$PROFILE" --json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Otherwise (auto-detect default):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
node bin/sync-baseline-requirements.cjs --json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Parse JSON output. Display human-readable summary:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Baseline sync complete (<mode>)
|
|
72
|
+
Added: N new requirements
|
|
73
|
+
Skipped: M (already present)
|
|
74
|
+
Total: K requirements
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If added > 0, list each: `+ [ID] text`
|
|
78
|
+
|
|
79
|
+
## Step 4: Store Intent (if auto-detected)
|
|
80
|
+
|
|
81
|
+
If intent was auto-detected (no --profile flag), persist to config:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
node -e "
|
|
85
|
+
const fs = require('fs');
|
|
86
|
+
const path = require('path');
|
|
87
|
+
const configPath = '.planning/config.json';
|
|
88
|
+
const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {};
|
|
89
|
+
const intent = JSON.parse(process.argv[1]);
|
|
90
|
+
config.intent = intent;
|
|
91
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
|
|
92
|
+
" '<detected_intent_json>'
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Step 5: Commit if Needed
|
|
96
|
+
|
|
97
|
+
If `added.length > 0`:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
node ~/.claude/qgsd/bin/gsd-tools.cjs commit "req(baseline): sync N baseline requirements" --files .planning/formal/requirements.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Also commit config if intent was stored:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
node ~/.claude/qgsd/bin/gsd-tools.cjs commit "chore(baseline): store detected project intent" --files .planning/config.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Where N is the count of added requirements.
|
|
110
|
+
|
|
111
|
+
If `added.length === 0`: display "No new requirements to sync -- .planning/formal/requirements.json is up to date."
|
|
112
|
+
|
|
113
|
+
</process>
|
|
114
|
+
|
|
115
|
+
<success_criteria>
|
|
116
|
+
- [ ] sync-baseline-requirements.cjs ran without error
|
|
117
|
+
- [ ] Results displayed with added/skipped counts
|
|
118
|
+
- [ ] .planning/formal/requirements.json committed if changed
|
|
119
|
+
</success_criteria>
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qgsd:triage
|
|
3
|
+
description: Fetch issues/errors from configured sources (GitHub, Sentry, custom) and triage them. Sources are defined in .planning/triage-sources.md
|
|
4
|
+
argument-hint: "[--source github|sentry|sentry-feedback|bash] [--since 24h|7d] [--limit N]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Glob
|
|
9
|
+
- Task
|
|
10
|
+
- AskUserQuestion
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<objective>
|
|
14
|
+
Aggregate issues and errors from all configured sources, deduplicate, render a prioritized triage table, and route the selected issue to the right QGSD workflow.
|
|
15
|
+
|
|
16
|
+
This command is the project's unified "what's broken right now?" entry point.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<process>
|
|
20
|
+
|
|
21
|
+
## Step 1: Parse arguments
|
|
22
|
+
|
|
23
|
+
From `$ARGUMENTS`, extract:
|
|
24
|
+
- `--source <type>` → `$SOURCE_FILTER` (filter to one source type; default: all)
|
|
25
|
+
- `--since <duration>` → `$SINCE_OVERRIDE` (e.g. `24h`, `7d`; overrides per-source config)
|
|
26
|
+
- `--limit <n>` → `$LIMIT_OVERRIDE` (max issues per source; default: 10)
|
|
27
|
+
|
|
28
|
+
## Step 2: Load source configuration
|
|
29
|
+
|
|
30
|
+
Read `.planning/triage-sources.md`.
|
|
31
|
+
|
|
32
|
+
Parse the YAML frontmatter block (between `---` delimiters at the top of the file) to extract the `sources` array.
|
|
33
|
+
|
|
34
|
+
**If the file does not exist:**
|
|
35
|
+
|
|
36
|
+
Display:
|
|
37
|
+
```
|
|
38
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
+
QGSD ► TRIAGE: No sources configured
|
|
40
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
41
|
+
|
|
42
|
+
Create .planning/triage-sources.md to configure issue sources.
|
|
43
|
+
See the template at: docs/triage-sources.example.md
|
|
44
|
+
```
|
|
45
|
+
Stop.
|
|
46
|
+
|
|
47
|
+
**If `$SOURCE_FILTER` is set**, keep only sources whose `type` matches.
|
|
48
|
+
|
|
49
|
+
## Step 3: Show dispatch header
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
53
|
+
QGSD ► TRIAGE: Fetching from N source(s)...
|
|
54
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
55
|
+
```
|
|
56
|
+
(Replace N with actual count.)
|
|
57
|
+
|
|
58
|
+
## Step 4: Dispatch parallel fetch agents
|
|
59
|
+
|
|
60
|
+
For each source in the config, spawn ONE Task(subagent_type="general-purpose") in parallel (all in the same message turn).
|
|
61
|
+
|
|
62
|
+
Each agent receives:
|
|
63
|
+
- The source config block (type, label, repo/project/command, filter settings)
|
|
64
|
+
- `$SINCE_OVERRIDE` and `$LIMIT_OVERRIDE` (if set)
|
|
65
|
+
- The fetch instructions for its source type (see Source Type Handlers below)
|
|
66
|
+
|
|
67
|
+
Each agent MUST return a JSON block in this exact format (and nothing else outside the block):
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"source_label": "<label from config>",
|
|
71
|
+
"source_type": "<github|sentry|bash>",
|
|
72
|
+
"status": "ok|error",
|
|
73
|
+
"error": "<message if status=error>",
|
|
74
|
+
"issues": [
|
|
75
|
+
{
|
|
76
|
+
"id": "<unique id: gh-123, sentry-abc, etc.>",
|
|
77
|
+
"title": "<issue title>",
|
|
78
|
+
"url": "<direct url or empty string>",
|
|
79
|
+
"severity": "<error|warning|bug|info>",
|
|
80
|
+
"age": "<human-readable: 5m ago, 2h ago, 3d ago>",
|
|
81
|
+
"created_at": "<ISO8601>",
|
|
82
|
+
"meta": "<one-line extra context: assignee, first-seen count, etc.>"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Source Type Handlers
|
|
89
|
+
|
|
90
|
+
#### `github`
|
|
91
|
+
|
|
92
|
+
Config fields: `repo` (optional, default: detect from `git remote`), `filter.state` (default: `open`), `filter.labels` (list, optional), `filter.assignee` (optional), `filter.since` (duration string).
|
|
93
|
+
|
|
94
|
+
Steps:
|
|
95
|
+
1. If `repo` not set, run: `git remote get-url origin` and parse owner/repo from the URL.
|
|
96
|
+
2. Build `gh issue list` command:
|
|
97
|
+
- `--repo <owner/repo>`
|
|
98
|
+
- `--state <filter.state>`
|
|
99
|
+
- `--label <label>` (repeat for each label in filter.labels)
|
|
100
|
+
- `--assignee <filter.assignee>` (if set)
|
|
101
|
+
- `--limit <$LIMIT_OVERRIDE or 10>`
|
|
102
|
+
- `--json number,title,url,labels,createdAt,assignees`
|
|
103
|
+
3. Run the command. Parse JSON output.
|
|
104
|
+
4. Apply `since` filter: if `filter.since` or `$SINCE_OVERRIDE` is set, compute the cutoff timestamp and filter out issues older than that.
|
|
105
|
+
5. Map each issue to the standard output schema:
|
|
106
|
+
- `id`: `gh-<number>`
|
|
107
|
+
- `severity`: first label matching `bug|error|critical|warning|enhancement|info` (else `info`)
|
|
108
|
+
- `age`: compute from `createdAt`
|
|
109
|
+
|
|
110
|
+
**For PRs** (if `filter.type: pr` is in config): use `gh pr list` with the same flags.
|
|
111
|
+
|
|
112
|
+
#### `sentry`
|
|
113
|
+
|
|
114
|
+
Config fields: `project` (optional `org-slug/project-slug`), `filter.status` (default: `unresolved`), `filter.since`.
|
|
115
|
+
|
|
116
|
+
Uses Sentry MCP tools — no `sentry-cli` required. Falls back to CLI only if MCP is unavailable.
|
|
117
|
+
|
|
118
|
+
Steps:
|
|
119
|
+
1. **Discover org/project**: If `project` is not set in config, call `mcp__sentry__find_organizations` to get the org slug, then `mcp__sentry__list_projects` to find the project whose slug or name best matches the current working directory name. If `mcp__sentry__` tools are unavailable, try `mcp__plugin_sentry_sentry__find_organizations` + `mcp__plugin_sentry_sentry__find_projects` instead.
|
|
120
|
+
2. **Fetch issues**: Call `mcp__sentry__search_issues` (or `mcp__plugin_sentry_sentry__search_issues`) with:
|
|
121
|
+
- `query`: `"is:<filter.status>"` (default: `"is:unresolved"`)
|
|
122
|
+
- `organization_slug` and `project_slug` from Step 1 or parsed from `project` config field
|
|
123
|
+
- Apply `filter.since` or `$SINCE_OVERRIDE` to filter results by recency
|
|
124
|
+
- Limit to `$LIMIT_OVERRIDE` or 10 results, sorted newest first
|
|
125
|
+
3. **Enrich critical issues**: For up to 3 issues with `level: fatal` or `level: error`, call `mcp__sentry__get_issue_details` (or `mcp__plugin_sentry_sentry__get_issue_details`) and extract the root file + line number from the first non-library stack frame. Put it in `meta` as `"<file>:<line> · <event_count> events · <user_count> users"`.
|
|
126
|
+
4. **Map to standard schema**:
|
|
127
|
+
- `id`: `sentry-<issue_id>`
|
|
128
|
+
- `severity`: `fatal`→`error`, `error`→`error`, `warning`→`warning`, `info`→`info`
|
|
129
|
+
- `meta`: enriched root cause string (Step 3) if available; else `"<event_count> events · <user_count> users"`
|
|
130
|
+
5. **CLI fallback** (only if all MCP tools are unavailable): run `sentry-cli issues list --project <project> --status <status> --format json`. If `sentry-cli` is also absent, return `status: error` with message `"Sentry MCP not connected and sentry-cli not found"`.
|
|
131
|
+
|
|
132
|
+
#### `sentry-feedback`
|
|
133
|
+
|
|
134
|
+
Config fields: `project` (optional `org-slug/project-slug`), `filter.since` (default: `7d`).
|
|
135
|
+
|
|
136
|
+
Fetches user-submitted feedback reports from Sentry — distinct from automated error events. Use alongside a `sentry` source to surface both signals.
|
|
137
|
+
|
|
138
|
+
Steps:
|
|
139
|
+
1. **Discover org/project**: Same discovery logic as the `sentry` handler (Step 1 above).
|
|
140
|
+
2. **Fetch feedback**: Call `mcp__sentry__list_user_feedback` with `organization_slug`, `project_slug`, and a `since` cutoff computed from `filter.since` or `$SINCE_OVERRIDE` (default: `7d`).
|
|
141
|
+
3. If `mcp__sentry__list_user_feedback` is unavailable, return `status: error` with `"sentry-feedback requires mcp__sentry__ tools — ensure the Sentry MCP server is connected"`.
|
|
142
|
+
4. **Map to standard schema**:
|
|
143
|
+
- `id`: `feedback-<id>`
|
|
144
|
+
- `title`: feedback comment text truncated to 80 chars, prefixed with `[Feedback] `
|
|
145
|
+
- `severity`: always `info`
|
|
146
|
+
- `meta`: `"by <user_email>"` if available, plus the page URL where feedback was submitted
|
|
147
|
+
|
|
148
|
+
#### `bash`
|
|
149
|
+
|
|
150
|
+
Config fields: `command` (shell command string), `parser` (optional: `json` | `lines`; default: `lines`).
|
|
151
|
+
|
|
152
|
+
Steps:
|
|
153
|
+
1. Run: `<command>` (execute the configured command as-is).
|
|
154
|
+
2. If `parser: json`, attempt to parse as JSON array of `{title, url, severity}` objects.
|
|
155
|
+
3. If `parser: lines` (default), treat each non-empty output line as an issue title with severity `info`.
|
|
156
|
+
4. Map to standard schema: `id` = `bash-<index>`, `url` = empty unless provided.
|
|
157
|
+
|
|
158
|
+
## Step 5: Collect and deduplicate results
|
|
159
|
+
|
|
160
|
+
Wait for all fetch agents to return.
|
|
161
|
+
|
|
162
|
+
Collect all `issues[]` arrays. Deduplicate by URL (exact match) then by title (Jaccard similarity > 0.8 = same issue, keep the one with more metadata).
|
|
163
|
+
|
|
164
|
+
Mark cross-source duplicates with a `[+N]` tag (e.g. `[+Sentry]`).
|
|
165
|
+
|
|
166
|
+
Sort by:
|
|
167
|
+
1. Severity: `error` > `bug` > `warning` > `info`
|
|
168
|
+
2. Age: newest first
|
|
169
|
+
|
|
170
|
+
## Step 6: Render triage table
|
|
171
|
+
|
|
172
|
+
If total issues = 0:
|
|
173
|
+
```
|
|
174
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
175
|
+
QGSD ► TRIAGE: All clear — no open issues found
|
|
176
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
177
|
+
Sources checked: <list>
|
|
178
|
+
```
|
|
179
|
+
Stop.
|
|
180
|
+
|
|
181
|
+
Otherwise:
|
|
182
|
+
```
|
|
183
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
184
|
+
QGSD ► TRIAGE: N issues across M source(s)
|
|
185
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
186
|
+
|
|
187
|
+
┌────┬─────────────────────────────────────────────┬──────────────┬─────────┬────────────┐
|
|
188
|
+
│ # │ Title │ Source │ Sev │ Age │
|
|
189
|
+
├────┼─────────────────────────────────────────────┼──────────────┼─────────┼────────────┤
|
|
190
|
+
│ 1 │ TypeError: cannot read 'id' of undefined │ Sentry │ error │ 5m ago │
|
|
191
|
+
│ 2 │ Login fails on Safari iOS 17 [+GitHub] │ Sentry │ bug │ 2h ago │
|
|
192
|
+
│ 3 │ Memory leak in worker pool │ GitHub #119 │ bug │ 1d ago │
|
|
193
|
+
│ 4 │ API rate limiter returns 200 on reject │ GitHub #124 │ warning │ 3d ago │
|
|
194
|
+
└────┴─────────────────────────────────────────────┴──────────────┴─────────┴────────────┘
|
|
195
|
+
|
|
196
|
+
Errors from fetches (if any):
|
|
197
|
+
✗ Sentry: sentry-cli not found (run: npm install -g @sentry/cli)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Step 7: Route to action
|
|
201
|
+
|
|
202
|
+
Prompt the user:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
Enter issue # to work on, "all" for full details, or press Enter to skip:
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**If user enters a number:**
|
|
209
|
+
- Load the full issue details (title, URL, meta) for that index.
|
|
210
|
+
- Determine routing:
|
|
211
|
+
- `severity: error` or `severity: bug` → suggest `/qgsd:debug`
|
|
212
|
+
- `severity: warning` or `severity: info` → suggest `/qgsd:quick`
|
|
213
|
+
- Display:
|
|
214
|
+
```
|
|
215
|
+
◆ Issue: <title>
|
|
216
|
+
URL: <url>
|
|
217
|
+
Meta: <meta>
|
|
218
|
+
|
|
219
|
+
Suggested action: /qgsd:debug "<title> — <meta>"
|
|
220
|
+
Run it? [Y/n]
|
|
221
|
+
```
|
|
222
|
+
- If confirmed, invoke the suggested skill with the issue as context.
|
|
223
|
+
|
|
224
|
+
**If user enters "all":**
|
|
225
|
+
- Print the full metadata for each issue (title, URL, meta, created_at) as a numbered list.
|
|
226
|
+
- Then re-prompt for a number.
|
|
227
|
+
|
|
228
|
+
**If user presses Enter (blank):**
|
|
229
|
+
```
|
|
230
|
+
Triage skipped. Run /qgsd:triage again when ready.
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
</process>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qgsd:update
|
|
3
|
+
description: Update GSD to latest version with changelog display
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- AskUserQuestion
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<objective>
|
|
10
|
+
Check for GSD updates, install if available, and display what changed.
|
|
11
|
+
|
|
12
|
+
Routes to the update workflow which handles:
|
|
13
|
+
- Version detection (local vs global installation)
|
|
14
|
+
- npm version checking
|
|
15
|
+
- Changelog fetching and display
|
|
16
|
+
- User confirmation with clean install warning
|
|
17
|
+
- Update execution and cache clearing
|
|
18
|
+
- Restart reminder
|
|
19
|
+
</objective>
|
|
20
|
+
|
|
21
|
+
<execution_context>
|
|
22
|
+
@~/.claude/qgsd/workflows/update.md
|
|
23
|
+
</execution_context>
|
|
24
|
+
|
|
25
|
+
<process>
|
|
26
|
+
**Follow the update workflow** from `@~/.claude/qgsd/workflows/update.md`.
|
|
27
|
+
|
|
28
|
+
The workflow handles all logic including:
|
|
29
|
+
1. Installed version detection (local/global)
|
|
30
|
+
2. Latest version checking via npm
|
|
31
|
+
3. Version comparison
|
|
32
|
+
4. Changelog fetching and extraction
|
|
33
|
+
5. Clean install warning display
|
|
34
|
+
6. User confirmation
|
|
35
|
+
7. Update execution
|
|
36
|
+
8. Cache clearing
|
|
37
|
+
</process>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qgsd:verify-work
|
|
3
|
+
description: Validate built features through conversational UAT
|
|
4
|
+
argument-hint: "[phase number, e.g., '4']"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Edit
|
|
11
|
+
- Write
|
|
12
|
+
- Task
|
|
13
|
+
---
|
|
14
|
+
<objective>
|
|
15
|
+
Validate built features through conversational testing with persistent state.
|
|
16
|
+
|
|
17
|
+
Purpose: Confirm what Claude built actually works from user's perspective. One test at a time, plain text responses, no interrogation. When issues are found, automatically diagnose, plan fixes, and prepare for execution.
|
|
18
|
+
|
|
19
|
+
Output: {phase_num}-UAT.md tracking all test results. If issues found: diagnosed gaps, verified fix plans ready for /qgsd:execute-phase
|
|
20
|
+
</objective>
|
|
21
|
+
|
|
22
|
+
<execution_context>
|
|
23
|
+
@~/.claude/qgsd/workflows/verify-work.md
|
|
24
|
+
@~/.claude/qgsd/templates/UAT.md
|
|
25
|
+
</execution_context>
|
|
26
|
+
|
|
27
|
+
<context>
|
|
28
|
+
Phase: $ARGUMENTS (optional)
|
|
29
|
+
- If provided: Test specific phase (e.g., "4")
|
|
30
|
+
- If not provided: Check for active sessions or prompt for phase
|
|
31
|
+
|
|
32
|
+
Context files are resolved inside the workflow (`init verify-work`) and delegated via `<files_to_read>` blocks.
|
|
33
|
+
</context>
|
|
34
|
+
|
|
35
|
+
<process>
|
|
36
|
+
Execute the verify-work workflow from @~/.claude/qgsd/workflows/verify-work.md end-to-end.
|
|
37
|
+
Preserve all workflow gates (session management, test presentation, diagnosis, fix planning, routing).
|
|
38
|
+
</process>
|