@sylphx/flow 1.4.18 → 1.4.20
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/CHANGELOG.md +33 -0
- package/assets/rules/workspace.md +105 -87
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 1.4.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d34613f: Add comprehensive prompting guide for writing effective LLM prompts. Introduces 5 core principles: pain-triggered, default path, immediate reward, natural integration, and self-interest alignment. This is a meta-level guide for maintainers, not for agents to follow.
|
|
8
|
+
|
|
9
|
+
## 1.4.19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c7ce3ac: Fix workspace.md execution issues with realistic strategies
|
|
14
|
+
|
|
15
|
+
Critical fixes:
|
|
16
|
+
|
|
17
|
+
- Fixed cold start: Check exists → create if needed → read (was: read immediately, failing if missing)
|
|
18
|
+
- Changed to batch updates: Note during work, update before commit (was: update immediately, causing context switching)
|
|
19
|
+
- Realistic verification: Spot-check on read, full check before commit (was: check everything on every read)
|
|
20
|
+
- Objective ADR criteria: Specific measurable conditions (was: subjective "can reverse in <1 day?")
|
|
21
|
+
- Added concrete examples to all templates (was: generic placeholders causing confusion)
|
|
22
|
+
|
|
23
|
+
Additional improvements:
|
|
24
|
+
|
|
25
|
+
- Added SSOT duplication triggers (when to reference vs duplicate)
|
|
26
|
+
- Added content boundary test (README vs context.md decision criteria)
|
|
27
|
+
- Added detailed drift fix patterns with conditions
|
|
28
|
+
- Expanded red flags list
|
|
29
|
+
- Clarified update strategy with rationale
|
|
30
|
+
|
|
31
|
+
Result: Executable, realistic workspace management that LLM agents can actually follow.
|
|
32
|
+
|
|
33
|
+
Before: 265 lines with execution problems
|
|
34
|
+
After: 283 lines (+7%) with all critical issues fixed, higher information density
|
|
35
|
+
|
|
3
36
|
## 1.4.18
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -7,13 +7,11 @@ description: .sylphx/ workspace - SSOT for context, architecture, decisions
|
|
|
7
7
|
|
|
8
8
|
## Core Behavior
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**Task start:** `.sylphx/` missing → create structure with templates. Exists → read context.md, spot-check critical VERIFY markers.
|
|
11
11
|
|
|
12
|
-
**
|
|
12
|
+
**During work:** Note changes. Defer updates until before commit.
|
|
13
13
|
|
|
14
|
-
**
|
|
15
|
-
|
|
16
|
-
**Before commit:** `.sylphx/` matches code. No contradictions. All markers valid.
|
|
14
|
+
**Before commit:** Update all .sylphx/ files. All VERIFY markers valid. No contradictions. Outdated → delete.
|
|
17
15
|
|
|
18
16
|
---
|
|
19
17
|
|
|
@@ -29,41 +27,43 @@ description: .sylphx/ workspace - SSOT for context, architecture, decisions
|
|
|
29
27
|
NNN-title.md # Individual ADRs
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
Missing → create with templates below.
|
|
33
|
-
|
|
34
30
|
---
|
|
35
31
|
|
|
36
32
|
## Templates
|
|
37
33
|
|
|
38
34
|
### context.md
|
|
39
35
|
|
|
40
|
-
Internal
|
|
36
|
+
Internal only. Public → README.md.
|
|
41
37
|
|
|
42
38
|
```markdown
|
|
43
39
|
# Project Context
|
|
44
40
|
|
|
45
41
|
## What (Internal)
|
|
46
|
-
[Project scope,
|
|
42
|
+
[Project scope, boundaries, target]
|
|
43
|
+
|
|
44
|
+
Example: CLI for AI agent orchestration. Scope: Local execution, file config, multi-agent. Target: TS developers. Out: Cloud, training, UI.
|
|
47
45
|
|
|
48
46
|
## Why (Business/Internal)
|
|
49
|
-
[Business context,
|
|
47
|
+
[Business context, motivation, market gap]
|
|
48
|
+
|
|
49
|
+
Example: Market gap in TS-native AI tooling. Python-first tools dominate. Opportunity: Capture web dev market.
|
|
50
50
|
|
|
51
51
|
## Key Constraints
|
|
52
52
|
<!-- Non-negotiable constraints affecting code decisions -->
|
|
53
|
-
- Technical: [e.g., "Bundle <5MB (Vercel edge)"]
|
|
54
|
-
- Business: [e.g., "Zero telemetry (enterprise security)"]
|
|
55
|
-
- Legal: [e.g., "GDPR compliant (EU market)"]
|
|
53
|
+
- Technical: [e.g., "Bundle <5MB (Vercel edge)", "Node 18+ (ESM-first)"]
|
|
54
|
+
- Business: [e.g., "Zero telemetry (enterprise security)", "Offline-capable (China market)"]
|
|
55
|
+
- Legal: [e.g., "GDPR compliant (EU market)", "Apache 2.0 license only"]
|
|
56
56
|
|
|
57
57
|
## Boundaries
|
|
58
58
|
**In scope:** [What we build]
|
|
59
|
-
**Out of scope:** [What we don't]
|
|
59
|
+
**Out of scope:** [What we explicitly don't]
|
|
60
60
|
|
|
61
61
|
## SSOT References
|
|
62
62
|
<!-- VERIFY: package.json -->
|
|
63
63
|
- Dependencies: `package.json`
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
Update
|
|
66
|
+
Update: Scope/constraints/boundaries change.
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
@@ -75,10 +75,16 @@ Update when: Scope/constraints/boundaries change.
|
|
|
75
75
|
## System Overview
|
|
76
76
|
[1-2 paragraphs: structure, data flow, key decisions]
|
|
77
77
|
|
|
78
|
+
Example: Event-driven CLI. Commands → Agent orchestrator → Specialized agents → Tools. File-based config, no server.
|
|
79
|
+
|
|
78
80
|
## Key Components
|
|
79
81
|
<!-- VERIFY: src/path/ -->
|
|
80
82
|
- **Name** (`src/path/`): [Responsibility]
|
|
81
83
|
|
|
84
|
+
Example:
|
|
85
|
+
- **Agent Orchestrator** (`src/orchestrator/`): Task decomposition, delegation, synthesis
|
|
86
|
+
- **Code Agent** (`src/agents/coder/`): Code generation, testing, git operations
|
|
87
|
+
|
|
82
88
|
## Design Patterns
|
|
83
89
|
|
|
84
90
|
### Pattern: [Name]
|
|
@@ -86,12 +92,18 @@ Update when: Scope/constraints/boundaries change.
|
|
|
86
92
|
**Where:** `src/path/`
|
|
87
93
|
**Trade-off:** [Gained vs lost]
|
|
88
94
|
|
|
95
|
+
Example:
|
|
96
|
+
### Pattern: Factory for agents
|
|
97
|
+
**Why:** Dynamic agent creation based on task type
|
|
98
|
+
**Where:** `src/factory/`
|
|
99
|
+
**Trade-off:** Flexibility vs complexity. Added indirection but easy to add agents.
|
|
100
|
+
|
|
89
101
|
## Boundaries
|
|
90
|
-
**In scope:** [
|
|
91
|
-
**Out of scope:** [
|
|
102
|
+
**In scope:** [Core functionality]
|
|
103
|
+
**Out of scope:** [Explicitly excluded]
|
|
92
104
|
```
|
|
93
105
|
|
|
94
|
-
Update
|
|
106
|
+
Update: Architecture changes, pattern adopted, major refactor.
|
|
95
107
|
|
|
96
108
|
---
|
|
97
109
|
|
|
@@ -104,9 +116,15 @@ Update when: Architecture changes, pattern adopted, major refactor.
|
|
|
104
116
|
**Definition:** [Concise]
|
|
105
117
|
**Usage:** `src/path/`
|
|
106
118
|
**Context:** [When/why matters]
|
|
119
|
+
|
|
120
|
+
Example:
|
|
121
|
+
## Agent Enhancement
|
|
122
|
+
**Definition:** Merging base agent definition with rules
|
|
123
|
+
**Usage:** `src/core/enhance-agent.ts`
|
|
124
|
+
**Context:** Loaded at runtime before agent execution. Rules field stripped for Claude Code compatibility.
|
|
107
125
|
```
|
|
108
126
|
|
|
109
|
-
Update
|
|
127
|
+
Update: New project-specific term. Skip: General programming concepts.
|
|
110
128
|
|
|
111
129
|
---
|
|
112
130
|
|
|
@@ -140,22 +158,15 @@ Update when: New project-specific term. Skip: General programming concepts.
|
|
|
140
158
|
|
|
141
159
|
**<200 words total.**
|
|
142
160
|
|
|
143
|
-
**Create ADR when:**
|
|
144
|
-
-
|
|
145
|
-
-
|
|
161
|
+
**Create ADR when ANY:**
|
|
162
|
+
- Changes database schema
|
|
163
|
+
- Adds/removes major dependency (runtime, not dev)
|
|
164
|
+
- Changes auth/authz mechanism
|
|
165
|
+
- Affects >3 files in different features
|
|
146
166
|
- Security/compliance decision
|
|
147
|
-
-
|
|
148
|
-
- Team will ask "why?"
|
|
149
|
-
|
|
150
|
-
**Don't create for:** Framework patterns, best practices, temporary solutions, single-file changes.
|
|
167
|
+
- Multiple valid approaches exist
|
|
151
168
|
|
|
152
|
-
**
|
|
153
|
-
```
|
|
154
|
-
Can reverse in <1 day? → No ADR
|
|
155
|
-
Clear best practice? → No ADR
|
|
156
|
-
Affects architecture? → ADR
|
|
157
|
-
Trade-offs worth documenting? → ADR
|
|
158
|
-
```
|
|
169
|
+
**Skip:** Framework patterns, obvious fixes, config changes, single-file changes, dev dependencies.
|
|
159
170
|
|
|
160
171
|
---
|
|
161
172
|
|
|
@@ -168,94 +179,101 @@ Never duplicate. Always reference.
|
|
|
168
179
|
[Topic]: See `path/to/file`
|
|
169
180
|
```
|
|
170
181
|
|
|
182
|
+
**Duplication triggers:**
|
|
183
|
+
- Listing dependencies → Reference package.json
|
|
184
|
+
- Describing config → Reference config file
|
|
185
|
+
- Listing versions → Reference package.json
|
|
186
|
+
- How-to steps → Reference code or docs site
|
|
187
|
+
|
|
188
|
+
**When to duplicate:**
|
|
189
|
+
- WHY behind choice + trade-off (with reference)
|
|
190
|
+
- Business constraint context (reference authority)
|
|
191
|
+
|
|
171
192
|
**Example:**
|
|
172
193
|
```markdown
|
|
173
194
|
<!-- VERIFY: package.json -->
|
|
174
195
|
Dependencies: `package.json`
|
|
175
196
|
|
|
176
197
|
<!-- VERIFY: biome.json -->
|
|
177
|
-
Linting: Biome. WHY: Single tool for format+lint. Trade-off: Smaller ecosystem. (ADR-003)
|
|
198
|
+
Linting: Biome. WHY: Single tool for format+lint. Trade-off: Smaller plugin ecosystem vs simplicity. (ADR-003)
|
|
178
199
|
```
|
|
179
200
|
|
|
180
|
-
VERIFY marker = check on file changes.
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## Update Triggers
|
|
185
|
-
|
|
186
|
-
New understanding → context.md/architecture.md. Architectural decision → ADR. Project term → glossary.md. Pattern adopted → architecture.md (WHY + trade-off). Constraint → context.md. Outdated → delete/fix immediately.
|
|
187
|
-
|
|
188
201
|
---
|
|
189
202
|
|
|
190
|
-
##
|
|
203
|
+
## Update Strategy
|
|
191
204
|
|
|
192
|
-
|
|
193
|
-
- context.md: Business context, constraints, scope
|
|
194
|
-
- architecture.md: Design decisions (WHY), patterns, trade-offs
|
|
195
|
-
- glossary.md: Project-specific terms
|
|
196
|
-
- ADRs: Significant decisions with alternatives
|
|
205
|
+
**During work:** Note changes (comment/mental).
|
|
197
206
|
|
|
198
|
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
- How-to → Code/docs site
|
|
207
|
+
**Before commit:**
|
|
208
|
+
- Architecture change → Update architecture.md or create ADR
|
|
209
|
+
- New constraint discovered → Update context.md
|
|
210
|
+
- Project-specific term introduced → Add to glossary.md
|
|
211
|
+
- Pattern adopted → Document in architecture.md (WHY + trade-off)
|
|
212
|
+
- Outdated content → Delete
|
|
205
213
|
|
|
206
|
-
|
|
214
|
+
Single batch update. Reduces context switching.
|
|
207
215
|
|
|
208
216
|
---
|
|
209
217
|
|
|
210
|
-
##
|
|
218
|
+
## Content Rules
|
|
211
219
|
|
|
212
|
-
|
|
220
|
+
### ✅ Include
|
|
221
|
+
- **context.md:** Business context you can't find in code. Constraints affecting decisions. Explicit scope boundaries.
|
|
222
|
+
- **architecture.md:** WHY this pattern. Trade-offs of major decisions. System-level structure.
|
|
223
|
+
- **glossary.md:** Project-specific terms. Domain language.
|
|
224
|
+
- **ADRs:** Significant decisions with alternatives.
|
|
213
225
|
|
|
214
|
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
226
|
+
### ❌ Exclude
|
|
227
|
+
- Public marketing → README.md
|
|
228
|
+
- API reference → JSDoc/TSDoc
|
|
229
|
+
- Implementation details → Code comments
|
|
230
|
+
- Config values → Config files
|
|
231
|
+
- Dependency list → package.json
|
|
232
|
+
- Tutorial steps → Code examples or docs site
|
|
233
|
+
- Generic best practices → Core rules
|
|
234
|
+
|
|
235
|
+
**Boundary test:** Can user learn this from README? → Exclude. Does code show WHAT but not WHY? → Include.
|
|
221
236
|
|
|
222
237
|
---
|
|
223
238
|
|
|
224
239
|
## Verification
|
|
225
240
|
|
|
226
|
-
**
|
|
227
|
-
|
|
228
|
-
**Automated:**
|
|
229
|
-
```bash
|
|
230
|
-
bun run verify-docs # Check all VERIFY markers
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
---
|
|
241
|
+
**On read:** Spot-check critical VERIFY markers in context.md.
|
|
234
242
|
|
|
235
|
-
|
|
243
|
+
**Before commit:** Check all VERIFY markers → files exist. Content matches code. Wrong → fix. Outdated → delete.
|
|
236
244
|
|
|
237
|
-
**
|
|
238
|
-
- VERIFY
|
|
245
|
+
**Drift detection:**
|
|
246
|
+
- VERIFY → non-existent file
|
|
239
247
|
- Docs describe missing pattern
|
|
240
248
|
- Code has undocumented pattern
|
|
241
249
|
- Contradiction between .sylphx/ and code
|
|
242
250
|
|
|
243
|
-
**Resolution
|
|
251
|
+
**Resolution:**
|
|
244
252
|
```
|
|
245
|
-
Code
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
└─ Both outdated → Research, fix both
|
|
253
|
+
WHAT/HOW conflict → Code wins, update docs
|
|
254
|
+
WHY conflict → Docs win if still valid, else update both
|
|
255
|
+
Both outdated → Research current state, fix both
|
|
249
256
|
```
|
|
250
257
|
|
|
251
|
-
**Fix
|
|
258
|
+
**Fix patterns:**
|
|
259
|
+
- File moved → Update VERIFY path
|
|
260
|
+
- Implementation changed → Update docs. Major change + alternatives existed → Create ADR
|
|
261
|
+
- Constraint violated → Fix code (if constraint valid) or update constraint (if context changed) + document WHY
|
|
252
262
|
|
|
253
|
-
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Red Flags
|
|
254
266
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
267
|
+
Delete immediately:
|
|
268
|
+
|
|
269
|
+
- ❌ "We plan to..." / "In the future..." (speculation)
|
|
270
|
+
- ❌ "Currently using X" implying change (state facts: "Uses X")
|
|
271
|
+
- ❌ Contradicts code
|
|
272
|
+
- ❌ References non-existent files
|
|
273
|
+
- ❌ Duplicates package.json/config values
|
|
274
|
+
- ❌ Explains HOW not WHY
|
|
275
|
+
- ❌ Generic advice ("follow best practices")
|
|
276
|
+
- ❌ Outdated after refactor
|
|
259
277
|
|
|
260
278
|
---
|
|
261
279
|
|