Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sudo chmod +x /usr/local/bin/coding-context

```
Usage:
coding-context-cli [options] <task-name>
coding-context [options] <task-name>

Options:
-C string
Expand All @@ -99,7 +99,7 @@ Options:

**Basic usage with local files:**
```bash
coding-context-cli -p jira_issue_key=PROJ-1234 fix-bug | llm -m gemini-pro
coding-context -p jira_issue_key=PROJ-1234 fix-bug | llm -m gemini-pro
```

This command will:
Expand All @@ -113,7 +113,7 @@ This command will:

**Using remote directories:**
```bash
coding-context-cli \
coding-context \
-d git::https://github.com/company/shared-rules.git \
-d s3::https://s3.amazonaws.com/my-bucket/coding-standards \
fix-bug | llm -m gemini-pro
Expand Down Expand Up @@ -188,16 +188,16 @@ The tool supports loading rules and tasks from remote locations via HTTP/HTTPS U

```bash
# Clone a Git repository containing rules
coding-context-cli -d git::https://github.com/company/shared-rules.git fix-bug
coding-context -d git::https://github.com/company/shared-rules.git fix-bug

# Use multiple remote sources
coding-context-cli \
coding-context \
-d git::https://github.com/company/shared-rules.git \
-d https://cdn.company.com/coding-standards \
deploy

# Mix local and remote directories
coding-context-cli \
coding-context \
-d git::https://github.com/company/shared-rules.git \
-s language=Go \
implement-feature
Expand All @@ -220,12 +220,12 @@ coding-context-cli \

```bash
# Use a specific branch or tag
coding-context-cli \
coding-context \
-d 'git::https://github.com/company/shared-rules.git?ref=v1.0' \
fix-bug

# Use a subdirectory within the repo
coding-context-cli \
coding-context \
-d 'git::https://github.com/company/mono-repo.git//coding-standards' \
implement-feature
```
Expand Down Expand Up @@ -271,10 +271,10 @@ Deploy the application to production with all safety checks.
You can then select the appropriate task using:
```bash
# Deploy to staging
coding-context-cli -s environment=staging deploy
coding-context -s environment=staging deploy

# Deploy to production
coding-context-cli -s environment=production deploy
coding-context -s environment=production deploy
```

#### Task Frontmatter Selectors
Expand All @@ -297,12 +297,12 @@ Implement the feature following Go best practices and implementation guidelines.
When you run this task, it automatically applies the selectors:
```bash
# This command automatically includes only rules with language=Go and stage=implementation
coding-context-cli implement-feature
coding-context implement-feature
```

This is equivalent to:
```bash
coding-context-cli -s language=Go -s stage=implementation implement-feature
coding-context -s language=Go -s stage=implementation implement-feature
```

**Selectors support OR logic for the same key using arrays:**
Expand All @@ -324,7 +324,7 @@ Selectors from both the task frontmatter and command line are combined (additive
# Task has: selectors.language = Go
# Command adds: -s priority=high
# Result: includes rules matching language=Go AND priority=high
coding-context-cli -s priority=high implement-feature
coding-context -s priority=high implement-feature
```

### Resume Mode
Expand All @@ -344,10 +344,10 @@ This is particularly useful in agentic workflows where an AI agent has already b

```bash
# Initial task invocation (includes all rules, uses task with resume: false)
coding-context-cli -s resume=false fix-bug | ai-agent
coding-context -s resume=false fix-bug | ai-agent

# Resume the task (skips rules, uses task with resume: true)
coding-context-cli -r fix-bug | ai-agent
coding-context -r fix-bug | ai-agent
```

**Example task files for resume mode:**
Expand Down Expand Up @@ -397,7 +397,7 @@ language: Go
To include this rule only when working on Go code, you would use `-s language=Go`:

```bash
coding-context-cli -s language=Go fix-bug
coding-context -s language=Go fix-bug
```

This will include all rules with `language: Go` in their frontmatter, excluding rules for other languages.
Expand All @@ -414,10 +414,10 @@ Then select only the relevant rules:

```bash
# Work on Python code with Python-specific rules
coding-context-cli -s language=Python fix-bug
coding-context -s language=Python fix-bug

# Work on JavaScript code with JavaScript-specific rules
coding-context-cli -s language=JavaScript enhance-feature
coding-context -s language=JavaScript enhance-feature
```

**Common Linguist Languages**
Expand Down Expand Up @@ -496,7 +496,7 @@ The `-t` flag allows you to include the task's YAML frontmatter at the beginning

**Example usage:**
```bash
coding-context-cli -t -p issue_number=123 fix-bug
coding-context -t -p issue_number=123 fix-bug
```

**Output format:**
Expand All @@ -517,7 +517,7 @@ This can be useful for:

**Example with selectors in frontmatter:**
```bash
coding-context-cli -t implement-feature
coding-context -t implement-feature
```

If the task has `selectors` in its frontmatter, they will be visible in the output:
Expand Down
8 changes: 4 additions & 4 deletions docs/explanation/agentic-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ Context is assembled at runtime based on the specific task:

