mycontext-cli 4.2.16 → 4.2.18

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.
Files changed (167) hide show
  1. package/README.md +62 -96
  2. package/dist/agents/implementations/SolverAgent.d.ts +42 -0
  3. package/dist/agents/implementations/SolverAgent.d.ts.map +1 -0
  4. package/dist/agents/implementations/SolverAgent.js +543 -0
  5. package/dist/agents/implementations/SolverAgent.js.map +1 -0
  6. package/dist/cli.js +143 -43
  7. package/dist/cli.js.map +1 -1
  8. package/dist/clients/ClaudeSDKClient.d.ts +1 -0
  9. package/dist/clients/ClaudeSDKClient.d.ts.map +1 -1
  10. package/dist/clients/ClaudeSDKClient.js +3 -0
  11. package/dist/clients/ClaudeSDKClient.js.map +1 -1
  12. package/dist/clients/MyContextAIClient.d.ts +4 -0
  13. package/dist/clients/MyContextAIClient.d.ts.map +1 -1
  14. package/dist/clients/MyContextAIClient.js +6 -0
  15. package/dist/clients/MyContextAIClient.js.map +1 -1
  16. package/dist/clients/ProviderChain.d.ts +1 -0
  17. package/dist/clients/ProviderChain.d.ts.map +1 -1
  18. package/dist/clients/ProviderChain.js +3 -0
  19. package/dist/clients/ProviderChain.js.map +1 -1
  20. package/dist/clients/XAIClient.d.ts +4 -0
  21. package/dist/clients/XAIClient.d.ts.map +1 -1
  22. package/dist/clients/XAIClient.js +6 -0
  23. package/dist/clients/XAIClient.js.map +1 -1
  24. package/dist/commands/add.d.ts +17 -0
  25. package/dist/commands/add.d.ts.map +1 -0
  26. package/dist/commands/add.js +164 -0
  27. package/dist/commands/add.js.map +1 -0
  28. package/dist/commands/build.d.ts +10 -0
  29. package/dist/commands/build.d.ts.map +1 -0
  30. package/dist/commands/build.js +37 -0
  31. package/dist/commands/build.js.map +1 -0
  32. package/dist/commands/generate-assets.d.ts +11 -0
  33. package/dist/commands/generate-assets.d.ts.map +1 -0
  34. package/dist/commands/generate-assets.js +131 -0
  35. package/dist/commands/generate-assets.js.map +1 -0
  36. package/dist/commands/generate-components.d.ts.map +1 -1
  37. package/dist/commands/generate-components.js +21 -18
  38. package/dist/commands/generate-components.js.map +1 -1
  39. package/dist/commands/generate-screens.d.ts +5 -0
  40. package/dist/commands/generate-screens.d.ts.map +1 -1
  41. package/dist/commands/generate-screens.js +160 -12
  42. package/dist/commands/generate-screens.js.map +1 -1
  43. package/dist/commands/generate.d.ts +3 -0
  44. package/dist/commands/generate.d.ts.map +1 -1
  45. package/dist/commands/generate.js +285 -167
  46. package/dist/commands/generate.js.map +1 -1
  47. package/dist/commands/ideate.d.ts +14 -0
  48. package/dist/commands/ideate.d.ts.map +1 -0
  49. package/dist/commands/ideate.js +153 -0
  50. package/dist/commands/ideate.js.map +1 -0
  51. package/dist/commands/init-interactive.d.ts.map +1 -1
  52. package/dist/commands/init-interactive.js +30 -2
  53. package/dist/commands/init-interactive.js.map +1 -1
  54. package/dist/commands/init.d.ts +2 -0
  55. package/dist/commands/init.d.ts.map +1 -1
  56. package/dist/commands/init.js +220 -39
  57. package/dist/commands/init.js.map +1 -1
  58. package/dist/commands/migrate-transform.d.ts +16 -0
  59. package/dist/commands/migrate-transform.d.ts.map +1 -0
  60. package/dist/commands/migrate-transform.js +135 -0
  61. package/dist/commands/migrate-transform.js.map +1 -0
  62. package/dist/commands/setup-complete.d.ts.map +1 -1
  63. package/dist/commands/setup-complete.js +4 -6
  64. package/dist/commands/setup-complete.js.map +1 -1
  65. package/dist/commands/sync-readme.d.ts +3 -1
  66. package/dist/commands/sync-readme.d.ts.map +1 -1
  67. package/dist/commands/sync-readme.js +57 -59
  68. package/dist/commands/sync-readme.js.map +1 -1
  69. package/dist/commands/vision-test.d.ts.map +1 -1
  70. package/dist/commands/vision-test.js +8 -0
  71. package/dist/commands/vision-test.js.map +1 -1
  72. package/dist/commands/workflow.d.ts.map +1 -1
  73. package/dist/commands/workflow.js +10 -58
  74. package/dist/commands/workflow.js.map +1 -1
  75. package/dist/constants/subAgentPersonalities.d.ts.map +1 -1
  76. package/dist/constants/subAgentPersonalities.js +29 -0
  77. package/dist/constants/subAgentPersonalities.js.map +1 -1
  78. package/dist/core/ai/AICore.d.ts +12 -0
  79. package/dist/core/ai/AICore.d.ts.map +1 -1
  80. package/dist/core/ai/AICore.js +56 -1
  81. package/dist/core/ai/AICore.js.map +1 -1
  82. package/dist/core/ai/TokenCostModel.d.ts +37 -0
  83. package/dist/core/ai/TokenCostModel.d.ts.map +1 -0
  84. package/dist/core/ai/TokenCostModel.js +132 -0
  85. package/dist/core/ai/TokenCostModel.js.map +1 -0
  86. package/dist/core/brain/BrainClient.d.ts +13 -1
  87. package/dist/core/brain/BrainClient.d.ts.map +1 -1
  88. package/dist/core/brain/BrainClient.js +49 -0
  89. package/dist/core/brain/BrainClient.js.map +1 -1
  90. package/dist/interfaces/AIClient.d.ts +4 -0
  91. package/dist/interfaces/AIClient.d.ts.map +1 -1
  92. package/dist/interfaces/AIClient.js.map +1 -1
  93. package/dist/services/MonorepoScanner.d.ts +18 -0
  94. package/dist/services/MonorepoScanner.d.ts.map +1 -0
  95. package/dist/services/MonorepoScanner.js +101 -0
  96. package/dist/services/MonorepoScanner.js.map +1 -0
  97. package/dist/services/ProjectScanner.d.ts.map +1 -1
  98. package/dist/services/ProjectScanner.js +7 -0
  99. package/dist/services/ProjectScanner.js.map +1 -1
  100. package/dist/services/ReadmeDeducer.d.ts +14 -0
  101. package/dist/services/ReadmeDeducer.d.ts.map +1 -0
  102. package/dist/services/ReadmeDeducer.js +109 -0
  103. package/dist/services/ReadmeDeducer.js.map +1 -0
  104. package/dist/tui/DashboardMode.d.ts +16 -0
  105. package/dist/tui/DashboardMode.d.ts.map +1 -0
  106. package/dist/tui/DashboardMode.js +190 -0
  107. package/dist/tui/DashboardMode.js.map +1 -0
  108. package/dist/tui/TUIClient.d.ts +9 -0
  109. package/dist/tui/TUIClient.d.ts.map +1 -1
  110. package/dist/tui/TUIClient.js +63 -0
  111. package/dist/tui/TUIClient.js.map +1 -1
  112. package/dist/types/constraint.d.ts +123 -0
  113. package/dist/types/constraint.d.ts.map +1 -0
  114. package/dist/types/constraint.js +13 -0
  115. package/dist/types/constraint.js.map +1 -0
  116. package/dist/types/index.d.ts +1 -1
  117. package/dist/types/index.d.ts.map +1 -1
  118. package/dist/types/living-context.d.ts +7 -0
  119. package/dist/types/living-context.d.ts.map +1 -1
  120. package/dist/types/tui.d.ts +3 -1
  121. package/dist/types/tui.d.ts.map +1 -1
  122. package/dist/utils/claudeAgentClient.d.ts +4 -0
  123. package/dist/utils/claudeAgentClient.d.ts.map +1 -1
  124. package/dist/utils/claudeAgentClient.js +6 -0
  125. package/dist/utils/claudeAgentClient.js.map +1 -1
  126. package/dist/utils/contextEnricher.d.ts +2 -1
  127. package/dist/utils/contextEnricher.d.ts.map +1 -1
  128. package/dist/utils/contextEnricher.js +138 -1
  129. package/dist/utils/contextEnricher.js.map +1 -1
  130. package/dist/utils/contextRenderer.d.ts +3 -0
  131. package/dist/utils/contextRenderer.d.ts.map +1 -1
  132. package/dist/utils/contextRenderer.js +101 -26
  133. package/dist/utils/contextRenderer.js.map +1 -1
  134. package/dist/utils/fileSystem.d.ts.map +1 -1
  135. package/dist/utils/fileSystem.js +32 -1
  136. package/dist/utils/fileSystem.js.map +1 -1
  137. package/dist/utils/geminiClient.d.ts +11 -1
  138. package/dist/utils/geminiClient.d.ts.map +1 -1
  139. package/dist/utils/geminiClient.js +109 -56
  140. package/dist/utils/geminiClient.js.map +1 -1
  141. package/dist/utils/githubModelsClient.d.ts +4 -0
  142. package/dist/utils/githubModelsClient.d.ts.map +1 -1
  143. package/dist/utils/githubModelsClient.js +10 -1
  144. package/dist/utils/githubModelsClient.js.map +1 -1
  145. package/dist/utils/openRouterClient.d.ts +1 -0
  146. package/dist/utils/openRouterClient.d.ts.map +1 -1
  147. package/dist/utils/openRouterClient.js +4 -0
  148. package/dist/utils/openRouterClient.js.map +1 -1
  149. package/dist/utils/unifiedDesignContextLoader.d.ts.map +1 -1
  150. package/dist/utils/unifiedDesignContextLoader.js +14 -0
  151. package/dist/utils/unifiedDesignContextLoader.js.map +1 -1
  152. package/package.json +27 -22
  153. package/dist/commands/assemble-features.d.ts +0 -40
  154. package/dist/commands/assemble-features.d.ts.map +0 -1
  155. package/dist/commands/assemble-features.js +0 -383
  156. package/dist/commands/assemble-features.js.map +0 -1
  157. package/dist/commands/compile-prd.d.ts +0 -18
  158. package/dist/commands/compile-prd.d.ts.map +0 -1
  159. package/dist/commands/compile-prd.js +0 -253
  160. package/dist/commands/compile-prd.js.map +0 -1
  161. package/dist/commands/generate-context-files.d.ts +0 -44
  162. package/dist/commands/generate-context-files.d.ts.map +0 -1
  163. package/dist/commands/generate-context-files.js +0 -871
  164. package/dist/commands/generate-context-files.js.map +0 -1
  165. package/dist/templates/playbooks/instantdb-integration.md +0 -851
  166. package/dist/templates/playbooks/mpesa-integration.md +0 -652
  167. package/dist/templates/ui-spec-examples.md +0 -318
