cntx-ui 2.0.13 → 2.0.15
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/bin/cntx-ui.js +137 -55
- package/lib/agent-runtime.js +1480 -0
- package/lib/agent-tools.js +368 -0
- package/lib/api-router.js +978 -0
- package/lib/bundle-manager.js +471 -0
- package/lib/configuration-manager.js +725 -0
- package/lib/file-system-manager.js +472 -0
- package/lib/heuristics-manager.js +425 -0
- package/lib/mcp-server.js +1054 -1
- package/lib/semantic-splitter.js +7 -14
- package/lib/simple-vector-store.js +329 -0
- package/lib/websocket-manager.js +470 -0
- package/package.json +10 -3
- package/server.js +662 -1933
- package/templates/activities/README.md +67 -0
- package/templates/activities/activities/create-project-bundles/README.md +83 -0
- package/templates/activities/activities/create-project-bundles/notes.md +102 -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 +78 -0
- package/templates/agent-instructions.md +218 -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/heuristics-manager-browser-DfonOP5I.js +1 -0
- package/web/dist/assets/index-dF3qg-y_.js +2486 -0
- package/web/dist/assets/index-h5FGSg_P.css +1 -0
- package/web/dist/cntx-ui.svg +18 -0
- package/web/dist/index.html +25 -8
- package/lib/semantic-integration.js +0 -441
- 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,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,83 @@
|
|
|
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 both .cntx/bundles.json (metadata) AND .cntx/config.json (tracking patterns)
|
|
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` - Main cntx-ui configuration
|
|
81
|
+
- `.cntx/bundles.json` - Bundle definitions and rules
|
|
82
|
+
- `lib/bundle-manager.js` - Bundle management logic
|
|
83
|
+
- `web/src/components/BundleList.tsx` - Bundle UI components
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
**bundles.json** (detailed metadata):
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"name": "ui-components",
|
|
54
|
+
"description": "Reusable UI components and design system elements",
|
|
55
|
+
"patterns": ["src/components/**/*.tsx", "src/ui/**/*.tsx"],
|
|
56
|
+
"exclude": ["**/*.test.tsx", "**/*.stories.tsx"],
|
|
57
|
+
"tags": ["ui", "components"],
|
|
58
|
+
"priority": 1
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**config.json** (tracking patterns):
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"bundles": {
|
|
66
|
+
"ui-components": [
|
|
67
|
+
"src/components/**/*.tsx",
|
|
68
|
+
"src/ui/**/*.tsx",
|
|
69
|
+
"!**/*.test.tsx",
|
|
70
|
+
"!**/*.stories.tsx"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
⚠️ **CRITICAL**: Both files must be updated for bundles to appear in the UI!
|
|
77
|
+
|
|
78
|
+
### File Organization Patterns
|
|
79
|
+
- Component files: Component.tsx, Component.test.tsx, Component.stories.tsx
|
|
80
|
+
- Page files: pages/[route]/index.tsx, pages/[route]/components/
|
|
81
|
+
- API files: api/[endpoint]/route.ts, api/[endpoint]/types.ts
|
|
82
|
+
|
|
83
|
+
## Useful Commands
|
|
84
|
+
|
|
85
|
+
### Analyzing Project Structure
|
|
86
|
+
```bash
|
|
87
|
+
# Get overview of project structure
|
|
88
|
+
tree -I 'node_modules|dist|build' -L 3
|
|
89
|
+
|
|
90
|
+
# Count files by type
|
|
91
|
+
find . -name "*.tsx" | wc -l
|
|
92
|
+
find . -name "*.ts" | wc -l
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Bundle Testing
|
|
96
|
+
```bash
|
|
97
|
+
# Test bundle generation
|
|
98
|
+
cntx-ui bundle --name ui-components --dry-run
|
|
99
|
+
|
|
100
|
+
# View bundle contents
|
|
101
|
+
cntx-ui status --verbose
|
|
102
|
+
```
|
|
@@ -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` - Main configuration file that will be updated with bundle settings
|
|
4
|
+
- `.cntx/bundles.json` - Bundle definitions file that will contain all bundle configurations
|
|
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/bundles.json with detailed metadata
|
|
31
|
+
- [ ] 3.2 **CRITICAL**: Update .cntx/config.json with bundle patterns for tracking
|
|
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/bundles.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
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Rule: Generating an Activity Definition
|
|
7
|
+
|
|
8
|
+
## Goal
|
|
9
|
+
|
|
10
|
+
To guide an AI assistant in creating a detailed Activity Definition in Markdown format, based on an initial user prompt. The Activity should be clear, actionable, and suitable for a junior developer to understand and implement the feature or improvement for the cntx-ui project.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
1. **Receive Initial Prompt:** The user provides a brief description or request for a new feature, improvement, or functionality for cntx-ui.
|
|
15
|
+
2. **Ask Clarifying Questions:** Before writing the Activity, the AI *must* ask clarifying questions to gather sufficient detail. The goal is to understand the "what" and "why" of the activity, not necessarily the "how" (which the developer will figure out). Make sure to provide options in letter/number lists so I can respond easily with my selections.
|
|
16
|
+
3. **Generate Activity:** Based on the initial prompt and the user's answers to the clarifying questions, generate an Activity using the structure outlined below.
|
|
17
|
+
4. **Save Activity:** Save the generated document as `activity-[feature-name].md` inside the `.cntx/activities/[activity-name]/` directory.
|
|
18
|
+
|
|
19
|
+
## Clarifying Questions (Examples)
|
|
20
|
+
|
|
21
|
+
The AI should adapt its questions based on the prompt, but here are some common areas to explore:
|
|
22
|
+
|
|
23
|
+
* **Problem/Goal:** "What problem does this activity solve for cntx-ui users?" or "What is the main goal we want to achieve with this activity?"
|
|
24
|
+
* **Target User:** "Who is the primary user of this feature? (e.g., developers using cntx-ui, AI assistants, end users of bundled applications)"
|
|
25
|
+
* **Core Functionality:** "Can you describe the key actions a user should be able to perform with this feature?"
|
|
26
|
+
* **User Stories:** "Could you provide a few user stories? (e.g., As a [type of user], I want to [perform an action] so that [benefit].)"
|
|
27
|
+
* **Acceptance Criteria:** "How will we know when this activity is successfully implemented? What are the key success criteria?"
|
|
28
|
+
* **Scope/Boundaries:** "Are there any specific things this activity *should not* do (non-goals)?"
|
|
29
|
+
* **Data Requirements:** "What kind of data does this feature need to display or manipulate? (e.g., bundle configurations, file metadata, semantic chunks)"
|
|
30
|
+
* **Design/UI:** "Are there any existing design patterns in cntx-ui to follow?" or "Can you describe the desired look and feel?"
|
|
31
|
+
* **Edge Cases:** "Are there any potential edge cases or error conditions we should consider?"
|
|
32
|
+
|
|
33
|
+
## Activity Structure
|
|
34
|
+
|
|
35
|
+
The generated Activity should include the following sections:
|
|
36
|
+
|
|
37
|
+
1. **Introduction/Overview:** Briefly describe the activity and the problem it solves for cntx-ui. State the goal.
|
|
38
|
+
2. **Goals:** List the specific, measurable objectives for this activity.
|
|
39
|
+
3. **User Stories:** Detail the user narratives describing activity usage and benefits.
|
|
40
|
+
4. **Functional Requirements:** List the specific functionalities the activity must have. Use clear, concise language (e.g., "The system must allow users to configure bundle rules."). Number these requirements.
|
|
41
|
+
5. **Non-Goals (Out of Scope):** Clearly state what this activity will *not* include to manage scope.
|
|
42
|
+
6. **Design Considerations (Optional):** Link to existing UI components, describe UI/UX requirements, or mention relevant cntx-ui components/styles if applicable.
|
|
43
|
+
7. **Technical Considerations (Optional):** Mention any known technical constraints, dependencies, or suggestions (e.g., "Should integrate with the existing bundle management system").
|
|
44
|
+
8. **Success Metrics:** How will the success of this activity be measured? (e.g., "Improve bundle generation speed by 20%", "Reduce configuration errors by 50%").
|
|
45
|
+
9. **Open Questions:** List any remaining questions or areas needing further clarification.
|
|
46
|
+
|
|
47
|
+
## Target Audience
|
|
48
|
+
|
|
49
|
+
Assume the primary reader of the Activity is a **junior developer** working on cntx-ui. Therefore, requirements should be explicit, unambiguous, and avoid jargon where possible. Provide enough detail for them to understand the activity's purpose and core logic.
|
|
50
|
+
|
|
51
|
+
## Output
|
|
52
|
+
|
|
53
|
+
* **Format:** Markdown (`.md`)
|
|
54
|
+
* **Location:** `.cntx/activities/activities/[activity-name]/`
|
|
55
|
+
* **Filename:** `README.md`
|
|
56
|
+
|
|
57
|
+
## Final instructions
|
|
58
|
+
|
|
59
|
+
1. Do NOT start implementing the Activity
|
|
60
|
+
2. Make sure to ask the user clarifying questions
|
|
61
|
+
3. Take the user's answers to the clarifying questions and improve the Activity
|
|
62
|
+
4. Consider how this activity fits into the broader cntx-ui ecosystem of file bundling and AI development tools
|
|
63
|
+
5. **REQUIRED**: After creating the activity README.md, update `.cntx/activities/activities.json` to register the new activity with proper title, description, desired_outcome, references, status, and tasks
|