agentsys 5.3.3 → 5.3.5
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.kiro/agents/agent-enhancer.json +1 -1
- package/.kiro/agents/ci-fixer.json +1 -1
- package/.kiro/agents/ci-monitor.json +1 -1
- package/.kiro/agents/claudemd-enhancer.json +1 -1
- package/.kiro/agents/consult-agent.json +1 -1
- package/.kiro/agents/cross-file-enhancer.json +1 -1
- package/.kiro/agents/debate-orchestrator.json +1 -1
- package/.kiro/agents/delivery-validator.json +1 -1
- package/.kiro/agents/deslop-agent.json +1 -1
- package/.kiro/agents/docs-enhancer.json +1 -1
- package/.kiro/agents/exploration-agent.json +1 -1
- package/.kiro/agents/hooks-enhancer.json +1 -1
- package/.kiro/agents/implementation-agent.json +1 -1
- package/.kiro/agents/learn-agent.json +1 -1
- package/.kiro/agents/map-validator.json +1 -1
- package/.kiro/agents/perf-analyzer.json +1 -1
- package/.kiro/agents/perf-code-paths.json +1 -1
- package/.kiro/agents/perf-investigation-logger.json +1 -1
- package/.kiro/agents/perf-orchestrator.json +1 -1
- package/.kiro/agents/perf-theory-gatherer.json +1 -1
- package/.kiro/agents/perf-theory-tester.json +1 -1
- package/.kiro/agents/plan-synthesizer.json +1 -1
- package/.kiro/agents/planning-agent.json +1 -1
- package/.kiro/agents/plugin-enhancer.json +1 -1
- package/.kiro/agents/prompt-enhancer.json +1 -1
- package/.kiro/agents/reviewer-perf-test.json +1 -1
- package/.kiro/agents/reviewer-quality-security.json +1 -1
- package/.kiro/agents/simple-fixer.json +1 -1
- package/.kiro/agents/skills-enhancer.json +1 -1
- package/.kiro/agents/sync-docs-agent.json +1 -1
- package/.kiro/agents/task-discoverer.json +1 -1
- package/.kiro/agents/test-coverage-checker.json +1 -1
- package/.kiro/agents/web-session.json +1 -1
- package/.kiro/agents/worktree-manager.json +1 -1
- package/CHANGELOG.md +14 -0
- package/bin/cli.js +48 -36
- package/lib/adapter-transforms.js +3 -3
- package/package.json +1 -1
- package/site/content.json +32 -8
- package/.cursor/commands/audit-project-agents.md +0 -454
- package/.cursor/commands/audit-project-github.md +0 -141
- package/.cursor/commands/audit-project.md +0 -330
- package/.cursor/commands/consult.md +0 -417
- package/.cursor/commands/debate.md +0 -381
- package/.cursor/commands/delivery-approval.md +0 -334
- package/.cursor/commands/deslop.md +0 -142
- package/.cursor/commands/drift-detect.md +0 -259
- package/.cursor/commands/enhance.md +0 -172
- package/.cursor/commands/learn.md +0 -165
- package/.cursor/commands/next-task.md +0 -519
- package/.cursor/commands/perf.md +0 -464
- package/.cursor/commands/repo-map.md +0 -124
- package/.cursor/commands/ship-ci-review-loop.md +0 -468
- package/.cursor/commands/ship-deployment.md +0 -348
- package/.cursor/commands/ship-error-handling.md +0 -265
- package/.cursor/commands/ship.md +0 -517
- package/.cursor/commands/sync-docs.md +0 -171
- package/.cursor/commands/web-ctl.md +0 -101
- package/.cursor/skills/consult/SKILL.md +0 -425
- package/.cursor/skills/debate/SKILL.md +0 -316
- package/.cursor/skills/deslop/SKILL.md +0 -204
- package/.cursor/skills/discover-tasks/SKILL.md +0 -297
- package/.cursor/skills/drift-analysis/SKILL.md +0 -324
- package/.cursor/skills/enhance-agent-prompts/SKILL.md +0 -277
- package/.cursor/skills/enhance-claude-memory/SKILL.md +0 -387
- package/.cursor/skills/enhance-cross-file/SKILL.md +0 -110
- package/.cursor/skills/enhance-docs/SKILL.md +0 -298
- package/.cursor/skills/enhance-hooks/SKILL.md +0 -554
- package/.cursor/skills/enhance-orchestrator/SKILL.md +0 -255
- package/.cursor/skills/enhance-plugins/SKILL.md +0 -319
- package/.cursor/skills/enhance-prompts/SKILL.md +0 -340
- package/.cursor/skills/enhance-skills/SKILL.md +0 -436
- package/.cursor/skills/learn/SKILL.md +0 -349
- package/.cursor/skills/orchestrate-review/SKILL.md +0 -260
- package/.cursor/skills/perf-analyzer/SKILL.md +0 -37
- package/.cursor/skills/perf-baseline-manager/SKILL.md +0 -30
- package/.cursor/skills/perf-benchmarker/SKILL.md +0 -52
- package/.cursor/skills/perf-code-paths/SKILL.md +0 -32
- package/.cursor/skills/perf-investigation-logger/SKILL.md +0 -41
- package/.cursor/skills/perf-profiler/SKILL.md +0 -42
- package/.cursor/skills/perf-theory-gatherer/SKILL.md +0 -35
- package/.cursor/skills/perf-theory-tester/SKILL.md +0 -36
- package/.cursor/skills/repo-mapping/SKILL.md +0 -83
- package/.cursor/skills/sync-docs/SKILL.md +0 -351
- package/.cursor/skills/validate-delivery/SKILL.md +0 -186
- package/.cursor/skills/web-auth/SKILL.md +0 -177
- package/.cursor/skills/web-browse/SKILL.md +0 -516
- package/.kiro/steering/audit-project-agents.md +0 -459
- package/.kiro/steering/audit-project-github.md +0 -146
- package/.kiro/steering/audit-project.md +0 -330
- package/.kiro/steering/consult.md +0 -422
- package/.kiro/steering/debate.md +0 -386
- package/.kiro/steering/delivery-approval.md +0 -339
- package/.kiro/steering/deslop.md +0 -149
- package/.kiro/steering/drift-detect.md +0 -264
- package/.kiro/steering/enhance.md +0 -177
- package/.kiro/steering/learn.md +0 -166
- package/.kiro/steering/next-task.md +0 -481
- package/.kiro/steering/perf.md +0 -469
- package/.kiro/steering/repo-map.md +0 -126
- package/.kiro/steering/ship-ci-review-loop.md +0 -473
- package/.kiro/steering/ship-deployment.md +0 -353
- package/.kiro/steering/ship-error-handling.md +0 -270
- package/.kiro/steering/ship.md +0 -522
- package/.kiro/steering/sync-docs.md +0 -178
- package/.kiro/steering/web-ctl.md +0 -106
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: enhance-prompts
|
|
3
|
-
description: "Use when improving general prompts for structure, examples, and constraints."
|
|
4
|
-
version: 5.1.0
|
|
5
|
-
argument-hint: "[path] [--fix]"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# enhance-prompts
|
|
9
|
-
|
|
10
|
-
Analyze prompts for clarity, structure, examples, and output reliability.
|
|
11
|
-
|
|
12
|
-
## Parse Arguments
|
|
13
|
-
|
|
14
|
-
```javascript
|
|
15
|
-
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
|
|
16
|
-
const targetPath = args.find(a => !a.startsWith('--')) || '.';
|
|
17
|
-
const fix = args.includes('--fix');
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Differentiation from enhance-agent-prompts
|
|
21
|
-
|
|
22
|
-
| Skill | Focus | Use When |
|
|
23
|
-
|-------|-------|----------|
|
|
24
|
-
| `enhance-prompts` | Prompt quality (clarity, structure, examples) | General prompts, system prompts, templates |
|
|
25
|
-
| `enhance-agent-prompts` | Agent config (frontmatter, tools, model) | Agent files with YAML frontmatter |
|
|
26
|
-
|
|
27
|
-
## Workflow
|
|
28
|
-
|
|
29
|
-
1. **Run Analyzer** - Execute the JavaScript analyzer to get findings:
|
|
30
|
-
```bash
|
|
31
|
-
node -e "const a = require('./lib/enhance/prompt-analyzer.js'); console.log(JSON.stringify(a.analyzeAllPrompts('.'), null, 2));"
|
|
32
|
-
```
|
|
33
|
-
For a specific path: `a.analyzeAllPrompts('./plugins/enhance')`
|
|
34
|
-
For a single file: `a.analyzePrompt('./path/to/file.md')`
|
|
35
|
-
|
|
36
|
-
2. **Parse Results** - The analyzer returns JSON with `summary` and `findings`
|
|
37
|
-
3. **Filter** - Apply certainty filtering based on --verbose flag
|
|
38
|
-
4. **Report** - Format findings as markdown output
|
|
39
|
-
5. **Fix** - If --fix flag, apply auto-fixes from findings
|
|
40
|
-
|
|
41
|
-
The JavaScript analyzer (`lib/enhance/prompt-analyzer.js`) implements all detection patterns including AST-based code validation. The patterns below are reference documentation.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Prompt Engineering Knowledge Reference
|
|
46
|
-
|
|
47
|
-
### System Prompt Structure
|
|
48
|
-
|
|
49
|
-
Effective system prompts include: Role/Identity, Capabilities & Constraints, Instruction Priority, Output Format, Behavioral Directives, Examples, Error Handling.
|
|
50
|
-
|
|
51
|
-
**Minimal Template:**
|
|
52
|
-
```xml
|
|
53
|
-
<system>
|
|
54
|
-
You are [ROLE]. [PURPOSE].
|
|
55
|
-
Key constraints: [CONSTRAINTS]
|
|
56
|
-
Output format: [FORMAT]
|
|
57
|
-
When uncertain: [HANDLING]
|
|
58
|
-
</system>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### XML Tags (Claude-Specific)
|
|
62
|
-
|
|
63
|
-
Claude is fine-tuned for XML tags. Use: `<role>`, `<constraints>`, `<output_format>`, `<examples>`, `<instructions>`, `<context>`
|
|
64
|
-
|
|
65
|
-
```xml
|
|
66
|
-
<constraints>
|
|
67
|
-
- Maximum response length: 500 words
|
|
68
|
-
- Use only Python 3.10+ syntax
|
|
69
|
-
</constraints>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Few-Shot Examples
|
|
73
|
-
|
|
74
|
-
- 2-5 examples is optimal (research-backed)
|
|
75
|
-
- Include edge cases and ensure format consistency
|
|
76
|
-
- Start zero-shot, add examples only if needed
|
|
77
|
-
- Show both good AND bad examples when relevant
|
|
78
|
-
|
|
79
|
-
### Chain-of-Thought (CoT)
|
|
80
|
-
|
|
81
|
-
| Use CoT | Don't Use CoT |
|
|
82
|
-
|---------|---------------|
|
|
83
|
-
| Complex multi-step reasoning | Simple factual questions |
|
|
84
|
-
| Math and logic problems | Classification tasks |
|
|
85
|
-
| Code debugging | When model has built-in reasoning |
|
|
86
|
-
|
|
87
|
-
**Key:** Modern models (Claude 4.x, o1/o3) perform CoT internally. "Think step by step" is redundant.
|
|
88
|
-
|
|
89
|
-
### Role Prompting
|
|
90
|
-
|
|
91
|
-
**Helps:** Creative tasks, tone/style, roleplay
|
|
92
|
-
**Doesn't help:** Accuracy tasks, factual retrieval, complex reasoning
|
|
93
|
-
|
|
94
|
-
Better: "Approach systematically, showing work" vs "You are an expert"
|
|
95
|
-
|
|
96
|
-
### Instruction Hierarchy
|
|
97
|
-
|
|
98
|
-
Priority: System > Developer > User > Retrieved Content
|
|
99
|
-
|
|
100
|
-
Include explicit priority in prompts with multiple constraint sources.
|
|
101
|
-
|
|
102
|
-
### Negative Prompting
|
|
103
|
-
|
|
104
|
-
Positive alternatives are more effective than negatives:
|
|
105
|
-
|
|
106
|
-
| Less Effective | More Effective |
|
|
107
|
-
|----------------|----------------|
|
|
108
|
-
| "Don't use markdown" | "Use prose paragraphs" |
|
|
109
|
-
| "Don't be vague" | "Use specific language" |
|
|
110
|
-
|
|
111
|
-
### Structured Output
|
|
112
|
-
|
|
113
|
-
- Prompt-based: ~35.9% reliability
|
|
114
|
-
- Schema enforcement: 100% reliability
|
|
115
|
-
- Always provide schema example and validate output
|
|
116
|
-
|
|
117
|
-
### Context Window Optimization
|
|
118
|
-
|
|
119
|
-
**Lost-in-the-Middle:** Models weigh beginning and end more heavily.
|
|
120
|
-
|
|
121
|
-
Place critical constraints at start, examples in middle, error handling at end.
|
|
122
|
-
|
|
123
|
-
### Extended Thinking
|
|
124
|
-
|
|
125
|
-
High-level instructions ("Think deeply") outperform step-by-step guidance. "Think step-by-step" is redundant with modern models.
|
|
126
|
-
|
|
127
|
-
### Anti-Patterns Quick Reference
|
|
128
|
-
|
|
129
|
-
| Anti-Pattern | Problem | Fix |
|
|
130
|
-
|--------------|---------|-----|
|
|
131
|
-
| Vague references | "The above code" loses context | Quote specifically |
|
|
132
|
-
| Negative-only | "Don't do X" without alternative | State what TO do |
|
|
133
|
-
| Aggressive emphasis | "CRITICAL: MUST" | Use normal language |
|
|
134
|
-
| Redundant CoT | Wastes tokens | Let model manage |
|
|
135
|
-
| Critical info buried | Lost-in-the-middle | Place at start/end |
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Detection Patterns
|
|
140
|
-
|
|
141
|
-
### 1. Clarity Issues (HIGH Certainty)
|
|
142
|
-
|
|
143
|
-
**Vague Instructions:** "usually", "sometimes", "try to", "if possible", "might", "could"
|
|
144
|
-
|
|
145
|
-
**Negative-Only Constraints:** "don't", "never", "avoid" without stating what TO do
|
|
146
|
-
|
|
147
|
-
**Aggressive Emphasis:** Excessive CAPS (CRITICAL, IMPORTANT), multiple !!
|
|
148
|
-
|
|
149
|
-
### 2. Structure Issues (HIGH/MEDIUM Certainty)
|
|
150
|
-
|
|
151
|
-
**Missing XML Structure:** Complex prompts (>800 tokens) without XML tags
|
|
152
|
-
|
|
153
|
-
**Inconsistent Sections:** Mixed heading styles, skipped levels (H1→H3)
|
|
154
|
-
|
|
155
|
-
**Critical Info Buried:** Important instructions in middle 40%, constraints after examples
|
|
156
|
-
|
|
157
|
-
### 3. Example Issues (HIGH/MEDIUM Certainty)
|
|
158
|
-
|
|
159
|
-
**Missing Examples:** Complex tasks without few-shot, format requests without example
|
|
160
|
-
|
|
161
|
-
**Suboptimal Count:** Only 1 example (optimal: 2-5), more than 7 (bloat)
|
|
162
|
-
|
|
163
|
-
**Missing Contrast:** No good/bad labeling, no edge cases
|
|
164
|
-
|
|
165
|
-
### 4. Context Issues (MEDIUM Certainty)
|
|
166
|
-
|
|
167
|
-
**Missing WHY:** Rules without explanation
|
|
168
|
-
|
|
169
|
-
**Missing Priority:** Multiple constraint sections without conflict resolution
|
|
170
|
-
|
|
171
|
-
### 5. Output Format Issues (HIGH/MEDIUM Certainty)
|
|
172
|
-
|
|
173
|
-
**Missing Format:** Substantial prompts without format specification
|
|
174
|
-
|
|
175
|
-
**JSON Without Schema:** Requests JSON but no example structure
|
|
176
|
-
|
|
177
|
-
### 6. Anti-Patterns (HIGH/MEDIUM/LOW Certainty)
|
|
178
|
-
|
|
179
|
-
**Redundant CoT (HIGH):** "Think step by step" with modern models
|
|
180
|
-
|
|
181
|
-
**Overly Prescriptive (MEDIUM):** 10+ numbered steps, micro-managing reasoning
|
|
182
|
-
|
|
183
|
-
**Prompt Bloat (LOW):** Over 2500 tokens, redundant instructions
|
|
184
|
-
|
|
185
|
-
**Vague References (HIGH):** "The above code", "as mentioned"
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Auto-Fix Implementations
|
|
190
|
-
|
|
191
|
-
### 1. Aggressive Emphasis
|
|
192
|
-
Replace CRITICAL→critical, !!→!, remove excessive caps
|
|
193
|
-
|
|
194
|
-
### 2. Negative-Only to Positive
|
|
195
|
-
Suggest positive alternatives for "don't" statements
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
## Output Format
|
|
200
|
-
|
|
201
|
-
```markdown
|
|
202
|
-
## Prompt Analysis: {prompt-name}
|
|
203
|
-
|
|
204
|
-
**File**: {path}
|
|
205
|
-
**Type**: {system|agent|skill|template}
|
|
206
|
-
**Token Count**: ~{tokens}
|
|
207
|
-
|
|
208
|
-
### Summary
|
|
209
|
-
- HIGH: {count} issues
|
|
210
|
-
- MEDIUM: {count} issues
|
|
211
|
-
|
|
212
|
-
### Clarity Issues ({n})
|
|
213
|
-
| Issue | Location | Fix | Certainty |
|
|
214
|
-
|
|
215
|
-
### Structure Issues ({n})
|
|
216
|
-
| Issue | Location | Fix | Certainty |
|
|
217
|
-
|
|
218
|
-
### Example Issues ({n})
|
|
219
|
-
| Issue | Location | Fix | Certainty |
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Pattern Statistics
|
|
225
|
-
|
|
226
|
-
| Category | Patterns | Auto-Fixable |
|
|
227
|
-
|----------|----------|--------------|
|
|
228
|
-
| Clarity | 4 | 1 |
|
|
229
|
-
| Structure | 4 | 0 |
|
|
230
|
-
| Examples | 4 | 0 |
|
|
231
|
-
| Context | 2 | 0 |
|
|
232
|
-
| Output Format | 3 | 0 |
|
|
233
|
-
| Anti-Pattern | 4 | 0 |
|
|
234
|
-
| **Total** | **21** | **1** |
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
<examples>
|
|
239
|
-
### Example: Vague Instructions
|
|
240
|
-
|
|
241
|
-
<bad_example>
|
|
242
|
-
```markdown
|
|
243
|
-
You should usually follow best practices when possible.
|
|
244
|
-
```
|
|
245
|
-
**Why it's bad**: Vague qualifiers reduce determinism.
|
|
246
|
-
</bad_example>
|
|
247
|
-
|
|
248
|
-
<good_example>
|
|
249
|
-
```markdown
|
|
250
|
-
Follow these practices:
|
|
251
|
-
1. Validate input before processing
|
|
252
|
-
2. Handle null/undefined explicitly
|
|
253
|
-
```
|
|
254
|
-
**Why it's good**: Specific, actionable instructions.
|
|
255
|
-
</good_example>
|
|
256
|
-
|
|
257
|
-
### Example: Negative-Only Constraints
|
|
258
|
-
|
|
259
|
-
<bad_example>
|
|
260
|
-
```markdown
|
|
261
|
-
- Don't use vague language
|
|
262
|
-
- Never skip validation
|
|
263
|
-
```
|
|
264
|
-
**Why it's bad**: Only states what NOT to do.
|
|
265
|
-
</bad_example>
|
|
266
|
-
|
|
267
|
-
<good_example>
|
|
268
|
-
```markdown
|
|
269
|
-
- Use specific, deterministic language
|
|
270
|
-
- Always validate input; return structured errors
|
|
271
|
-
```
|
|
272
|
-
**Why it's good**: Each constraint includes positive action.
|
|
273
|
-
</good_example>
|
|
274
|
-
|
|
275
|
-
### Example: Redundant Chain-of-Thought
|
|
276
|
-
|
|
277
|
-
<bad_example>
|
|
278
|
-
```markdown
|
|
279
|
-
Think through this step by step:
|
|
280
|
-
1. First, analyze the input
|
|
281
|
-
2. Then, identify the key elements
|
|
282
|
-
```
|
|
283
|
-
**Why it's bad**: Modern models do this internally. Wastes tokens.
|
|
284
|
-
</bad_example>
|
|
285
|
-
|
|
286
|
-
<good_example>
|
|
287
|
-
```markdown
|
|
288
|
-
Analyze the input carefully before responding.
|
|
289
|
-
```
|
|
290
|
-
**Why it's good**: High-level guidance without micro-managing.
|
|
291
|
-
</good_example>
|
|
292
|
-
|
|
293
|
-
### Example: Missing Output Format
|
|
294
|
-
|
|
295
|
-
<bad_example>
|
|
296
|
-
```markdown
|
|
297
|
-
Respond with a JSON object containing the analysis results.
|
|
298
|
-
```
|
|
299
|
-
**Why it's bad**: No schema or example.
|
|
300
|
-
</bad_example>
|
|
301
|
-
|
|
302
|
-
<good_example>
|
|
303
|
-
```markdown
|
|
304
|
-
## Output Format
|
|
305
|
-
{"status": "success|error", "findings": [{"severity": "HIGH"}]}
|
|
306
|
-
```
|
|
307
|
-
**Why it's good**: Concrete schema shows exact structure.
|
|
308
|
-
</good_example>
|
|
309
|
-
|
|
310
|
-
### Example: Critical Info Buried
|
|
311
|
-
|
|
312
|
-
<bad_example>
|
|
313
|
-
```markdown
|
|
314
|
-
# Task
|
|
315
|
-
[task]
|
|
316
|
-
## Background
|
|
317
|
-
[500 words...]
|
|
318
|
-
## Important Constraints <- buried at end
|
|
319
|
-
```
|
|
320
|
-
**Why it's bad**: Lost-in-the-middle effect.
|
|
321
|
-
</bad_example>
|
|
322
|
-
|
|
323
|
-
<good_example>
|
|
324
|
-
```markdown
|
|
325
|
-
# Task
|
|
326
|
-
## Critical Constraints <- at start
|
|
327
|
-
[constraints]
|
|
328
|
-
## Background
|
|
329
|
-
```
|
|
330
|
-
**Why it's good**: Critical info at start where attention is highest.
|
|
331
|
-
</good_example>
|
|
332
|
-
</examples>
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
## Constraints
|
|
337
|
-
|
|
338
|
-
- Only apply auto-fixes for HIGH certainty issues
|
|
339
|
-
- Preserve original structure and formatting
|
|
340
|
-
- Validate against embedded knowledge reference above
|