Skip to content

Common Workflows

Practical workflows for using ctxloom effectively in your daily development.

Getting Started Workflow

1. Initialize ctxloom

expressiveCode.terminalWindowFallbackTitle
# In your project directory
ctxloom init
# Or initialize globally
ctxloom init --home

2. Discover and Add Bundles

expressiveCode.terminalWindowFallbackTitle
# Find relevant bundles
ctxloom remote discover golang
# Add a remote
ctxloom remote add community alice/ctxloom-golang
# Browse what's available
ctxloom remote browse community

3. Create a Profile

expressiveCode.terminalWindowFallbackTitle
# Create a development profile that references the remote bundles
ctxloom profile create go-dev \
-b community/go-development \
-b community/testing-patterns \
-d "Go development environment"
# Pull the referenced content
ctxloom remote pull

4. Start Coding

expressiveCode.terminalWindowFallbackTitle
# Run with your profile
ctxloom run -p go-dev "help with code"

Daily Development Workflow

Morning Setup

expressiveCode.terminalWindowFallbackTitle
# Pull any remote updates your profiles reference
ctxloom remote pull
# Check your current profile
ctxloom profile show default

During Development

Your context is automatically available. For specific tasks:

expressiveCode.terminalWindowFallbackTitle
# Add security context for a security review
ctxloom run -f security#fragments/owasp "review this authentication code"
# Use a specific profile for frontend work
ctxloom run -p frontend-dev "help with React component"
# Preview what context will be used
ctxloom run --dry-run --print

End of Day

expressiveCode.terminalWindowFallbackTitle
# If you created new fragments, commit them
git add .ctxloom/
git commit -m "Update ctxloom configuration"

Team Onboarding Workflow

For Team Leads

  1. Create team bundles repository:
expressiveCode.terminalWindowFallbackTitle
mkdir team-ctxloom && cd team-ctxloom
mkdir -p ctxloom/bundles ctxloom/profiles
  1. Add team standards:
ctxloom/bundles/team-standards.yaml
version: "1.0"
description: Team coding standards
fragments:
code-style:
content: |
# Team Code Style
- Use gofmt for all Go code
- 100 character line limit
- Descriptive variable names
  1. Create team profile:
ctxloom/profiles/team-developer.yaml
description: Standard team development environment
bundles:
- team-standards
- security-basics
  1. Publish:
expressiveCode.terminalWindowFallbackTitle
git init && git add . && git commit -m "Initial team ctxloom"
git remote add origin https://github.com/myorg/ctxloom-team.git
git push -u origin main

For New Team Members

expressiveCode.terminalWindowFallbackTitle
# Add team remote
ctxloom remote add team myorg/ctxloom-team
# Create profile that inherits from team
ctxloom profile create my-dev --parent team/team-developer
# Pull the referenced team content
ctxloom remote pull
# Use the profile
ctxloom run -p my-dev "help with code"

Project-Specific Workflow

Setting Up a New Project

expressiveCode.terminalWindowFallbackTitle
cd my-project
ctxloom init
# Create project-specific profile
ctxloom profile create project \
--parent go-dev \
-b project-specific \
-d "This project's development context"
# Use the profile
ctxloom run -p project "help with code"

Project Bundle

Create a bundle specific to your project:

.ctxloom/bundles/project-specific.yaml
version: "1.0"
description: Project-specific context
fragments:
architecture:
content: |
# Project Architecture
This project uses:
- Clean architecture with domain/usecase/infrastructure layers
- PostgreSQL for persistence
- Redis for caching
- gRPC for internal services
conventions:
content: |
# Project Conventions
- All handlers in internal/handlers/
- Domain models in internal/domain/
- Use structured logging with zap

Multi-Language Workflow

Switching Contexts

expressiveCode.terminalWindowFallbackTitle
# Create language-specific profiles
ctxloom profile create go-work -b go-development -b go-testing
ctxloom profile create python-work -b python-development -b python-testing
ctxloom profile create frontend-work -b typescript -b react
# Use based on current task
ctxloom run -p go-work "help with Go code"
ctxloom run -p python-work "help with Python code"

