prizmkit 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-prizmkit.js +4 -1
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/claude/command-adapter.js +35 -4
- package/bundled/adapters/claude/rules-adapter.js +6 -58
- package/bundled/adapters/claude/team-adapter.js +2 -2
- package/bundled/adapters/codebuddy/agent-adapter.js +0 -1
- package/bundled/adapters/codebuddy/rules-adapter.js +30 -0
- package/bundled/adapters/shared/frontmatter.js +3 -1
- package/bundled/dev-pipeline/README.md +13 -3
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +10 -0
- package/bundled/dev-pipeline/launch-daemon.sh +18 -4
- package/bundled/dev-pipeline/lib/common.sh +105 -0
- package/bundled/dev-pipeline/run-bugfix.sh +57 -57
- package/bundled/dev-pipeline/run.sh +75 -59
- package/bundled/dev-pipeline/scripts/check-session-status.py +47 -2
- package/bundled/dev-pipeline/scripts/cleanup-logs.py +192 -0
- package/bundled/dev-pipeline/scripts/detect-stuck.py +15 -3
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +32 -27
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +23 -23
- package/bundled/dev-pipeline/scripts/update-feature-status.py +50 -2
- package/bundled/dev-pipeline/scripts/utils.py +22 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +18 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +19 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +18 -2
- package/bundled/dev-pipeline/templates/session-status-schema.json +7 -1
- package/bundled/dev-pipeline/tests/__init__.py +0 -0
- package/bundled/dev-pipeline/tests/conftest.py +133 -0
- package/bundled/dev-pipeline/tests/test_check_session.py +127 -0
- package/bundled/dev-pipeline/tests/test_cleanup_logs.py +119 -0
- package/bundled/dev-pipeline/tests/test_detect_stuck.py +207 -0
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +181 -0
- package/bundled/dev-pipeline/tests/test_generate_prompt.py +190 -0
- package/bundled/dev-pipeline/tests/test_init_bugfix_pipeline.py +153 -0
- package/bundled/dev-pipeline/tests/test_init_pipeline.py +241 -0
- package/bundled/dev-pipeline/tests/test_update_bug_status.py +142 -0
- package/bundled/dev-pipeline/tests/test_update_feature_status.py +277 -0
- package/bundled/dev-pipeline/tests/test_utils.py +141 -0
- package/bundled/rules/USAGE.md +153 -0
- package/bundled/rules/_rules-metadata.json +43 -0
- package/bundled/rules/general/prefer-linux-commands.md +9 -0
- package/bundled/rules/prizm/prizm-commit-workflow.md +10 -0
- package/bundled/rules/prizm/prizm-documentation.md +19 -0
- package/bundled/rules/prizm/prizm-progressive-loading.md +11 -0
- package/bundled/skills/_metadata.json +130 -67
- package/bundled/skills/app-planner/SKILL.md +252 -499
- package/bundled/skills/app-planner/assets/evaluation-guide.md +44 -0
- package/bundled/skills/app-planner/scripts/validate-and-generate.py +143 -4
- package/bundled/skills/bug-planner/SKILL.md +58 -13
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -7
- package/bundled/skills/dev-pipeline-launcher/SKILL.md +16 -7
- package/bundled/skills/feature-workflow/SKILL.md +175 -234
- package/bundled/skills/prizm-kit/SKILL.md +17 -31
- package/bundled/skills/{prizmkit-adr-manager → prizmkit-tool-adr-manager}/SKILL.md +6 -7
- package/bundled/skills/{prizmkit-api-doc-generator → prizmkit-tool-api-doc-generator}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-bug-reproducer → prizmkit-tool-bug-reproducer}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-ci-cd-generator → prizmkit-tool-ci-cd-generator}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-db-migration → prizmkit-tool-db-migration}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-dependency-health → prizmkit-tool-dependency-health}/SKILL.md +3 -4
- package/bundled/skills/{prizmkit-deployment-strategy → prizmkit-tool-deployment-strategy}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-error-triage → prizmkit-tool-error-triage}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-log-analyzer → prizmkit-tool-log-analyzer}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-monitoring-setup → prizmkit-tool-monitoring-setup}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-onboarding-generator → prizmkit-tool-onboarding-generator}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-perf-profiler → prizmkit-tool-perf-profiler}/SKILL.md +4 -5
- package/bundled/skills/{prizmkit-security-audit → prizmkit-tool-security-audit}/SKILL.md +3 -4
- package/bundled/skills/{prizmkit-tech-debt-tracker → prizmkit-tool-tech-debt-tracker}/SKILL.md +3 -4
- package/bundled/skills/refactor-skill/SKILL.md +371 -0
- package/bundled/skills/refactor-workflow/SKILL.md +17 -119
- package/package.json +1 -1
- package/src/external-skills.js +71 -0
- package/src/index.js +62 -4
- package/src/metadata.js +36 -0
- package/src/scaffold.js +136 -32
- package/bundled/skills/prizmkit-bug-fix-workflow/SKILL.md +0 -356
- package/bundled/templates/claude-md-template.md +0 -38
- package/bundled/templates/codebuddy-md-template.md +0 -35
- /package/bundled/skills/{prizmkit-adr-manager → prizmkit-tool-adr-manager}/assets/adr-template.md +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# App Planner Evaluation Guide
|
|
2
|
+
|
|
3
|
+
This guide is for maintainers who evaluate and iterate on the `app-planner` skill quality.
|
|
4
|
+
|
|
5
|
+
## Evaluation & Quality Gates (Optional but Recommended)
|
|
6
|
+
|
|
7
|
+
After multiple planning cycles or before committing refined skill logic, run standardized evaluation.
|
|
8
|
+
|
|
9
|
+
### One-Command Evaluation
|
|
10
|
+
|
|
11
|
+
Requires npm setup:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm run skill:review -- \
|
|
15
|
+
--workspace /.codebuddy/skill-evals/app-planner-workspace \
|
|
16
|
+
--iteration iteration-N \
|
|
17
|
+
--skill-name app-planner \
|
|
18
|
+
--skill-path /core/skills/app-planner \
|
|
19
|
+
--runs 3 \
|
|
20
|
+
--grader-cmd "python3 /core/skills/app-planner/scripts/validate-and-generate.py grade --workspace {workspace} --iteration {iteration}"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Produces:
|
|
24
|
+
- `benchmark.json` — quantitative metrics (pass rate, feature quality, time)
|
|
25
|
+
- `benchmark.md` — human-readable summary
|
|
26
|
+
- `review.html` — interactive evaluation viewer
|
|
27
|
+
|
|
28
|
+
### Metrics Tracked
|
|
29
|
+
|
|
30
|
+
| Metric | Computation | Target | Interpretation |
|
|
31
|
+
|--------|-------------|--------|-----------------|
|
|
32
|
+
| `plan_validity` | % runs with validation pass | >95% | Higher = more robust planning |
|
|
33
|
+
| `avg_features_per_run` | avg feature count | ±20% consistency | Should be stable across runs |
|
|
34
|
+
| `avg_acceptance_criteria` | AC count per feature | 4-6 | Target sweet spot for test coverage |
|
|
35
|
+
| `dependency_complexity` | max DAG depth, cycle count | depth < 5 | Manageable dependency graph |
|
|
36
|
+
| `description_quality` | word count, keyword coverage | min 20 words | Sufficient AC detail |
|
|
37
|
+
| `latency_sec` | wall-clock execution time | <120s per run | UX acceptable |
|
|
38
|
+
|
|
39
|
+
### When to Run Evaluation
|
|
40
|
+
|
|
41
|
+
- After major SKILL.md revisions
|
|
42
|
+
- Before releasing new skill updates
|
|
43
|
+
- Quarterly quality assurance
|
|
44
|
+
- Post-optimization to measure improvement
|
|
@@ -7,11 +7,13 @@ Commands:
|
|
|
7
7
|
validate Validate an existing feature-list.json
|
|
8
8
|
template Generate a blank template feature-list.json
|
|
9
9
|
summary Print a summary table of features from a feature-list.json
|
|
10
|
+
grade Generate grading results from eval runs (for npm run skill:review)
|
|
10
11
|
|
|
11
12
|
Usage:
|
|
12
|
-
python3 validate-and-generate.py validate --input feature-list.json [--output validated.json]
|
|
13
|
+
python3 validate-and-generate.py validate --input feature-list.json [--output validated.json] [--mode new|incremental]
|
|
13
14
|
python3 validate-and-generate.py template --output feature-list.json
|
|
14
15
|
python3 validate-and-generate.py summary --input feature-list.json [--format markdown|json]
|
|
16
|
+
python3 validate-and-generate.py grade --workspace /.codebuddy/skill-evals/app-planner-workspace --iteration iteration-1
|
|
15
17
|
|
|
16
18
|
Python 3.6+ required. No external dependencies.
|
|
17
19
|
"""
|
|
@@ -33,6 +35,7 @@ SCHEMA_VERSION = "dev-pipeline-feature-list-v1"
|
|
|
33
35
|
VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "split"}
|
|
34
36
|
VALID_COMPLEXITIES = {"low", "medium", "high"}
|
|
35
37
|
VALID_GRANULARITIES = {"feature", "sub_feature", "auto"}
|
|
38
|
+
VALID_PLANNING_MODES = {"new", "incremental"}
|
|
36
39
|
|
|
37
40
|
FEATURE_ID_RE = re.compile(r"^F-\d{3}(-[A-Z])?$")
|
|
38
41
|
SUB_FEATURE_ID_RE = re.compile(r"^F-\d{3}-[A-Z]$")
|
|
@@ -89,6 +92,7 @@ def _write_json(path, data):
|
|
|
89
92
|
# ---------------------------------------------------------------------------
|
|
90
93
|
|
|
91
94
|
|
|
95
|
+
|
|
92
96
|
def _detect_cycles(features):
|
|
93
97
|
"""Return (has_cycles: bool, max_depth: int) using Kahn's topological sort.
|
|
94
98
|
|
|
@@ -141,11 +145,14 @@ def _detect_cycles(features):
|
|
|
141
145
|
# ---------------------------------------------------------------------------
|
|
142
146
|
|
|
143
147
|
|
|
144
|
-
def validate_feature_list(data):
|
|
148
|
+
def validate_feature_list(data, planning_mode="new"):
|
|
145
149
|
"""Validate a parsed feature-list data structure.
|
|
146
150
|
|
|
147
151
|
Returns a dict with keys ``valid``, ``errors``, ``warnings``, ``stats``.
|
|
148
152
|
"""
|
|
153
|
+
if planning_mode not in VALID_PLANNING_MODES:
|
|
154
|
+
planning_mode = "new"
|
|
155
|
+
|
|
149
156
|
errors = []
|
|
150
157
|
warnings = []
|
|
151
158
|
|
|
@@ -258,7 +265,7 @@ def validate_feature_list(data):
|
|
|
258
265
|
label, status, ", ".join(sorted(VALID_STATUSES))
|
|
259
266
|
)
|
|
260
267
|
)
|
|
261
|
-
if status and status != "pending":
|
|
268
|
+
if planning_mode == "new" and status and status != "pending":
|
|
262
269
|
warnings.append(
|
|
263
270
|
"{}: status is '{}' (expected 'pending' for new plans)".format(label, status)
|
|
264
271
|
)
|
|
@@ -621,7 +628,7 @@ def cmd_validate(args):
|
|
|
621
628
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
622
629
|
return 2
|
|
623
630
|
|
|
624
|
-
result = validate_feature_list(data)
|
|
631
|
+
result = validate_feature_list(data, planning_mode=args.mode)
|
|
625
632
|
|
|
626
633
|
# Print results to stdout
|
|
627
634
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -682,6 +689,114 @@ def cmd_summary(args):
|
|
|
682
689
|
return 0
|
|
683
690
|
|
|
684
691
|
|
|
692
|
+
def cmd_grade(args):
|
|
693
|
+
"""Handle the 'grade' command for evaluation framework integration.
|
|
694
|
+
|
|
695
|
+
Collects validation results from eval runs and generates grading data.
|
|
696
|
+
Used by npm run skill:review for automated evaluation of app-planner.
|
|
697
|
+
"""
|
|
698
|
+
workspace = getattr(args, 'workspace', None)
|
|
699
|
+
iteration = getattr(args, 'iteration', None)
|
|
700
|
+
|
|
701
|
+
if not workspace or not iteration:
|
|
702
|
+
_err("--workspace and --iteration are required for the grade command")
|
|
703
|
+
return 2
|
|
704
|
+
|
|
705
|
+
workspace_path = os.path.expanduser(workspace)
|
|
706
|
+
|
|
707
|
+
if not os.path.isdir(workspace_path):
|
|
708
|
+
_err("Workspace directory not found: {}".format(workspace_path))
|
|
709
|
+
return 2
|
|
710
|
+
|
|
711
|
+
# Collect run outputs from iteration subdirectory
|
|
712
|
+
iteration_dir = os.path.join(workspace_path, iteration)
|
|
713
|
+
if not os.path.isdir(iteration_dir):
|
|
714
|
+
_err("Iteration directory not found: {}".format(iteration_dir))
|
|
715
|
+
return 2
|
|
716
|
+
|
|
717
|
+
# Find all eval-* subdirectories
|
|
718
|
+
eval_dirs = []
|
|
719
|
+
try:
|
|
720
|
+
for item in os.listdir(iteration_dir):
|
|
721
|
+
item_path = os.path.join(iteration_dir, item)
|
|
722
|
+
if os.path.isdir(item_path) and item.startswith('eval-'):
|
|
723
|
+
eval_dirs.append((item, item_path))
|
|
724
|
+
except Exception as exc:
|
|
725
|
+
_err("Failed to list iteration directory: {}".format(exc))
|
|
726
|
+
return 2
|
|
727
|
+
|
|
728
|
+
if not eval_dirs:
|
|
729
|
+
_warn("No eval-* directories found in {}".format(iteration_dir))
|
|
730
|
+
|
|
731
|
+
grades = []
|
|
732
|
+
|
|
733
|
+
for eval_name, eval_path in sorted(eval_dirs):
|
|
734
|
+
output_json = os.path.join(eval_path, "outputs", "feature-list.json")
|
|
735
|
+
|
|
736
|
+
if not os.path.isfile(output_json):
|
|
737
|
+
_info("Skipping {}: no output/feature-list.json found".format(eval_name))
|
|
738
|
+
continue
|
|
739
|
+
|
|
740
|
+
# Load and validate the output
|
|
741
|
+
data, load_err = _load_json(output_json)
|
|
742
|
+
if load_err:
|
|
743
|
+
_warn("Failed to load {}: {}".format(output_json, load_err))
|
|
744
|
+
continue
|
|
745
|
+
|
|
746
|
+
# Run validation
|
|
747
|
+
result = validate_feature_list(data, planning_mode="new")
|
|
748
|
+
|
|
749
|
+
# Create grading entry
|
|
750
|
+
grade_entry = {
|
|
751
|
+
"test_name": eval_name,
|
|
752
|
+
"passed": result["valid"],
|
|
753
|
+
"assertions": [
|
|
754
|
+
{
|
|
755
|
+
"name": "Feature list valid schema",
|
|
756
|
+
"passed": result["valid"],
|
|
757
|
+
"evidence": "valid={}".format(result["valid"])
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"name": "No cycles in DAG",
|
|
761
|
+
"passed": not result["stats"].get("has_cycles", False),
|
|
762
|
+
"evidence": "cycles={}".format(result["stats"].get("has_cycles", False))
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"name": "Features generated",
|
|
766
|
+
"passed": result["stats"].get("total_features", 0) > 0,
|
|
767
|
+
"evidence": "count={}".format(result["stats"].get("total_features", 0))
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "No validation errors",
|
|
771
|
+
"passed": len(result.get("errors", [])) == 0,
|
|
772
|
+
"evidence": "error_count={}".format(len(result.get("errors", [])))
|
|
773
|
+
}
|
|
774
|
+
]
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
grades.append(grade_entry)
|
|
778
|
+
|
|
779
|
+
# Write grading.json to eval run directory
|
|
780
|
+
grading_file = os.path.join(eval_path, "grading.json")
|
|
781
|
+
_write_json(grading_file, grade_entry)
|
|
782
|
+
_info("Wrote grading to {}".format(grading_file))
|
|
783
|
+
|
|
784
|
+
# Write aggregated results
|
|
785
|
+
aggregated = {
|
|
786
|
+
"iteration": iteration,
|
|
787
|
+
"total_runs": len(grades),
|
|
788
|
+
"passed_runs": sum(1 for g in grades if g["passed"]),
|
|
789
|
+
"pass_rate": len([g for g in grades if g["passed"]]) / len(grades) if grades else 0,
|
|
790
|
+
"grades": grades
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
benchmark_file = os.path.join(iteration_dir, "benchmark.json")
|
|
794
|
+
_write_json(benchmark_file, aggregated)
|
|
795
|
+
_info("Wrote aggregated benchmark to {}".format(benchmark_file))
|
|
796
|
+
|
|
797
|
+
return 0
|
|
798
|
+
|
|
799
|
+
|
|
685
800
|
def main():
|
|
686
801
|
parser = argparse.ArgumentParser(
|
|
687
802
|
description="Validate and generate feature-list.json files for the dev-pipeline system.",
|
|
@@ -689,6 +804,7 @@ def main():
|
|
|
689
804
|
epilog=(
|
|
690
805
|
"Examples:\n"
|
|
691
806
|
" %(prog)s validate --input feature-list.json\n"
|
|
807
|
+
" %(prog)s validate --input feature-list.json --mode incremental\n"
|
|
692
808
|
" %(prog)s validate --input feature-list.json --output validated.json\n"
|
|
693
809
|
" %(prog)s template --output feature-list.json\n"
|
|
694
810
|
" %(prog)s summary --input feature-list.json\n"
|
|
@@ -709,6 +825,12 @@ def main():
|
|
|
709
825
|
p_validate.add_argument(
|
|
710
826
|
"--output", help="Path to write validated output (optional)"
|
|
711
827
|
)
|
|
828
|
+
p_validate.add_argument(
|
|
829
|
+
"--mode",
|
|
830
|
+
choices=["new", "incremental"],
|
|
831
|
+
default="new",
|
|
832
|
+
help="Validation mode (default: new)",
|
|
833
|
+
)
|
|
712
834
|
|
|
713
835
|
# -- template --
|
|
714
836
|
p_template = subparsers.add_parser(
|
|
@@ -734,6 +856,22 @@ def main():
|
|
|
734
856
|
help="Output format (default: markdown)",
|
|
735
857
|
)
|
|
736
858
|
|
|
859
|
+
# -- grade --
|
|
860
|
+
p_grade = subparsers.add_parser(
|
|
861
|
+
"grade",
|
|
862
|
+
help="Generate grading results from eval runs (for npm run skill:review)",
|
|
863
|
+
)
|
|
864
|
+
p_grade.add_argument(
|
|
865
|
+
"--workspace",
|
|
866
|
+
required=True,
|
|
867
|
+
help="Path to eval workspace (e.g., /.codebuddy/skill-evals/app-planner-workspace)",
|
|
868
|
+
)
|
|
869
|
+
p_grade.add_argument(
|
|
870
|
+
"--iteration",
|
|
871
|
+
required=True,
|
|
872
|
+
help="Iteration ID (e.g., iteration-1)",
|
|
873
|
+
)
|
|
874
|
+
|
|
737
875
|
args = parser.parse_args()
|
|
738
876
|
|
|
739
877
|
if not args.command:
|
|
@@ -744,6 +882,7 @@ def main():
|
|
|
744
882
|
"validate": cmd_validate,
|
|
745
883
|
"template": cmd_template,
|
|
746
884
|
"summary": cmd_summary,
|
|
885
|
+
"grade": cmd_grade,
|
|
747
886
|
}
|
|
748
887
|
|
|
749
888
|
handler = dispatch.get(args.command)
|
|
@@ -57,6 +57,22 @@ Output: `project_name`, `project_description`, `global_context` fields populated
|
|
|
57
57
|
|
|
58
58
|
Accept bug information in ANY of these formats (auto-detect):
|
|
59
59
|
|
|
60
|
+
#### Severity Auto-Classification Rules
|
|
61
|
+
|
|
62
|
+
When extracting bugs, apply these rules to auto-suggest severity:
|
|
63
|
+
|
|
64
|
+
| Severity | Indicators | Examples |
|
|
65
|
+
|----------|------------|----------|
|
|
66
|
+
| **critical** | System crash, data loss, security breach, OOM, unrecoverable error | `Segmentation fault`, `OutOfMemoryError`, `SQL injection vulnerability`, `Database corrupted` |
|
|
67
|
+
| **high** | Core feature broken, authentication failure, data integrity issue, timeout | `Auth token invalid`, `Payment failed`, `Connection timeout`, `500 Internal Server Error` |
|
|
68
|
+
| **medium** | Feature partially broken, workaround exists, incorrect output | `CSV encoding issue`, `Pagination not working`, `Wrong date format`, `Missing validation` |
|
|
69
|
+
| **low** | Cosmetic issue, minor inconvenience, edge case | `UI misalignment`, `Typo in error message`, `Slow loading (non-critical page)`, `Non-breaking warning` |
|
|
70
|
+
|
|
71
|
+
**Special cases:**
|
|
72
|
+
- Failed test → medium (unless test covers critical path, then high)
|
|
73
|
+
- User report with "cannot use app" → high
|
|
74
|
+
- User report with "annoying but works" → low
|
|
75
|
+
|
|
60
76
|
#### Format A: Stack Trace / Error Log
|
|
61
77
|
```
|
|
62
78
|
TypeError: Cannot read property 'token' of null
|
|
@@ -124,18 +140,47 @@ ALERT: Error rate spike: 500 errors/min on /api/login endpoint
|
|
|
124
140
|
### Phase 4: Generate & Validate
|
|
125
141
|
|
|
126
142
|
1. **Generate `bug-fix-list.json`**: Conform to `dev-pipeline/templates/bug-fix-list-schema.json`
|
|
127
|
-
2. **Validate against schema**:
|
|
143
|
+
2. **Validate against schema**: Run the validation checks below
|
|
128
144
|
3. **Write file** to project root (or user-specified path)
|
|
129
|
-
4. **Output**: File path, summary, and next steps
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
4. **Output**: File path, summary, and next steps
|
|
146
|
+
|
|
147
|
+
#### Schema Validation Checklist
|
|
148
|
+
|
|
149
|
+
Before writing the file, verify all items pass:
|
|
150
|
+
|
|
151
|
+
**Required fields:**
|
|
152
|
+
- [ ] `$schema`: must be `"dev-pipeline-bug-fix-list-v1"`
|
|
153
|
+
- [ ] `project_name`: non-empty string
|
|
154
|
+
- [ ] `bugs`: non-empty array
|
|
155
|
+
|
|
156
|
+
**Per-bug required fields:**
|
|
157
|
+
- [ ] `id`: matches pattern `B-NNN` (e.g., `B-001`)
|
|
158
|
+
- [ ] `title`: non-empty string
|
|
159
|
+
- [ ] `description`: non-empty string
|
|
160
|
+
- [ ] `severity`: one of `critical`, `high`, `medium`, `low`
|
|
161
|
+
- [ ] `error_source.type`: one of `stack_trace`, `user_report`, `failed_test`, `log_pattern`, `monitoring_alert`
|
|
162
|
+
- [ ] `verification_type`: one of `automated`, `manual`, `hybrid`
|
|
163
|
+
- [ ] `acceptance_criteria`: non-empty array of strings
|
|
164
|
+
- [ ] `status`: must be `pending` for new bugs
|
|
165
|
+
|
|
166
|
+
**Consistency checks:**
|
|
167
|
+
- [ ] No duplicate bug IDs
|
|
168
|
+
- [ ] No duplicate priorities (each bug should have unique priority number)
|
|
169
|
+
- [ ] If `affected_feature` is set, verify it exists in `feature-list.json` (if available)
|
|
170
|
+
|
|
171
|
+
If any check fails, fix before writing the file.
|
|
172
|
+
|
|
173
|
+
#### Success Output
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
✅ bug-fix-list.json generated with 3 bugs (1 critical, 1 medium, 1 low)
|
|
177
|
+
|
|
178
|
+
Next steps:
|
|
179
|
+
- Review: cat bug-fix-list.json
|
|
180
|
+
- Start fixing: say "开始修复" or "start fixing bugs" to launch the bugfix pipeline
|
|
181
|
+
- Or run directly: ./dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json
|
|
182
|
+
- Fix one interactively: invoke bug-fix-workflow for each bug
|
|
183
|
+
```
|
|
139
184
|
|
|
140
185
|
---
|
|
141
186
|
|
|
@@ -150,7 +195,7 @@ Batch-parse error logs to generate bug entries without interactive prompts:
|
|
|
150
195
|
3. Auto-generate bug entries with:
|
|
151
196
|
- Title: first line of error message
|
|
152
197
|
- Description: full error context
|
|
153
|
-
- Severity:
|
|
198
|
+
- Severity: use the **Severity Auto-Classification Rules** (see Phase 2)
|
|
154
199
|
- error_source: populated from log content
|
|
155
200
|
- verification_type: default to `automated`
|
|
156
201
|
- acceptance_criteria: auto-generate "Error no longer occurs in [scenario]"
|
|
@@ -210,7 +255,7 @@ After `bug-fix-list.json` is generated, the user can:
|
|
|
210
255
|
1. **Say "开始修复" or "start fixing bugs"** — triggers `bugfix-pipeline-launcher` skill to auto-launch pipeline in background (recommended)
|
|
211
256
|
2. **Background daemon**: `./dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json`
|
|
212
257
|
3. **Foreground run**: `./dev-pipeline/run-bugfix.sh run bug-fix-list.json`
|
|
213
|
-
4. **Fix single bug interactively**: invoke `
|
|
258
|
+
4. **Fix single bug interactively**: invoke `bug-fix-workflow` in current session
|
|
214
259
|
5. **Retry a failed bug**: `./dev-pipeline/retry-bug.sh B-001`
|
|
215
260
|
|
|
216
261
|
## Error Handling
|
|
@@ -36,7 +36,7 @@ Launch the autonomous bug fix pipeline from within a cbc conversation. The pipel
|
|
|
36
36
|
|
|
37
37
|
**Do NOT use this skill when:**
|
|
38
38
|
- User wants to plan/collect bugs (use `bug-planner` instead)
|
|
39
|
-
- User wants to fix a single bug interactively in current session (use `
|
|
39
|
+
- User wants to fix a single bug interactively in current session (use `bug-fix-workflow`)
|
|
40
40
|
- User wants to launch the feature pipeline (use `dev-pipeline-launcher`)
|
|
41
41
|
|
|
42
42
|
### Prerequisites
|
|
@@ -225,13 +225,11 @@ When user says "retry B-001" or "重试 B-001":
|
|
|
225
225
|
dev-pipeline/retry-bug.sh B-001 bug-fix-list.json
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
**Note:** `retry-bug.sh` automatically cleans bug artifacts and resets status before retrying. This is equivalent to `reset-feature.sh --clean --run` in the feature pipeline. No separate reset command is needed.
|
|
229
|
+
|
|
230
|
+
Environment variables (optional):
|
|
229
231
|
```bash
|
|
230
|
-
|
|
231
|
-
--bug-list bug-fix-list.json \
|
|
232
|
-
--state-dir dev-pipeline/bugfix-state \
|
|
233
|
-
--bug-id B-001 --action reset
|
|
234
|
-
# Then restart pipeline to pick it up
|
|
232
|
+
SESSION_TIMEOUT=3600 dev-pipeline/retry-bug.sh B-001 bug-fix-list.json
|
|
235
233
|
```
|
|
236
234
|
|
|
237
235
|
### Error Handling
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "dev-pipeline-launcher"
|
|
3
|
-
description: "Launch and manage the dev-pipeline from within
|
|
3
|
+
description: "Launch and manage the dev-pipeline from within an AI CLI session. Start pipeline in background, monitor logs, check status, stop pipeline. Invoke when user wants to start building features, run the pipeline, or check pipeline progress. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Dev-Pipeline Launcher
|
|
7
7
|
|
|
8
|
-
Launch the autonomous development pipeline from within
|
|
8
|
+
Launch the autonomous development pipeline from within an AI CLI conversation. The pipeline runs as a fully detached background process -- closing the AI CLI session does NOT stop the pipeline.
|
|
9
9
|
|
|
10
10
|
### Mandatory Execution Mode (MUST)
|
|
11
11
|
|
|
12
12
|
- Always use daemon mode via `dev-pipeline/launch-daemon.sh` for start/stop/status/log actions.
|
|
13
13
|
- NEVER run `dev-pipeline/run.sh run ...` directly from this skill.
|
|
14
|
-
- Reason: foreground `run.sh` can be terminated by AI CLI command timeout (e.g. cbc 120s), while daemon mode survives session timeout.
|
|
14
|
+
- Reason: foreground `run.sh` can be terminated by AI CLI command timeout (e.g. cbc 120s, claude may vary), while daemon mode survives session timeout.
|
|
15
15
|
|
|
16
16
|
### When to Use
|
|
17
17
|
|
|
@@ -49,11 +49,12 @@ Before any action, validate:
|
|
|
49
49
|
|
|
50
50
|
1. **dev-pipeline exists**: Confirm `dev-pipeline/launch-daemon.sh` is present and executable
|
|
51
51
|
2. **For start**: `feature-list.json` must exist in project root (or user-specified path)
|
|
52
|
-
3. **Dependencies**: `jq`, `python3`, `cbc` must be in PATH
|
|
52
|
+
3. **Dependencies**: `jq`, `python3`, AI CLI (`cbc` or `claude`) must be in PATH
|
|
53
|
+
4. **Python version**: Requires Python 3.8+ for dev-pipeline scripts
|
|
53
54
|
|
|
54
55
|
Quick check:
|
|
55
56
|
```bash
|
|
56
|
-
command -v jq && command -v python3 && command -v cbc && echo "All dependencies OK"
|
|
57
|
+
command -v jq && command -v python3 && (command -v cbc || command -v claude) && echo "All dependencies OK"
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
If `feature-list.json` is missing, inform user:
|
|
@@ -227,8 +228,14 @@ When user says "从头重试 F-003" or "clean retry F-003":
|
|
|
227
228
|
dev-pipeline/reset-feature.sh F-003 --clean --run feature-list.json
|
|
228
229
|
```
|
|
229
230
|
|
|
231
|
+
Environment variables (optional):
|
|
232
|
+
```bash
|
|
233
|
+
SESSION_TIMEOUT=3600 dev-pipeline/retry-feature.sh F-003 feature-list.json
|
|
234
|
+
```
|
|
235
|
+
|
|
230
236
|
Notes:
|
|
231
237
|
- `retry-feature.sh` runs exactly one feature session and exits.
|
|
238
|
+
- `reset-feature.sh --clean --run` clears the feature state before retrying (fresh start).
|
|
232
239
|
- Keep pipeline daemon mode for main run management (`launch-daemon.sh`).
|
|
233
240
|
|
|
234
241
|
### Error Handling
|
|
@@ -237,17 +244,19 @@ Notes:
|
|
|
237
244
|
|-------|--------|
|
|
238
245
|
| `feature-list.json` not found | Tell user to run `app-planner` skill first |
|
|
239
246
|
| `jq` not installed | Suggest: `brew install jq` |
|
|
240
|
-
| `cbc` not in PATH | Check
|
|
247
|
+
| `cbc`/`claude` not in PATH | Check AI CLI installation |
|
|
241
248
|
| Pipeline already running | Show status, ask if user wants to stop and restart |
|
|
242
249
|
| PID file stale (process dead) | `launch-daemon.sh` auto-cleans, retry start |
|
|
243
250
|
| Launch failed (process died immediately) | Show last 20 lines of log: `tail -20 dev-pipeline/state/pipeline-daemon.log` |
|
|
251
|
+
| Feature stuck/blocked | Use `retry-feature.sh <F-XXX>` to retry; use `reset-feature.sh <F-XXX> --clean --run` for fresh start |
|
|
244
252
|
| All features blocked/failed | Show status, suggest daemon-safe recovery: `dev-pipeline/reset-feature.sh <F-XXX> --clean --run feature-list.json` |
|
|
245
253
|
| Permission denied on script | Run `chmod +x dev-pipeline/launch-daemon.sh dev-pipeline/run.sh` |
|
|
246
254
|
|
|
247
255
|
### Integration Notes
|
|
248
256
|
|
|
249
257
|
- **After app-planner**: This is the natural next step. When user finishes planning and has `feature-list.json`, suggest launching the pipeline.
|
|
250
|
-
- **Session independence**: The pipeline runs completely detached. User can close
|
|
258
|
+
- **Session independence**: The pipeline runs completely detached. User can close the AI CLI session, open a new session later, and use this skill to check progress or stop the pipeline.
|
|
251
259
|
- **Single instance**: Only one pipeline can run at a time. The PID file prevents duplicates.
|
|
260
|
+
- **Pipeline coexistence**: Feature and bugfix pipelines use separate state directories (`state/` vs `bugfix-state/`), so they can run simultaneously without conflict.
|
|
252
261
|
- **State preservation**: Stopping and restarting the pipeline resumes from where it left off -- completed features are not re-run.
|
|
253
262
|
- **HANDOFF**: After pipeline completes all features, suggest running `prizmkit-code-review` for overall review, or `prizmkit-summarize` to archive.
|