package/README.md CHANGED
@@ -1,105 +1,71 @@
1
- # MyContext CLI - Deterministic Full-Stack App Compiler
1
+ # The Project
2
2
 
3
- Transform natural language into production-ready Next.js applications through deterministic compilation.
3
+ A high-fidelity application built with MyContext.
4
4
 
5
- MyContext is not an AI code generator—it's a natural-language-to-project compiler that uses LLMs only for intent parsing, while all code generation is performed by deterministic script templates. No hallucinations. No guessing. Just facts → manifest → complete application.
5
+ ## 🎯 Project Overview
6
+ This project is built using a spec-driven development paradigm guided by a central 'Living Brain'.
6
7
 
7
- [![npm version](https://img.shields.io/npm/v/mycontext-cli.svg)](https://www.npmjs.com/package/mycontext-cli)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ ## ✨ Key Features
9
+ - **Authentication**: undefined
10
+ - **Pricing Table**: undefined
11
+ - **FAQ Section**: undefined
9
12
 
10
- ---
11
-
12
- ## 🧠 Core Philosophy
13
-
14
- ### Zero-Hallucination Compilation
15
- Most AI tools act as "chat-driven coders" that guess your requirements. MyContext acts as a **Natural Language Compiler**:
16
- 1. **Analyze**: LLM parses your intent into a strict JSON manifest (FSR).
17
- 2. **Clarify**: The CLI identifies gaps and prompts you *before* any code is written.
18
- 3. **Generate**: Deterministic script templates render valid, typed Next.js code.
19
-
20
- ### The Living Brain (`.mycontext/`)
21
- Every project is governed by a local "brain" folder that ensures your code, types, and design tokens never drift:
22
- - `context.json`: The master source of truth for your project features.
23
- - `design_manifest.json`: Your premium design tokens and layout rules.
24
- - `registry/`: Automated tracking of all generated components and actions.
25
-
26
- ---
27
-
28
- ## 🚀 NEW: Phase 0.7 Premium Features (VERIFIED ✓)
29
-
30
- - **Smart Layout Engine**: Autonomic 8/12 grid placement based on component `weight`.
31
- - **Test-Mode Fast-Forward**: Detects `__MYCONTEXT_TEST_MODE__` to speed up animations 60x.
32
- - **Auto-Test Generation**: `mycontext test:generate` creates Playwright specs from your FSR.
33
- - **Density Guardrails**: Visual checks to prevent "rammed UI" and visual clutter.
34
-
35
- ---
36
-
37
- ## 🏗️ Full Project Workflow
38
-
39
- ### 1. Initialization (`mycontext init`)
40
- Set up your framework (InstantDB, Next.js, or shadcn) and establish the project brain.
41
- ```bash
42
- mycontext init --interactive
43
- ```
44
- *AI auto-infers 90% of your spec, reducing setup from 15 mins to 2 mins.*
45
-
46
- ### 2. Feature Planning (`mycontext plan`)
47
- Translate a feature request into a strict FSR (Feature Structured Representation).
48
- ```bash
49
- mycontext plan "A gallery for removed background images with token display"
50
- ```
51
-
52
- ### 3. Deterministic Build (`mycontext build`)
53
- Compile your FSR into production-ready code.
54
- ```bash
55
- mycontext build --feature gallery
56
- ```
57
-
58
- ### 4. Continuous Sync (`mycontext sync`)
59
- Automatically update your documentation and `context.json` brain as your code evolves.
60
- ```bash
61
- mycontext sync --readme
62
- ```
63
-
64
- ### 5. Diagnostics (`mycontext doctor`)
65
- Verify type safety, catch schema drift, and check for "as any" usage.
13
+ ## 📂 Project Structure
66
14
  ```bash
67
- mycontext doctor --verbose
15
+ 📁 bao-pilot
16
+ 📁 bao-pilot
17
+ 📄 build-errors-2.txt
18
+ 📄 build-errors.txt
19
+ 📁 docs
20
+ 📁 research
21
+ 📁 examples
22
+ 📄 mega-context-sample.json
23
+ 📄 validate-context.ts
24
+ 📁 experiments
25
+ 📁 living-brain-blog
26
+ 📁 pricing-mission
27
+ 📄 jest.config.js
28
+ 📄 mycontext-cli-4.2.13.tgz
29
+ 📄 mycontext-cli-4.2.14.tgz
30
+ 📄 mycontext-cli-4.2.15.tgz
31
+ 📄 mycontext-cli-4.2.16.tgz
32
+ 📄 package.json
33
+ 📁 public
34
+ 📁 scripts
35
+ 📄 generateTypesFromSchema.ts
36
+ 📄 migrate-brain.ts
37
+ 📄 run-improvement-analysis.js
38
+ 📄 test-tailor-cv.sh
39
+ 📁 src
40
+ 📁 agents
41
+ 📄 cli.ts
42
+ 📁 clients
43
+ 📁 commands
44
+ 📁 config
68
45
  ```
69
46
 
70
- ---
71
-
72
- ## 📦 Installation
73
- ```bash
74
- npm install -g mycontext-cli
75
- ```
47
+ ## 🚀 Quick Start
48
+ 1. **Install Dependencies**:
49
+ ```bash
50
+ pnpm install
51
+ ```
52
+ 2. **Run Dev Server**:
53
+ ```bash
54
+ npm run dev
55
+ ```
56
+
57
+ <!-- mycontext:start -->
58
+ ### 🎯 Project Overview
59
+ AI-driven development platform.
60
+
61
+ ### ✨ Key Features
62
+ - Authentication
63
+ - Pricing Table
64
+ - FAQ Section
65
+
66
+ ---
67
+ _Last synchronized with MyContext Living DB on 3/10/2026_
68
+ <!-- mycontext:end -->
76
69
 
77
70
  ---
78
-
79
- ## 🛣️ Roadmap
80
- - [x] **Phase 0.6**: Deterministic Scaffolding & Token Tracking
81
- - [x] **Phase 0.7**: Premium Layout Engine & Test-Mode
82
- - [ ] **Phase 1**: Global Registry & Multi-Agent Orchestration
83
- - [ ] **Phase 2**: Granular component-level targeted LLM refactors
84
-
85
- ---
86
-
87
- ## 📄 License & Links
88
- MIT © [MyContext Team](https://github.com/farajabien/mycontext-cli)
89
- - [Documentation](https://mycontext.framer.website)
90
- - [NPM: mycontext-cli](https://www.npmjs.com/package/mycontext-cli)
91
-
92
- ---
93
-
94
- ## 🛣️ Roadmap
95
- - [x] **Phase 0.6**: Deterministic Scaffolding & Token Tracking
96
- - [x] **Phase 0.7**: Premium Layout Engine & Test-Mode
97
- - [ ] **Phase 1**: Global Registry & Multi-Agent Orchestration
98
- - [ ] **Phase 2**: Granular component-level targeted LLM refactors
99
-
100
- ---
101
-
102
- ## 📄 License & Links
103
- MIT © [MyContext Team](https://github.com/farajabien/mycontext-cli)
104
- - [Documentation](https://mycontext.framer.website)
105
- - [NPM: mycontext-cli](https://www.npmjs.com/package/mycontext-cli)
71
+ *Generated by MyContext CLI - Living Brain JSON Source*
@@ -0,0 +1,42 @@
1
+ /**
2
+ * SolverAgent
3
+ *
4
+ * Research sub-agent that implements Phase 2–4 of the "Structured Reasoning
5
+ * Systems" research plan:
6
+ *
7
+ * NL → LLM → ConstraintSpec (JSON Brain) → Solver → SolveResult + metrics
8
+ *
9
+ * The solver operates in pure TypeScript with no external dependencies so the
10
+ * pipeline can run immediately. Swap the `_nativeSolve` call for a Z3 /
11
+ * OR-Tools binding once you want to scale to harder instances.
12
+ *
13
+ * Key design choices:
14
+ * - Expression evaluation uses a recursive-descent parser (NO eval()).
15
+ * - Three interchangeable strategies: brute-force, constraint-propagation,
16
+ * llm-guided (LLM trims the domain before search).
17
+ * - Every run produces a SolveTrace with operations count, search-space size,
18
+ * pruning ratio — the numbers for Phase 4 / 5 measurement tables.
19
+ */
20
+ import { SubAgent } from "../interfaces/SubAgent";
21
+ import { SolverInput, SolverOutput, ConstraintSpec } from "../../types/constraint";
22
+ export declare class SolverAgent implements SubAgent<SolverInput, SolverOutput> {
23
+ name: string;
24
+ description: string;
25
+ personality: string;
26
+ llmProvider: string;
27
+ expertise: string[];
28
+ private ai;
29
+ constructor();
30
+ validate(input: SolverInput): Promise<boolean>;
31
+ run(input: SolverInput): Promise<SolverOutput>;
32
+ private _translateNL;
33
+ private _llmNarrowDomains;
34
+ getStatus(): Promise<{
35
+ name: string;
36
+ status: "idle";
37
+ errorCount: number;
38
+ successCount: number;
39
+ }>;
40
+ }
41
+ export declare function createFactorizationSpec(N: number): ConstraintSpec;
42
+ //# sourceMappingURL=SolverAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolverAgent.d.ts","sourceRoot":"","sources":["../../../src/agents/implementations/SolverAgent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EAQf,MAAM,wBAAwB,CAAC;AAwbhC,qBAAa,WAAY,YAAW,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACrE,IAAI,SAAiB;IACrB,WAAW,SACsJ;IACjK,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB,OAAO,CAAC,EAAE,CAAiB;;IAWrB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAI9C,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;YAuCtC,YAAY;YAqCZ,iBAAiB;IA8BzB,SAAS;;;;;;CAQhB;AAMD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,MAAM,GAAG,cAAc,CAqBjE"}