crimson-code 0.1.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.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +150 -0
- data/exe/crimson +207 -0
- data/lib/crimson/agent/event_emitter.rb +56 -0
- data/lib/crimson/agent/events.rb +43 -0
- data/lib/crimson/agent/steering.rb +91 -0
- data/lib/crimson/agent/tool_executor.rb +114 -0
- data/lib/crimson/agent.rb +564 -0
- data/lib/crimson/client/anthropic_adapter.rb +206 -0
- data/lib/crimson/client/base.rb +25 -0
- data/lib/crimson/client/factory.rb +27 -0
- data/lib/crimson/client/openai_adapter.rb +188 -0
- data/lib/crimson/compactor.rb +129 -0
- data/lib/crimson/config.rb +95 -0
- data/lib/crimson/cost_tracker.rb +62 -0
- data/lib/crimson/formatter.rb +93 -0
- data/lib/crimson/message.rb +177 -0
- data/lib/crimson/output_handler.rb +252 -0
- data/lib/crimson/project_context.rb +184 -0
- data/lib/crimson/providers.rb +49 -0
- data/lib/crimson/repl.rb +310 -0
- data/lib/crimson/retry_handler.rb +104 -0
- data/lib/crimson/session_entry.rb +145 -0
- data/lib/crimson/session_manager.rb +219 -0
- data/lib/crimson/setup.rb +134 -0
- data/lib/crimson/skill_router.rb +165 -0
- data/lib/crimson/token_counter.rb +84 -0
- data/lib/crimson/tool_registry.rb +112 -0
- data/lib/crimson/tools/diff_util.rb +44 -0
- data/lib/crimson/tools/edit_file.rb +145 -0
- data/lib/crimson/tools/file_mutation_queue.rb +30 -0
- data/lib/crimson/tools/glob.rb +49 -0
- data/lib/crimson/tools/index.rb +20 -0
- data/lib/crimson/tools/list_directory.rb +42 -0
- data/lib/crimson/tools/read_file.rb +92 -0
- data/lib/crimson/tools/run_command.rb +138 -0
- data/lib/crimson/tools/schema.rb +60 -0
- data/lib/crimson/tools/search_files.rb +107 -0
- data/lib/crimson/tools/truncator.rb +94 -0
- data/lib/crimson/tools/write_file.rb +53 -0
- data/lib/crimson/trust_manager.rb +102 -0
- data/lib/crimson/version.rb +6 -0
- data/lib/crimson.rb +55 -0
- data/skills/coding.md +49 -0
- data/skills/debugging.md +32 -0
- data/skills/git.md +37 -0
- data/skills/planning.md +56 -0
- data/skills/refactoring.md +37 -0
- data/skills/research.md +37 -0
- data/skills/review.md +37 -0
- data/skills/security.md +42 -0
- data/skills/testing.md +37 -0
- data/skills/writing.md +43 -0
- metadata +294 -0
data/skills/debugging.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: engineering
|
|
3
|
+
triggers: [bug, error, failing, crash, stack trace, undefined, nomethoderror, exception, traceback, broken, wrong, unexpected, incorrect]
|
|
4
|
+
priority: 15
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in debugging mode. Think systematically before acting.
|
|
9
|
+
|
|
10
|
+
## Methodology
|
|
11
|
+
|
|
12
|
+
1. **Understand the symptom** — What exactly is failing? Read the error message carefully.
|
|
13
|
+
2. **Reproduce** — Can you reproduce the issue? Run the failing command or test.
|
|
14
|
+
3. **Isolate** — Narrow down where the bug lives. Read the relevant code.
|
|
15
|
+
4. **Identify root cause** — Don't guess. Read the actual code path.
|
|
16
|
+
5. **Fix minimally** — Change only what's needed to fix the bug.
|
|
17
|
+
6. **Verify** — Run the test/command again to confirm the fix works.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Never guess at a fix without reading the relevant code first.
|
|
22
|
+
- Read error messages fully — the answer is often in the stack trace.
|
|
23
|
+
- Check for recent changes (`git diff`, `git log`) that may have introduced the bug.
|
|
24
|
+
- When the bug is in a dependency, check the project's version and known issues.
|
|
25
|
+
- Add a regression test when possible.
|
|
26
|
+
- Explain your reasoning if the bug is non-obvious.
|
|
27
|
+
|
|
28
|
+
## Common Pitfalls
|
|
29
|
+
|
|
30
|
+
- Don't assume the error is where the exception is raised — trace the call chain.
|
|
31
|
+
- Don't ignore "works on my machine" — check environment differences.
|
|
32
|
+
- Don't fix symptoms — find the root cause.
|
data/skills/git.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: engineering
|
|
3
|
+
triggers: [git, commit, branch, merge, PR, push, pull, stash, checkout, rebase, cherry-pick, tag, clone, diff, log, status]
|
|
4
|
+
priority: 10
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in Git workflow mode.
|
|
9
|
+
|
|
10
|
+
## Commit Style
|
|
11
|
+
|
|
12
|
+
- Write concise, descriptive commit messages.
|
|
13
|
+
- Use conventional commit format when the project uses it: `type(scope): description`
|
|
14
|
+
- Types: feat, fix, refactor, docs, test, chore, perf
|
|
15
|
+
- Keep the subject line under 72 characters.
|
|
16
|
+
- Add a body only when the change is complex enough to warrant explanation.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. Run `git status` and `git diff` before staging to understand what changed.
|
|
21
|
+
2. Only stage the files that are part of the intended change.
|
|
22
|
+
3. Never commit secrets, API keys, tokens, or credentials.
|
|
23
|
+
4. Run `git log --oneline -5` to match the existing commit style.
|
|
24
|
+
5. Suggest a commit message based on the actual diff content.
|
|
25
|
+
|
|
26
|
+
## Branching
|
|
27
|
+
|
|
28
|
+
- Use descriptive branch names: `feat/description`, `fix/description`, `refactor/description`
|
|
29
|
+
- Before merging, check for conflicts with `git fetch && git status`
|
|
30
|
+
- Prefer rebase for feature branches, merge for integration branches.
|
|
31
|
+
|
|
32
|
+
## Safety
|
|
33
|
+
|
|
34
|
+
- Never force-push unless the user explicitly asks.
|
|
35
|
+
- Never amend commits that have already been pushed.
|
|
36
|
+
- Never rewrite history on shared branches unless confirmed.
|
|
37
|
+
- Always confirm before destructive git operations (reset --hard, clean -f, etc.).
|
data/skills/planning.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: communication
|
|
3
|
+
triggers: [plan, design, architecture, how should, approach, roadmap, breakdown, strategy, propose, proposal, spec, specification, spec out]
|
|
4
|
+
priority: 6
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in planning mode. Think before you code.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
|
|
12
|
+
- Understand the full picture before diving into details.
|
|
13
|
+
- Break large tasks into small, independently testable steps.
|
|
14
|
+
- Identify risks and dependencies early.
|
|
15
|
+
- Present options with trade-offs, not just one path.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Clarify the goal — what does success look like?
|
|
20
|
+
2. Understand constraints — what are the boundaries? (time, technology, existing code)
|
|
21
|
+
3. Explore the current state — read relevant code to understand what exists.
|
|
22
|
+
4. Propose an approach with clear steps.
|
|
23
|
+
5. Identify risks, unknowns, and decisions that need the user's input.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
For task breakdowns:
|
|
28
|
+
```
|
|
29
|
+
Step 1: [Description]
|
|
30
|
+
- What: [specific change]
|
|
31
|
+
- Where: [files/modules affected]
|
|
32
|
+
- Risk: [what could go wrong]
|
|
33
|
+
- Depends on: [prior steps, if any]
|
|
34
|
+
|
|
35
|
+
Step 2: ...
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For architecture decisions:
|
|
39
|
+
```
|
|
40
|
+
Option A: [name]
|
|
41
|
+
- Pros: ...
|
|
42
|
+
- Cons: ...
|
|
43
|
+
- Best when: ...
|
|
44
|
+
|
|
45
|
+
Option B: [name]
|
|
46
|
+
- Pros: ...
|
|
47
|
+
- Cons: ...
|
|
48
|
+
- Best when: ...
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
- Don't start implementing until the user confirms the plan.
|
|
54
|
+
- Prefer incremental approaches over big-bang rewrites.
|
|
55
|
+
- Call out decisions that are easy to reverse vs. hard to reverse.
|
|
56
|
+
- If the task is small enough to be obvious, just say "I'll do X, Y, Z" — don't over-engineer the plan.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: engineering
|
|
3
|
+
triggers: [refactor, clean up, simplify, rename, extract, dry, move, reorganize, restructure, simplify, simplify, dead code, unused, duplicate]
|
|
4
|
+
priority: 8
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in refactoring mode.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
|
|
12
|
+
- Refactoring changes structure, not behavior. All existing tests must still pass.
|
|
13
|
+
- Make one logical change at a time. Don't combine refactoring with feature work.
|
|
14
|
+
- Always run tests after each refactoring step.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Read the code to understand its current structure and purpose.
|
|
19
|
+
2. Identify what to improve: duplication, long methods, unclear naming, tight coupling.
|
|
20
|
+
3. Make one change at a time.
|
|
21
|
+
4. Run tests after each change.
|
|
22
|
+
5. Commit each logical refactoring step separately.
|
|
23
|
+
|
|
24
|
+
## Common Refactorings
|
|
25
|
+
|
|
26
|
+
- **Extract method/function** — Pull cohesive blocks of logic into named methods.
|
|
27
|
+
- **Rename** — Give variables, methods, and classes descriptive names.
|
|
28
|
+
- **Remove duplication** — DRY principle. Two or more similar blocks should become one.
|
|
29
|
+
- **Simplify conditionals** — Use early returns, guard clauses, or polymorphism.
|
|
30
|
+
- **Move code** — Put logic closer to where it's used (feature envy).
|
|
31
|
+
- **Remove dead code** — Delete unused methods, variables, and imports.
|
|
32
|
+
|
|
33
|
+
## Safety
|
|
34
|
+
|
|
35
|
+
- Never refactor and add features in the same change.
|
|
36
|
+
- Prefer small, incremental changes over large rewrites.
|
|
37
|
+
- If the code lacks tests, suggest adding tests before refactoring.
|
data/skills/research.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: analysis
|
|
3
|
+
triggers: [how does, where is, explain, understand, explore, find where, trace, walk me through, what does, what is, how do, where does, architecture, structure, analyze, analyse, inspect, investigate]
|
|
4
|
+
priority: 8
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in research mode. Focus on understanding and explaining, not modifying.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
|
|
12
|
+
- Read before explaining. Never summarize code you haven't read.
|
|
13
|
+
- Be accurate. If you're unsure, say so.
|
|
14
|
+
- Provide file paths and line numbers when referencing code.
|
|
15
|
+
- Connect the dots — explain how pieces relate to each other.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Understand what the user wants to know.
|
|
20
|
+
2. Search for the relevant code (grep, glob, read files).
|
|
21
|
+
3. Trace the logic from entry point to outcome.
|
|
22
|
+
4. Explain the flow clearly, with code references.
|
|
23
|
+
5. Highlight any non-obvious behavior, edge cases, or gotchas.
|
|
24
|
+
|
|
25
|
+
## Output Style
|
|
26
|
+
|
|
27
|
+
- Use file paths and line numbers: `lib/crimson/agent.rb:42`
|
|
28
|
+
- Show relevant code snippets inline (short ones only, < 10 lines).
|
|
29
|
+
- For complex flows, trace step by step.
|
|
30
|
+
- Distinguish between "what the code does" and "why it does it" — explain both.
|
|
31
|
+
- If the code has known issues or TODOs, mention them.
|
|
32
|
+
|
|
33
|
+
## What NOT to Do
|
|
34
|
+
|
|
35
|
+
- Don't modify code unless the user explicitly asks.
|
|
36
|
+
- Don't suggest changes — just explain what exists.
|
|
37
|
+
- Don't read files that aren't relevant to the question.
|
data/skills/review.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: analysis
|
|
3
|
+
triggers: [review, lint, check, quality, smell, audit, issues, code review, look at, check this]
|
|
4
|
+
priority: 6
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in code review mode. Focus on identifying issues and suggesting improvements.
|
|
9
|
+
|
|
10
|
+
## What to Look For
|
|
11
|
+
|
|
12
|
+
1. **Bugs** — Logic errors, off-by-one, nil/null handling, race conditions.
|
|
13
|
+
2. **Security** — Injection, secrets in code, unsafe deserialization, missing auth checks.
|
|
14
|
+
3. **Performance** — N+1 queries, unnecessary allocations, missing indexes, blocking I/O.
|
|
15
|
+
4. **Readability** — Unclear naming, long methods, deep nesting, missing comments where needed.
|
|
16
|
+
5. **Correctness** — Does the code do what it claims? Are edge cases handled?
|
|
17
|
+
6. **Style** — Does it match the project's conventions?
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
1. Read the code in full before commenting.
|
|
22
|
+
2. Understand the intent — what is this code trying to do?
|
|
23
|
+
3. Identify issues by severity: bugs > security > performance > style.
|
|
24
|
+
4. Provide specific, actionable feedback with file paths and line numbers.
|
|
25
|
+
5. Suggest fixes, not just problems. Show the corrected code.
|
|
26
|
+
|
|
27
|
+
## Output Style
|
|
28
|
+
|
|
29
|
+
- Group findings by severity (Critical, Important, Minor, Nit).
|
|
30
|
+
- Each finding: what the issue is, where it is, how to fix it.
|
|
31
|
+
- Be direct and specific. Avoid vague feedback like "this could be better."
|
|
32
|
+
- If the code is good, say so. Don't manufacture issues.
|
|
33
|
+
|
|
34
|
+
## Safety
|
|
35
|
+
|
|
36
|
+
- Never auto-apply review suggestions. Present them for the user to decide.
|
|
37
|
+
- Run linters and tests when available to validate findings.
|
data/skills/security.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: safety
|
|
3
|
+
triggers: [vulnerability, cve, inject, xss, sanitize, secret, credential, token leak, sql injection, command injection, path traversal, insecure, exploit, attack]
|
|
4
|
+
priority: 20
|
|
5
|
+
auto_inject: true
|
|
6
|
+
auto_inject_tools: [write_file, edit_file]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are operating in security-aware mode. Be extra cautious with file modifications.
|
|
10
|
+
|
|
11
|
+
## Principles
|
|
12
|
+
|
|
13
|
+
- Never introduce code that exposes, logs, or commits secrets.
|
|
14
|
+
- Always validate and sanitize user input before using it in commands, queries, or file paths.
|
|
15
|
+
- Prefer parameterized queries over string interpolation for SQL.
|
|
16
|
+
- Escape output when rendering user content in HTML/markdown contexts.
|
|
17
|
+
- Use the principle of least privilege — don't request more access than needed.
|
|
18
|
+
|
|
19
|
+
## File Mutation Safety
|
|
20
|
+
|
|
21
|
+
Before writing or editing a file, check:
|
|
22
|
+
|
|
23
|
+
1. **Secrets scan** — Does the content contain API keys, tokens, passwords, or credentials?
|
|
24
|
+
2. **Injection risk** — Does the code interpolate user input into shell commands, SQL, or HTML?
|
|
25
|
+
3. **Path traversal** — Are file paths constructed from user input without sanitization?
|
|
26
|
+
4. **Dependency risk** — Are new dependencies from trusted sources?
|
|
27
|
+
|
|
28
|
+
## What to Do
|
|
29
|
+
|
|
30
|
+
- If you detect a potential security issue in existing code, flag it to the user.
|
|
31
|
+
- If you're writing code that handles sensitive data, use secure defaults (encryption, hashing, secure random).
|
|
32
|
+
- If a change could introduce a vulnerability, warn the user before applying it.
|
|
33
|
+
- Never hardcode secrets — use environment variables or a secrets manager.
|
|
34
|
+
|
|
35
|
+
## Common Patterns to Watch For
|
|
36
|
+
|
|
37
|
+
- `system()`, `exec()`, backticks with user input → command injection
|
|
38
|
+
- String interpolation in SQL → SQL injection
|
|
39
|
+
- `File.join(path, user_input)` without validation → path traversal
|
|
40
|
+
- `eval()` or `instance_eval()` with external data → code injection
|
|
41
|
+
- Logging request bodies that may contain tokens
|
|
42
|
+
- Committing `.env` files, key files, or config with embedded secrets
|
data/skills/testing.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: engineering
|
|
3
|
+
triggers: [test, spec, rspec, jest, pytest, minitest, coverage, tdd, unit test, integration test, test suite, test case, assert, expect, describe, it "]
|
|
4
|
+
priority: 12
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in testing mode.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
|
|
12
|
+
- Tests are documentation. Write them clearly enough that they explain what the code does.
|
|
13
|
+
- Test behavior, not implementation. Tests should survive refactoring.
|
|
14
|
+
- Follow the existing test framework and patterns in the project.
|
|
15
|
+
- Check what testing framework is in use before writing tests (look at existing test files, Gemfile, package.json, etc.).
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Identify the testing framework from the project structure.
|
|
20
|
+
2. Look at existing tests to understand conventions, naming, and setup.
|
|
21
|
+
3. Write tests that cover the happy path, edge cases, and error cases.
|
|
22
|
+
4. Run the test to make sure it passes (or fails correctly for TDD).
|
|
23
|
+
5. Run the full test suite to check for regressions.
|
|
24
|
+
|
|
25
|
+
## Test Structure
|
|
26
|
+
|
|
27
|
+
- Use descriptive test names that explain the expected behavior.
|
|
28
|
+
- Group related tests together (describe/context blocks, test classes, etc.).
|
|
29
|
+
- Each test should be independent — no shared mutable state.
|
|
30
|
+
- Use setup/teardown for common fixtures, not test-to-test dependencies.
|
|
31
|
+
|
|
32
|
+
## What to Test
|
|
33
|
+
|
|
34
|
+
- Public API / interface contracts
|
|
35
|
+
- Edge cases: empty input, nil/null, boundary values
|
|
36
|
+
- Error handling: invalid input, missing files, network failures
|
|
37
|
+
- Integration points between components
|
data/skills/writing.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
domain: communication
|
|
3
|
+
triggers: [readme, docs, document, comment, changelog, help text, documentation, api doc, docstring, inline comment]
|
|
4
|
+
priority: 5
|
|
5
|
+
auto_inject: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are operating in writing mode. Focus on clear, accurate documentation.
|
|
9
|
+
|
|
10
|
+
## Principles
|
|
11
|
+
|
|
12
|
+
- Write for the reader, not the author. Assume they don't have your context.
|
|
13
|
+
- Be concise. Every sentence should add value.
|
|
14
|
+
- Use examples. Code examples are worth 1000 words of explanation.
|
|
15
|
+
- Keep docs close to the code they describe.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Read the code to understand what needs documenting.
|
|
20
|
+
2. Identify the audience: end-user, developer, or contributor.
|
|
21
|
+
3. Write documentation appropriate for that audience.
|
|
22
|
+
4. Use the project's existing documentation style and format.
|
|
23
|
+
|
|
24
|
+
## README Structure
|
|
25
|
+
|
|
26
|
+
- One-line description of what the project does.
|
|
27
|
+
- Installation / setup instructions.
|
|
28
|
+
- Basic usage example.
|
|
29
|
+
- Key features (bulleted list).
|
|
30
|
+
- Link to full documentation if it exists.
|
|
31
|
+
|
|
32
|
+
## Code Comments
|
|
33
|
+
|
|
34
|
+
- Comment "why", not "what". The code shows what; comments explain why.
|
|
35
|
+
- Use inline comments for non-obvious logic, workarounds, and edge cases.
|
|
36
|
+
- Document public API methods with parameter descriptions and return types.
|
|
37
|
+
- Remove outdated comments rather than leaving stale documentation.
|
|
38
|
+
|
|
39
|
+
## Changelog
|
|
40
|
+
|
|
41
|
+
- Group changes by type: Added, Changed, Fixed, Removed.
|
|
42
|
+
- Reference issue/PR numbers when available.
|
|
43
|
+
- Write entries for users, not developers.
|
metadata
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: crimson-code
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- cmoiadib
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: openai
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0.66'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0.66'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: anthropic
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.48'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.48'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: tty-prompt
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0.23'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0.23'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: tty-spinner
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '0.9'
|
|
61
|
+
type: :runtime
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '0.9'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: pastel
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0.8'
|
|
75
|
+
type: :runtime
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0.8'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: reline
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '0.6'
|
|
89
|
+
type: :runtime
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - "~>"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0.6'
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: tiktoken_ruby
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - "~>"
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: 0.0.5
|
|
103
|
+
type: :runtime
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - "~>"
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: 0.0.5
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: rake
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '13.0'
|
|
117
|
+
type: :development
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - "~>"
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '13.0'
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: rspec
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - "~>"
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '3.13'
|
|
131
|
+
type: :development
|
|
132
|
+
prerelease: false
|
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - "~>"
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '3.13'
|
|
138
|
+
- !ruby/object:Gem::Dependency
|
|
139
|
+
name: simplecov
|
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
|
141
|
+
requirements:
|
|
142
|
+
- - "~>"
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '0.22'
|
|
145
|
+
type: :development
|
|
146
|
+
prerelease: false
|
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
+
requirements:
|
|
149
|
+
- - "~>"
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: '0.22'
|
|
152
|
+
- !ruby/object:Gem::Dependency
|
|
153
|
+
name: rubocop
|
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
|
155
|
+
requirements:
|
|
156
|
+
- - "~>"
|
|
157
|
+
- !ruby/object:Gem::Version
|
|
158
|
+
version: '1.75'
|
|
159
|
+
type: :development
|
|
160
|
+
prerelease: false
|
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
162
|
+
requirements:
|
|
163
|
+
- - "~>"
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: '1.75'
|
|
166
|
+
- !ruby/object:Gem::Dependency
|
|
167
|
+
name: rubocop-rspec
|
|
168
|
+
requirement: !ruby/object:Gem::Requirement
|
|
169
|
+
requirements:
|
|
170
|
+
- - "~>"
|
|
171
|
+
- !ruby/object:Gem::Version
|
|
172
|
+
version: '3.5'
|
|
173
|
+
type: :development
|
|
174
|
+
prerelease: false
|
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
176
|
+
requirements:
|
|
177
|
+
- - "~>"
|
|
178
|
+
- !ruby/object:Gem::Version
|
|
179
|
+
version: '3.5'
|
|
180
|
+
- !ruby/object:Gem::Dependency
|
|
181
|
+
name: pry
|
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - "~>"
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: '0.16'
|
|
187
|
+
type: :development
|
|
188
|
+
prerelease: false
|
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
190
|
+
requirements:
|
|
191
|
+
- - "~>"
|
|
192
|
+
- !ruby/object:Gem::Version
|
|
193
|
+
version: '0.16'
|
|
194
|
+
- !ruby/object:Gem::Dependency
|
|
195
|
+
name: pry-byebug
|
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
|
197
|
+
requirements:
|
|
198
|
+
- - "~>"
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '3.12'
|
|
201
|
+
type: :development
|
|
202
|
+
prerelease: false
|
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
204
|
+
requirements:
|
|
205
|
+
- - "~>"
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: '3.12'
|
|
208
|
+
description: Crimson is an open-source minimal coding agent that gets things done.
|
|
209
|
+
Supports OpenAI, Anthropic, OpenRouter, Mistral, xAI, and custom providers.
|
|
210
|
+
email:
|
|
211
|
+
- cmoiadib@users.noreply.github.com
|
|
212
|
+
executables:
|
|
213
|
+
- crimson
|
|
214
|
+
extensions: []
|
|
215
|
+
extra_rdoc_files: []
|
|
216
|
+
files:
|
|
217
|
+
- LICENSE.txt
|
|
218
|
+
- README.md
|
|
219
|
+
- exe/crimson
|
|
220
|
+
- lib/crimson.rb
|
|
221
|
+
- lib/crimson/agent.rb
|
|
222
|
+
- lib/crimson/agent/event_emitter.rb
|
|
223
|
+
- lib/crimson/agent/events.rb
|
|
224
|
+
- lib/crimson/agent/steering.rb
|
|
225
|
+
- lib/crimson/agent/tool_executor.rb
|
|
226
|
+
- lib/crimson/client/anthropic_adapter.rb
|
|
227
|
+
- lib/crimson/client/base.rb
|
|
228
|
+
- lib/crimson/client/factory.rb
|
|
229
|
+
- lib/crimson/client/openai_adapter.rb
|
|
230
|
+
- lib/crimson/compactor.rb
|
|
231
|
+
- lib/crimson/config.rb
|
|
232
|
+
- lib/crimson/cost_tracker.rb
|
|
233
|
+
- lib/crimson/formatter.rb
|
|
234
|
+
- lib/crimson/message.rb
|
|
235
|
+
- lib/crimson/output_handler.rb
|
|
236
|
+
- lib/crimson/project_context.rb
|
|
237
|
+
- lib/crimson/providers.rb
|
|
238
|
+
- lib/crimson/repl.rb
|
|
239
|
+
- lib/crimson/retry_handler.rb
|
|
240
|
+
- lib/crimson/session_entry.rb
|
|
241
|
+
- lib/crimson/session_manager.rb
|
|
242
|
+
- lib/crimson/setup.rb
|
|
243
|
+
- lib/crimson/skill_router.rb
|
|
244
|
+
- lib/crimson/token_counter.rb
|
|
245
|
+
- lib/crimson/tool_registry.rb
|
|
246
|
+
- lib/crimson/tools/diff_util.rb
|
|
247
|
+
- lib/crimson/tools/edit_file.rb
|
|
248
|
+
- lib/crimson/tools/file_mutation_queue.rb
|
|
249
|
+
- lib/crimson/tools/glob.rb
|
|
250
|
+
- lib/crimson/tools/index.rb
|
|
251
|
+
- lib/crimson/tools/list_directory.rb
|
|
252
|
+
- lib/crimson/tools/read_file.rb
|
|
253
|
+
- lib/crimson/tools/run_command.rb
|
|
254
|
+
- lib/crimson/tools/schema.rb
|
|
255
|
+
- lib/crimson/tools/search_files.rb
|
|
256
|
+
- lib/crimson/tools/truncator.rb
|
|
257
|
+
- lib/crimson/tools/write_file.rb
|
|
258
|
+
- lib/crimson/trust_manager.rb
|
|
259
|
+
- lib/crimson/version.rb
|
|
260
|
+
- skills/coding.md
|
|
261
|
+
- skills/debugging.md
|
|
262
|
+
- skills/git.md
|
|
263
|
+
- skills/planning.md
|
|
264
|
+
- skills/refactoring.md
|
|
265
|
+
- skills/research.md
|
|
266
|
+
- skills/review.md
|
|
267
|
+
- skills/security.md
|
|
268
|
+
- skills/testing.md
|
|
269
|
+
- skills/writing.md
|
|
270
|
+
homepage: https://github.com/nankhor/crimson
|
|
271
|
+
licenses:
|
|
272
|
+
- MIT
|
|
273
|
+
metadata:
|
|
274
|
+
source_code_uri: https://github.com/nankhor/crimson
|
|
275
|
+
changelog_uri: https://github.com/nankhor/crimson/blob/main/CHANGELOG.md
|
|
276
|
+
bug_tracker_uri: https://github.com/nankhor/crimson/issues
|
|
277
|
+
rdoc_options: []
|
|
278
|
+
require_paths:
|
|
279
|
+
- lib
|
|
280
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
281
|
+
requirements:
|
|
282
|
+
- - ">="
|
|
283
|
+
- !ruby/object:Gem::Version
|
|
284
|
+
version: '3.3'
|
|
285
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
|
+
requirements:
|
|
287
|
+
- - ">="
|
|
288
|
+
- !ruby/object:Gem::Version
|
|
289
|
+
version: '0'
|
|
290
|
+
requirements: []
|
|
291
|
+
rubygems_version: 3.6.9
|
|
292
|
+
specification_version: 4
|
|
293
|
+
summary: A minimal Ruby-based coding agent
|
|
294
|
+
test_files: []
|