helloagents 1.0.0 → 2.2.7
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/LICENSE.md +51 -0
- package/README.md +440 -840
- package/bin/cli.mjs +106 -0
- package/package.json +23 -38
- package/Claude/Skills/CN/CLAUDE.md +0 -998
- package/Claude/Skills/CN/skills/helloagents/analyze/SKILL.md +0 -187
- package/Claude/Skills/CN/skills/helloagents/design/SKILL.md +0 -261
- package/Claude/Skills/CN/skills/helloagents/develop/SKILL.md +0 -352
- package/Claude/Skills/CN/skills/helloagents/kb/SKILL.md +0 -249
- package/Claude/Skills/CN/skills/helloagents/templates/SKILL.md +0 -451
- package/Claude/Skills/EN/CLAUDE.md +0 -998
- package/Claude/Skills/EN/skills/helloagents/analyze/SKILL.md +0 -187
- package/Claude/Skills/EN/skills/helloagents/design/SKILL.md +0 -261
- package/Claude/Skills/EN/skills/helloagents/develop/SKILL.md +0 -352
- package/Claude/Skills/EN/skills/helloagents/kb/SKILL.md +0 -249
- package/Claude/Skills/EN/skills/helloagents/templates/SKILL.md +0 -451
- package/Codex/Skills/CN/AGENTS.md +0 -998
- package/Codex/Skills/CN/skills/helloagents/analyze/SKILL.md +0 -187
- package/Codex/Skills/CN/skills/helloagents/design/SKILL.md +0 -261
- package/Codex/Skills/CN/skills/helloagents/develop/SKILL.md +0 -352
- package/Codex/Skills/CN/skills/helloagents/kb/SKILL.md +0 -249
- package/Codex/Skills/CN/skills/helloagents/templates/SKILL.md +0 -451
- package/Codex/Skills/EN/AGENTS.md +0 -998
- package/Codex/Skills/EN/skills/helloagents/analyze/SKILL.md +0 -187
- package/Codex/Skills/EN/skills/helloagents/design/SKILL.md +0 -261
- package/Codex/Skills/EN/skills/helloagents/develop/SKILL.md +0 -352
- package/Codex/Skills/EN/skills/helloagents/kb/SKILL.md +0 -249
- package/Codex/Skills/EN/skills/helloagents/templates/SKILL.md +0 -451
- package/bin/cli.js +0 -85
- package/lib/args.js +0 -106
- package/lib/backup.js +0 -81
- package/lib/conflict.js +0 -118
- package/lib/copy.js +0 -125
- package/lib/defaults.js +0 -47
- package/lib/index.js +0 -297
- package/lib/output.js +0 -220
- package/lib/prompts.js +0 -173
- package/lib/utils.js +0 -225
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: develop
|
|
3
|
-
description: Development implementation phase detailed rules; read when entering development implementation; includes execution flow, code specifications, consistency audit, solution package migration
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Development Implementation - Detailed Rules
|
|
7
|
-
|
|
8
|
-
**Goal:** Execute code changes per task list in solution package, synchronize knowledge base updates, migrate to history/
|
|
9
|
-
|
|
10
|
-
**Prerequisites:** Solution package exists in `plan/` directory awaiting execution
|
|
11
|
-
|
|
12
|
-
**Backup Protection:** Recommend creating Git backup branch or manually backing up code directory before execution
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Mandatory Pre-entry Check
|
|
17
|
-
|
|
18
|
-
<p3_entry_gate>
|
|
19
|
-
**Description:** Even if routing determines entering development implementation, this check still verifies legitimacy (double insurance)
|
|
20
|
-
|
|
21
|
-
**Sole Legal Conditions for Development Implementation (meet any):**
|
|
22
|
-
|
|
23
|
-
```yaml
|
|
24
|
-
Condition A - Confirmation after solution design complete:
|
|
25
|
-
Verification method: Previous AI output in conversation history was solution design complete AND current user input is explicit confirmation
|
|
26
|
-
|
|
27
|
-
Condition B - Full authorization command:
|
|
28
|
-
Verification method: MODE_FULL_AUTH status=true
|
|
29
|
-
|
|
30
|
-
Condition C - Execution command:
|
|
31
|
-
Verification method: MODE_EXECUTION status=true
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Verification Failure Handling:**
|
|
35
|
-
```
|
|
36
|
-
IF doesn't meet any condition:
|
|
37
|
-
Output: "❌ Routing Error: Entering development implementation requires meeting prerequisites. Current conditions not met, re-routed."
|
|
38
|
-
Execute: Re-determine current user message per routing priority
|
|
39
|
-
Terminate: Development implementation flow
|
|
40
|
-
```
|
|
41
|
-
</p3_entry_gate>
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Execution Steps
|
|
46
|
-
|
|
47
|
-
**Important:** All file operations follow G5 silent execution specification
|
|
48
|
-
|
|
49
|
-
### Step 1: Determine Solution Package to Execute
|
|
50
|
-
|
|
51
|
-
```yaml
|
|
52
|
-
Full authorization command (MODE_FULL_AUTH=true):
|
|
53
|
-
- Read CREATED_PACKAGE variable (solution package path set during solution design phase)
|
|
54
|
-
- Check if solution package exists and is complete
|
|
55
|
-
- Exists and complete → Use this solution package, set CURRENT_PACKAGE = CREATED_PACKAGE
|
|
56
|
-
- Doesn't exist or incomplete → Output error format per G6.2 and stop
|
|
57
|
-
- Ignore other legacy solution packages in plan/
|
|
58
|
-
|
|
59
|
-
Interactive confirmation mode/Execution command (MODE_EXECUTION=true):
|
|
60
|
-
- Scan all solution packages under plan/ directory
|
|
61
|
-
- No solution package exists → Output error format per G6.2 and stop
|
|
62
|
-
- Solution package incomplete → Output error format per G6.2 and stop
|
|
63
|
-
- Single complete solution package → Set CURRENT_PACKAGE, continue execution
|
|
64
|
-
- Multiple solution packages → List inventory, wait for user selection
|
|
65
|
-
- User enters valid number (1-N) → Set CURRENT_PACKAGE, continue execution
|
|
66
|
-
- User enters cancel/refuse → Output cancellation format per G6.2, flow terminates
|
|
67
|
-
- Invalid input → Ask again
|
|
68
|
-
|
|
69
|
-
Exception output examples:
|
|
70
|
-
Solution package doesn't exist:
|
|
71
|
-
```
|
|
72
|
-
❌【HelloAGENTS】- Execution Error
|
|
73
|
-
|
|
74
|
-
Error: No executable solution package found
|
|
75
|
-
- Cause: plan/ directory is empty or doesn't exist
|
|
76
|
-
|
|
77
|
-
────
|
|
78
|
-
🔄 Next Steps: Please create solution using ~plan command first, or enter solution design phase
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Solution package incomplete:
|
|
82
|
-
```
|
|
83
|
-
❌【HelloAGENTS】- Execution Error
|
|
84
|
-
|
|
85
|
-
Error: Solution package incomplete
|
|
86
|
-
- Solution package: [solution package name]
|
|
87
|
-
- Missing files: [why.md/how.md/task.md]
|
|
88
|
-
|
|
89
|
-
────
|
|
90
|
-
🔄 Next Steps: Please supplement missing files or recreate solution package
|
|
91
|
-
```
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Step 2: Check Knowledge Base Status and Handle
|
|
95
|
-
|
|
96
|
-
Execution method:
|
|
97
|
-
- Determine per G10 quick decision tree
|
|
98
|
-
- If need to create/rebuild knowledge base → Read `kb` Skill to execute complete flow
|
|
99
|
-
|
|
100
|
-
### Step 3: Read Knowledge Base and Acquire Project Context
|
|
101
|
-
|
|
102
|
-
Execution method:
|
|
103
|
-
- Execute per G10 quick flow (check knowledge base first → scan codebase if insufficient)
|
|
104
|
-
- If need detailed rules → Read `kb` Skill
|
|
105
|
-
|
|
106
|
-
### Step 4: Read Current Solution Package
|
|
107
|
-
|
|
108
|
-
Read `plan/YYYYMMDDHHMM_<feature>/task.md` and `why.md`
|
|
109
|
-
|
|
110
|
-
### Step 5: Execute Code Changes Per Task List
|
|
111
|
-
|
|
112
|
-
```yaml
|
|
113
|
-
Execution rules:
|
|
114
|
-
- Strictly execute item by item per task.md
|
|
115
|
-
|
|
116
|
-
Task success handling:
|
|
117
|
-
- After each task executes successfully, immediately update status from [ ] to [√]
|
|
118
|
-
|
|
119
|
-
Task skip handling (status update to [-]):
|
|
120
|
-
- Prerequisite tasks this task depends on failed
|
|
121
|
-
- Task conditions not met
|
|
122
|
-
- Task already covered by other task implementations
|
|
123
|
-
|
|
124
|
-
Task failure handling (status update to [X]):
|
|
125
|
-
- Record error information (for adding notes before migration)
|
|
126
|
-
- Continue executing subsequent tasks
|
|
127
|
-
- After all tasks complete, if failures exist:
|
|
128
|
-
- Interactive confirmation mode/Execution command: List failure inventory, ask user decision
|
|
129
|
-
- User chooses continue → Continue subsequent steps
|
|
130
|
-
- User chooses terminate → Output "Terminated development implementation", flow terminates
|
|
131
|
-
- Full authorization command: List failed tasks in summary, clear MODE_FULL_AUTH status
|
|
132
|
-
|
|
133
|
-
Code editing techniques:
|
|
134
|
-
- Large file handling (≥2000 lines): Grep locate → Read(offset,limit) → Edit precise modification
|
|
135
|
-
- Each Edit only modifies single function/class
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Step 6: Code Security Check
|
|
139
|
-
|
|
140
|
-
Check content:
|
|
141
|
-
- Unsafe patterns (eval, exec, SQL concatenation, etc.)
|
|
142
|
-
- Hardcoded sensitive information
|
|
143
|
-
- EHRB risk avoidance
|
|
144
|
-
|
|
145
|
-
### Step 7: Quality Check and Testing
|
|
146
|
-
|
|
147
|
-
```yaml
|
|
148
|
-
Test execution: Run test tasks defined in task.md, or project's existing test suite
|
|
149
|
-
|
|
150
|
-
Test failure handling rules (strictly enforce):
|
|
151
|
-
⛔ Blocking tests (core functionality):
|
|
152
|
-
- Failure MUST immediately stop execution
|
|
153
|
-
- Output critical error format
|
|
154
|
-
- Wait for user explicit decision (fix/skip/terminate)
|
|
155
|
-
- Prohibit auto-skip
|
|
156
|
-
|
|
157
|
-
⚠️ Warning tests (important functionality):
|
|
158
|
-
- Mark in summary when failed
|
|
159
|
-
- Continue executing subsequent steps
|
|
160
|
-
|
|
161
|
-
ℹ️ Informational tests (secondary functionality):
|
|
162
|
-
- Record in summary when failed
|
|
163
|
-
- Continue executing subsequent steps
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**⛔Blocking Test Failure Output Format:**
|
|
167
|
-
```
|
|
168
|
-
❌【HelloAGENTS】- Blocking Test Failure
|
|
169
|
-
|
|
170
|
-
⛔ Core functionality test failed, must handle before continuing:
|
|
171
|
-
- Failed test: [test name]
|
|
172
|
-
- Error message: [error summary]
|
|
173
|
-
|
|
174
|
-
[1] Fix and retry - Attempt to fix issue then retest
|
|
175
|
-
[2] Skip and continue - At your own risk, ignore this error and continue execution
|
|
176
|
-
[3] Terminate execution - Stop development implementation
|
|
177
|
-
|
|
178
|
-
────
|
|
179
|
-
🔄 Next Steps: Please enter number to choose
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Step 8: Synchronize Update Knowledge Base
|
|
183
|
-
|
|
184
|
-
**Important:** MUST complete solution package content reading before step 12 migrates solution package
|
|
185
|
-
|
|
186
|
-
Execution method: Read `kb` Skill to execute complete knowledge base synchronization rules
|
|
187
|
-
|
|
188
|
-
### Step 9: Update CHANGELOG.md
|
|
189
|
-
|
|
190
|
-
Determine version number per G7 version management rules
|
|
191
|
-
|
|
192
|
-
### Step 10: Consistency Audit
|
|
193
|
-
|
|
194
|
-
<consistency_audit>
|
|
195
|
-
**Audit Timing:** Execute immediately after P3 phase completes knowledge base operations
|
|
196
|
-
|
|
197
|
-
**Audit Content:**
|
|
198
|
-
1. **Completeness**: Documentation covers all modules, essential files and charts complete
|
|
199
|
-
2. **Consistency**: APIs/data models consistent with code, no omissions, duplicates, dead links
|
|
200
|
-
|
|
201
|
-
**Reality Priority (conflict resolution mechanism):**
|
|
202
|
-
```
|
|
203
|
-
1. Code is sole source of execution reality (Ground Truth)
|
|
204
|
-
→ Runtime behavior, API signatures, data structures based on code
|
|
205
|
-
|
|
206
|
-
2. Default correction direction: Correct knowledge base to conform to code
|
|
207
|
-
→ When inconsistency discovered, MUST update documentation to reflect code's objective facts
|
|
208
|
-
|
|
209
|
-
3. Exceptions (correct code):
|
|
210
|
-
- Knowledge base is recent P2/P3 solution package (just designed solution)
|
|
211
|
-
- Code has obvious errors (Bug)
|
|
212
|
-
- Error information points to code issue
|
|
213
|
-
|
|
214
|
-
4. When in doubt: Bidirectional verification, prioritize trusting most recent code changes
|
|
215
|
-
```
|
|
216
|
-
</consistency_audit>
|
|
217
|
-
|
|
218
|
-
### Step 11: Code Quality Check (Optional)
|
|
219
|
-
|
|
220
|
-
```yaml
|
|
221
|
-
Execution content: Analyze code files, identify quality issues
|
|
222
|
-
|
|
223
|
-
If issues found:
|
|
224
|
-
Interactive confirmation mode:
|
|
225
|
-
- Output optimization suggestion inquiry format
|
|
226
|
-
- User confirms → Execute optimization, update documentation, retest
|
|
227
|
-
- User refuses → Skip optimization, continue subsequent steps
|
|
228
|
-
Full authorization command/Execution command:
|
|
229
|
-
- List suggestions in summary (don't execute)
|
|
230
|
-
|
|
231
|
-
Commit association: Execute per project specifications if commit needed
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
**Code Quality Optimization Suggestion Inquiry Format:**
|
|
235
|
-
```
|
|
236
|
-
❓【HelloAGENTS】- Code Quality
|
|
237
|
-
|
|
238
|
-
Found following optimizable items:
|
|
239
|
-
1. [Optimization suggestion 1] - [Impact scope/files]
|
|
240
|
-
2. [Optimization suggestion 2] - [Impact scope/files]
|
|
241
|
-
|
|
242
|
-
[1] Execute optimization - Apply above optimization suggestions
|
|
243
|
-
[2] Skip - Keep current state, continue subsequent steps
|
|
244
|
-
|
|
245
|
-
────
|
|
246
|
-
🔄 Next Steps: Please enter number to choose
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Step 12: Migrate Executed Solution Package to history/
|
|
250
|
-
|
|
251
|
-
<plan_migration>
|
|
252
|
-
|
|
253
|
-
⚠️ **CRITICAL - Mandatory Enforcement Rules:**
|
|
254
|
-
|
|
255
|
-
**Cannot skip:** This step is atomic operation at end of this phase
|
|
256
|
-
|
|
257
|
-
**Execution Rules:**
|
|
258
|
-
|
|
259
|
-
1. Update task.md task status and notes:
|
|
260
|
-
- All tasks update to actual execution results ([√]/[X]/[-]/[?])
|
|
261
|
-
- Add notes below non-[√] status tasks (format: `> Note: [reason]`)
|
|
262
|
-
- If multiple failed/skipped tasks, can add execution summary section at end
|
|
263
|
-
|
|
264
|
-
2. Migrate to history directory:
|
|
265
|
-
- Move solution package directory from plan/ to under history/YYYY-MM/
|
|
266
|
-
- YYYY-MM extracted from solution package directory name (e.g., 202511201200_xxx → 2025-11)
|
|
267
|
-
- Complete path after migration: history/YYYY-MM/YYYYMMDDHHMM_<feature>/
|
|
268
|
-
- Migration operation automatically deletes source directory under plan/
|
|
269
|
-
- Name conflict handling: Force overwrite old solution package in history/
|
|
270
|
-
|
|
271
|
-
3. Update history index: `history/index.md`
|
|
272
|
-
|
|
273
|
-
**Warning:** This operation will invalidate source file paths under plan/, ensure step 8 has completed content reading
|
|
274
|
-
**Cannot skip:** This step is atomic operation at end of this phase
|
|
275
|
-
</plan_migration>
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
## Code Specification Requirements
|
|
280
|
-
|
|
281
|
-
<code_standards>
|
|
282
|
-
**Applicable Scope:** All code changes in P3 phase
|
|
283
|
-
|
|
284
|
-
**Specification Requirements:**
|
|
285
|
-
- **File top comments:** Before import statements, project's existing comment style, 1-3 sentences explaining module purpose
|
|
286
|
-
- **All code comments:** MUST be generated in {OUTPUT_LANGUAGE}
|
|
287
|
-
- **Code style:** Follow project's existing naming conventions and format specifications
|
|
288
|
-
</code_standards>
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## Development Implementation Output Format
|
|
293
|
-
|
|
294
|
-
⚠️ **CRITICAL - Mandatory Requirements:**
|
|
295
|
-
- ALWAYS use G6.1 unified output format
|
|
296
|
-
- NEVER use free text to replace standard format
|
|
297
|
-
- MUST verify format completeness before output
|
|
298
|
-
|
|
299
|
-
### When Waiting for User to Select Solution Package (step 1 multiple solution packages)
|
|
300
|
-
|
|
301
|
-
```
|
|
302
|
-
❓【HelloAGENTS】- Development Implementation
|
|
303
|
-
|
|
304
|
-
Detected multiple solution packages, please select execution target:
|
|
305
|
-
|
|
306
|
-
[1] YYYYMMDDHHMM_<feature1> - [Overview description]
|
|
307
|
-
[2] YYYYMMDDHHMM_<feature2> - [Overview description]
|
|
308
|
-
[3] YYYYMMDDHHMM_<feature3> - [Overview description]
|
|
309
|
-
|
|
310
|
-
────
|
|
311
|
-
🔄 Next Steps: Please enter solution package number (1/2/3)
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### When Phase Complete
|
|
315
|
-
|
|
316
|
-
Strictly call G6.1 unified output format, fill following data:
|
|
317
|
-
|
|
318
|
-
1. **Phase Name:** `Development Implementation`
|
|
319
|
-
2. **Phase Specific Content (≤5 key points):**
|
|
320
|
-
- 📚 Knowledge base status
|
|
321
|
-
- ✅ Execution result: Task count and status statistics
|
|
322
|
-
- 🔍 Quality verification: Consistency audit, test results
|
|
323
|
-
- 💡 Code quality optimization suggestions (if any)
|
|
324
|
-
- 📦 Migration info: Migrated to `history/YYYY-MM/YYYYMMDDHHMM_<feature>/`
|
|
325
|
-
3. **File Change List:**
|
|
326
|
-
```
|
|
327
|
-
📁 Changes:
|
|
328
|
-
- {code files}
|
|
329
|
-
- {knowledge base files}
|
|
330
|
-
- helloagents/CHANGELOG.md
|
|
331
|
-
- helloagents/history/index.md
|
|
332
|
-
...
|
|
333
|
-
```
|
|
334
|
-
4. **Next Step Suggestions:** "Please confirm if implementation results meet expectations?"
|
|
335
|
-
5. **Legacy Solution Reminder:** Scan plan/ directory per G11, display if legacy solution packages exist
|
|
336
|
-
|
|
337
|
-
---
|
|
338
|
-
|
|
339
|
-
## Phase Transition Rules
|
|
340
|
-
|
|
341
|
-
```yaml
|
|
342
|
-
After completing all actions:
|
|
343
|
-
Interactive confirmation mode: Output summary → Development implementation ends
|
|
344
|
-
Full authorization command: Output overall summary → Flow ends
|
|
345
|
-
Execution command: Output overall summary → Flow ends
|
|
346
|
-
Variable cleanup: CURRENT_PACKAGE will automatically clean during legacy solution scan (per G11 rules)
|
|
347
|
-
|
|
348
|
-
Exceptional situations (test failures/user raises issues):
|
|
349
|
-
Interactive confirmation mode: Mark in output, wait for user decision
|
|
350
|
-
Full authorization command/Execution command: Mark test failure in summary, flow ends normally
|
|
351
|
-
Subsequent user messages handled per routing priority
|
|
352
|
-
```
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: kb
|
|
3
|
-
description: Complete knowledge base management rules; read when ~init command or knowledge base missing; includes creation, synchronization, audit, context acquisition rules
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Knowledge Base Management - Complete Rules
|
|
7
|
-
|
|
8
|
-
## Knowledge Base Architecture
|
|
9
|
-
|
|
10
|
-
**File Structure:**
|
|
11
|
-
```plaintext
|
|
12
|
-
helloagents/ # HelloAGENTS workspace (SSOT)
|
|
13
|
-
├── CHANGELOG.md # Version history (Keep a Changelog)
|
|
14
|
-
├── project.md # Technical conventions
|
|
15
|
-
├── wiki/ # Core documentation
|
|
16
|
-
│ ├── overview.md # Project overview
|
|
17
|
-
│ ├── arch.md # Architecture design
|
|
18
|
-
│ ├── api.md # API manual
|
|
19
|
-
│ ├── data.md # Data models
|
|
20
|
-
│ └── modules/<module>.md
|
|
21
|
-
├── plan/ # Change workspace
|
|
22
|
-
│ └── YYYYMMDDHHMM_<feature>/
|
|
23
|
-
│ ├── why.md # Change proposal
|
|
24
|
-
│ ├── how.md # Technical design
|
|
25
|
-
│ └── task.md # Task list
|
|
26
|
-
└── history/ # Completed changes archive
|
|
27
|
-
├── index.md
|
|
28
|
-
└── YYYY-MM/YYYYMMDDHHMM_<feature>/
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Path Conventions:**
|
|
32
|
-
- In this ruleset, `plan/`, `wiki/`, `history/` all refer to complete paths under `helloagents/`
|
|
33
|
-
- All knowledge base files MUST be created under the `helloagents/` directory
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Core Terminology Details
|
|
38
|
-
|
|
39
|
-
- **SSOT** (Single Source of Truth): Single source of truth (knowledge level), refers to knowledge base
|
|
40
|
-
- *Note:* When SSOT conflicts with code, SSOT is considered "outdated" and needs updating based on code (execution facts)
|
|
41
|
-
- **Knowledge Base**: Complete project documentation collection (`CHANGELOG.md`, `project.md`, `wiki/*`)
|
|
42
|
-
- **EHRB** (Extreme High-Risk Behavior): Extreme high-risk behavior
|
|
43
|
-
- **ADR** (Architecture Decision Record): Architecture decision record
|
|
44
|
-
- **MRE** (Minimal Reproducible Example): Minimal reproducible example
|
|
45
|
-
- **Solution Package**: Complete solution unit
|
|
46
|
-
- **Directory structure**: `YYYYMMDDHHMM_<feature>/`
|
|
47
|
-
- **Required files**: `why.md` + `how.md` + `task.md`
|
|
48
|
-
- **Completeness check**: Required files exist, non-empty, task.md has at least 1 task item
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Quality Check Dimensions
|
|
53
|
-
|
|
54
|
-
1. **Completeness**: Whether required files and sections exist
|
|
55
|
-
2. **Format**: Whether Mermaid charts/Markdown format is correct
|
|
56
|
-
3. **Consistency**: Whether API signatures/data models consistent with code
|
|
57
|
-
4. **Security**: Whether contains sensitive information (keys/PII)
|
|
58
|
-
|
|
59
|
-
**Issue Grading:**
|
|
60
|
-
- **Minor** (can continue): Missing non-critical files, non-standard format, outdated descriptions
|
|
61
|
-
- **Severe** (needs handling): Core files missing, seriously out of sync (>30%), contains sensitive information
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Project Context Acquisition Strategy
|
|
66
|
-
|
|
67
|
-
<context_acquisition_rules>
|
|
68
|
-
**Step 1: Check knowledge base first (if exists)**
|
|
69
|
-
- Core files: `project.md`, `wiki/overview.md`, `wiki/arch.md`
|
|
70
|
-
- Select as needed: `wiki/modules/<module>.md`, `wiki/api.md`, `wiki/data.md`
|
|
71
|
-
|
|
72
|
-
**Step 2: Knowledge base doesn't exist/insufficient info → Comprehensive codebase scan**
|
|
73
|
-
- Use Glob to get file structure
|
|
74
|
-
- Use Grep to search key information
|
|
75
|
-
- Acquire: Architecture, tech stack, module structure, technical constraints
|
|
76
|
-
</context_acquisition_rules>
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Knowledge Base Synchronization Rules
|
|
81
|
-
|
|
82
|
-
<kb_sync_rules>
|
|
83
|
-
**Trigger Timing:** After code changes, MUST immediately synchronize knowledge base updates
|
|
84
|
-
|
|
85
|
-
**Step 1 - Module Specification Update:**
|
|
86
|
-
- Read current solution package `plan/YYYYMMDDHHMM_<feature>/why.md` **Core Scenarios** section (read before migration)
|
|
87
|
-
- Extract requirements and scenarios (requirements need to mark owning module)
|
|
88
|
-
- Update `wiki/modules/<module>.md` **Specifications** section
|
|
89
|
-
- Does not exist → Append
|
|
90
|
-
- Already exists → Update
|
|
91
|
-
|
|
92
|
-
**Step 2 - Update by Change Type:**
|
|
93
|
-
- API changes → Update `wiki/api.md`
|
|
94
|
-
- Data model changes → Update `wiki/data.md`
|
|
95
|
-
- Architecture changes/new modules → Update `wiki/arch.md`
|
|
96
|
-
- Module index changes → Update `wiki/overview.md`
|
|
97
|
-
- Technical convention changes → Update `project.md`
|
|
98
|
-
|
|
99
|
-
**Step 3 - ADR Maintenance (if includes architecture decisions):**
|
|
100
|
-
- Extract ADR information (read from `plan/YYYYMMDDHHMM_<feature>/how.md` **Architecture Decision ADR** section before migration)
|
|
101
|
-
- Append to **Major Architecture Decisions** table in `wiki/arch.md`
|
|
102
|
-
- Link to `history/YYYY-MM/YYYYMMDDHHMM_<feature>/how.md#adr-xxx`
|
|
103
|
-
- **Note:** The history/ link written at this time is a pre-calculated path
|
|
104
|
-
|
|
105
|
-
**Step 4 - Cleanup:**
|
|
106
|
-
- Delete outdated information, deprecated APIs, removed modules
|
|
107
|
-
|
|
108
|
-
**Step 5 - Defect Retrospective (fix scenario specific):**
|
|
109
|
-
- Add "Known Issues" or "Notes" in module documentation
|
|
110
|
-
- Record root cause, fix solution, prevention measures
|
|
111
|
-
</kb_sync_rules>
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Knowledge Base Missing Handling
|
|
116
|
-
|
|
117
|
-
<kb_missing_handler>
|
|
118
|
-
**STEP 1: Check if core files exist**
|
|
119
|
-
- `CHANGELOG.md`, `project.md`, `wiki/*.md`
|
|
120
|
-
|
|
121
|
-
**STEP 2: Knowledge base does not exist**
|
|
122
|
-
Handle by phase:
|
|
123
|
-
```yaml
|
|
124
|
-
Requirements Analysis Phase:
|
|
125
|
-
- Only flag issue, don't create knowledge base
|
|
126
|
-
- Prompt in summary "Knowledge base missing, recommend executing ~init command first"
|
|
127
|
-
|
|
128
|
-
Solution Design/Development Implementation Phase:
|
|
129
|
-
- Comprehensively scan codebase and create complete knowledge base:
|
|
130
|
-
- Root directory: CHANGELOG.md, project.md
|
|
131
|
-
- wiki/: overview.md, arch.md, api.md, data.md
|
|
132
|
-
- wiki/modules/: <module>.md (each module)
|
|
133
|
-
- Large projects (determined per G4) batch process (≤20 modules per batch)
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**STEP 3: Knowledge base exists**
|
|
137
|
-
```yaml
|
|
138
|
-
Execute quality pre-check:
|
|
139
|
-
Severe issues → Comprehensively scan and rebuild (Solution Design/Development Implementation phase)
|
|
140
|
-
Minor issues → Continue flow
|
|
141
|
-
```
|
|
142
|
-
</kb_missing_handler>
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Legacy Solution Handling
|
|
147
|
-
|
|
148
|
-
### User Selection Migration Flow
|
|
149
|
-
|
|
150
|
-
<legacy_plan_migration>
|
|
151
|
-
**Applicable Scenario:** Batch processing flow after user responds "confirm migration"
|
|
152
|
-
|
|
153
|
-
**Step 1 - User selects migration scope:**
|
|
154
|
-
|
|
155
|
-
List all legacy solution packages, ask user to choose:
|
|
156
|
-
```
|
|
157
|
-
Detected X legacy solution packages, please select migration method:
|
|
158
|
-
- Enter "all" → Migrate all legacy solution packages
|
|
159
|
-
- Enter solution package numbers (e.g., 1, 1,3, 1-3) → Migrate specified solution packages
|
|
160
|
-
- Enter "cancel" → Keep all legacy solution packages
|
|
161
|
-
|
|
162
|
-
Solution package list:
|
|
163
|
-
[1] 202511201300_logout
|
|
164
|
-
[2] 202511201400_profile
|
|
165
|
-
[3] 202511201500_settings
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**User Response Handling:**
|
|
169
|
-
- "all" → Migrate all
|
|
170
|
-
- Single number (e.g., 1) → Migrate 1st
|
|
171
|
-
- Multiple numbers (e.g., 1,3) → Migrate specified
|
|
172
|
-
- Number range (e.g., 1-3) → Migrate 1st to 3rd
|
|
173
|
-
- "cancel" → Keep all
|
|
174
|
-
- Other input → Ask again
|
|
175
|
-
|
|
176
|
-
**Step 2 - Migrate selected solution packages one by one:**
|
|
177
|
-
|
|
178
|
-
```yaml
|
|
179
|
-
for each selected solution package:
|
|
180
|
-
1. Update task status: All task statuses update to [-]
|
|
181
|
-
Add at top: > **Status:** Not executed (user cleanup)
|
|
182
|
-
|
|
183
|
-
2. Migrate to history directory:
|
|
184
|
-
- Move from plan/ to history/YYYY-MM/
|
|
185
|
-
- YYYY-MM extracted from solution package directory name
|
|
186
|
-
- Name conflict: Force overwrite
|
|
187
|
-
|
|
188
|
-
3. Update history index: history/index.md (mark "not executed")
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
**Step 3 - Output migration summary:**
|
|
192
|
-
```
|
|
193
|
-
✅ Migrated X solution packages to history/:
|
|
194
|
-
- 202511201300_logout → history/2025-11/202511201300_logout/
|
|
195
|
-
- 202511201500_settings → history/2025-11/202511201500_settings/
|
|
196
|
-
📦 Remaining Y solution packages kept in plan/:
|
|
197
|
-
- 202511201400_profile
|
|
198
|
-
```
|
|
199
|
-
</legacy_plan_migration>
|
|
200
|
-
|
|
201
|
-
### Legacy Solution Scan and Reminder Mechanism
|
|
202
|
-
|
|
203
|
-
<legacy_plan_scan>
|
|
204
|
-
**Trigger Timing:**
|
|
205
|
-
- After solution package creation: Solution Design complete, Planning command complete, Lightweight iteration complete
|
|
206
|
-
- After solution package migration: Development Implementation complete, Execution command complete, Full authorization command complete
|
|
207
|
-
|
|
208
|
-
**Scan Logic:**
|
|
209
|
-
1. Scan all solution package directories under plan/ directory
|
|
210
|
-
2. Exclude solution package executed this time (read CURRENT_PACKAGE variable)
|
|
211
|
-
3. Clear CURRENT_PACKAGE variable
|
|
212
|
-
4. Remaining solution packages are legacy solutions
|
|
213
|
-
|
|
214
|
-
**Output Position:** Auto-inject to end slot of G6.1 output format
|
|
215
|
-
|
|
216
|
-
**Output Format:**
|
|
217
|
-
```
|
|
218
|
-
📦 plan/Legacy Solutions: Detected X legacy solution packages ([list]), do you need to migrate to history?
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
List format: YYYYMMDDHHMM_<feature> (one per line, max 5, show "...and X more" if exceeds)
|
|
222
|
-
|
|
223
|
-
**User Response:**
|
|
224
|
-
- Confirm migration → Execute batch migration flow
|
|
225
|
-
- Refuse/ignore → Keep in plan/ directory
|
|
226
|
-
</legacy_plan_scan>
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## ~init / ~wiki Command Completion Summary Format
|
|
231
|
-
|
|
232
|
-
Strictly follow G6.1 unified output format:
|
|
233
|
-
|
|
234
|
-
```
|
|
235
|
-
✅【HelloAGENTS】- Knowledge Base Command Complete
|
|
236
|
-
|
|
237
|
-
- 📚 Knowledge base status: [Created/Updated/Rebuilt]
|
|
238
|
-
- 📊 Operation summary: Scanned X modules, created/updated Y documents
|
|
239
|
-
- 🔍 Quality check: [Check results, if issues exist]
|
|
240
|
-
|
|
241
|
-
────
|
|
242
|
-
📁 Changes:
|
|
243
|
-
- {knowledge base files}
|
|
244
|
-
- helloagents/CHANGELOG.md
|
|
245
|
-
- helloagents/project.md
|
|
246
|
-
...
|
|
247
|
-
|
|
248
|
-
🔄 Next Steps: Knowledge base operation complete, can proceed with other tasks
|
|
249
|
-
```
|