```bash
# Bug fix: Include only relevant rules
coding-context-cli -s language=Go -s priority=high fix-bug
coding-context -s language=Go -s priority=high fix-bug

# Code review: Different context
coding-context-cli -s stage=review code-review
coding-context -s stage=review code-review
```

### 3. Parameter Injection
Expand All @@ -103,7 +103,7 @@ Runtime information flows into task prompts:

```bash
# Each bug gets specific context
coding-context-cli \
coding-context \
-p issue_key=BUG-123 \
-p description="Crashes on startup" \
fix-bug
Expand All @@ -116,7 +116,7 @@ Scripts fetch current state before agent execution:
```bash
# Fetch JIRA issue details automatically
export JIRA_ISSUE_KEY="BUG-123"
coding-context-cli fix-bug # Bootstrap fetches latest data
coding-context fix-bug # Bootstrap fetches latest data
```

## The Agentic Workflow Ecosystem
Expand Down
4 changes: 2 additions & 2 deletions docs/explanation/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Each stage transforms data before passing it to the next stage.
### 1. Parse Command-Line Arguments

```
coding-context-cli -C /project -s language=Go -p issue=BUG-123 fix-bug
coding-context -C /project -s language=Go -p issue=BUG-123 fix-bug
```

The CLI parses:
Expand Down Expand Up @@ -387,7 +387,7 @@ Multiple selectors use AND logic:

```bash
# Requires BOTH language=Go AND stage=testing
coding-context-cli -s language=Go -s stage=testing fix-bug
coding-context -s language=Go -s stage=testing fix-bug

# No way to specify: language=Go OR language=Python
```
Expand Down
12 changes: 6 additions & 6 deletions docs/how-to/create-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ language: Python
Use with:
```bash
# Include only Go rules
coding-context-cli -s language=Go fix-bug
coding-context -s language=Go fix-bug

# Include only Python rules
coding-context-cli -s language=Python fix-bug
coding-context -s language=Python fix-bug
```

## Rules with Multiple Selectors
Expand All @@ -90,7 +90,7 @@ When writing tests:
Use with:
```bash
# Include rules for Go testing
coding-context-cli -s language=Go -s stage=testing implement-feature
coding-context -s language=Go -s stage=testing implement-feature
```

## Stage-Specific Rules
Expand Down Expand Up @@ -128,10 +128,10 @@ stage: implementation
Use with:
```bash
# Planning phase
coding-context-cli -s stage=planning plan-feature
coding-context -s stage=planning plan-feature

# Implementation phase
coding-context-cli -s stage=implementation implement-feature
coding-context -s stage=implementation implement-feature
```

## Rules with Bootstrap Scripts
Expand Down Expand Up @@ -172,7 +172,7 @@ Use with:
export JIRA_ISSUE_KEY="PROJ-123"
export JIRA_API_TOKEN="your-token"

coding-context-cli -s source=jira fix-bug
coding-context -s source=jira fix-bug
```

## Best Practices
Expand Down
18 changes: 9 additions & 9 deletions docs/how-to/create-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Save as `.agents/tasks/code-review.md`.

Use with:
```bash
coding-context-cli code-review
coding-context code-review
```

## Task with Parameters
Expand All @@ -53,7 +53,7 @@ Implement the following feature: ${feature_name}

Use with:
```bash
coding-context-cli \
coding-context \
-p feature_name="User Authentication" \
-p requirements="OAuth2 support, secure password storage" \
-p success_criteria="All tests pass, security audit clean" \
Expand Down Expand Up @@ -89,10 +89,10 @@ Deploy with all safety checks and rollback plan.
Use with:
```bash
# Deploy to staging
coding-context-cli -s environment=staging deploy
coding-context -s environment=staging deploy

# Deploy to production
coding-context-cli -s environment=production deploy
coding-context -s environment=production deploy
```

## Resume Mode Tasks
Expand Down Expand Up @@ -124,10 +124,10 @@ Continue with the refactoring work from your previous session.
Use with:
```bash
# Initial session
coding-context-cli -s resume=false refactor
coding-context -s resume=false refactor

# Resume session (uses -r flag to skip rules and select resume task)
coding-context-cli -r refactor
coding-context -r refactor
```

## Tasks with Embedded Selectors
Expand All @@ -153,7 +153,7 @@ Requirements: ${requirements}
**Usage:**
```bash
# Automatically applies language=Go and stage=implementation selectors
coding-context-cli -p feature_name="User Auth" implement-feature
coding-context -p feature_name="User Auth" implement-feature
```

**Example with OR logic using arrays:**
Expand All @@ -176,7 +176,7 @@ This matches rules where `(language=Go OR language=Python) AND stage=testing`.
# Task has: selectors.language = Go
# Command adds: -s priority=high
# Result: Includes rules matching language=Go AND priority=high
coding-context-cli -s priority=high implement-feature
coding-context -s priority=high implement-feature
```

## Emitting Task Frontmatter
Expand All @@ -185,7 +185,7 @@ Use the `-t` flag to include the task frontmatter in the output. This is useful

**Example:**
```bash
coding-context-cli -t implement-feature
coding-context -t implement-feature
```

**Output:**
Expand Down
Loading