Skip to content

Implement local JSON workflow logging in .sequant/ #13

Closed

Description

@admarble

Summary

Replace the non-functional Supabase logging with a local JSON-based logging system that requires no external dependencies.

Design

Directory Structure

```
.sequant/
├── workflow-runs.jsonl # Append-only log of workflow executions (JSON Lines format)
└── .gitignore # Optionally ignore logs
```

Log Entry Schema

```typescript
interface WorkflowRun {
id: string; // UUID
issueNumber: number;
startedAt: string; // ISO timestamp
completedAt?: string;
status: 'running' | 'success' | 'failed' | 'aborted';
phases: PhaseResult[];
totalDurationSeconds?: number;
abortReason?: string;
gitBranch?: string;
gitCommit?: string;
}

interface PhaseResult {
phase: 'spec' | 'exec' | 'qa' | 'test' | 'loop' | 'testgen';
status: 'success' | 'failed' | 'skipped';
startedAt: string;
completedAt: string;
durationSeconds: number;
iterations?: number; // For loop phase
error?: string;
}
```

Features

  • JSONL format - One JSON object per line, easy to append, easy to parse
  • No external deps - Pure Node.js file operations
  • Optional - Workflows work without logging, just warns
  • Queryable - Add sequant stats command to analyze runs

CLI Commands

```bash
sequant stats # Show summary stats
sequant stats --issue 123 # Stats for specific issue
sequant stats --last 7d # Last 7 days
sequant stats --export csv # Export to CSV
```

Acceptance Criteria

  • Create .sequant/ directory during init (or first log write)
  • Log workflow runs in JSONL format
  • Handle concurrent writes safely (file locking or atomic append)
  • Add sequant stats command
  • Update skills to use new logging (or make transparent)
  • Document the logging system

Technical Notes

  • Use JSONL (JSON Lines) instead of JSON array for easy append
  • Consider file rotation if log grows large (> 10MB)
  • Ensure .sequant/ is created with appropriate permissions

Priority

Medium - nice to have for workflow analysis, not blocking

Activity

  1. admarble commented on Jan 9, 2026

    @admarble
    ContributorAuthor

    Completed in v1.1.2 and v1.1.3.

    Implementation differs slightly from original design:

    • Per-run JSON files in .sequant/logs/ instead of single JSONL file
    • sequant logs command instead of sequant stats
    • JSON logging enabled by default in v1.1.3

    See follow-up issue for remaining enhancements (log rotation, documentation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions