mycontext-cli 4.2.17 → 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 (123) hide show
  1. package/README.md +62 -97
  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 +129 -0
  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-screens.d.ts +5 -0
  37. package/dist/commands/generate-screens.d.ts.map +1 -1
  38. package/dist/commands/generate-screens.js +160 -12
  39. package/dist/commands/generate-screens.js.map +1 -1
  40. package/dist/commands/generate.d.ts.map +1 -1
  41. package/dist/commands/generate.js +43 -9
  42. package/dist/commands/generate.js.map +1 -1
  43. package/dist/commands/ideate.d.ts +14 -0
  44. package/dist/commands/ideate.d.ts.map +1 -0
  45. package/dist/commands/ideate.js +153 -0
  46. package/dist/commands/ideate.js.map +1 -0
  47. package/dist/commands/init.d.ts +1 -0
  48. package/dist/commands/init.d.ts.map +1 -1
  49. package/dist/commands/init.js +27 -2
  50. package/dist/commands/init.js.map +1 -1
  51. package/dist/commands/migrate-transform.d.ts +16 -0
  52. package/dist/commands/migrate-transform.d.ts.map +1 -0
  53. package/dist/commands/migrate-transform.js +135 -0
  54. package/dist/commands/migrate-transform.js.map +1 -0
  55. package/dist/commands/sync-readme.d.ts +3 -1
  56. package/dist/commands/sync-readme.d.ts.map +1 -1
  57. package/dist/commands/sync-readme.js +57 -59
  58. package/dist/commands/sync-readme.js.map +1 -1
  59. package/dist/commands/vision-test.d.ts.map +1 -1
  60. package/dist/commands/vision-test.js +8 -0
  61. package/dist/commands/vision-test.js.map +1 -1
  62. package/dist/constants/subAgentPersonalities.d.ts.map +1 -1
  63. package/dist/constants/subAgentPersonalities.js +29 -0
  64. package/dist/constants/subAgentPersonalities.js.map +1 -1
  65. package/dist/core/ai/AICore.d.ts +8 -0
  66. package/dist/core/ai/AICore.d.ts.map +1 -1
  67. package/dist/core/ai/AICore.js +50 -1
  68. package/dist/core/ai/AICore.js.map +1 -1
  69. package/dist/core/ai/TokenCostModel.d.ts +37 -0
  70. package/dist/core/ai/TokenCostModel.d.ts.map +1 -0
  71. package/dist/core/ai/TokenCostModel.js +132 -0
  72. package/dist/core/ai/TokenCostModel.js.map +1 -0
  73. package/dist/core/brain/BrainClient.d.ts +13 -1
  74. package/dist/core/brain/BrainClient.d.ts.map +1 -1
  75. package/dist/core/brain/BrainClient.js +49 -0
  76. package/dist/core/brain/BrainClient.js.map +1 -1
  77. package/dist/interfaces/AIClient.d.ts +4 -0
  78. package/dist/interfaces/AIClient.d.ts.map +1 -1
  79. package/dist/interfaces/AIClient.js.map +1 -1
  80. package/dist/services/MonorepoScanner.d.ts +18 -0
  81. package/dist/services/MonorepoScanner.d.ts.map +1 -0
  82. package/dist/services/MonorepoScanner.js +101 -0
  83. package/dist/services/MonorepoScanner.js.map +1 -0
  84. package/dist/services/ProjectScanner.d.ts.map +1 -1
  85. package/dist/services/ProjectScanner.js +7 -0
  86. package/dist/services/ProjectScanner.js.map +1 -1
  87. package/dist/services/ReadmeDeducer.d.ts +14 -0
  88. package/dist/services/ReadmeDeducer.d.ts.map +1 -0
  89. package/dist/services/ReadmeDeducer.js +109 -0
  90. package/dist/services/ReadmeDeducer.js.map +1 -0
  91. package/dist/tui/DashboardMode.d.ts +2 -0
  92. package/dist/tui/DashboardMode.d.ts.map +1 -1
  93. package/dist/tui/DashboardMode.js +116 -1
  94. package/dist/tui/DashboardMode.js.map +1 -1
  95. package/dist/types/constraint.d.ts +123 -0
  96. package/dist/types/constraint.d.ts.map +1 -0
  97. package/dist/types/constraint.js +13 -0
  98. package/dist/types/constraint.js.map +1 -0
  99. package/dist/types/living-context.d.ts +6 -0
  100. package/dist/types/living-context.d.ts.map +1 -1
  101. package/dist/utils/claudeAgentClient.d.ts +4 -0
  102. package/dist/utils/claudeAgentClient.d.ts.map +1 -1
  103. package/dist/utils/claudeAgentClient.js +6 -0
  104. package/dist/utils/claudeAgentClient.js.map +1 -1
  105. package/dist/utils/contextRenderer.d.ts.map +1 -1
  106. package/dist/utils/contextRenderer.js +40 -30
  107. package/dist/utils/contextRenderer.js.map +1 -1
  108. package/dist/utils/geminiClient.d.ts +11 -1
  109. package/dist/utils/geminiClient.d.ts.map +1 -1
  110. package/dist/utils/geminiClient.js +106 -58
  111. package/dist/utils/geminiClient.js.map +1 -1
  112. package/dist/utils/githubModelsClient.d.ts +4 -0
  113. package/dist/utils/githubModelsClient.d.ts.map +1 -1
  114. package/dist/utils/githubModelsClient.js +6 -0
  115. package/dist/utils/githubModelsClient.js.map +1 -1
  116. package/dist/utils/openRouterClient.d.ts +1 -0
  117. package/dist/utils/openRouterClient.d.ts.map +1 -1
  118. package/dist/utils/openRouterClient.js +3 -0
  119. package/dist/utils/openRouterClient.js.map +1 -1
  120. package/package.json +4 -2
  121. package/dist/templates/playbooks/instantdb-integration.md +0 -851
  122. package/dist/templates/playbooks/mpesa-integration.md +0 -652
  123. package/dist/templates/ui-spec-examples.md +0 -318
