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.
- package/README.md +62 -96
- package/dist/agents/implementations/SolverAgent.d.ts +42 -0
- package/dist/agents/implementations/SolverAgent.d.ts.map +1 -0
- package/dist/agents/implementations/SolverAgent.js +543 -0
- package/dist/agents/implementations/SolverAgent.js.map +1 -0
- package/dist/cli.js +143 -43
- package/dist/cli.js.map +1 -1
- package/dist/clients/ClaudeSDKClient.d.ts +1 -0
- package/dist/clients/ClaudeSDKClient.d.ts.map +1 -1
- package/dist/clients/ClaudeSDKClient.js +3 -0
- package/dist/clients/ClaudeSDKClient.js.map +1 -1
- package/dist/clients/MyContextAIClient.d.ts +4 -0
- package/dist/clients/MyContextAIClient.d.ts.map +1 -1
- package/dist/clients/MyContextAIClient.js +6 -0
- package/dist/clients/MyContextAIClient.js.map +1 -1
- package/dist/clients/ProviderChain.d.ts +1 -0
- package/dist/clients/ProviderChain.d.ts.map +1 -1
- package/dist/clients/ProviderChain.js +3 -0
- package/dist/clients/ProviderChain.js.map +1 -1
- package/dist/clients/XAIClient.d.ts +4 -0
- package/dist/clients/XAIClient.d.ts.map +1 -1
- package/dist/clients/XAIClient.js +6 -0
- package/dist/clients/XAIClient.js.map +1 -1
- package/dist/commands/add.d.ts +17 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +164 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/build.d.ts +10 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +37 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/generate-assets.d.ts +11 -0
- package/dist/commands/generate-assets.d.ts.map +1 -0
- package/dist/commands/generate-assets.js +131 -0
- package/dist/commands/generate-assets.js.map +1 -0
- package/dist/commands/generate-components.d.ts.map +1 -1
- package/dist/commands/generate-components.js +21 -18
- package/dist/commands/generate-components.js.map +1 -1
- package/dist/commands/generate-screens.d.ts +5 -0
- package/dist/commands/generate-screens.d.ts.map +1 -1
- package/dist/commands/generate-screens.js +160 -12
- package/dist/commands/generate-screens.js.map +1 -1
- package/dist/commands/generate.d.ts +3 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +285 -167
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/ideate.d.ts +14 -0
- package/dist/commands/ideate.d.ts.map +1 -0
- package/dist/commands/ideate.js +153 -0
- package/dist/commands/ideate.js.map +1 -0
- package/dist/commands/init-interactive.d.ts.map +1 -1
- package/dist/commands/init-interactive.js +30 -2
- package/dist/commands/init-interactive.js.map +1 -1
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +220 -39
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate-transform.d.ts +16 -0
- package/dist/commands/migrate-transform.d.ts.map +1 -0
- package/dist/commands/migrate-transform.js +135 -0
- package/dist/commands/migrate-transform.js.map +1 -0
- package/dist/commands/setup-complete.d.ts.map +1 -1
- package/dist/commands/setup-complete.js +4 -6
- package/dist/commands/setup-complete.js.map +1 -1
- package/dist/commands/sync-readme.d.ts +3 -1
- package/dist/commands/sync-readme.d.ts.map +1 -1
- package/dist/commands/sync-readme.js +57 -59
- package/dist/commands/sync-readme.js.map +1 -1
- package/dist/commands/vision-test.d.ts.map +1 -1
- package/dist/commands/vision-test.js +8 -0
- package/dist/commands/vision-test.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +10 -58
- package/dist/commands/workflow.js.map +1 -1
- package/dist/constants/subAgentPersonalities.d.ts.map +1 -1
- package/dist/constants/subAgentPersonalities.js +29 -0
- package/dist/constants/subAgentPersonalities.js.map +1 -1
- package/dist/core/ai/AICore.d.ts +12 -0
- package/dist/core/ai/AICore.d.ts.map +1 -1
- package/dist/core/ai/AICore.js +56 -1
- package/dist/core/ai/AICore.js.map +1 -1
- package/dist/core/ai/TokenCostModel.d.ts +37 -0
- package/dist/core/ai/TokenCostModel.d.ts.map +1 -0
- package/dist/core/ai/TokenCostModel.js +132 -0
- package/dist/core/ai/TokenCostModel.js.map +1 -0
- package/dist/core/brain/BrainClient.d.ts +13 -1
- package/dist/core/brain/BrainClient.d.ts.map +1 -1
- package/dist/core/brain/BrainClient.js +49 -0
- package/dist/core/brain/BrainClient.js.map +1 -1
- package/dist/interfaces/AIClient.d.ts +4 -0
- package/dist/interfaces/AIClient.d.ts.map +1 -1
- package/dist/interfaces/AIClient.js.map +1 -1
- package/dist/services/MonorepoScanner.d.ts +18 -0
- package/dist/services/MonorepoScanner.d.ts.map +1 -0
- package/dist/services/MonorepoScanner.js +101 -0
- package/dist/services/MonorepoScanner.js.map +1 -0
- package/dist/services/ProjectScanner.d.ts.map +1 -1
- package/dist/services/ProjectScanner.js +7 -0
- package/dist/services/ProjectScanner.js.map +1 -1
- package/dist/services/ReadmeDeducer.d.ts +14 -0
- package/dist/services/ReadmeDeducer.d.ts.map +1 -0
- package/dist/services/ReadmeDeducer.js +109 -0
- package/dist/services/ReadmeDeducer.js.map +1 -0
- package/dist/tui/DashboardMode.d.ts +16 -0
- package/dist/tui/DashboardMode.d.ts.map +1 -0
- package/dist/tui/DashboardMode.js +190 -0
- package/dist/tui/DashboardMode.js.map +1 -0
- package/dist/tui/TUIClient.d.ts +9 -0
- package/dist/tui/TUIClient.d.ts.map +1 -1
- package/dist/tui/TUIClient.js +63 -0
- package/dist/tui/TUIClient.js.map +1 -1
- package/dist/types/constraint.d.ts +123 -0
- package/dist/types/constraint.d.ts.map +1 -0
- package/dist/types/constraint.js +13 -0
- package/dist/types/constraint.js.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/living-context.d.ts +7 -0
- package/dist/types/living-context.d.ts.map +1 -1
- package/dist/types/tui.d.ts +3 -1
- package/dist/types/tui.d.ts.map +1 -1
- package/dist/utils/claudeAgentClient.d.ts +4 -0
- package/dist/utils/claudeAgentClient.d.ts.map +1 -1
- package/dist/utils/claudeAgentClient.js +6 -0
- package/dist/utils/claudeAgentClient.js.map +1 -1
- package/dist/utils/contextEnricher.d.ts +2 -1
- package/dist/utils/contextEnricher.d.ts.map +1 -1
- package/dist/utils/contextEnricher.js +138 -1
- package/dist/utils/contextEnricher.js.map +1 -1
- package/dist/utils/contextRenderer.d.ts +3 -0
- package/dist/utils/contextRenderer.d.ts.map +1 -1
- package/dist/utils/contextRenderer.js +101 -26
- package/dist/utils/contextRenderer.js.map +1 -1
- package/dist/utils/fileSystem.d.ts.map +1 -1
- package/dist/utils/fileSystem.js +32 -1
- package/dist/utils/fileSystem.js.map +1 -1
- package/dist/utils/geminiClient.d.ts +11 -1
- package/dist/utils/geminiClient.d.ts.map +1 -1
- package/dist/utils/geminiClient.js +109 -56
- package/dist/utils/geminiClient.js.map +1 -1
- package/dist/utils/githubModelsClient.d.ts +4 -0
- package/dist/utils/githubModelsClient.d.ts.map +1 -1
- package/dist/utils/githubModelsClient.js +10 -1
- package/dist/utils/githubModelsClient.js.map +1 -1
- package/dist/utils/openRouterClient.d.ts +1 -0
- package/dist/utils/openRouterClient.d.ts.map +1 -1
- package/dist/utils/openRouterClient.js +4 -0
- package/dist/utils/openRouterClient.js.map +1 -1
- package/dist/utils/unifiedDesignContextLoader.d.ts.map +1 -1
- package/dist/utils/unifiedDesignContextLoader.js +14 -0
- package/dist/utils/unifiedDesignContextLoader.js.map +1 -1
- package/package.json +27 -22
- package/dist/commands/assemble-features.d.ts +0 -40
- package/dist/commands/assemble-features.d.ts.map +0 -1
- package/dist/commands/assemble-features.js +0 -383
- package/dist/commands/assemble-features.js.map +0 -1
- package/dist/commands/compile-prd.d.ts +0 -18
- package/dist/commands/compile-prd.d.ts.map +0 -1
- package/dist/commands/compile-prd.js +0 -253
- package/dist/commands/compile-prd.js.map +0 -1
- package/dist/commands/generate-context-files.d.ts +0 -44
- package/dist/commands/generate-context-files.d.ts.map +0 -1
- package/dist/commands/generate-context-files.js +0 -871
- package/dist/commands/generate-context-files.js.map +0 -1
- package/dist/templates/playbooks/instantdb-integration.md +0 -851
- package/dist/templates/playbooks/mpesa-integration.md +0 -652
- package/dist/templates/ui-spec-examples.md +0 -318
package/README.md
CHANGED
|
@@ -1,105 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# The Project
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A high-fidelity application built with MyContext.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🎯 Project Overview
|
|
6
|
+
This project is built using a spec-driven development paradigm guided by a central 'Living Brain'.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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"}
|