cntx-ui 2.0.13 → 3.0.0
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 +51 -339
- package/VISION.md +110 -0
- package/bin/cntx-ui-mcp.sh +3 -0
- package/bin/cntx-ui.js +138 -55
- package/lib/agent-runtime.js +301 -0
- package/lib/agent-tools.js +370 -0
- package/lib/api-router.js +1161 -0
- package/lib/bundle-manager.js +236 -0
- package/lib/configuration-manager.js +760 -0
- package/lib/database-manager.js +397 -0
- package/lib/file-system-manager.js +489 -0
- package/lib/heuristics-manager.js +527 -0
- package/lib/mcp-server.js +1125 -2
- package/lib/semantic-splitter.js +225 -491
- package/lib/simple-vector-store.js +98 -0
- package/lib/websocket-manager.js +470 -0
- package/package.json +19 -25
- package/server.js +742 -1935
- package/templates/TOOLS.md +41 -0
- package/templates/activities/README.md +67 -0
- package/templates/activities/activities/create-project-bundles/README.md +84 -0
- package/templates/activities/activities/create-project-bundles/notes.md +98 -0
- package/templates/activities/activities/create-project-bundles/progress.md +63 -0
- package/templates/activities/activities/create-project-bundles/tasks.md +39 -0
- package/templates/activities/activities.json +219 -0
- package/templates/activities/lib/.markdownlint.jsonc +18 -0
- package/templates/activities/lib/create-activity.mdc +63 -0
- package/templates/activities/lib/generate-tasks.mdc +64 -0
- package/templates/activities/lib/process-task-list.mdc +52 -0
- package/templates/agent-config.yaml +65 -0
- package/templates/agent-instructions.md +234 -0
- package/templates/agent-rules/capabilities/activities-system.md +147 -0
- package/templates/agent-rules/capabilities/bundle-system.md +131 -0
- package/templates/agent-rules/capabilities/vector-search.md +135 -0
- package/templates/agent-rules/core/codebase-navigation.md +91 -0
- package/templates/agent-rules/core/performance-hierarchy.md +48 -0
- package/templates/agent-rules/core/response-formatting.md +120 -0
- package/templates/agent-rules/project-specific/architecture.md +145 -0
- package/templates/config.json +76 -0
- package/templates/hidden-files.json +14 -0
- package/web/dist/assets/index-B2OdTzzI.css +1 -0
- package/web/dist/assets/index-D0tBsKiR.js +2016 -0
- package/web/dist/cntx-ui.svg +18 -0
- package/web/dist/index.html +25 -8
- package/lib/semantic-integration.js +0 -441
- package/mcp-config-example.json +0 -9
- package/web/dist/assets/index-Ci1Q-YrQ.js +0 -611
- package/web/dist/assets/index-IUp4q_fr.css +0 -1
- package/web/dist/vite.svg +0 -21
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# cntx-ui Tool Reference
|
|
2
|
+
|
|
3
|
+
This document maps the **Model Context Protocol (MCP)** tools to their **HTTP API** equivalents.
|
|
4
|
+
|
|
5
|
+
## Core Agent Tools
|
|
6
|
+
|
|
7
|
+
| MCP Tool | HTTP Endpoint | Parameters | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `agent/discover` | `GET /api/status` | `scope?: string` | Architectural overview and health check. |
|
|
10
|
+
| `agent/query` | `POST /api/semantic-search` | `question: string` | Semantic search across the entire codebase. |
|
|
11
|
+
| `agent/investigate` | `POST /api/vector-db/search` | `feature: string` | Suggest integration points for new features. |
|
|
12
|
+
| `agent/organize` | `GET /api/bundles` | `activity: string` | Audit and optimize project bundle health. |
|
|
13
|
+
|
|
14
|
+
## Bundle Management
|
|
15
|
+
|
|
16
|
+
| MCP Tool | HTTP Endpoint | Parameters | Description |
|
|
17
|
+
| :--- | :--- | :--- | :--- |
|
|
18
|
+
| `list_bundles` | `GET /api/bundles` | *None* | List all manual and smart bundles. |
|
|
19
|
+
| `get_bundle` | `GET /api/bundles/:name` | `name: string` | Get full XML content of a specific bundle. |
|
|
20
|
+
|
|
21
|
+
## Semantic Analysis
|
|
22
|
+
|
|
23
|
+
| MCP Tool | HTTP Endpoint | Parameters | Description |
|
|
24
|
+
| :--- | :--- | :--- | :--- |
|
|
25
|
+
| `get_semantic_chunks`| `GET /api/semantic-chunks` | `refresh?: bool` | Get all surgically extracted code chunks. |
|
|
26
|
+
| `search_by_type` | `POST /api/vector-db/search-by-type` | `type: string` | Find chunks by AST type (e.g. arrow_function). |
|
|
27
|
+
| `search_by_domain` | `POST /api/vector-db/search-by-domain`| `domain: string` | Find chunks by business domain (e.g. auth). |
|
|
28
|
+
|
|
29
|
+
## File Operations
|
|
30
|
+
|
|
31
|
+
| MCP Tool | HTTP Endpoint | Parameters | Description |
|
|
32
|
+
| :--- | :--- | :--- | :--- |
|
|
33
|
+
| `read_file` | `GET /api/files/:path` | `path: string` | Read file with injected semantic metadata. |
|
|
34
|
+
| `write_file` | `POST /api/files` | `path, content` | Write file with automatic backup. |
|
|
35
|
+
|
|
36
|
+
## Activities
|
|
37
|
+
|
|
38
|
+
| MCP Tool | HTTP Endpoint | Parameters | Description |
|
|
39
|
+
| :--- | :--- | :--- | :--- |
|
|
40
|
+
| `list_activities` | `GET /api/activities` | *None* | List all ongoing agent missions. |
|
|
41
|
+
| `get_reasoning` | `GET /api/activities/:id/reasoning` | `id: string` | Recall agent interaction history for a task. |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# cntx-ui Activities System
|
|
2
|
+
|
|
3
|
+
This directory contains the activities management system for cntx-ui. Activities are used to plan, track, and document significant development efforts.
|
|
4
|
+
|
|
5
|
+
## Guiding Principles for AI Agents
|
|
6
|
+
|
|
7
|
+
**ATTENTION AI AGENT:** This is a mandatory set of rules for interacting with the cntx-ui Activities System.
|
|
8
|
+
|
|
9
|
+
1. **This is a Sequential, Multi-Step Workflow.** You **MUST** follow the 3-step process for creating activities. Do not attempt to combine steps or skip ahead. Each step uses a specific tool (`.mdc` file) and requires user confirmation before proceeding to the next.
|
|
10
|
+
2. **Context is Critical.** Before creating a new activity, you **MUST** first examine the contents of an existing activity in the `activities/` directory (e.g., `api-audit`). This will give you the required context on the structure and content of the four standard files (`README.md`, `tasks.md`, `progress.md`, `notes.md`).
|
|
11
|
+
3. **One Step at a Time.** After completing a step, you **MUST** stop and inform the user of the result. Do not automatically proceed to the next step without explicit user instruction (e.g., the user saying "go" or "proceed").
|
|
12
|
+
|
|
13
|
+
## The 3-Step Activity Creation Workflow
|
|
14
|
+
|
|
15
|
+
To create a new activity, you must follow these three steps in order.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### **Step 1: Create the Activity Definition**
|
|
20
|
+
|
|
21
|
+
- **Goal:** To create the high-level plan (`README.md`) for the activity.
|
|
22
|
+
- **Input:** A user prompt describing the feature.
|
|
23
|
+
- **Tool:** `@.cntx/activities/lib/create-activity.mdc`
|
|
24
|
+
- **Output:** A new directory in `.cntx/activities/activities/` containing a single `README.md` file.
|
|
25
|
+
|
|
26
|
+
**Note to Agent:** After completing this step, your job is done for now. Inform the user that the Activity Definition has been created and that the next step is to generate the task list. **Wait for their command to proceed.**
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### **Step 2: Generate the Task List & Register Activity**
|
|
31
|
+
|
|
32
|
+
- **Goal:** To break down the high-level plan into a detailed task list and register the activity.
|
|
33
|
+
- **Input:** The `README.md` file created in Step 1.
|
|
34
|
+
- **Tool:** `@.cntx/activities/lib/generate-tasks.mdc`
|
|
35
|
+
- **Output:**
|
|
36
|
+
1. A `tasks.md` file inside the activity's directory.
|
|
37
|
+
2. A new entry for the activity added to the `.cntx/activities/activities.json` file, including the generated tasks.
|
|
38
|
+
|
|
39
|
+
**Note to Agent:** This step requires a pause for user confirmation after generating the parent tasks, as per the instructions in `generate-tasks.mdc`. After this step is fully complete, stop and wait for the user's command.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### **Step 3: Create Progress and Notes Files**
|
|
44
|
+
|
|
45
|
+
- **Goal:** To create the initial tracking and notes files for the activity.
|
|
46
|
+
- **Input:** The `tasks.md` file from Step 2.
|
|
47
|
+
- **Tool:** `@.cntx/activities/lib/process-task-list.mdc` (and knowledge from existing examples).
|
|
48
|
+
- **Output:** `progress.md` and `notes.md` files inside the activity's directory, populated with initial template content.
|
|
49
|
+
|
|
50
|
+
**Note to Agent:** Once this step is complete, the entire activity has been successfully scaffolded. Inform the user and await further instructions.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
## How to Work on Existing Activities
|
|
54
|
+
|
|
55
|
+
To begin working on an existing activity, provide the agent with the activity files and use the process-task-list workflow:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
I want to work on the [activity-name] activity. Here are the relevant files:
|
|
59
|
+
@.cntx/activities/activities/[activity-name]/README.md
|
|
60
|
+
@.cntx/activities/activities/[activity-name]/tasks.md
|
|
61
|
+
@.cntx/activities/activities/[activity-name]/progress.md
|
|
62
|
+
|
|
63
|
+
Please start on the next uncompleted task and use @process-task-list.mdc
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
This system is for internal cntx-ui project management and is not intended for public open source use.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Create Project Bundles with Agent Assistance
|
|
2
|
+
|
|
3
|
+
## Introduction/Overview
|
|
4
|
+
|
|
5
|
+
Set up organized bundles for a new codebase using agent assistance to analyze project structure and suggest appropriate file groupings. This activity demonstrates how to collaborate with an AI agent to understand your project's architecture and create meaningful bundles for efficient context management and LLM consumption.
|
|
6
|
+
|
|
7
|
+
## Goals
|
|
8
|
+
|
|
9
|
+
- Analyze project structure and identify logical file groupings
|
|
10
|
+
- Create bundles that reflect the project's architecture and workflow
|
|
11
|
+
- Establish bundle naming conventions and categorization rules
|
|
12
|
+
- Set up automated bundle suggestions for future file additions
|
|
13
|
+
- Document bundle purposes and contents for team understanding
|
|
14
|
+
|
|
15
|
+
## User Stories
|
|
16
|
+
|
|
17
|
+
- As a developer, I want an agent to analyze my codebase so that I can understand how to organize files into logical bundles
|
|
18
|
+
- As a developer, I want suggested bundle structures so that I don't have to manually categorize every file
|
|
19
|
+
- As a team member, I want clear bundle documentation so that I understand the project organization
|
|
20
|
+
- As a developer, I want bundle rules that adapt to my project so that new files are automatically categorized appropriately
|
|
21
|
+
|
|
22
|
+
## Functional Requirements
|
|
23
|
+
|
|
24
|
+
1. The system must analyze the existing project structure and file types
|
|
25
|
+
2. The system must suggest logical bundle groupings based on project architecture
|
|
26
|
+
3. The system must create bundle configuration files with clear naming and descriptions
|
|
27
|
+
4. **CRITICAL**: The system must update .cntx/bundle-states.json as the single source of truth for bundle definitions
|
|
28
|
+
5. The system must establish rules for automatic file categorization
|
|
29
|
+
6. The system must generate documentation explaining each bundle's purpose
|
|
30
|
+
7. The system must allow iterative refinement of bundle structure based on user feedback
|
|
31
|
+
8. The system must integrate with the existing cntx-ui bundle management system
|
|
32
|
+
|
|
33
|
+
## Non-Goals (Out of Scope)
|
|
34
|
+
|
|
35
|
+
- Modifying existing project files or structure
|
|
36
|
+
- Creating complex custom bundling algorithms
|
|
37
|
+
- Handling projects with unusual or highly specialized architectures
|
|
38
|
+
- Setting up advanced semantic analysis beyond basic file categorization
|
|
39
|
+
|
|
40
|
+
## Design Considerations
|
|
41
|
+
|
|
42
|
+
- Follow existing cntx-ui bundle configuration patterns
|
|
43
|
+
- Use clear, intuitive bundle names that reflect project concepts
|
|
44
|
+
- Consider both technical structure (frontend/backend) and functional structure (features/components)
|
|
45
|
+
- Balance bundle granularity - not too many small bundles, not too few large ones
|
|
46
|
+
- Account for common development workflows and contexts
|
|
47
|
+
|
|
48
|
+
## Technical Considerations
|
|
49
|
+
|
|
50
|
+
- Leverage existing cntx-ui bundle management and configuration systems
|
|
51
|
+
- Use file path analysis and naming patterns for initial categorization
|
|
52
|
+
- Consider integration with semantic analysis for content-based grouping
|
|
53
|
+
- Ensure bundle configurations are easily editable and maintainable
|
|
54
|
+
- Account for different project types (React, Node.js, full-stack, etc.)
|
|
55
|
+
|
|
56
|
+
## Success Metrics
|
|
57
|
+
|
|
58
|
+
- Complete bundle coverage of project files with logical groupings
|
|
59
|
+
- Clear bundle documentation that team members can understand
|
|
60
|
+
- Automated bundle suggestions that are 80%+ accurate for new files
|
|
61
|
+
- Reduced time to find relevant files when working on specific features
|
|
62
|
+
- Improved context efficiency when using bundled files with LLMs
|
|
63
|
+
|
|
64
|
+
## Open Questions
|
|
65
|
+
|
|
66
|
+
- What level of bundle granularity works best for different project sizes?
|
|
67
|
+
- How should bundles handle cross-cutting concerns like utilities and shared components?
|
|
68
|
+
- Should bundles be organized by technical layers or business features?
|
|
69
|
+
- How can bundle rules adapt as the project evolves?
|
|
70
|
+
|
|
71
|
+
## Status
|
|
72
|
+
|
|
73
|
+
- **Current Status**: Todo
|
|
74
|
+
- **Priority**: High
|
|
75
|
+
- **Estimated Effort**: Small
|
|
76
|
+
- **Dependencies**: Existing cntx-ui bundle management system
|
|
77
|
+
|
|
78
|
+
## Related Files
|
|
79
|
+
|
|
80
|
+
- `.cntx/config.json` - Non-bundle configuration settings (editor, etc.)
|
|
81
|
+
- `.cntx/bundle-states.json` - Single source of truth for all bundle definitions
|
|
82
|
+
- `lib/bundle-manager.js` - Bundle management logic
|
|
83
|
+
- `lib/configuration-manager.js` - Configuration and bundle state management
|
|
84
|
+
- `web/src/components/BundleList.tsx` - Bundle UI components
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Notes: Create Project Bundles with Agent Assistance
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document captures ongoing thoughts, insights, and reference information related to creating project bundles with agent assistance.
|
|
6
|
+
|
|
7
|
+
## Agent Collaboration Tips
|
|
8
|
+
|
|
9
|
+
### Effective Prompts for Bundle Creation
|
|
10
|
+
- "Analyze my project structure and suggest logical file groupings"
|
|
11
|
+
- "Help me understand which files should be bundled together for [specific feature/workflow]"
|
|
12
|
+
- "Review these bundle suggestions and recommend improvements"
|
|
13
|
+
- "Create bundle rules that will automatically categorize files like [example files]"
|
|
14
|
+
|
|
15
|
+
### Questions to Ask Your Agent
|
|
16
|
+
- What architectural patterns do you see in this codebase?
|
|
17
|
+
- How would you group these files for efficient context switching?
|
|
18
|
+
- What bundle structure would work best for a team of [X] developers?
|
|
19
|
+
- Can you suggest rules for automatically categorizing new files?
|
|
20
|
+
|
|
21
|
+
## Bundle Strategy Notes
|
|
22
|
+
|
|
23
|
+
### Common Bundle Patterns
|
|
24
|
+
- **By Architecture Layer:** frontend, backend, database, api
|
|
25
|
+
- **By Feature:** user-auth, payment-system, dashboard, reports
|
|
26
|
+
- **By Component Type:** ui-components, pages, hooks, utilities
|
|
27
|
+
- **By Development Phase:** core, features, testing, deployment
|
|
28
|
+
|
|
29
|
+
### Bundle Naming Guidelines
|
|
30
|
+
- Use clear, descriptive names that reflect content
|
|
31
|
+
- Avoid technical jargon that team members might not understand
|
|
32
|
+
- Consider using consistent prefixes (ui-, api-, lib-, etc.)
|
|
33
|
+
- Keep names short but meaningful
|
|
34
|
+
|
|
35
|
+
## Project-Specific Considerations
|
|
36
|
+
|
|
37
|
+
### Codebase Characteristics
|
|
38
|
+
_Document specific aspects of your project that affect bundle organization_
|
|
39
|
+
|
|
40
|
+
### Team Workflow
|
|
41
|
+
_Note how your team works with files and what bundle structure would support their workflow_
|
|
42
|
+
|
|
43
|
+
### Future Growth
|
|
44
|
+
_Consider how bundle structure should accommodate project expansion_
|
|
45
|
+
|
|
46
|
+
## Reference Examples
|
|
47
|
+
|
|
48
|
+
### Sample Bundle Configurations
|
|
49
|
+
|
|
50
|
+
**bundle-states.json** (single source of truth):
|
|
51
|
+
```json
|
|
52
|
+
[
|
|
53
|
+
{
|
|
54
|
+
"name": "ui-components",
|
|
55
|
+
"patterns": ["src/components/**/*.tsx", "src/ui/**/*.tsx"],
|
|
56
|
+
"files": ["src/components/Button.tsx", "src/ui/Card.tsx"],
|
|
57
|
+
"content": "",
|
|
58
|
+
"size": 45231,
|
|
59
|
+
"changed": false,
|
|
60
|
+
"generated": "2025-06-30T08:00:00.000Z"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**config.json** (non-bundle settings only):
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"editor": "cursor"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
⚠️ **CRITICAL**: Use .cntx/bundle-states.json as the single source of truth for all bundle data!
|
|
73
|
+
|
|
74
|
+
### File Organization Patterns
|
|
75
|
+
- Component files: Component.tsx, Component.test.tsx, Component.stories.tsx
|
|
76
|
+
- Page files: pages/[route]/index.tsx, pages/[route]/components/
|
|
77
|
+
- API files: api/[endpoint]/route.ts, api/[endpoint]/types.ts
|
|
78
|
+
|
|
79
|
+
## Useful Commands
|
|
80
|
+
|
|
81
|
+
### Analyzing Project Structure
|
|
82
|
+
```bash
|
|
83
|
+
# Get overview of project structure
|
|
84
|
+
tree -I 'node_modules|dist|build' -L 3
|
|
85
|
+
|
|
86
|
+
# Count files by type
|
|
87
|
+
find . -name "*.tsx" | wc -l
|
|
88
|
+
find . -name "*.ts" | wc -l
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Bundle Testing
|
|
92
|
+
```bash
|
|
93
|
+
# Test bundle generation
|
|
94
|
+
cntx-ui bundle --name ui-components --dry-run
|
|
95
|
+
|
|
96
|
+
# View bundle contents
|
|
97
|
+
cntx-ui status --verbose
|
|
98
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Progress Tracking: Create Project Bundles with Agent Assistance
|
|
2
|
+
|
|
3
|
+
## Current Status: Todo
|
|
4
|
+
|
|
5
|
+
**Last Updated:** Not started
|
|
6
|
+
**Next Action:** Begin project analysis and discovery phase
|
|
7
|
+
|
|
8
|
+
## Completed Tasks
|
|
9
|
+
|
|
10
|
+
_No tasks completed yet_
|
|
11
|
+
|
|
12
|
+
## In Progress Tasks
|
|
13
|
+
|
|
14
|
+
_No tasks currently in progress_
|
|
15
|
+
|
|
16
|
+
## Upcoming Tasks
|
|
17
|
+
|
|
18
|
+
- [ ] 1.0 Project Analysis and Discovery
|
|
19
|
+
- [ ] 2.0 Bundle Strategy Design
|
|
20
|
+
- [ ] 3.0 Bundle Configuration Implementation
|
|
21
|
+
- [ ] 4.0 Documentation and Refinement
|
|
22
|
+
|
|
23
|
+
## Notes and Decisions
|
|
24
|
+
|
|
25
|
+
### Key Decisions Made
|
|
26
|
+
_Document important decisions as they are made during the activity_
|
|
27
|
+
|
|
28
|
+
### Challenges Encountered
|
|
29
|
+
_Track any obstacles or issues that arise during implementation_
|
|
30
|
+
|
|
31
|
+
### Lessons Learned
|
|
32
|
+
_Capture insights gained during the bundle creation process_
|
|
33
|
+
|
|
34
|
+
## Agent Interaction Log
|
|
35
|
+
|
|
36
|
+
### Session 1: [Date]
|
|
37
|
+
_Example format for documenting agent interactions:_
|
|
38
|
+
- **User Request:** "Help me analyze my React project structure"
|
|
39
|
+
- **Agent Analysis:** [Agent's findings about project structure]
|
|
40
|
+
- **User Feedback:** [User's response to agent suggestions]
|
|
41
|
+
- **Outcome:** [What was decided or implemented]
|
|
42
|
+
|
|
43
|
+
### Session 2: [Date]
|
|
44
|
+
_Continue logging agent interactions for future reference_
|
|
45
|
+
|
|
46
|
+
## Bundle Evolution
|
|
47
|
+
|
|
48
|
+
### Initial Structure
|
|
49
|
+
_Document the first bundle configuration created_
|
|
50
|
+
|
|
51
|
+
### Refinements Made
|
|
52
|
+
_Track changes made to bundle structure based on usage and feedback_
|
|
53
|
+
|
|
54
|
+
### Current Configuration
|
|
55
|
+
_Maintain current state of bundle setup_
|
|
56
|
+
|
|
57
|
+
## Success Metrics Progress
|
|
58
|
+
|
|
59
|
+
- [ ] Complete bundle coverage of project files
|
|
60
|
+
- [ ] Clear bundle documentation created
|
|
61
|
+
- [ ] Automated bundle suggestions implemented
|
|
62
|
+
- [ ] Team can easily understand and use bundle system
|
|
63
|
+
- [ ] Improved context efficiency demonstrated
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
## Relevant Files
|
|
2
|
+
|
|
3
|
+
- `.cntx/config.json` - Non-bundle configuration settings (editor preferences, etc.)
|
|
4
|
+
- `.cntx/bundle-states.json` - Single source of truth for all bundle definitions and metadata
|
|
5
|
+
- `lib/bundle-manager.js` - Core bundle management logic for processing and applying bundle rules
|
|
6
|
+
- `web/src/components/BundleList.tsx` - UI component for displaying and managing bundles
|
|
7
|
+
- `web/src/components/BundleDetails.tsx` - UI component for viewing individual bundle contents
|
|
8
|
+
- `lib/heuristics-manager.js` - Logic for automatic file categorization and bundle suggestions
|
|
9
|
+
|
|
10
|
+
### Notes
|
|
11
|
+
|
|
12
|
+
- This activity focuses on configuration and setup rather than code changes
|
|
13
|
+
- The agent will primarily work with JSON configuration files and provide guidance
|
|
14
|
+
- Bundle rules should be tested with sample files to ensure they work correctly
|
|
15
|
+
- Documentation should be clear enough for team members to understand and modify bundles
|
|
16
|
+
|
|
17
|
+
## Tasks
|
|
18
|
+
|
|
19
|
+
- [ ] 1.0 Project Analysis and Discovery
|
|
20
|
+
- [ ] 1.1 Analyze project directory structure and identify main folders/modules
|
|
21
|
+
- [ ] 1.2 Categorize existing files by type, purpose, and architectural layer
|
|
22
|
+
- [ ] 1.3 Identify common patterns in file naming and organization
|
|
23
|
+
- [ ] 1.4 Document project architecture and workflow patterns
|
|
24
|
+
- [ ] 2.0 Bundle Strategy Design
|
|
25
|
+
- [ ] 2.1 Propose initial bundle structure based on project analysis
|
|
26
|
+
- [ ] 2.2 Define bundle naming conventions and categorization rules
|
|
27
|
+
- [ ] 2.3 Create bundle descriptions that explain their purpose and contents
|
|
28
|
+
- [ ] 2.4 Validate bundle strategy with user and refine based on feedback
|
|
29
|
+
- [ ] 3.0 Bundle Configuration Implementation
|
|
30
|
+
- [ ] 3.1 Create bundle definitions in .cntx/bundle-states.json with patterns and metadata
|
|
31
|
+
- [ ] 3.2 **CRITICAL**: Use .cntx/bundle-states.json as single source of truth (no config.json bundle data)
|
|
32
|
+
- [ ] 3.3 Set up automatic file categorization rules
|
|
33
|
+
- [ ] 3.4 Configure bundle metadata (descriptions, tags, priorities)
|
|
34
|
+
- [ ] 3.5 Test bundle rules with sample files to ensure proper categorization
|
|
35
|
+
- [ ] 4.0 Documentation and Refinement
|
|
36
|
+
- [ ] 4.1 Document bundle purposes and use cases for team reference
|
|
37
|
+
- [ ] 4.2 Create guidelines for adding new bundles or modifying existing ones
|
|
38
|
+
- [ ] 4.3 Test bundle system with real project workflow scenarios
|
|
39
|
+
- [ ] 4.4 Refine bundle structure based on usage patterns and feedback
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"title": "Create Project Bundles with Agent Assistance",
|
|
4
|
+
"description": "Set up organized bundles for a new codebase using agent assistance to analyze project structure and suggest appropriate file groupings.",
|
|
5
|
+
"desired_outcome": "Complete bundle coverage with logical groupings, clear documentation, and automated suggestions for new files. Improved context efficiency for LLM consumption.",
|
|
6
|
+
"references": [
|
|
7
|
+
".cntx/activities/activities/create-project-bundles/README.md",
|
|
8
|
+
".cntx/activities/activities/create-project-bundles/tasks.md",
|
|
9
|
+
".cntx/activities/activities/create-project-bundles/progress.md"
|
|
10
|
+
],
|
|
11
|
+
"status": "todo",
|
|
12
|
+
"tags": ["bundles", "agent-collaboration", "setup"],
|
|
13
|
+
"tasks": [
|
|
14
|
+
{
|
|
15
|
+
"title": "Project Analysis and Discovery",
|
|
16
|
+
"description": "Analyze project directory structure and identify main folders, file types, and architectural patterns.",
|
|
17
|
+
"status": "todo"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"title": "Bundle Strategy Design",
|
|
21
|
+
"description": "Propose initial bundle structure based on project analysis and define naming conventions.",
|
|
22
|
+
"status": "todo"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Bundle Configuration Implementation",
|
|
26
|
+
"description": "Create bundle definitions in .cntx/bundle-states.json and set up automatic file categorization rules.",
|
|
27
|
+
"status": "todo"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Documentation and Refinement",
|
|
31
|
+
"description": "Document bundle purposes, create usage guidelines, and refine structure based on testing.",
|
|
32
|
+
"status": "todo"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "API Audit, Refinement, and Documentation",
|
|
38
|
+
"description": "Review all existing API endpoints, refine their design for consistency and efficiency, and generate comprehensive documentation.",
|
|
39
|
+
"desired_outcome": "All API endpoints are consistent, efficient, and well-documented. API documentation is up-to-date and easily accessible.",
|
|
40
|
+
"references": [
|
|
41
|
+
".cntx/activities/activities/api-audit/README.md",
|
|
42
|
+
".cntx/activities/activities/api-audit/tasks.md",
|
|
43
|
+
".cntx/activities/activities/api-audit/progress.md"
|
|
44
|
+
],
|
|
45
|
+
"status": "todo",
|
|
46
|
+
"tags": ["general", "api"],
|
|
47
|
+
"tasks": [
|
|
48
|
+
{
|
|
49
|
+
"title": "Example",
|
|
50
|
+
"description": "lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
51
|
+
"status": "todo"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"title": "Agent Stories: Research and Optimization",
|
|
57
|
+
"description": "Create a comprehensive research activity to systematically test and discover optimal patterns for agent interactions with cntx-ui through the .cntx directory and MCP server.",
|
|
58
|
+
"desired_outcome": "Comprehensive coverage of agent interaction scenarios, documented best practices, and an actionable plan for continuous agent testing through the 'Agent Stories Cycle'.",
|
|
59
|
+
"references": [
|
|
60
|
+
".cntx/activities/activities/agent-stories/README.md",
|
|
61
|
+
".cntx/activities/activities/agent-stories/tasks.md",
|
|
62
|
+
".cntx/activities/activities/agent-stories/progress.md"
|
|
63
|
+
],
|
|
64
|
+
"status": "todo",
|
|
65
|
+
"tags": ["general", "agent"],
|
|
66
|
+
"tasks": [
|
|
67
|
+
{
|
|
68
|
+
"title": "Current State Analysis",
|
|
69
|
+
"description": "Analyze existing agent instructions, MCP server tools, and interaction patterns.",
|
|
70
|
+
"status": "todo"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"title": "Heuristics Configuration Refactor",
|
|
76
|
+
"description": "Transform hardcoded heuristics into a configurable, agent-manageable system. Extract all code categorization logic into centralized configuration with agent activity framework integration.",
|
|
77
|
+
"desired_outcome": "All heuristics are externalized to configuration, agents can automatically refine categorization rules, and the system maintains complete backward compatibility while enabling intelligent self-improvement.",
|
|
78
|
+
"references": [
|
|
79
|
+
".cntx/activities/activities/heuristics-refactor/README.md"
|
|
80
|
+
],
|
|
81
|
+
"status": "todo",
|
|
82
|
+
"tags": ["general", "refactor"],
|
|
83
|
+
"tasks": [
|
|
84
|
+
{
|
|
85
|
+
"title": "Extract Purpose Detection Heuristics",
|
|
86
|
+
"description": "Extract hardcoded purpose detection patterns from semantic-splitter.js to heuristics-config.json",
|
|
87
|
+
"status": "todo"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"title": "Extract Bundle Suggestion Logic",
|
|
91
|
+
"description": "Extract bundle suggestion heuristics from BundleList.tsx to centralized config",
|
|
92
|
+
"status": "todo"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"title": "Create HeuristicsManager Service",
|
|
96
|
+
"description": "Build centralized service for loading and applying heuristics with caching and validation",
|
|
97
|
+
"status": "todo"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"title": "Implement Heuristics API Endpoints",
|
|
101
|
+
"description": "Create REST API for reading, updating, and managing heuristics configuration",
|
|
102
|
+
"status": "todo"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"title": "Build Agent Activity Framework",
|
|
106
|
+
"description": "Implement activity scheduler and execution system for agent-driven heuristics refinement",
|
|
107
|
+
"status": "todo"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"title": "Verify Backward Compatibility",
|
|
111
|
+
"description": "Ensure all existing functionality works identically after refactor",
|
|
112
|
+
"status": "todo"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"title": "VS Code Extension",
|
|
118
|
+
"description": "Adapt the existing cntx-ui tool into a VS Code extension, providing an integrated experience within the editor.",
|
|
119
|
+
"desired_outcome": "A functional VS Code extension that embeds the cntx-ui, allowing users to manage their projects without leaving the editor. The extension will share a codebase with the standalone web application.",
|
|
120
|
+
"references": [
|
|
121
|
+
".cntx/activities/activities/vscode-extension/README.md",
|
|
122
|
+
".cntx/activities/activities/vscode-extension/tasks.md",
|
|
123
|
+
".cntx/activities/activities/vscode-extension/progress.md"
|
|
124
|
+
],
|
|
125
|
+
"status": "todo",
|
|
126
|
+
"tags": ["vscode", "feature"],
|
|
127
|
+
"tasks": [
|
|
128
|
+
{
|
|
129
|
+
"title": "Project Scaffolding",
|
|
130
|
+
"description": "Set up the basic file structure for a VS Code extension, including package.json, extension.ts, and a webpack.config.js.",
|
|
131
|
+
"status": "todo"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"title": "Implement Webview Panel",
|
|
135
|
+
"description": "Create the command and logic to open a WebviewPanel that loads the existing web/dist/index.html.",
|
|
136
|
+
"status": "todo"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"title": "Create Communication Bridge",
|
|
140
|
+
"description": "Develop an abstraction layer that handles messaging between the webview and the extension host, supporting both postMessage and WebSockets.",
|
|
141
|
+
"status": "todo"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"title": "Implement Activation Events",
|
|
145
|
+
"description": "Configure the extension to activate when a .cntx directory is found, when the Activity Bar icon is clicked, or when a command is run.",
|
|
146
|
+
"status": "todo"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"title": "Add Activity Bar Icon",
|
|
150
|
+
"description": "Create an icon for the extension and configure it to appear in the VS Code Activity Bar.",
|
|
151
|
+
"status": "todo"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"title": "Implement Command Palette Actions",
|
|
155
|
+
"description": "Add the cntx-ui: Start Server, cntx-ui: Stop Server, and cntx-ui: Open UI commands to the Command Palette.",
|
|
156
|
+
"status": "todo"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"title": "Build Initial Dashboard UI",
|
|
160
|
+
"description": "Create the simple dashboard view with controls for the server, a health status indicator, and a list of bundles.",
|
|
161
|
+
"status": "todo"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"title": "Backend Integration",
|
|
165
|
+
"description": "Connect the dashboard UI to the reused backend logic to control the server and fetch the bundle list.",
|
|
166
|
+
"status": "todo"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"title": "Documentation",
|
|
170
|
+
"description": "Update the project's README.md with instructions on how to build, run, and debug the new VS Code extension.",
|
|
171
|
+
"status": "todo"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"title": "Packaging and Testing",
|
|
175
|
+
"description": "Create a .vsix package for the extension and test its installation and functionality in a clean VS Code environment.",
|
|
176
|
+
"status": "todo"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"title": "cntx-ui Init Defaults",
|
|
182
|
+
"description": "Define and implement a comprehensive default template for the .cntx directory, established by `cntx-ui init`.",
|
|
183
|
+
"desired_outcome": "A single command initializes a fully functional .cntx directory with all necessary defaults, compatible with the UI.",
|
|
184
|
+
"references": [
|
|
185
|
+
".cntx/activities/activities/cntx-ui-init-defaults/README.md",
|
|
186
|
+
".cntx/activities/activities/cntx-ui-init-defaults/tasks.md",
|
|
187
|
+
".cntx/activities/activities/cntx-ui-init-defaults/progress.md"
|
|
188
|
+
],
|
|
189
|
+
"status": "todo",
|
|
190
|
+
"tags": ["init", "defaults", "scaffolding"],
|
|
191
|
+
"tasks": [
|
|
192
|
+
{
|
|
193
|
+
"title": "Define Default .cntx Structure & Content",
|
|
194
|
+
"description": "Create templates for config, hidden-files, semantic-cache, activities, and agent-rules.",
|
|
195
|
+
"status": "todo"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"title": "Extend Existing cntx-ui init Command",
|
|
199
|
+
"description": "Modify the `init` command to copy the default .cntx structure to the user's project.",
|
|
200
|
+
"status": "todo"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"title": "Integrate Minimal Default Activities & Agent Rules",
|
|
204
|
+
"description": "Ensure the sample activities and agent rules are correctly loaded and displayed.",
|
|
205
|
+
"status": "todo"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"title": "Testing & Validation",
|
|
209
|
+
"description": "Write tests for the `init` command and verify the created .cntx directory.",
|
|
210
|
+
"status": "todo"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"title": "Documentation & Release Preparation",
|
|
214
|
+
"description": "Update documentation and prepare for release of the new `init` functionality.",
|
|
215
|
+
"status": "todo"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
// https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md
|
|
3
|
+
"default": true,
|
|
4
|
+
// Trailing spaces
|
|
5
|
+
"MD009": false,
|
|
6
|
+
// Line length (default: 80)
|
|
7
|
+
"MD013": false,
|
|
8
|
+
// Duplicate headings (e.g., nested headings)
|
|
9
|
+
"MD024": false,
|
|
10
|
+
// Ordered list item prefix
|
|
11
|
+
"MD029": {
|
|
12
|
+
"style": "ordered"
|
|
13
|
+
},
|
|
14
|
+
// Fenced code blocks should be surrounded by blank lines
|
|
15
|
+
"MD031": false,
|
|
16
|
+
// Emphasis as heading (e.g., table of contents)
|
|
17
|
+
"MD036": false
|
|
18
|
+
}
|