groundswell 0.0.1
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/settings.local.json +9 -0
- package/.claude/system_prompts/task-breakdown.md +100 -0
- package/PRPs/001-hierarchical-workflow-engine.md +2438 -0
- package/PRPs/PRDs/001-hierarchical-workflow-engine.md +543 -0
- package/PRPs/PRDs/002-agent-prompt.md +390 -0
- package/PRPs/PRDs/003-agent-prompt.md +943 -0
- package/PRPs/PRDs/004-agent-prompt.md +1136 -0
- package/PRPs/PRDs/tasks-001.json +492 -0
- package/PRPs/README.md +83 -0
- package/PRPs/templates/prp_base.md +222 -0
- package/README.md +218 -0
- package/docs/agent.md +422 -0
- package/docs/prompt.md +419 -0
- package/docs/workflow.md +600 -0
- package/examples/README.md +244 -0
- package/examples/examples/01-basic-workflow.ts +100 -0
- package/examples/examples/02-decorator-options.ts +217 -0
- package/examples/examples/03-parent-child.ts +241 -0
- package/examples/examples/04-observers-debugger.ts +340 -0
- package/examples/examples/05-error-handling.ts +387 -0
- package/examples/examples/06-concurrent-tasks.ts +352 -0
- package/examples/examples/07-agent-loops.ts +432 -0
- package/examples/examples/08-sdk-features.ts +667 -0
- package/examples/examples/09-reflection.ts +573 -0
- package/examples/examples/10-introspection.ts +550 -0
- package/examples/index.ts +143 -0
- package/examples/utils/helpers.ts +57 -0
- package/llms_full.txt +5890 -0
- package/package.json +63 -0
- package/plan/P1P2/PRP.md +527 -0
- package/plan/P1P2/research/LRU_CACHE_BEST_PRACTICES.md +1929 -0
- package/plan/P1P2/research/LRU_CACHE_CODE_PATTERNS.md +857 -0
- package/plan/P1P2/research/LRU_CACHE_INTEGRATION_GUIDE.md +738 -0
- package/plan/P1P2/research/LRU_CACHE_RESEARCH_INDEX.md +424 -0
- package/plan/P1P2/research/REFLECTION_INDEX.md +291 -0
- package/plan/P1P2/research/REFLECTION_RESEARCH_REPORT.md +1342 -0
- package/plan/P1P2/research/RESEARCH_SUMMARY.md +342 -0
- package/plan/P1P2/research/anthropic-sdk.md +174 -0
- package/plan/P1P2/research/async-local-storage.md +200 -0
- package/plan/P1P2/research/reflection-code-patterns.md +1205 -0
- package/plan/P1P2/research/reflection-decision-matrix.md +421 -0
- package/plan/P1P2/research/reflection-implementation-guide.md +1341 -0
- package/plan/P1P2/research/reflection-integration-guide.md +834 -0
- package/plan/P1P2/research/reflection-patterns.md +1468 -0
- package/plan/P1P2/research/reflection-quick-reference.md +558 -0
- package/plan/P1P2/research/zod-schema.md +152 -0
- package/plan/P3P4/PRP.md +1388 -0
- package/plan/P3P4/research/caching-lru.md +116 -0
- package/plan/P3P4/research/introspection-tools.md +177 -0
- package/plan/P3P4/research/reflection-patterns.md +117 -0
- package/plan/P4P5/PRP.md +1136 -0
- package/plan/P4P5/research/RESEARCH_SUMMARY.md +151 -0
- package/plan/architecture/external_deps.md +358 -0
- package/plan/architecture/system_context.md +242 -0
- package/plan/backlog.json +867 -0
- package/plan/research/INTROSPECTION_RESEARCH_SUMMARY.md +378 -0
- package/plan/research/README-INTROSPECTION.md +352 -0
- package/plan/research/agent-introspection-patterns.md +1085 -0
- package/plan/research/introspection-security-guide.md +928 -0
- package/plan/research/introspection-tool-examples.md +875 -0
- package/scripts/generate-llms-full.ts +206 -0
- package/src/__tests__/integration/agent-workflow.test.ts +256 -0
- package/src/__tests__/integration/tree-mirroring.test.ts +114 -0
- package/src/__tests__/unit/agent.test.ts +169 -0
- package/src/__tests__/unit/cache-key.test.ts +182 -0
- package/src/__tests__/unit/cache.test.ts +172 -0
- package/src/__tests__/unit/context.test.ts +138 -0
- package/src/__tests__/unit/decorators.test.ts +100 -0
- package/src/__tests__/unit/introspection-tools.test.ts +277 -0
- package/src/__tests__/unit/prompt.test.ts +135 -0
- package/src/__tests__/unit/reflection.test.ts +210 -0
- package/src/__tests__/unit/tree-debugger.test.ts +85 -0
- package/src/__tests__/unit/workflow.test.ts +81 -0
- package/src/cache/cache-key.ts +244 -0
- package/src/cache/cache.ts +236 -0
- package/src/cache/index.ts +8 -0
- package/src/core/agent.ts +573 -0
- package/src/core/context.ts +119 -0
- package/src/core/event-tree.ts +260 -0
- package/src/core/factory.ts +123 -0
- package/src/core/index.ts +17 -0
- package/src/core/logger.ts +87 -0
- package/src/core/mcp-handler.ts +184 -0
- package/src/core/prompt.ts +150 -0
- package/src/core/workflow-context.ts +349 -0
- package/src/core/workflow.ts +302 -0
- package/src/debugger/index.ts +1 -0
- package/src/debugger/tree-debugger.ts +210 -0
- package/src/decorators/index.ts +3 -0
- package/src/decorators/observed-state.ts +95 -0
- package/src/decorators/step.ts +139 -0
- package/src/decorators/task.ts +96 -0
- package/src/examples/index.ts +2 -0
- package/src/examples/tdd-orchestrator.ts +65 -0
- package/src/examples/test-cycle-workflow.ts +64 -0
- package/src/index.ts +140 -0
- package/src/reflection/index.ts +5 -0
- package/src/reflection/reflection.ts +407 -0
- package/src/tools/index.ts +36 -0
- package/src/tools/introspection.ts +464 -0
- package/src/types/agent.ts +90 -0
- package/src/types/decorators.ts +25 -0
- package/src/types/error-strategy.ts +13 -0
- package/src/types/error.ts +20 -0
- package/src/types/events.ts +74 -0
- package/src/types/index.ts +55 -0
- package/src/types/logging.ts +24 -0
- package/src/types/observer.ts +18 -0
- package/src/types/prompt.ts +40 -0
- package/src/types/reflection.ts +117 -0
- package/src/types/sdk-primitives.ts +128 -0
- package/src/types/snapshot.ts +14 -0
- package/src/types/workflow-context.ts +163 -0
- package/src/types/workflow.ts +37 -0
- package/src/utils/id.ts +11 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/observable.ts +77 -0
- package/tasks.json +0 -0
- package/tsconfig.json +22 -0
- package/vitest.config.ts +16 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# LEAD TECHNICAL ARCHITECT & PROJECT SYNTHESIZER
|
|
2
|
+
|
|
3
|
+
> **ROLE:** Act as a Lead Technical Architect and Project Management Synthesizer.
|
|
4
|
+
> **CONTEXT:** You represent the rigorous, unified consensus of a senior panel (Security, DevOps, Backend, Frontend, QA).
|
|
5
|
+
> **GOAL:** Validate the PRD through research, document findings, and decompose the PRD into a strict hierarchy: `Phase` > `Milestone` > `Task` > `Subtask`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## HIERARCHY DEFINITIONS
|
|
10
|
+
|
|
11
|
+
* **PHASE:** Project-scope goals (e.g., MVP, V1.0). *Weeks to months.*
|
|
12
|
+
* **MILESTONE:** Key objectives within a Phase. *1 to 12 weeks.*
|
|
13
|
+
* **TASK:** Complete features within a Milestone. *Days to weeks.*
|
|
14
|
+
* **SUBTASK:** Atomic implementation steps. **0.5, 1, or 2 Story Points (SP).** (Max 2 SP, do not break subtasks down further than 2 SP unless required).
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## CRITICAL CONSTRAINTS & STANDARD OF WORK (SOW)
|
|
19
|
+
|
|
20
|
+
### 1. RESEARCH-DRIVEN ARCHITECTURE (NEW PRIORITY)
|
|
21
|
+
* **VALIDATE BEFORE BREAKING DOWN:** You cannot plan what you do not understand.
|
|
22
|
+
* **SPAWN SUBAGENTS:** Use your tools to spawn agents to research the codebase and external documentation *before* defining the hierarchy.
|
|
23
|
+
* **REALITY CHECK:** Verify that the PRD's requests match the current codebase state (e.g., don't plan a React hook if the project is vanilla JS).
|
|
24
|
+
* **PERSISTENCE:** You must store architectural findings in `plan/architecture/` so the downstream PRP (Product Requirement Prompt) agents have access to them.
|
|
25
|
+
|
|
26
|
+
### 2. COHERENCE & CONTINUITY
|
|
27
|
+
* **NO VACUUMS:** You must ensure architectural flow. Subtasks must not exist in isolation.
|
|
28
|
+
* **EXPLICIT HANDOFFS:** If `Subtask A` defines a schema, `Subtask B` must be explicitly instructed to consume that schema.
|
|
29
|
+
* **STRICT REFERENCES:** Reference specific file paths, variable names, or API endpoints confirmed during your **Research Phase**.
|
|
30
|
+
|
|
31
|
+
### 3. IMPLICIT TDD & QUALITY
|
|
32
|
+
* **DO NOT** create subtasks for "Write Tests."
|
|
33
|
+
* **IMPLIED WORKFLOW:** Assume every subtask implies: *"Write the failing test -> Implement the code -> Pass the test."*
|
|
34
|
+
* **DEFINITION OF DONE:** Code is not complete without tests.
|
|
35
|
+
|
|
36
|
+
### 4. THE "CONTEXT SCOPE" BLINDER
|
|
37
|
+
For every Subtask, the `context_scope` must be a **strict set of instructions** for a developer who cannot see the rest of the project. It must define:
|
|
38
|
+
* **INPUT:** What specific data/interfaces are available from previous subtasks?
|
|
39
|
+
* **OUTPUT:** What exact interface does this subtask expose?
|
|
40
|
+
* **MOCKING:** What external services must be mocked to keep this subtask isolated?
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## PROCESS
|
|
45
|
+
|
|
46
|
+
1. **ANALYZE** the attached or referenced PRD.
|
|
47
|
+
2. **RESEARCH (SPAWN & VALIDATE):**
|
|
48
|
+
* **Spawn** subagents to map the codebase and verify PRD feasibility.
|
|
49
|
+
* **Spawn** subagents to find external documentation for new tech.
|
|
50
|
+
* **Store** findings in `plan/architecture/` (e.g., `system_context.md`, `external_deps.md`).
|
|
51
|
+
3. **DETERMINE** the highest level of scope (Phase, Milestone, or Task).
|
|
52
|
+
4. **DECOMPOSE** strictly downwards to the Subtask level, using your research to populate the `context_scope`.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## OUTPUT FORMAT
|
|
57
|
+
|
|
58
|
+
**CONSTRAINT:** Output **ONLY** a valid JSON object. No conversational text.
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"backlog": [
|
|
63
|
+
{
|
|
64
|
+
"type": "Phase",
|
|
65
|
+
"id": "P[#]",
|
|
66
|
+
"title": "Phase Title",
|
|
67
|
+
"status": "Planned | Researching | Ready | Implementing | Complete | Failed",
|
|
68
|
+
"description": "High level goal.",
|
|
69
|
+
"milestones": [
|
|
70
|
+
{
|
|
71
|
+
"type": "Milestone",
|
|
72
|
+
"id": "P[#].M[#]",
|
|
73
|
+
"title": "Milestone Title",
|
|
74
|
+
"status": "Planned",
|
|
75
|
+
"description": "Key objective.",
|
|
76
|
+
"tasks": [
|
|
77
|
+
{
|
|
78
|
+
"type": "Task",
|
|
79
|
+
"id": "P[#].M[#].T[#]",
|
|
80
|
+
"title": "Task Title",
|
|
81
|
+
"status": "Planned",
|
|
82
|
+
"description": "Feature definition.",
|
|
83
|
+
"subtasks": [
|
|
84
|
+
{
|
|
85
|
+
"type": "Subtask",
|
|
86
|
+
"id": "P[#].M[#].T[#].S[#]",
|
|
87
|
+
"title": "Subtask Title",
|
|
88
|
+
"status": "Planned",
|
|
89
|
+
"story_points": 1,
|
|
90
|
+
"dependencies": ["ID of prerequisite subtask"],
|
|
91
|
+
"context_scope": "CONTRACT DEFINITION:\n1. RESEARCH NOTE: [Finding from plan/architecture/ regarding this feature].\n2. INPUT: [Specific data structure/variable] from [Dependency ID].\n3. LOGIC: Implement [PRD Section X] logic. Mock [Service Y] for isolation.\n4. OUTPUT: Return [Result Object/Interface] for consumption by [Next Subtask ID]."
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|