package/README.md CHANGED
@@ -1,106 +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
- ---
38
-
39
- ## 🚀 The Brain-First Workflow
40
-
41
- Transforming natural language into project intent involves three core stages, all mediated by the **Living Brain (`.mycontext/context.json`)**.
42
-
43
- ### 1. Initialization (`mycontext init`)
44
- Establish the `.mycontext` directory and establish the source of truth.
45
- ```bash
46
- mycontext init --interactive
47
- ```
48
- *AI auto-infers project framework, core entities, and foundational requirements.*
49
-
50
- ### 2. High-Fidelity Sync (`mycontext generate context --full`)
51
- The most critical step. This command performs a unified AI pass to synchronize:
52
- - **Requirements**: Functional and non-functional specs (PRD).
53
- - **Features**: Atomic feature breakdown with technical specifications.
54
- - **Types**: Shared TypeScript entity definitions and database schemas.
55
- - **Brand**: Visual design tokens (colors, typography).
56
- - **Registry**: Auto-discovery of existing code to prevent drift.
57
-
58
- ```bash
59
- mycontext generate context --full --description "A removal tool for image backgrounds"
60
- ```
61
-
62
- ### 3. Component Orchestration (`mycontext generate-components`)
63
- Render the specifications in the brain into production-ready React code.
64
- ```bash
65
- # Generate everything in the brain
66
- mycontext generate-components all
67
-
68
- # Or target a specific group
69
- mycontext generate-components gallery
70
- ```
71
-
72
- ### 4. Project Cockpit (The Dashboard)
73
- Run `mycontext` without arguments to launch the interactive dashboard.
74
- - **Project Health**: View feature completeness and type coverage.
75
- - **Registry Manager**: Browse generated components and schemas.
76
- - **Sync Trigger**: Instantly refresh the brain from the dashboard.
77
-
78
- ---
79
-
80
- ## 🛠️ Diagnostics & Maintenance
81
-
82
- - **`mycontext doctor`**: Verify project health, type safety, and schema alignment.
83
- - **`mycontext sync --readme`**: Synchronize the root README with the brain's latest design manifest.
84
- - **`mycontext status`**: Quick check of the current project state.
85
-
86
- ---
87
-
88
- ## 📦 Installation
13
+ ## 📂 Project Structure
89
14
  ```bash
90
- npm install -g mycontext-cli
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
91
45
  ```
92
46
 
93
- ---
94
-
95
- ## 🛣️ Roadmap
96
- - [x] **Phase 0.7**: Brain-First Architecture & TUI Dashboard
97
- - [x] **Phase 0.8**: Smart Layout Engine & Deterministic Scaffolding
98
- - [ ] **Phase 1**: Multi-Agent Orchestration (Backend/Security/QA)
99
- - [ ] **Phase 2**: Granular component-level targeted LLM refactors
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 -->
100
69
 
101
70
  ---
102
-
103
- ## 📄 License & Links
104
- MIT © [MyContext Team](https://github.com/farajabien/mycontext-cli)
105
- - [Documentation](https://mycontext.framer.website)
106
- - [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"}