From cf04d99f638d98aaeb8b9309ee3cb695949604fe Mon Sep 17 00:00:00 2001 From: carlos-alm <127798846+carlos-alm@users.noreply.github.com> Date: Mon, 30 Mar 2026 03:42:06 -0600 Subject: [PATCH 1/6] fix(skills): track real phase timestamps, open GitHub issues, enforce batch size titan-run: record phaseTimestamps.{phase}.startedAt/completedAt in titan-state.json at each phase boundary so CLOSE has real wall-clock data. titan-close: read phaseTimestamps from state instead of guessing; fall back to git log timestamps when missing. Open GitHub issues (gh issue create) for bug/limitation severity entries instead of only listing them in the report. titan-recon: enforce hard limit of 5 files per batch to prevent context overload in gauntlet sub-agents. titan-run V4 now warns on oversized batches. --- .claude/skills/titan-close/SKILL.md | 55 ++++++++++++++++++++++++----- .claude/skills/titan-recon/SKILL.md | 3 +- .claude/skills/titan-run/SKILL.md | 36 +++++++++++++++++++ 3 files changed, 85 insertions(+), 9 deletions(-) diff --git a/.claude/skills/titan-close/SKILL.md b/.claude/skills/titan-close/SKILL.md index 299bc447..fb486ddb 100644 --- a/.claude/skills/titan-close/SKILL.md +++ b/.claude/skills/titan-close/SKILL.md @@ -216,7 +216,7 @@ Compare final metrics against `titan-state.json` baseline: --- -## Step 5 — Compile the issue tracker +## Step 5 — Compile the issue tracker and open GitHub issues Read `.codegraph/titan/issues.ndjson`. Each line is a JSON object: @@ -230,6 +230,37 @@ Group issues by category and severity. Summarize: - **Process notes:** suggestions for improving the Titan workflow - **Codebase observations:** structural concerns beyond what the audit covered +### 5b. Open GitHub issues + +For each issue with severity `bug` or `limitation`, create a GitHub issue using `gh`: + +```bash +gh issue create --title ": " --body "$(cat <<'EOF' +## Context +Discovered during Titan audit (phase: , date: ). + +## Description + + +## Additional Context + + +## Source +- **Titan phase:** +- **Severity:** +- **Category:** +EOF +)" --label "titan-audit" +``` + +**Rules for issue creation:** +- **Only open issues for `bug` and `limitation` severity.** Suggestions and observations go in the report only — they are not actionable enough for standalone issues. +- **Check for duplicates first:** Run `gh issue list --search "" --state open --limit 5` before creating. If a matching open issue exists, skip it and note "existing issue #N" in the report. +- **Label:** Use `titan-audit` label. If the label doesn't exist, create it: `gh label create titan-audit --description "Issues discovered during Titan audit" --color "d4c5f9" 2>/dev/null || true` +- **Record each created issue number** for inclusion in the report's Issues section. + +For `suggestion` and `codebase` severity entries, include them in the report's Issues section but do NOT create GitHub issues. + --- ## Step 6 — Compile the gate log @@ -283,13 +314,21 @@ Write the report as Markdown: ## Pipeline Timeline -| Phase | Started | Completed | Duration | -|-------|---------|-----------|----------| -| RECON | | | — | -| GAUNTLET | — | — | — | -| SYNC | — | — | — | -| GATE (runs) | — | — | — | -| CLOSE | | | — | +Read `titan-state.json → phaseTimestamps` for real wall-clock data. If `phaseTimestamps` exists, use the recorded ISO 8601 timestamps to compute durations. If it does not exist (older pipeline run), derive timing from git commit timestamps as a fallback — **never invent or guess timestamps.** + +**Duration computation:** For each phase with `startedAt` and `completedAt`, compute duration as the difference in minutes/hours. For forge, also note the first and last commit timestamps from `git log`. + +| Phase | Duration | Notes | +|-------|----------|-------| +| RECON | | — | +| GAUNTLET | | | +| SYNC | | — | +| FORGE | | , first at