sequant 1.10.0 → 1.11.0

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.
Files changed (41) hide show
  1. package/README.md +6 -1
  2. package/dist/bin/cli.js +55 -2
  3. package/dist/dashboard/server.d.ts +37 -0
  4. package/dist/dashboard/server.js +968 -0
  5. package/dist/src/commands/dashboard.d.ts +25 -0
  6. package/dist/src/commands/dashboard.js +44 -0
  7. package/dist/src/commands/doctor.d.ts +18 -1
  8. package/dist/src/commands/doctor.js +105 -2
  9. package/dist/src/commands/init.d.ts +1 -0
  10. package/dist/src/commands/init.js +26 -2
  11. package/dist/src/commands/run.d.ts +20 -0
  12. package/dist/src/commands/run.js +202 -7
  13. package/dist/src/commands/state.d.ts +60 -0
  14. package/dist/src/commands/state.js +267 -0
  15. package/dist/src/commands/stats.d.ts +3 -2
  16. package/dist/src/commands/stats.js +246 -38
  17. package/dist/src/commands/status.d.ts +2 -0
  18. package/dist/src/commands/status.js +28 -3
  19. package/dist/src/lib/ac-parser.d.ts +61 -0
  20. package/dist/src/lib/ac-parser.js +156 -0
  21. package/dist/src/lib/fs.d.ts +19 -0
  22. package/dist/src/lib/fs.js +58 -1
  23. package/dist/src/lib/settings.d.ts +7 -0
  24. package/dist/src/lib/settings.js +1 -0
  25. package/dist/src/lib/system.d.ts +19 -0
  26. package/dist/src/lib/system.js +26 -0
  27. package/dist/src/lib/templates.d.ts +34 -1
  28. package/dist/src/lib/templates.js +109 -5
  29. package/dist/src/lib/workflow/metrics-schema.d.ts +153 -0
  30. package/dist/src/lib/workflow/metrics-schema.js +138 -0
  31. package/dist/src/lib/workflow/metrics-writer.d.ts +102 -0
  32. package/dist/src/lib/workflow/metrics-writer.js +189 -0
  33. package/dist/src/lib/workflow/state-manager.d.ts +18 -1
  34. package/dist/src/lib/workflow/state-manager.js +61 -1
  35. package/dist/src/lib/workflow/state-schema.d.ts +152 -1
  36. package/dist/src/lib/workflow/state-schema.js +99 -0
  37. package/dist/src/lib/workflow/state-utils.d.ts +67 -3
  38. package/dist/src/lib/workflow/state-utils.js +289 -8
  39. package/dist/src/lib/workflow/types.d.ts +2 -0
  40. package/dist/src/lib/workflow/types.js +1 -0
  41. package/package.json +5 -1
package/README.md CHANGED
@@ -60,6 +60,9 @@ Every `/qa` runs automated checks:
60
60
  - **Type Safety** — Detects `any`, `as any`, missing types
61
61
  - **Security Scans** — OWASP-style vulnerability detection
62
62
  - **Scope Analysis** — Flags changes outside issue scope
63
+ - **Execution Evidence** — Scripts/CLI must pass smoke tests
64
+ - **Test Quality** — Validates test coverage and mock hygiene
65
+ - **Anti-Pattern Detection** — Catches N+1 queries, empty catch blocks, stale dependencies
63
66
 
64
67
  When checks fail, `/loop` automatically fixes and re-runs (up to 3x).
65
68
 
@@ -136,9 +139,11 @@ npx sequant update # Update skill templates
136
139
  npx sequant doctor # Check installation
137
140
  npx sequant status # Show version and config
138
141
  npx sequant run <issues...> # Execute workflow
