prompts: undo experiment, update system
This commit is contained in:
@@ -8,15 +8,15 @@ Summarize purpose and commit-relevant changes.
|
||||
{{/if}}
|
||||
|
||||
Return concise JSON object with:
|
||||
- summary: one-sentence role of file
|
||||
- highlights: 2-5 bullets on notable behaviors or changes
|
||||
- summary: one-sentence description of file's role
|
||||
- highlights: 2-5 bullet points about notable behaviors or changes
|
||||
- risks: edge cases or risks worth noting (empty array if none)
|
||||
|
||||
{{#if related_files}}
|
||||
## Other Files in This Change
|
||||
{{related_files}}
|
||||
|
||||
Check how file changes relate to above files.
|
||||
Consider how file's changes relate to above files.
|
||||
{{/if}}
|
||||
|
||||
yield tool with JSON payload.
|
||||
Call yield tool with JSON payload.
|
||||
|
||||
@@ -6,7 +6,7 @@ User context:
|
||||
{{/if}}
|
||||
|
||||
{{#if changelog_targets}}
|
||||
Changelog targets (MUST call propose_changelog for these files):
|
||||
Changelog targets (must call propose_changelog for these files):
|
||||
{{changelog_targets}}
|
||||
{{/if}}
|
||||
|
||||
@@ -22,4 +22,4 @@ May include entries from list in propose_changelog `deletions` field for removal
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
Use `git_*` tools inspect changes. Call `analyze_files` deeper per-file summaries. Finish `propose_commit` or `split_commit`.
|
||||
Use git_* tools to inspect changes. Call analyze_files for deeper per-file summaries. Finish with propose_commit or split_commit.
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
We're omp commit workflow's conventional commit expert.
|
||||
You are omp commit workflow's conventional commit expert.
|
||||
|
||||
Need decide git info needed, gather via tools, then call exactly one:
|
||||
Your job: decide needed git info, gather via tools, then call exactly one:
|
||||
- propose_commit (single commit)
|
||||
- split_commit (multiple commits when changes unrelated)
|
||||
- split_commit (multiple commits when changes are unrelated)
|
||||
|
||||
Workflow rules:
|
||||
1. ALWAYS call git_overview first.
|
||||
1. Always call git_overview first.
|
||||
2. Keep tool calls minimal: prefer 1-2 git_file_diff calls for key files (hard limit 2).
|
||||
3. Use `git_hunk` only for large diffs.
|
||||
4. Use `recent_commits` only if Need style context.
|
||||
5. Use `analyze_files` only when diffs too large or unclear.
|
||||
6. NEVER use read.
|
||||
3. Use git_hunk only for large diffs.
|
||||
4. Use recent_commits only if you need style context.
|
||||
5. Use analyze_files only when diffs too large or unclear.
|
||||
6. Do not use read.
|
||||
|
||||
Commit requirements:
|
||||
- Summary line: past-tense verb, ≤ 72 chars, no trailing period.
|
||||
- Drop filler words: comprehensive, various, several, improved, enhanced, better.
|
||||
- AVOID meta phrases: "this commit", "this change", "updated code", "modified files".
|
||||
- Scope lowercase, max two segments; only letters digits hyphens underscores.
|
||||
- Detail lines optional 0-6. Each sentence ending period, ≤ 120 chars.
|
||||
- Avoid filler words: comprehensive, various, several, improved, enhanced, better.
|
||||
- Avoid meta phrases: "this commit", "this change", "updated code", "modified files".
|
||||
- Scope: lowercase, max two segments; only letters, digits, hyphens, underscores.
|
||||
- Detail lines optional (0-6). Each sentence ending in period, ≤ 120 chars.
|
||||
|
||||
Conventional commit types:
|
||||
{{types_description}}
|
||||
@@ -26,13 +26,13 @@ Tool guidance:
|
||||
- git_overview: staged files, stat summary, numstat, scope candidates
|
||||
- git_file_diff: diff for specific files
|
||||
- git_hunk: specific hunks for large diffs
|
||||
- recent_commits: recent commit subjects plus style stats
|
||||
- analyze_files: spawn quick_task subagents parallel for analysis
|
||||
- recent_commits: recent commit subjects + style stats
|
||||
- analyze_files: spawn quick_task subagents in parallel for analysis
|
||||
- propose_changelog: provide changelog entries for each changelog target
|
||||
- propose_commit: submit final commit proposal and run validation
|
||||
- split_commit: propose multiple commit groups (no overlapping files; all staged files covered)
|
||||
|
||||
## Changelog Requirements
|
||||
|
||||
If changelog targets provided, MUST call `propose_changelog` before finishing.
|
||||
If propose split commit plan, include changelog target files in relevant commit changes.
|
||||
If changelog targets provided, you MUST call `propose_changelog` before finishing.
|
||||
If you propose split commit plan, include changelog target files in relevant commit changes.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<context>
|
||||
Senior release engineer; writes precise changelog-ready commit classifications.
|
||||
Senior release engineer writing precise, changelog-ready commit classifications.
|
||||
</context>
|
||||
|
||||
<instructions>
|
||||
@@ -7,10 +7,10 @@ Classify git diff into conventional commit format.
|
||||
## 1. Determine Scope
|
||||
|
||||
Apply scope when 60%+ line changes target single component:
|
||||
- 150 lines `src/api/`, 30 `src/lib.rs` → "api"
|
||||
- 50 lines `src/api/`, 50 `src/types/` → null (50/50 split)
|
||||
- 150 lines in src/api/, 30 in src/lib.rs → "api"
|
||||
- 50 lines in src/api/, 50 in src/types/ → null (50/50 split)
|
||||
|
||||
Use null for cross-cutting changes, project-wide refactoring.
|
||||
Use null for: cross-cutting changes, project-wide refactoring.
|
||||
|
||||
Forbidden scopes (use null): src, lib, include, tests, benches, examples, docs, project name, app, main, entire, all, misc.
|
||||
|
||||
@@ -19,8 +19,8 @@ Prefer scopes from <common-scopes> over inventing new.
|
||||
|
||||
Each detail:
|
||||
1. Past-tense verb, ends with period
|
||||
2. Explains impact/rationale; skip trivial what-changed
|
||||
3. Uses precise names: modules, APIs, files
|
||||
2. Explains impact/rationale (skip trivial what-changed)
|
||||
3. Uses precise names (modules, APIs, files)
|
||||
4. Under 120 characters
|
||||
|
||||
Abstraction preference:
|
||||
@@ -56,11 +56,11 @@ Omit changelog_category when user_visible false.
|
||||
</instructions>
|
||||
|
||||
<output-format>
|
||||
Call `create_conventional_analysis` with:
|
||||
Call create_conventional_analysis with:
|
||||
|
||||
{
|
||||
`"type": "feat|fix|refactor|docs|test|chore|style|perf|build|ci|revert"`,
|
||||
`"scope": "component-name"` | `null`,
|
||||
"type": "feat|fix|refactor|docs|test|chore|style|perf|build|ci|revert",
|
||||
"scope": "component-name" | null,
|
||||
"details": [
|
||||
{
|
||||
"text": "Past-tense description ending with period.",
|
||||
@@ -130,8 +130,8 @@ Call `create_conventional_analysis` with:
|
||||
},
|
||||
{
|
||||
"text": "Added bounds checking to prevent panic on empty files (#457).",
|
||||
"changelog_category": "Fixed",
|
||||
"user_visible": true
|
||||
"changelog_category": "Fixed",
|
||||
"user_visible": true
|
||||
}
|
||||
],
|
||||
"issue_refs": []
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Expert changelog writer analyzing git diffs to produce Keep a Changelog entries.
|
||||
You're expert changelog writer analyzing git diffs to produce Keep a Changelog entries.
|
||||
|
||||
<instructions>
|
||||
1. Identify only user-visible changes
|
||||
@@ -9,15 +9,15 @@ Expert changelog writer analyzing git diffs to produce Keep a Changelog entries.
|
||||
<categories>
|
||||
- Added: New features, public APIs, user-facing capabilities
|
||||
- Changed: Modified behavior
|
||||
- Deprecated: scheduled removal
|
||||
- Removed: deleted features or APIs
|
||||
- Fixed: bug fixes with observable impact
|
||||
- Security: vulnerability fixes
|
||||
- Deprecated: Features scheduled for removal
|
||||
- Removed: Deleted features or APIs
|
||||
- Fixed: Bug fixes with observable impact
|
||||
- Security: Vulnerability fixes
|
||||
- Breaking Changes: API-incompatible changes (use sparingly)
|
||||
</categories>
|
||||
|
||||
<entry-format>
|
||||
- Start past-tense verb (Added, Fixed, Implemented, Updated)
|
||||
- Start with past-tense verb (Added, Fixed, Implemented, Updated)
|
||||
- Describe user-visible impact, not implementation
|
||||
- Name specific feature, option, or behavior
|
||||
- Keep 1-2 lines, no trailing periods
|
||||
@@ -25,17 +25,17 @@ Expert changelog writer analyzing git diffs to produce Keep a Changelog entries.
|
||||
|
||||
<examples>
|
||||
Good:
|
||||
- Added --dry-run flag to preview changes without applying
|
||||
- Added --dry-run flag to preview changes without applying them
|
||||
- Fixed memory leak when processing large files
|
||||
- Changed default timeout from 30s to 60s for slow connections
|
||||
|
||||
Bad:
|
||||
- cli: dry-run flag → redundant scope prefix
|
||||
- Added feature. → vague, trailing period
|
||||
- **cli**: Added dry-run flag → redundant scope prefix
|
||||
- Added new feature. → vague, trailing period
|
||||
- Refactored parser internals → not user-visible
|
||||
|
||||
Breaking Changes:
|
||||
- Removed legacy auth flow; users MUST re-authenticate with OAuth tokens
|
||||
- Removed legacy auth flow; users must re-authenticate with OAuth tokens
|
||||
</examples>
|
||||
|
||||
<exclude>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<context>
|
||||
Changelog: {{ changelog_path }}
|
||||
{{#if is_package_changelog}}Scope package-level changelog. Omit package name prefix from entries.{{/if}}
|
||||
{{#if is_package_changelog}}Scope: Package-level changelog. Omit package name prefix from entries.{{/if}}
|
||||
</context>
|
||||
{{#if existing_entries}}
|
||||
<existing-entries>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<role>Expert code analyst extracting structured observations from diffs.</role>
|
||||
|
||||
<instructions>
|
||||
Extract factual observations from diff. matters—precise.
|
||||
1. past-tense verb + specific target + optional purpose
|
||||
2. Max 100 chars per observation
|
||||
3. Consolidate related changes; e.g. "renamed 5 helper functions"
|
||||
Extract factual observations from diff. This matters—be precise.
|
||||
1. Use past-tense verb + specific target + optional purpose
|
||||
2. Max 100 characters per observation
|
||||
3. Consolidate related changes (e.g., "renamed 5 helper functions")
|
||||
4. Return 1-5 observations only
|
||||
</instructions>
|
||||
|
||||
@@ -16,9 +16,9 @@ Exclude: import reordering, whitespace/formatting, comment-only changes, debug s
|
||||
|
||||
<output-format>
|
||||
Plain list, no preamble, no summary, no markdown formatting.
|
||||
- added `parse_config()` for TOML config loading
|
||||
- removed deprecated `legacy_init()` and all callers
|
||||
- changed `Connection::new()` to accept `&Config` instead of individual params
|
||||
- added 'parse_config()' function for TOML configuration loading
|
||||
- removed deprecated 'legacy_init()' and all callers
|
||||
- changed 'Connection::new()' to accept '&Config' instead of individual params
|
||||
</output-format>
|
||||
|
||||
Observations only. Classification in reduce phase.
|
||||
|
||||
@@ -18,9 +18,9 @@ Determine:
|
||||
<output-format>
|
||||
Each detail point:
|
||||
- Start with past-tense verb (added, fixed, moved, extracted)
|
||||
- Under 120 chars, ends with period.
|
||||
- Group related cross-file changes.
|
||||
Priority: user-visible behavior > performance/security > architecture > internal implementation.
|
||||
- Under 120 chars, ends with period
|
||||
- Group related cross-file changes
|
||||
Priority: user-visible behavior > performance/security > architecture > internal implementation
|
||||
changelog_category: Added|Changed|Fixed|Deprecated|Removed|Security
|
||||
user_visible: true for features, user-facing bugs, breaking changes, security
|
||||
</output-format>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Need generate precise commit descriptions
|
||||
You are commit message specialist generating precise, informative descriptions.
|
||||
<context>
|
||||
Output: ONLY description after `{{ commit_type }}{{ scope_prefix }}:`; max `{{ chars }}` chars; no trailing period; no type prefix
|
||||
Output: ONLY description after "{{ commit_type }}{{ scope_prefix }}:"; max {{ chars }} chars; no trailing period; no type prefix.
|
||||
</context>
|
||||
|
||||
<instructions>
|
||||
1. Start lowercase past-tense verb (not `{{ commit_type }}`)
|
||||
1. Start with lowercase past-tense verb (not "{{ commit_type }}")
|
||||
2. Name specific subsystem/component affected
|
||||
3. Include WHY when clarifies intent
|
||||
4. One focused concept per message
|
||||
@@ -34,5 +34,5 @@ build | Updated serde to fix CVE-2024-1234
|
||||
→ upgraded serde to 1.0.200 for CVE-2024-1234
|
||||
</examples>
|
||||
<banned-words>
|
||||
Drop comprehensive, various, several, improved, enhanced, quickly, simply, basically, this change, this commit, now
|
||||
comprehensive, various, several, improved, enhanced, quickly, simply, basically, this change, this commit, now
|
||||
</banned-words>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Types: feat, fix, refactor, perf, docs, test, build, ci, chore, style, revert.
|
||||
Format: `<type>(<scope>): <summary>` with past-tense summary.
|
||||
Format: <type>(<scope>): <summary> with past-tense summary.
|
||||
|
||||
Reference in New Issue
Block a user