feat: add feature completion tracker and spec readiness gate#62
feat: add feature completion tracker and spec readiness gate#62brandon-fox wants to merge 1 commit intomainfrom
Conversation
…ture Completion Tracker: daily progress dashboard from tasks.md\n- Spec Readiness Gate: validates spec.md has all required sections, blocks PRs
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
There was a problem hiding this comment.
3 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/spec-readiness-gate.yml">
<violation number="1" location=".github/workflows/spec-readiness-gate.yml:79">
P1: Required section detection is too fuzzy and can produce false positives (e.g., treating `Non-Functional Requirements` as `Functional Requirements`).</violation>
</file>
<file name=".github/workflows/feature-completion-tracker.yml">
<violation number="1" location=".github/workflows/feature-completion-tracker.yml:51">
P2: Completed task matching is case-sensitive and misses `[X]`, causing inaccurate progress metrics.</violation>
<violation number="2" location=".github/workflows/feature-completion-tracker.yml:73">
P2: Issue lookup is not paginated, so the workflow can miss an existing dashboard issue and create duplicates.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| let missing = 0; | ||
| for (const section of requiredSections) { | ||
| // Check for H2 with similar name (case-insensitive, fuzzy) | ||
| const pattern = new RegExp(`^##\\s+.*${section.replace(/\s+/g, '.*')}`, 'im'); |
There was a problem hiding this comment.
P1: Required section detection is too fuzzy and can produce false positives (e.g., treating Non-Functional Requirements as Functional Requirements).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/spec-readiness-gate.yml, line 79:
<comment>Required section detection is too fuzzy and can produce false positives (e.g., treating `Non-Functional Requirements` as `Functional Requirements`).</comment>
<file context>
@@ -0,0 +1,133 @@
+ let missing = 0;
+ for (const section of requiredSections) {
+ // Check for H2 with similar name (case-insensitive, fuzzy)
+ const pattern = new RegExp(`^##\\s+.*${section.replace(/\s+/g, '.*')}`, 'im');
+ if (pattern.test(content)) {
+ report += `| ${section} | \u2705 |\n`;
</file context>
|
|
||
| // Count task markers | ||
| const total = (content.match(/^\s*-\s*\[/gm) || []).length; | ||
| const done = (content.match(/^\s*-\s*\[x\]/gm) || []).length; |
There was a problem hiding this comment.
P2: Completed task matching is case-sensitive and misses [X], causing inaccurate progress metrics.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/feature-completion-tracker.yml, line 51:
<comment>Completed task matching is case-sensitive and misses `[X]`, causing inaccurate progress metrics.</comment>
<file context>
@@ -0,0 +1,92 @@
+
+ // Count task markers
+ const total = (content.match(/^\s*-\s*\[/gm) || []).length;
+ const done = (content.match(/^\s*-\s*\[x\]/gm) || []).length;
+ const inProgress = (content.match(/^\s*-\s*\[\/\]/gm) || []).length;
+ const remaining = total - done - inProgress;
</file context>
| const done = (content.match(/^\s*-\s*\[x\]/gm) || []).length; | |
| const done = (content.match(/^\s*-\s*\[[xX]\]/gm) || []).length; |
| report += `\n_Updated: ${new Date().toISOString().slice(0, 16)}Z_\n`; | ||
|
|
||
| // Upsert dashboard issue | ||
| const { data: issues } = await github.rest.issues.listForRepo({ |
There was a problem hiding this comment.
P2: Issue lookup is not paginated, so the workflow can miss an existing dashboard issue and create duplicates.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/feature-completion-tracker.yml, line 73:
<comment>Issue lookup is not paginated, so the workflow can miss an existing dashboard issue and create duplicates.</comment>
<file context>
@@ -0,0 +1,92 @@
+ report += `\n_Updated: ${new Date().toISOString().slice(0, 16)}Z_\n`;
+
+ // Upsert dashboard issue
+ const { data: issues } = await github.rest.issues.listForRepo({
+ owner: context.repo.owner, repo: context.repo.repo,
+ labels: 'automated', state: 'open'
</file context>



Phase 2: 2 Specs Workflows\n- Feature Completion Tracker — daily dashboard of task progress\n- Spec Readiness Gate — blocks PRs with incomplete spec.md sections