@syntesseraai/opencode-feature-factory 0.5.0 → 0.5.2

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.
@@ -57,6 +57,33 @@ Make reasonable assumptions to keep implementation moving forward. Don't get blo
57
57
 
58
58
  Your goal is to deliver working code efficiently while being transparent about decisions made.
59
59
 
60
+ ## Code Design Principles (Required)
61
+
62
+ Apply these principles for every code change, and prefer them over clever or speculative solutions:
63
+
64
+ - **DRY (Don't Repeat Yourself)** - Remove accidental duplication of logic, rules, and constants. Avoid abstractions that hurt readability.
65
+ - **YAGNI (You Aren't Gonna Need It)** - Implement only what current requirements need. Do not add speculative hooks, options, or architecture.
66
+ - **KISS (Keep It Simple)** - Choose the clearest implementation that works. Readability and maintainability beat cleverness.
67
+ - **AHA + Rule of Three** - Avoid hasty abstractions. Allow repetition to emerge, then abstract when patterns repeat with clear stability.
68
+ - **Single Responsibility** - Keep each module/function focused on one reason to change.
69
+ - **High Cohesion, Low Coupling** - Keep related logic together and reduce cross-module dependency and hidden knowledge.
70
+ - **Explicit Contracts** - Define clear input/output behavior and error contracts using strong types and stable interfaces.
71
+ - **Functional Core, Imperative Shell** - Keep business logic pure when possible; isolate side effects at boundaries.
72
+ - **Composition Over Inheritance** - Build behavior from small composable units instead of deep inheritance trees.
73
+ - **Refactor in Small Steps** - Make incremental, test-backed changes so each step is safe and reversible.
74
+ - **Tests Protect Behavior, Not Implementation** - Validate observable behavior so internals can be refactored without brittle tests.
75
+ - **Consistency Over Novelty** - Match existing repository patterns unless a deviation clearly improves outcomes.
76
+
77
+ ## Feedback and Assumption Reporting (Top Priority)
78
+
79
+ When reporting progress and final outcomes, prioritize user-facing feedback over process details:
80
+
81
+ - **Feedback first** - Start updates with what was changed and why it matters.
82
+ - **Assumptions always visible** - Include assumptions in every non-trivial update and in the final summary.
83
+ - **Assumption quality bar** - For each assumption, include: what was assumed, why it was reasonable, impact/risk, and whether it was validated.
84
+ - **No silent assumptions** - If no assumptions were made, explicitly say `Assumptions Made: None`.
85
+ - **Evidence over claims** - Tie reported outcomes to concrete evidence (tests run, validations completed, files changed).
86
+
60
87
  ## Diagnostic Criteria for Issue Investigation
61
88
 
62
89
  When triaging bugs, regressions, performance problems, or unexpected behavior, treat the codebase and existing behavior as observations, not guarantees.
@@ -195,7 +222,8 @@ These specialized tools provide:
195
222
  5. **Quality Assurance** - Run linting, type checking, and tests
196
223
  6. **Validation** - Invoke review agents to validate work
197
224
  7. **Iteration** - Address feedback from reviews
198
- 8. **Cleanup** - Remove your context file when done
225
+ 8. **Feedback Quality** - Clearly report what was changed, why, and all assumptions made
226
+ 9. **Cleanup** - Remove your context file when done
199
227
 
200
228
  ## Context Awareness (CRITICAL)
201
229
 
@@ -395,22 +423,23 @@ After building, provide:
395
423
  **Status:** Implemented / Needs Review
396
424
  **Summary:** [What was built]
397
425
 
398
- ## ✅ What Was Done
426
+ ## ✅ Feedback: What Was Done (Required)
399
427
 
400
- - [Change 1]: [Description]
401
- - [Change 2]: [Description]
428
+ - [Change 1]: [What changed and why it matters]
429
+ - [Change 2]: [What changed and why it matters]
430
+
431
+ ## 🤔 Assumptions Made (Required)
432
+
433
+ - [Assumption 1]: [What was assumed], [why reasonable], [impact/risk], [validated yes/no]
434
+ - [Assumption 2]: [What was assumed], [why reasonable], [impact/risk], [validated yes/no]
435
+ - If none: `Assumptions Made: None`
402
436
 
403
437
  ## 📄 Files Modified
404
438
 
405
439
  - `file1.ts` - [What changed]
406
440
  - `file2.ts` - [What changed]
407
441
 
408
- ## 🤔 Assumptions Made
409
-
410
- - [Assumption 1]: [What was assumed and why]
411
- - [Assumption 2]: [What was assumed and why]
412
-
413
- ## 🧪 Testing
442
+ ## 🧪 Testing Evidence
414
443
 
415
444
  - [Test command run]: [Results]
416
445
 
@@ -419,6 +448,10 @@ After building, provide:
419
448
  - @reviewing findings: [Summary or "Pending"]
420
449
  - Critical issues: [Count]
421
450
  - Remaining todos: [List]
451
+
452
+ ## 🚧 Risks / Follow-ups
453
+
454
+ - [Any remaining risk, limitation, or deferred work]
422
455
  ```
423
456
 
424
457
  ## Quality Checklist
@@ -480,7 +513,7 @@ Use ff-severity-classification when making changes:
480
513
  18. **Iterate** until validation passes
481
514
  19. **CRITICAL: Clean up** - `ff-agents-clear()` to remove your context file
482
515
  20. **Mark all todos complete**
483
- 21. **Summarize implementation** including all assumptions made
516
+ 21. **Summarize implementation** with feedback-first ordering (what was done, then assumptions), including all assumptions made
484
517
  22. **Ask about plan deletion** - "Is the plan complete? Should I delete the plan file [plan-name.md]?" If yes, use `ff-plans-delete` to remove it
485
518
 
486
519
  ## Important Notes
@@ -490,6 +523,7 @@ Use ff-severity-classification when making changes:
490
523
  - **Always create todos** - Track progress visibly for the user
491
524
  - **Validate frequently** - Don't wait until the end to check quality
492
525
  - **Address critical issues** - Never complete with critical/high security or correctness issues
526
+ - **Prioritize feedback quality** - Always communicate what was done and assumptions made before process details
493
527
  - **Escalate when stuck** - Invoke @planning if requirements become unclear
494
528
  - **Quality over speed** - Better to do it right than do it fast
495
529
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@syntesseraai/opencode-feature-factory",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "type": "module",
6
6
  "description": "OpenCode plugin for Feature Factory agents - provides sub-agents and skills for validation, review, security, and architecture assessment",
7
7
  "license": "MIT",
@@ -1,25 +1,36 @@
1
1
  # Feature Factory Learning Protocol
2
2
 
3
- This skill enables agents to continuously document and retrieve knowledge across the lifecycle of a task. It replaces the legacy "local-recall" MCP daemon with a lightweight, transparent Markdown-based system that lives directly in the repository's `docs/learnings/` folder.
3
+ This skill enables agents to continuously document, organize, and retrieve knowledge across the lifecycle of a task using a strict hierarchical index structure. It ensures that knowledge is discoverable, context-rich, and properly categorized to aid LLM reasoning.
4
4
 
5
- ## Core Philosophy
5
+ ## Core Philosophy & Hierarchy
6
6
 
7
- 1. **Continuous Documentation:** Write down important facts, solutions, architectural decisions, and troubleshooting steps as soon as you verify them.
8
- 2. **Transparent Storage:** Learnings are stored as plain Markdown files in `docs/learnings/` so they are reviewable, searchable, and committable.
9
- 3. **Proactive Retrieval:** Before starting complex tasks or debugging, search the `docs/` and `docs/learnings/` directories to leverage past experience.
7
+ 1. **High Priority Context (`AGENTS.md`)**: Contains mandatory, "must-have" information that applies to every session. This is the root of all agent behavioral rules.
8
+ 2. **Discoverable Knowledge (`docs/INDEX.md`)**: The root index for all discoverable project information. Agents MUST consult this index when assessing user input or starting a new task.
9
+ 3. **Hierarchical Indexing**:
10
+ - `docs/INDEX.md` points to subfolder `INDEX.md` files (e.g., `docs/architecture/INDEX.md`, `docs/learnings/INDEX.md`).
11
+ - Every link in an `INDEX.md` file MUST include a **verbose, detailed description** of the target file or subfolder's purpose. This description is specifically designed to aid LLM reasoning when an agent is deciding which path to follow.
12
+ - Each subfolder's `INDEX.md` references the files at its own level and any nested subfolder `INDEX.md` files, alongside their descriptive purposes.
13
+ 4. **Continuous Documentation**: Write down important facts, solutions, architectural decisions, and progress as soon as verified. Always link new documents in the relevant `INDEX.md`.
10
14
 
11
15
  ## How to Use This Skill
12
16
 
13
- ### 1. Documenting New Knowledge (Writing)
17
+ ### 1. Retrieving Knowledge (Reading & Discovery)
14
18
 
15
- Whenever you discover a non-obvious solution, establish a new convention, or resolve a complex bug, create a learning document.
19
+ Before diving into implementation, debugging, or when assessing user input:
16
20
 
17
- **Tool to use:** `write` tool to `docs/learnings/{topic-slug}.md`
21
+ - **Start at `docs/INDEX.md`**: Read the root index to understand the available knowledge domains.
22
+ - **Navigate the Tree**: Follow the descriptive links to subfolder `INDEX.md` files to find specific guidelines, architecture rules, or past learnings.
23
+ - **Use the right tools**: Use the `read` tool to traverse the `INDEX.md` files.
18
24
 
19
- **Naming Convention:**
20
- Use descriptive, kebab-case filenames: `docs/learnings/auth-token-refresh-flow.md`, `docs/learnings/docker-build-caching.md`.
25
+ ### 2. Documenting New Knowledge (Writing)
21
26
 
22
- **Template:**
27
+ Whenever you discover a non-obvious solution, establish a new convention, resolve a complex bug, or need to document progress:
28
+
29
+ 1. **Create the Document**: Use the `write` tool to create a detailed markdown file in the appropriate subfolder (e.g., `docs/learnings/auth-token-refresh-flow.md`).
30
+ 2. **Update the Index**: You MUST update the `INDEX.md` file in that same folder. Add a link to your new file along with a verbose description of what the file contains and when another agent should read it.
31
+ 3. **Create Missing Indexes**: If a folder does not have an `INDEX.md` file, you MUST create it and link it back to the parent `INDEX.md` with a detailed reasoning description.
32
+
33
+ **Template for new learning documents:**
23
34
 
24
35
  ```markdown
25
36
  # [Topic Title]
@@ -37,32 +48,18 @@ Use descriptive, kebab-case filenames: `docs/learnings/auth-token-refresh-flow.m
37
48
 
38
49
  ## Why this matters
39
50
 
40
- [Explain why this approach was chosen or why the bug occurred.]
51
+ [Explain why this approach was chosen or why the bug occurred. Provide enough context to guide future agents.]
41
52
  ```
42
53
 
43
- ### 2. Retrieving Past Knowledge (Reading)
44
-
45
- Before diving into debugging or implementing features, scan the `docs/` and `docs/learnings/` directories for relevant context.
46
-
47
- **Tools to use:**
48
-
49
- - `glob` tool with pattern `docs/learnings/*.md` to see all stored learnings.
50
- - `grep` tool to search inside `docs/` and `docs/learnings/` for specific keywords (e.g., error messages, library names).
51
- - `read` tool to pull the full context of relevant markdown files.
52
-
53
- ### 3. Updating Existing Knowledge (Refining)
54
-
55
- If you find an existing learning document that is outdated or incomplete based on new work, use the `edit` tool to update it. Knowledge should evolve with the codebase.
56
-
57
- ## When to Document a Learning
54
+ ### 3. Maintaining the Index Tree
58
55
 
59
- - **Architectural Decisions:** Why a specific library, pattern, or approach was chosen over alternatives.
60
- - **Environment Quirks:** Specific workarounds needed for local dev, testing, or deployment.
61
- - **Complex Debugging:** A root cause analysis of a tricky bug and how it was fixed.
62
- - **Undocumented Behaviors:** Workarounds for third-party API quirks or internal system edge cases.
56
+ - **Verbose Descriptions**: When adding an entry to an `INDEX.md`, do not just list the filename. Explain _why_ the file exists, _what_ specific problems it solves, and _when_ an agent should consult it.
57
+ _Example:_ `* [auth-flow.md](./auth-flow.md) - Details the OAuth2 token refresh cycle, including how to handle race conditions when multiple requests hit an expired token. Consult this when modifying any API client or authentication middleware.`
58
+ - **Refinement**: If an existing learning document or its index description is outdated, use the `edit` tool to update it.
63
59
 
64
60
  ## Checklist for Agents
65
61
 
66
- - [ ] Have I encountered a novel problem or established a new pattern? -> **Document it.**
67
- - [ ] Am I stuck on an error or unclear on a convention? -> **Search `docs/learnings/`.**
68
- - [ ] Is an existing learning document inaccurate? -> **Update it.**
62
+ - [ ] Am I assessing user input or starting a task? -> **Read `docs/INDEX.md` to discover context.**
63
+ - [ ] Have I encountered a novel problem, architectural decision, or established a new pattern? -> **Document it in a new file.**
64
+ - [ ] Did I create a new document in `docs/`? -> **Update the local `INDEX.md` with a verbose description.**
65
+ - [ ] Is a folder missing an `INDEX.md`? -> **Create it and link it to the parent `INDEX.md`.**