@sylphx/flow 1.4.18 → 1.4.19

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 CHANGED
@@ -1,5 +1,32 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 1.4.19
4
+
5
+ ### Patch Changes
6
+
7
+ - c7ce3ac: Fix workspace.md execution issues with realistic strategies
8
+
9
+ Critical fixes:
10
+
11
+ - Fixed cold start: Check exists → create if needed → read (was: read immediately, failing if missing)
12
+ - Changed to batch updates: Note during work, update before commit (was: update immediately, causing context switching)
13
+ - Realistic verification: Spot-check on read, full check before commit (was: check everything on every read)
14
+ - Objective ADR criteria: Specific measurable conditions (was: subjective "can reverse in <1 day?")
15
+ - Added concrete examples to all templates (was: generic placeholders causing confusion)
16
+
17
+ Additional improvements:
18
+
19
+ - Added SSOT duplication triggers (when to reference vs duplicate)
20
+ - Added content boundary test (README vs context.md decision criteria)
21
+ - Added detailed drift fix patterns with conditions
22
+ - Expanded red flags list
23
+ - Clarified update strategy with rationale
24
+
25
+ Result: Executable, realistic workspace management that LLM agents can actually follow.
26
+
27
+ Before: 265 lines with execution problems
28
+ After: 283 lines (+7%) with all critical issues fixed, higher information density
29
+
3
30
  ## 1.4.18
4
31
 
5
32
  ### Patch Changes
@@ -7,13 +7,11 @@ description: .sylphx/ workspace - SSOT for context, architecture, decisions
7
7
 
8
8
  ## Core Behavior
9
9
 
10
- **First task:** `.sylphx/` missing → create structure. Exists → verify accuracy, delete outdated.
10
+ **Task start:** `.sylphx/` missing → create structure with templates. Exists → read context.md, spot-check critical VERIFY markers.
11
11
 
12
- **Task start:** Read `.sylphx/context.md`. Verify VERIFY markers. Drift → fix immediately (see Drift Resolution).
12
+ **During work:** Note changes. Defer updates until before commit.
13
13
 
14
- **During work:** New understanding/decision/term update `.sylphx/` immediately.
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 context only. Public info → README.md.
36
+ Internal only. Public → README.md.
41
37
 
42
38
  ```markdown
43
39
  # Project Context
44
40
 
45
41
  ## What (Internal)
46
- [Project scope, internal boundaries, target use cases]
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, internal motivation, market gap]
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 when: Scope/constraints/boundaries change.
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:** [What it does]
91
- **Out of scope:** [What it doesn't]
102
+ **In scope:** [Core functionality]
103
+ **Out of scope:** [Explicitly excluded]
92
104
  ```
93
105
 
94
- Update when: Architecture changes, pattern adopted, major refactor.
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 when: New project-specific term. Skip: General programming concepts.
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
- - Difficult to reverse (schema, architecture)
145
- - Affects >3 major components
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
- - 2+ significant alternatives
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
- **Decision tree:**
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
- ## Content Rules
203
+ ## Update Strategy
191
204
 
192
- ### Include (WHY + Internal)
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
- ### ❌ Exclude (Elsewhere)
199
- - Public infoREADME.md
200
- - API docsJSDoc/TSDoc
201
- - ImplementationCode comments
202
- - ConfigConfig files
203
- - Versions/depspackage.json
204
- - How-to → Code/docs site
207
+ **Before commit:**
208
+ - Architecture changeUpdate 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
- Internal context only. No duplication.
214
+ Single batch update. Reduces context switching.
207
215
 
208
216
  ---
209
217
 
210
- ## Red Flags
218
+ ## Content Rules
211
219
 
212
- Delete immediately:
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
- -"We plan to..." / "In the future..."
215
- - "Currently using..."
216
- - Contradicts code
217
- - Non-existent file references
218
- - Duplicates package.json/config
219
- - Explains HOW not WHY
220
- - Generic advice
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
- **Every `.sylphx/` read:** VERIFY markers valid. Content matches code. Wrong → fix immediately.
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
- ## Drift Resolution
243
+ **Before commit:** Check all VERIFY markers → files exist. Content matches code. Wrong → fix. Outdated → delete.
236
244
 
237
- **Detection triggers:**
238
- - VERIFY marker → non-existent file
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 hierarchy:**
251
+ **Resolution:**
244
252
  ```
245
- Code vs Docs:
246
- ├─ WHAT/HOWCode wins, update docs
247
- ├─ WHYDocs win if valid, else update both
248
- └─ Both outdated → Research, fix both
253
+ WHAT/HOW conflict → Code wins, update docs
254
+ WHY conflictDocs win if still valid, else update both
255
+ Both outdatedResearch current state, fix both
249
256
  ```
250
257
 
251
- **Fix immediately:** Code evolved → update docs. Docs outdated → update/delete. File moved → update markers. Who detects = who fixes.
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
- **Document:** Architectural change → ADR. Pattern change → architecture.md. Constraint change → context.md.
263
+ ---
264
+
265
+ ## Red Flags
254
266
 
255
- **Examples:**
256
- - File moved → update marker path
257
- - Implementation changed update docs + ADR
258
- - Constraint violated fix code or update constraint
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "1.4.18",
3
+ "version": "1.4.19",
4
4
  "description": "AI-powered development workflow automation with autonomous loop mode and smart configuration",
5
5
  "type": "module",
6
6
  "bin": {