142
+ npx sequant state <cmd> # Manage workflow state (init/rebuild/clean)
143
+ npx sequant stats # View local workflow analytics
139
144
  ```
140
145
 
141
- See [Run Command Options](docs/run-command.md) for advanced usage.
146
+ See [Run Command Options](docs/run-command.md), [State Command](docs/state-command.md), and [Analytics](docs/analytics.md) for details.
142
147
 
143
148
  ---
144
149
 
package/dist/bin/cli.js CHANGED
@@ -39,6 +39,8 @@ import { statusCommand } from "../src/commands/status.js";
39
39
  import { runCommand } from "../src/commands/run.js";
40
40
  import { logsCommand } from "../src/commands/logs.js";
41
41
  import { statsCommand } from "../src/commands/stats.js";
42
+ import { dashboardCommand } from "../src/commands/dashboard.js";
43
+ import { stateInitCommand, stateRebuildCommand, stateCleanCommand, } from "../src/commands/state.js";
42
44
  const program = new Command();
43
45
  // Handle --no-color before parsing
44
46
  if (process.argv.includes("--no-color")) {
@@ -64,6 +66,7 @@ program
64
66
  .option("-f, --force", "Overwrite existing configuration")
65
67
  .option("-i, --interactive", "Force interactive mode even in non-TTY environment")
66
68
  .option("--skip-setup", "Skip the dependency setup wizard")
69
+ .option("--no-symlinks", "Use copies instead of symlinks for scripts/dev/ files")
67
70
  .action(initCommand);
68
71
  program
69
72
  .command("update")
@@ -74,11 +77,26 @@ program
74
77
  program
75
78
  .command("doctor")
76
79
  .description("Check your Sequant installation for issues")
80
+ .option("--skip-issue-check", "Skip closed-issue verification check")
77
81
  .action(doctorCommand);
78
82
  program
79
83
  .command("status")
80
- .description("Show Sequant version and configuration status")
81
- .action(statusCommand);
84
+ .description("Show Sequant version, configuration, and workflow state")
85
+ .argument("[issue]", "Issue number to show details for", parseInt)
86
+ .option("--issues", "Show all tracked issues")
87
+ .option("--json", "Output as JSON")
88
+ .option("--rebuild", "Rebuild state from run logs")
89
+ .option("--cleanup", "Clean up stale/orphaned entries")
90
+ .option("--dry-run", "Preview cleanup without changes")
91
+ .option("--max-age <days>", "Remove entries older than N days", parseInt)
92
+ .option("--all", "Remove all orphaned entries (merged and abandoned)")
93
+ .action((issue, options) => {
94
+ // Support positional arg: `sequant status 42` → --issue 42
95
+ if (issue) {
96
+ options.issue = issue;
97
+ }
98
+ return statusCommand(options);
99
+ });
82
100
  program
83
101
  .command("run")
84
102
  .description("Execute workflow for GitHub issues using Claude Agent SDK")
@@ -99,7 +117,9 @@ program
99
117
  .option("--testgen", "Run testgen phase after spec")
100
118
  .option("--quiet", "Suppress version warnings and non-essential output")
101
119
  .option("--chain", "Chain issues: each branches from previous (requires --sequential)")
120
+ .option("--qa-gate", "Wait for QA pass before starting next issue in chain (requires --chain)")
102
121
  .option("--base <branch>", "Base branch for worktree creation (default: main or settings.run.defaultBase)")
122
+ .option("--no-mcp", "Disable MCP server injection in headless mode")
103
123
  .action(runCommand);
104
124
  program
105
125
  .command("logs")
@@ -119,6 +139,39 @@ program
119
139
  .option("--csv", "Output as CSV")
120
140
  .option("--json", "Output as JSON")
121
141
  .action(statsCommand);
142
+ program
143
+ .command("dashboard")
144
+ .description("Start visual workflow dashboard in browser")
145
+ .option("-p, --port <port>", "Port to run server on", parseInt)
146
+ .option("--no-open", "Don't automatically open browser")
147
+ .option("-v, --verbose", "Enable verbose logging")
148
+ .action(dashboardCommand);
149
+ // State management command with subcommands
150
+ const stateCmd = program
151
+ .command("state")
152
+ .description("Manage workflow state for worktrees");
153
+ stateCmd
154
+ .command("init")
155
+ .description("Populate state for untracked worktrees")
156
+ .option("--json", "Output as JSON")
157
+ .option("-v, --verbose", "Enable verbose output")
158
+ .action(stateInitCommand);
159
+ stateCmd
160
+ .command("rebuild")
161
+ .description("Recreate state from logs and worktrees")
162
+ .option("--json", "Output as JSON")
163
+ .option("-v, --verbose", "Enable verbose output")
164
+ .option("-f, --force", "Force rebuild without confirmation")
165
+ .action(stateRebuildCommand);
166
+ stateCmd
167
+ .command("clean")
168
+ .description("Remove entries for deleted worktrees")
169
+ .option("--json", "Output as JSON")
170
+ .option("-v, --verbose", "Enable verbose output")
171
+ .option("-d, --dry-run", "Preview cleanup without changes")
172
+ .option("--max-age <days>", "Remove entries older than N days", parseInt)
173
+ .option("--all", "Remove all orphaned entries (merged and abandoned)")
174
+ .action(stateCleanCommand);
122
175
  // Parse and execute
123
176
  program.parse();
124
177
  // Show help if no command provided
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Sequant Dashboard Server
3
+ *
4
+ * A lightweight web dashboard for visualizing workflow state using:
5
+ * - Hono: Fast, lightweight web framework
6
+ * - htmx: HTML-first interactivity
7
+ * - Pico CSS: Classless styling
8
+ * - SSE: Server-sent events for live updates
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { startDashboard } from './server';
13
+ * await startDashboard({ port: 3456, open: true });
14
+ * ```
15
+ */
16
+ import { Hono } from "hono";
17
+ import { StateManager } from "../src/lib/workflow/state-manager.js";
18
+ export interface DashboardOptions {
19
+ /** Port to run the server on (default: 3456) */
20
+ port?: number;
21
+ /** Whether to open browser automatically (default: true) */
22
+ open?: boolean;
23
+ /** Custom state file path */
24
+ statePath?: string;
25
+ /** Enable verbose logging */
26
+ verbose?: boolean;
27
+ }
28
+ /**
29
+ * Create the Hono app
30
+ */
31
+ export declare function createApp(stateManager: StateManager): Hono;
32
+ /**
33
+ * Start the dashboard server
34
+ */
35
+ export declare function startDashboard(options?: DashboardOptions): Promise<{
36
+ close: () => void;
37
+ }>;