Skip to content

Commit f0c12a0

Browse files
committed
Revise contributing guidelines and intro docs:
- Simplify wording and improve clarity in contributing steps. - Update code examples to reflect recent changes (e.g., `ctx` command usage). - Enhance CTX introduction with context-focused benefits and real-world use cases.
1 parent 4cab77f commit f0c12a0

File tree

2 files changed

+101
-73
lines changed

2 files changed

+101
-73
lines changed

docs/contributing.md

Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Contributing to **CTX**
1+
# Contributing
22

3-
We're excited to welcome you as a contributor to the **CTX** project! This guide will help you get started
4-
with contributing to our project.
3+
We're excited to welcome you as a contributor to our project!
54

65
## How to Contribute
76

@@ -10,17 +9,14 @@ There are many ways to contribute to **CTX**:
109
1. **Report Issues**: If you find a bug or have a
1110
suggestion, [create an issue](https://github.com/context-hub/generator/issues) on our GitHub repository.
1211
2. **Submit Pull Requests**: Have a fix or a new feature? Submit a pull request!
13-
3. **Improve Documentation**: Help us make our documentation more clear, comprehensive, and accessible.
12+
3. **Improve Documentation**: Help us make our [documentation](https://github.com/context-hub/docs) more clear,
13+
comprehensive, and accessible.
1414
4. **Share Your Use Cases**: Let us know how you're using **CTX** in your projects.
1515

1616
We label issues that are suitable for community contribution with the `help wanted` tag. Additionally, we use labels
1717
such as `good first issue` for newcomer-friendly tasks, and complexity indicators to help you choose tasks that match
1818
your experience level.
1919

20-
I'd be happy to write a better instruction for the Getting Started section that highlights the use of the context.yaml
21-
file for context generation. This will help new contributors understand how they can use **CTX** itself to
22-
explore and work with the codebase.
23-
2420
## Getting Started with Contributing
2521

2622
Follow this guide to set up your environment and effectively contribute to the **CTX** project. We've designed
@@ -37,31 +33,19 @@ cd context-generator
3733
composer install
3834

3935
# Make the CLI tool available locally
40-
chmod +x context-generator
36+
chmod +x ctx
4137

4238
# Test the command
43-
./context-generator --help
39+
./ctx --help
4440
```
4541

46-
> **Note:** Use the local `./context-generator` command during development to test your changes. The globally installed
47-
`ctx` command won't reflect your local modifications.
42+
> **Note:** Use the local `./ctx` command during development to test your changes. The globally installed`ctx` command
43+
> won't reflect your local modifications.
4844
4945
### 2. Understand the Project Structure
5046

51-
Before diving into specific components, familiarize yourself with the project structure:
52-
53-
```
54-
└── src/
55-
├── ConfigLoader/ - Configuration loading and processing
56-
├── Console/ - CLI commands and interfaces
57-
├── Document/ - Document generation and formatting
58-
├── Fetcher/ - Content fetching mechanisms
59-
├── Lib/ - Utility libraries and helpers
60-
├── Modifier/ - Content modification systems
61-
└── Source/ - Different source type implementations
62-
```
63-
64-
To get a more detailed view of the project structure, use the `tree` source type:
47+
Before diving into specific components, familiarize yourself with the project structure. To get a detailed view of the
48+
project structure, use the `tree` source type:
6549

6650
```yaml
6751
documents:
@@ -77,27 +61,13 @@ documents:
7761
Run this configuration to generate a visual representation of the codebase structure:
7862
7963
```bash
80-
./context-generator
64+
./ctx
8165
```
8266

83-
This will create a `docs/file-structure.md` file that outlines the project's organization. Just put this file in the
67+
This will create a `docs/file-structure.md` file that outlines the project's organization. Put this file in the
8468
Claude project context to help it understand the codebase.
8569

86-
### 3. Explore the Codebase Using **CTX**
87-
88-
The project includes a pre-configured `context.yaml` file to help you explore the codebase:
89-
90-
```bash
91-
# Generate context files using the provided configuration
92-
./context-generator
93-
94-
# This will create documentation in the .context/ directory
95-
```
96-
97-
The generated context files provide a comprehensive overview of the most important parts of the system. Upload documents
98-
connected to your task to an LLM like Claude to get a better understanding of the codebase.
99-
100-
### 4. Request Specific Context Using YAML
70+
### 3. Request Specific Context Using YAML
10171

10272
When working on a specific feature or bug fix, create targeted context requests to get exactly the information you need.
10373

@@ -122,7 +92,7 @@ documents:
12292
Generate your custom context:
12393
12494
```bash
125-
./context-generator
95+
./ctx
12696
```
12797

12898
This structured approach offers several advantages:
@@ -134,7 +104,7 @@ This structured approach offers several advantages:
134104

135105
Let me enhance the section on collaborating with AI assistants to include this important recommendation:
136106

137-
### 5. Collaborate with AI Assistants
107+
### 4. Collaborate with AI Assistants
138108

139109
Share the generated context files with AI assistants like Claude to get help with:
140110

@@ -176,7 +146,7 @@ Include the problem statement, proposed solution, implementation details, and po
176146
This gives the AI assistant exactly the context needed to provide meaningful assistance with your specific task, and the
177147
resulting document becomes a valuable asset throughout your development process.
178148
179-
### 6. Implement Your Changes
149+
### 5. Implement Your Changes
180150
181151
> **Tip**: When you provide all required context to Claude, it will be able to solve your task efficiently. With proper
182152
> context, the solution will be fast, precise, and aligned with the project's patterns and standards.
@@ -196,7 +166,7 @@ With a solid understanding of the codebase:
196166
3. Review and refine the suggested documentation
197167
4. Include the updated documentation in your pull request
198168
199-
### 7. Document Your Changes
169+
### 6. Document Your Changes
200170
201171
If you worked with an LLM to implement your changes, ask it to help draft commit messages and pull request descriptions.
202172
@@ -213,7 +183,7 @@ documents:
213183
commit: "unstaged" # or "staged" if you've already staged your changes
214184
```
215185
216-
### 8. Submit Your Pull Request
186+
### 7. Submit Your Pull Request
217187
218188
- Push your changes to your fork
219189
- Open a pull request with a clear description

docs/index.md

Lines changed: 83 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
![Good morning, LLM](https://github.com/user-attachments/assets/8129f227-dc3f-4671-bc0e-0ecd2f3a1888)
44

5-
**CTX** is a tool that solves the context management gap when working with LLMs like ChatGPT or Claude. It helps
6-
developers organize and automatically collect information from their codebase into structured documents that can be
7-
easily shared with AI assistants.
5+
During development, your codebase constantly evolves. Files are added, modified, and removed. Each time you need to
6+
continue working with an LLM, you need to regenerate context to provide updated information about your current codebase
7+
state.
88

9-
**The tool doesn't work instead of developer - it's a tool where developers can describe their contexts and use them
10-
to provide information to LLMs.**
9+
**CTX** is a context management tool that gives developers full control over what AI sees from their codebase. Instead
10+
of letting AI tools guess what's relevant, you define exactly what context to provide - making your AI-assisted
11+
development more predictable, secure, and efficient.
12+
13+
It helps developers organize contexts and automatically collect information from their codebase into structured
14+
documents that can be easily shared with LLM.
1115

1216
For example, a developer describes what context they need:
1317

@@ -56,30 +60,84 @@ into a chat session or provided via the built-in [MCP server](./mcp/index.md).
5660

5761
> Here is a [Quickstart guide](./quick-start.md) to get you started with CTX.
5862

59-
### The Problem CTX Solves
63+
### Why CTX?
64+
65+
Current AI coding tools automatically scan your entire codebase, which creates several issues:
66+
67+
- **Security risk**: Your sensitive files (env vars, tokens, private code) get uploaded to cloud services
68+
- **Context dilution**: AI gets overwhelmed with irrelevant code, reducing output quality
69+
- **No control**: You can't influence what the AI considers when generating responses
70+
- **Expensive**: Premium tools charge based on how much they scan, not how much you actually need
71+
72+
### The CTX Approach
73+
74+
You know your code better than any AI. CTX puts you in control:
75+
76+
- ✅ Define exactly what context to share - no more, no less
77+
- ✅ Keep sensitive data local - works with local LLMs or carefully curated cloud contexts
78+
- ✅ Generate reusable, shareable contexts - commit configurations to your repo
79+
- ✅ Improve code architecture - designing for AI context windows naturally leads to better modular code
80+
- ✅ Works with any LLM - Claude, ChatGPT, local models, or future tools
81+
82+
## Real-World Use Cases
83+
84+
### 🚀 Onboarding New Team Member
85+
86+
```yaml
87+
# Quick project overview for new developers
88+
documents:
89+
- description: "Project Architecture Overview"
90+
outputPath: "docs/architecture.md"
91+
sources:
92+
- type: tree
93+
sourcePaths: [ "src" ]
94+
maxDepth: 2
95+
- type: file
96+
description: "Core interfaces and main classes"
97+
sourcePaths: [ "src" ]
98+
filePattern: "*Interface.php"
99+
```
100+
101+
### 📝 Feature Development
102+
103+
```yaml
104+
# Context for developing a new feature
105+
documents:
106+
- description: "User Authentication System"
107+
outputPath: "contexts/auth-context.md"
108+
sources:
109+
- type: file
110+
sourcePaths: [ "src/Auth", "src/Models" ]
111+
filePattern: "*.php"
112+
- type: git_diff
113+
description: "Recent auth changes"
114+
commit: "last-week"
115+
```
60116

61-
**Without such a tool, you would need to:**
117+
### 📚 Documentation Generation
62118

63-
- Manually search for all files that were changed
64-
- Copy their contents each time
65-
- Explain the codebase structure repeatedly
66-
- Spend significant time maintaining context consistency
119+
```yaml
120+
# Generate API documentation
121+
documents:
122+
- description: "API Documentation"
123+
outputPath: "docs/api.md"
124+
sources:
125+
- type: file
126+
sourcePaths: [ "src/Controllers" ]
127+
modifiers: [ "php-signature" ]
128+
contains: [ "@Route", "@Api" ]
129+
```
67130

68-
This repetitive process becomes frustrating and can discourage continued development, as you end up doing the same
69-
context-gathering work over and over instead of writing code.
131+
## Join Our Community
70132

71-
Since CTX describes contexts, this process becomes automated.
133+
Join hundreds of developers using CTX for professional AI-assisted coding:
72134

73-
## Use Cases
135+
[![Join Discord](https://img.shields.io/discord/1419284404315881633?color=5865F2&label=Join%20Discord&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/YmFckwVkQM)
74136

75-
When working with AI-powered development tools context is everything.
137+
**What you'll find in our Discord:**
76138

77-
- **Code Development**: Maintain up-to-date context for iterative development sessions with AI assistants. When your
78-
codebase changes, regenerate context documents to continue working with current code state.
79-
- **Code Refactoring**: Provide AI with complete context about classes, functions, and their dependencies for
80-
refactoring assistance.
81-
- **Documentation**: Generate documentation by combining source code with explanations, using AI to create guides and
82-
references based on actual code.
83-
- **Team Workflows**: Share context configurations across team members to maintain consistent AI interaction patterns.
84-
- **MCP Integration**: Connect Claude AI directly to your codebase for real-time, context-aware assistance without
85-
manual context sharing.
139+
- 💡 Share and discover context configurations
140+
- 🛠️ Get help with setup and advanced usage
141+
- 🚀 Showcase your AI development workflows
142+
- 🤝 Connect with like-minded developers
143+
- 📢 First to know about new releases and features

0 commit comments

Comments
 (0)