.agents/skills/gf-feedback/SKILL.md
When users discover bugs or improvement points after implementation, this skill captures those issues, organizes them into a traceable task list in tasks.md, systematically fixes and verifies each one, and ensures every behavior-changing fix is covered by focused unit tests.
Core principles:
CRITICAL:
openspec/changes/ and has not been moved into openspec/changes/archive/. Do not treat status: complete, all tasks checked off, or similar completion signals as "inactive" until archive actually happens.openspec list --json
# Or: ls openspec/changes/ | grep -v archive
When the two signals disagree, prefer the filesystem rule:
openspec/changes/ and is not inside archive/, it is active.openspec list --json may still report such a change as status: complete; that only means implementation tasks are done, not that the change is inactive.openspec/changes/archive/ are inactive.| Active Changes | Action |
|---|---|
| None | Create new change (see below) |
| One | Auto-select it, announce and proceed |
| Multiple | Ask user to select from list |
When multiple active changes exist:
Multiple active changes detected. Which change should this feedback be appended to?
1. config-management — System config CRUD management
2. user-auth — User authentication enhancement
Please select 1 or 2:
When no active change exists:
openspec new change "<name>"proposal.md (one paragraph summarizing context)design.md for pure bug fixes unless architectural changes neededAnnounce: "Applying feedback fixes to change: <name>"
| File | Purpose |
|---|---|
tasks.md | Task structure, naming conventions, numbering |
design.md | Architectural context |
proposal.md | Feature scope and intent |
specs/ | Delta spec definitions |
# Locate existing unit tests in the impacted package before adding a new one
rg --files <pkg-dir> | rg '_test\\.go$'
For each reported issue:
Classify by type:
Classify by spec impact:
| Level | Definition | Action |
|---|---|---|
| implementation | Spec is correct, code is wrong | Fix code only |
| spec-level | Requirement missing/incomplete/changed | Update spec first, then fix |
| internal | No user-observable change | Fix code, test optional |
Group related issues — Same root cause → single task with multiple verification points.
For spec-level issues, update specs before recording tasks:
specs/<capability>/spec.md<!-- ADDED: New requirement -->
### Requirement: Parent Selector Circular Prevention
The system SHALL disable the current menu and all its descendants in the parent selector
to prevent circular references.
#### Scenario: Edit menu with children
WHEN user edits a menu that has child menus
THEN the parent selector SHALL disable the current menu and all descendant menus
<!-- MODIFIED: Changed requirement (include full original block) -->
### Requirement: Import Error Handling
The system SHALL display error messages when import fails.
**MODIFIED:** Error messages SHALL include row number, field name, and validation failure reason.
<!-- REMOVED: Deprecated requirement -->
### Requirement: Legacy Import Format
The system SHALL support legacy CSV format.
**REMOVED:** This format is no longer supported.
**Migration:** Use the new CSV format with header row.
Append a Feedback section to tasks.md:
## Feedback
- [ ] **FB-1**: Parent selector allows circular references in menu edit
- [ ] **FB-2**: Import error messages lack row and field details
- [ ] **FB-3**: No test coverage for reset password feature
Numbering: Sequential FB-1, FB-2, etc. Continue from last number if section exists.
One line per task — No sub-fields. Analysis happens during fix phase.
Confirm with user before writing to file.
Test coverage planning (internal):
*_z_unit*_test.go or *_test.go in the same packageFor each task:
a. Announce: ## Fixing FB-X: <issue title>
b. Investigate — Read source files, confirm root cause
c. Implement — Minimal, focused fix following existing patterns
d. Write/update unit tests — Prefer the affected package's existing *_z_unit*_test.go or *_test.go files and keep assertions focused on the changed logic
e. Assess Impact Scope (MANDATORY)
After implementing, identify regression risk:
| Change Type | Map To Tests |
|---|---|
| Package-level logic | Targeted test for changed function/method + package regression tests |
| Shared utility | Utility package unit tests + highest-value dependent package tests already covering reuse |
| DB/DAO logic | DAO/model package unit tests with focused fixtures, mocks, or test helpers |
| Public API validation | Handler/service package unit tests that assert the changed validation path |
| Refactor without behavior change | Existing package tests that prove behavior parity |
# Example: Find unit tests related to a changed symbol or package
rg -l "GenDao|gdao" . -g '*_test.go'
Announce:
### Impact Analysis for FB-X
- Modified: cmd/gf/internal/cmd/gendao/gendao.go
- Affected package: cmd/gf/internal/cmd/gendao
- Unit tests: cmd/gf/internal/cmd/gendao/gendao_test.go
- Regression command: go test ./cmd/gf/internal/cmd/gendao -run 'TestGenDao'
f. Verify (MANDATORY before marking complete)
[x] in tasks.mdIf regression fails:
g. Run review — Invoke gf-review skill after completion
After all fixes:
### Comprehensive Verification Results
- Total tests: N
- Passed: N
- Failed: N (list with details)
- Regression tests: all passed ✓ / X failures
If failures → add new FB tasks, loop to Step 6.
## Feedback Complete
**Change:** <name>
**Issues reported:** X
**Issues fixed:** Y/X
**Tests added:** Z unit tests / focused assertions
**Regression tests run:** R tests across N packages
**Verification:** all passed / N issues remaining
### Fixed This Session
- [x] FB-1: <title> ✓ (unit test: TestGenDao_FiltersInvalidTables | package: ./cmd/gf/internal/cmd/gendao ✓)
- [x] FB-2: <title> ✓ (unit test: existing package coverage extended | package: ./cmd/gf/internal/cmd ✓)
### Remaining (if any)
- [ ] FB-3: <title> — blocked by <reason>
| Situation | Handling |
|---|---|
| Single issue | Still follow full workflow |
| Missing test cases only | Classify as test-gap, implement tests |
| Fix reveals more issues | Add as new FB tasks |
| "Bug" is actually feature request | Re-classify as spec-level, update specs first |
| Unit test not feasible (docs/spec only) | Note reason explicitly and skip only when no runtime code changes exist |
| Multiple feedback rounds | All tasks in single Feedback section, sequential numbering |
[x] only after tests pass