Skip to content

[Extension]: Add logreduce (Log Intake) #4800

Description

@alexcpn

Extension ID

logreduce

Extension Name

Log Intake (logreduce)

Version

0.1.0

Description

Reduce large logs attached to a bug report into .specify/bugs/<slug>/evidence.md before assessment. This is a log-intake step for the bundled bug triage workflow: /speckit.bug.assess, fix and test then work from one saved, reduced log instead of each re-reading a raw log that may run to thousands or millions of lines.

Author

Alex Punnen

Repository URL

https://github.com/alexcpn/log_tfidf_reducer

Download URL

https://github.com/alexcpn/log_tfidf_reducer/releases/download/v0.3.0/logreduce-speckit.zip

License

Apache-2.0

Homepage (optional)

https://github.com/alexcpn/log_tfidf_reducer/tree/main/speckit

Documentation URL (optional)

https://github.com/alexcpn/log_tfidf_reducer/blob/main/speckit/README.md

Changelog URL (optional)

https://github.com/alexcpn/log_tfidf_reducer/blob/main/speckit/CHANGELOG.md

Required Spec Kit Version

=0.9.0

Required Tools (optional)

  • logreduce (>=0.2.0) - required. A single static binary from the same repository's releases, or cargo install logreduce.

Number of Commands

1

Number of Hooks (optional)

1

Tags

bug, logs, triage, debugging

Key Features

  • /speckit.logreduce.intake runs logreduce (TF-IDF over masked log templates, plus severity weighting) on each log in a bug report, with a token budget (default 8k).
  • Writes .specify/bugs/<slug>/evidence.md: source path, original line count, the exact command, stats, and the reduced log. It appends a dated section on re-runs and never overwrites.
  • Reuses the bug extension's slug resolution and handoff, so the evidence sits next to assessment.md / fix.md / test.md.
  • Guardrails: writes only inside BUG_DIR, treats log content as untrusted data, and keeps secret/PII redaction on.
  • Registers an optional before_bug_assess hook. That event is proposed in [Feature]: Hook events for the bundled bug extension (log intake as a pre-assess step) #4799; until it exists, the command is run by hand before /speckit.bug.assess.

Testing Checklist

  • Extension installs successfully via download URL
  • All commands execute without errors
  • Documentation is complete and accurate
  • No security vulnerabilities identified
  • Tested on at least one real project

Submission Requirements

  • Valid extension.yml manifest included
  • README.md with installation and usage instructions
  • LICENSE file included
  • GitHub release created with version tag
  • All command files exist and are properly formatted
  • Extension ID follows naming conventions (lowercase-with-hyphens)

Testing Details

Tested on: Linux (Pop!_OS 22.04, kernel 6.9) with Specify CLI 1.0.14, Claude Code integration.

Test project: a fresh specify init scratch project with the bundled bug extension installed. This was not a production codebase, so "Tested on at least one real project" is left unchecked.

Test scenarios:

  • specify extension add logreduce --from <the download URL above> installs the extension, registers the command as a Claude skill, and adds before_bug_assess to .specify/extensions.yml.
  • specify extension add --dev speckit/ from a checkout also works.
  • /speckit.logreduce.intake slug=crash-test crash_loop.log (a 503-line crash-loop log) produced .specify/bugs/crash-test/evidence.md: 503 → 180 lines, 9.9k → 3.7k tokens. It recorded the command and stats and suggested /speckit.bug.assess slug=crash-test as the next step.

Unchecked items:

  • LICENSE: the repository has an Apache-2.0 LICENSE at its root, but the release zip does not include a copy yet. It will be added in the next release.
  • Security: the extension is prompt-only and runs only the logreduce binary, but it has not had a separate security review.

Example Usage

# Install the logreduce binary (see the releases page), then:
specify extension add bug
specify extension add logreduce --from https://github.com/alexcpn/log_tfidf_reducer/releases/download/v0.3.0/logreduce-speckit.zip
/speckit.logreduce.intake slug=deploy-timeout ci/run-4812.log
/speckit.bug.assess slug=deploy-timeout Deploy step times out; evidence in .specify/bugs/deploy-timeout/evidence.md

Proposed Catalog Entry

{
  "logreduce": {
    "name": "Log Intake (logreduce)",
    "id": "logreduce",
    "description": "Reduce large logs attached to a bug report into .specify/bugs/<slug>/evidence.md before assessment",
    "author": "Alex Punnen",
    "version": "0.1.0",
    "download_url": "https://github.com/alexcpn/log_tfidf_reducer/releases/download/v0.3.0/logreduce-speckit.zip",
    "sha256": "f82ff36144c8d027154b20aeb47d8b6bc56cfb1f471b2e11f6a1eb7dd42f7984",
    "repository": "https://github.com/alexcpn/log_tfidf_reducer",
    "homepage": "https://github.com/alexcpn/log_tfidf_reducer/tree/main/speckit",
    "documentation": "https://github.com/alexcpn/log_tfidf_reducer/blob/main/speckit/README.md",
    "changelog": "https://github.com/alexcpn/log_tfidf_reducer/blob/main/speckit/CHANGELOG.md",
    "license": "Apache-2.0",
    "requires": {
      "speckit_version": ">=0.9.0",
      "tools": [
        { "name": "logreduce", "version": ">=0.2.0", "required": true }
      ]
    },
    "provides": { "commands": 1, "hooks": 1 },
    "tags": ["bug", "logs", "triage", "debugging"],
    "verified": false,
    "downloads": 0,
    "stars": 0,
    "created_at": "2026-09-30T00:00:00Z",
    "updated_at": "2026-09-30T00:00:00Z"
  }
}

Additional Context

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions