💡 摘要
根据工作项的证据从特定的代码库范围生成Jira准备好的问题。
🎯 适合人群
软件开发人员项目经理质量保证工程师DevOps团队
🤖 AI 吐槽: “看起来很能打,但别让配置把人劝退。”
安全分析中风险
风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。
name: repo-scan-2-jira description: Scan a repo scope for actionable work items (bugs, TODO/FIXME, doc inconsistencies, performance/maintainability risks) and emit Jira-ready issues in a strict JSON schema. Use when asked to scan a specific module/path/page/route and produce evidence-backed Jira tickets.
Repo Scan 2 Jira
Overview
Generate Jira-ready issues from a constrained scope in this monorepo. Operate on evidence only and emit JSON that matches schema.json.
Non-negotiable Rules
- Obey scope strictly: scan only target.paths and the specified module.
- Require evidence for every issue: file:line plus snippet or log excerpt.
- Make issues executable: include what/why/how, acceptance criteria, and definition of done.
- No speculative tickets. If reproduction is missing, create a Task to add repro/logging/tests.
- Output JSON only; match schema.json exactly.
- Use stable dedupeKey values across runs.
Arguments Contract
Use a structured Args block.
Required fields:
- target.module: docs | frontend | backend | prototype | cross
- target.paths: array of glob-ish paths (scope boundary)
- target.keywords: optional array of strings
- target.routes_or_pages: optional array of strings
- focus.issue_types: array of Bug | Task | Improvement
- focus.signals: array of TODO, FIXME, bug, doc_inconsistency, perf, lint, test_failures
- focus.depth: quick | standard | deep
- jira.project_key, jira.component, jira.labels_prefix; optional jira.epic_key
- output.format: json (required), optional markdown_report
- output.max_issues, output.min_confidence
- loop (optional): { mode: ralph, stop_condition: no_new_issues_in_scope | max_iterations, iteration_budget: number }
If target.paths is empty, stop and request scope.
Workflow
- Validate Args and scope. Refuse to scan outside target.paths.
- Collect signals inside scope only.
- Use scripts/collect-signals.sh for TODO/FIXME/BUG/PERF markers and keyword hits.
- If lint/test logs are provided, extract failures as evidence.
- Correlate signals into distinct issues and dedupe aggressively.
- For each issue, include evidence, reproduction (when applicable), acceptance criteria, and DoD.
- Compute stable dedupeKey values. Preferred format:
component:path:line:hash
- Hash should be stable across runs (example: sha1 of component|path|line|summary).
- Emit JSON only, matching schema.json.
Ralph Loop Mode
When loop.mode is ralph:
- Run a fresh scan for the same scope.
- Generate issues and compute dedupeKey values.
- Compare with prior output stored at .repo-scan-2-jira/last.json.
- Stop when no new dedupeKeys appear or iteration_budget is reached.
- Persist the latest output to .repo-scan-2-jira/last.json.
Output Schema
Follow schema.json exactly. Do not emit any extra keys or prose.
Prompt Template
Use prompts/invoke.txt as the wrapper prompt. Only edit the Args block.
Scripts
- scripts/collect-signals.sh: scoped ripgrep for TODO/FIXME/BUG/PERF/keywords, optional log parsing.
- scripts/dedupe.js: fill missing dedupeKey values and optionally filter out issues found in a prior run.
- scripts/jira-bulk-payload.js: convert output JSON to Jira bulk issue payload.
五维分析
清晰度8/10
创新性7/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析
优点
- 严格遵守范围确保结果集中。
- 基于证据的问题提高了票据质量。
- 自动生成Jira票据。
缺点
- 仅限于特定路径可能会忽视更广泛的问题。
- 需要精确的输入才能有效运行。
- 可能需要额外的脚本设置。
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 ReGYChang.
