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.
- package/README.md +62 -97
- 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 +129 -0
- 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-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.map +1 -1
- package/dist/commands/generate.js +43 -9
- 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.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +27 -2
- 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/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/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 +8 -0
- package/dist/core/ai/AICore.d.ts.map +1 -1
- package/dist/core/ai/AICore.js +50 -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 +2 -0
- package/dist/tui/DashboardMode.d.ts.map +1 -1
- package/dist/tui/DashboardMode.js +116 -1
- package/dist/tui/DashboardMode.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/living-context.d.ts +6 -0
- package/dist/types/living-context.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/contextRenderer.d.ts.map +1 -1
- package/dist/utils/contextRenderer.js +40 -30
- package/dist/utils/contextRenderer.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 +106 -58
- 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 +6 -0
- 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 +3 -0
- package/dist/utils/openRouterClient.js.map +1 -1
- package/package.json +4 -2
- 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,106 +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
|
-
---
|
|
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
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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"}
|