autonomous-loop
Iterate until success or limit, composing existing skills with Jidoka integration
Track commit accumulation and trigger PR when thresholds crossed
$ npx -y skills add WellApp-ai/Well --skill pr-threshold --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pr-thresholdContext preview
The summary Claude sees to decide when to auto-load this skill.
Track commit accumulation and trigger PR when thresholds crossed
name: pr-threshold description: Track commit accumulation and trigger PR when thresholds crossed
Monitor accumulated commits and metrics to determine when a PR should be pushed for human review. Prevents PRs from becoming too large or complex for effective review.
| Metric | Trigger Value | Rationale | |--------|---------------|-----------| | Lines of Code | > 300 | Human cognitive limit | | Files Changed | > 10 | Context switching cost | | Commits | > 5 | Review complexity | | Risk Score | HIGH | Needs careful review | | Scope Completion | 100% | Feature complete |
git diff origin/develop --stat | tail -1
Extract: insertions + deletions
git diff origin/develop --name-only | wc -l
git rev-list origin/develop..HEAD --count
Sum of risk from pr-review across all commits:
From Commit Plan:
## PR Threshold Check | Metric | Current | Threshold | Status | |--------|---------|-----------|--------| | Lines of Code | [N] | 300 | OK/CROSSED | | Files Changed | [N] | 10 | OK/CROSSED | | Commits | [N] | 5 | OK/CROSSED | | Risk Score | [N] | HIGH | OK/CROSSED | | Scope Completion | [N]% | 100% | OK/CROSSED |
## Verdict: CONTINUE No thresholds crossed. Proceeding to next commit. ### Current Accumulation: - LOC: [N]/300 - Files: [N]/10 - Commits: [N]/5 - Scope: [N]% ### Next Commit: [Name of next commit from plan]
## Verdict: TRIGGER_PR **Threshold crossed:** [Which metric(s)] ### Recommendation: Push PR now for human review before continuing. ### PR Scope: - Commits: [List of commit names] - Total LOC: [N] - Files: [N] - Risk: [LOW/MEDIUM/HIGH] ### Remaining Work: - Commits left: [N] - Features incomplete: [List] **Proceed to push-pr mode?** (Yes / Continue anyway)
If threshold crossed and user has NOT provided explicit override:
## Verdict: BLOCK **Threshold crossed:** [Which metric(s)] IMPLEMENTATION PAUSED - User decision required. | Option | Action | |--------|--------| | A | Push PR now (recommended) | | B | Continue anyway (override logged) | Reply with A or B to proceed.
Do NOT continue until user responds. This is a hard stop per `00-hard-rules.mdc`.
1. Present metrics summary 2. Recommend push-pr mode 3. If user approves: Switch to push-pr mode 4. If user continues: Log override, proceed
1. Proceed to next commit in plan 2. Update accumulated metrics
User can override thresholds with explicit confirmation:
**Warning:** LOC threshold exceeded (350/300). Continuing without PR may make review harder. **Override and continue?** (Yes / Push PR now)
Log overrides for later review.
This skill is invoked by:
Track across commits:
Accumulated Metrics: - Total LOC: [running sum] - Total Files: [unique count] - Commit Count: [N] - Highest Risk: [LOW/MEDIUM/HIGH] - Started: [timestamp]
Reset after successful PR push.
## PR Threshold Status **Verdict:** [CONTINUE / TRIGGER_PR] | Metric | Value | Threshold | % | |--------|-------|-----------|---| | LOC | [N] | 300 | [N]% | | Files | [N] | 10 | [N]% | | Commits | [N] | 5 | [N]% | | Scope | [N]% | 100% | [N]% | [Action recommendation]
Invoked automatically after each commit, or manually with "use pr-threshold skill".
Iterate until success or limit, composing existing skills with Jidoka integration
Generate and maintain BPMN 2.0 diagrams linked to Gherkin scenarios
Research best-in-class products using Browser MCP and WebSearch
Systematic debugging with MCP integration, auto-invoke from qa-commit, Phase 7 Harden