Per-Directory Configuration

Use different .ctxloom/ configurations in different project directories:

~/projects/
├── go-api/
│ └── .ctxloom/
│ └── profiles/default.yaml # Go-focused
├── python-ml/
│ └── .ctxloom/
│ └── profiles/default.yaml # Python/ML-focused
└── react-app/
└── .ctxloom/
└── profiles/default.yaml # Frontend-focused

Security Review Workflow

Setup

expressiveCode.terminalWindowFallbackTitle
# Author a profile referencing the security bundles
ctxloom profile create security \
-b ctxloom-default/security \
-b ctxloom-default/owasp
# Pull the referenced content
ctxloom remote pull

Conducting Reviews

expressiveCode.terminalWindowFallbackTitle
# General security review
ctxloom run -t security "review this code for security issues"
# OWASP-focused review
ctxloom run -f security#fragments/owasp-top-10 "check for OWASP top 10 vulnerabilities"
# Authentication-specific
ctxloom run -f security#fragments/auth-patterns "review authentication implementation"

Code Review Workflow

Preparing Context

expressiveCode.terminalWindowFallbackTitle
# Create a code review profile
ctxloom profile create reviewer \
-b code-quality \
-b testing-patterns \
-b security-basics \
-d "Code review context"

During Review

expressiveCode.terminalWindowFallbackTitle
# Use review profile
ctxloom run -p reviewer "review this PR for code quality"
# Add specific concerns
ctxloom run -p reviewer -f performance#fragments/optimization \
"review for performance issues"

CI/CD Integration Workflow

In CI Pipeline

.github/workflows/ci.yml
jobs:
lint:
steps:
- uses: actions/checkout@v4
- name: Setup ctxloom
run: |
go install github.com/ctxloom/ctxloom@latest
ctxloom remote pull
- name: AI Code Review
run: |
ctxloom run -p code-reviewer "review changes in this PR" \
--output review.md

Lockfile for Reproducibility

expressiveCode.terminalWindowFallbackTitle
# Pulling updates the lockfile automatically
ctxloom remote pull
# Commit lockfile
git add .ctxloom/lock.yaml
git commit -m "Lock ctxloom dependencies"

In CI:

expressiveCode.terminalWindowFallbackTitle
# Pull the exact versions recorded in the committed lockfile
ctxloom remote pull

Troubleshooting Workflow

When Context Isn’t Working

expressiveCode.terminalWindowFallbackTitle
# Check current configuration
ctxloom profile show default
# Preview assembled context
ctxloom run --dry-run --print
# Check hooks are applied
cat .claude/settings.json | jq '.hooks'
# Reapply hooks
ctxloom init

When Bundles Are Missing

expressiveCode.terminalWindowFallbackTitle
# Check what's installed
ctxloom fragment list
# Check what's available remotely
ctxloom remote browse ctxloom-default
# Pull missing dependencies
ctxloom remote pull

Tips and Best Practices

Keep Context Focused

expressiveCode.terminalWindowFallbackTitle
# Instead of one huge profile
ctxloom profile create everything -b bundle1 -b bundle2 -b bundle3...
# Create task-specific profiles
ctxloom profile create api-dev -b go-development -b api-patterns
ctxloom profile create testing -b testing-patterns -b mocking
ctxloom profile create security -b security -b owasp

Use Tags Effectively

# In your bundles
fragments:
quick-reference:
tags: [quick, cheatsheet]
content: ...
detailed-guide:
tags: [detailed, learning]
content: ...
expressiveCode.terminalWindowFallbackTitle
# Quick reference only
ctxloom run -t quick "remind me of the syntax"
# Detailed learning
ctxloom run -t detailed "explain this concept"

Version Control Your Configuration

expressiveCode.terminalWindowFallbackTitle
# Always commit ctxloom configuration
git add .ctxloom/
git commit -m "Update ctxloom configuration"

Regular Maintenance

expressiveCode.terminalWindowFallbackTitle
# Weekly: pull remote updates
ctxloom remote pull
# Monthly: review and clean up profiles
ctxloom profile list
ctxloom fragment list