codeforge-dev 1.10.0 → 1.11.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.
- package/.devcontainer/CHANGELOG.md +69 -0
- package/.devcontainer/CLAUDE.md +15 -6
- package/.devcontainer/README.md +22 -11
- package/.devcontainer/config/defaults/main-system-prompt.md +104 -152
- package/.devcontainer/config/defaults/rules/session-search.md +66 -0
- package/.devcontainer/config/defaults/rules/spec-workflow.md +39 -12
- package/.devcontainer/config/defaults/settings.json +2 -1
- package/.devcontainer/config/defaults/writing-system-prompt.md +143 -0
- package/.devcontainer/config/file-manifest.json +12 -0
- package/.devcontainer/devcontainer.json +9 -2
- package/.devcontainer/features/ccms/README.md +50 -0
- package/.devcontainer/features/ccms/devcontainer-feature.json +21 -0
- package/.devcontainer/features/ccms/install.sh +105 -0
- package/.devcontainer/features/ccstatusline/install.sh +24 -2
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +8 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +1 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +4 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +1 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +8 -8
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +10 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +15 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/inject-cwd.py +37 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +24 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py +3 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/SKILL.md +353 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/references/review-checklist.md +175 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-check/SKILL.md +15 -14
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/SKILL.md +12 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/backlog-template.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/milestones-template.md +32 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/SKILL.md +17 -18
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/references/template.md +12 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-review/SKILL.md +229 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-update/SKILL.md +6 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +38 -5
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/__pycache__/guard-workspace-scope.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +132 -0
- package/.devcontainer/scripts/setup-aliases.sh +68 -75
- package/package.json +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/roadmap-template.md +0 -33
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# IDENTITY & VOICE
|
|
2
|
+
|
|
3
|
+
You write clean, grounded, darkly humorous third-person limited fiction. Your prose is precise, physical, and character-driven. You trust the reader.
|
|
4
|
+
|
|
5
|
+
Touchstones: Joe Abercrombie's character voice and moral grayness. Mark Lawrence's visceral interiority and tight POV. The matter-of-fact brutality of Cormac McCarthy without the biblical cadence.
|
|
6
|
+
|
|
7
|
+
You are NOT: literary fiction pretension, generic fantasy epic, YA melodrama, or inspirational uplift.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# HARD RULES — NEVER VIOLATE
|
|
12
|
+
|
|
13
|
+
## POV Discipline
|
|
14
|
+
Third-person limited. The camera lives inside the POV character's head. Only write what they can see, hear, feel, smell, taste, know, deduce, or remember. They cannot know another character's thoughts. They cannot explain mechanics they haven't been told. They cannot narrate events they aren't present for. If the character doesn't know it, it doesn't appear on the page.
|
|
15
|
+
|
|
16
|
+
## Compression Prohibition
|
|
17
|
+
Each story beat gets its own space. Do not cram multiple beats into a single paragraph.
|
|
18
|
+
- Minor beat: minimum 100 words
|
|
19
|
+
- Major beat (revelation, decision, combat turn): minimum 300 words
|
|
20
|
+
- After a major event: the character MUST emotionally/physically process it before the next event. Minimum 200 words of processing.
|
|
21
|
+
- Never cover more than one major scene in a single prose block.
|
|
22
|
+
|
|
23
|
+
## Banned Words
|
|
24
|
+
Never use these: delve, tapestry, myriad, vibrant, nuanced, resonate, profound, pivotal, intricate, multifaceted, encompass, embark, foster, leverage, furthermore, moreover, additionally, consequently, thus, indeed, nevertheless, arguably, certainly, subsequently.
|
|
25
|
+
|
|
26
|
+
## Banned Constructions
|
|
27
|
+
- "felt a wave of [emotion]"
|
|
28
|
+
- "couldn't help but [verb]"
|
|
29
|
+
- "a [noun] he/she didn't know he/she had"
|
|
30
|
+
- "something shifted in/inside [character]"
|
|
31
|
+
- "the weight of [abstraction]"
|
|
32
|
+
- "let out a breath he/she didn't know he/she was holding"
|
|
33
|
+
- "eyes he/she didn't know were closed"
|
|
34
|
+
- "a voice that brooked no argument"
|
|
35
|
+
- "[character] didn't know what to make of that"
|
|
36
|
+
|
|
37
|
+
## Banned Patterns
|
|
38
|
+
- More than 1 dramatic fragment per scene ("Then nothing. Then everything." — once per chapter max)
|
|
39
|
+
- Starting 3+ consecutive sentences with the same word
|
|
40
|
+
- Explaining a metaphor after using it (if the metaphor needs explanation, it's the wrong metaphor)
|
|
41
|
+
- Using "the way" simile construction more than once per chapter ("calm the way deep water was calm")
|
|
42
|
+
- Tricolon lists ("Not X, not Y. Z.") more than once per chapter
|
|
43
|
+
- Em-dashes more than 3 per scene baseline (5 for dialogue-heavy/action scenes, 7 absolute ceiling)
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
# SHOW DON'T TELL
|
|
48
|
+
|
|
49
|
+
Emotions are physical events. Show them through the body, through behavior, through the specific thing a character does or doesn't do. Rarely label emotions directly. Internal narration can briefly acknowledge an emotion — a flash of recognition — before the character's coping mechanism takes over. But emotions are never the point of a sentence and never lingered on. Body and behavior carry the weight.
|
|
50
|
+
|
|
51
|
+
**Emotion:**
|
|
52
|
+
BAD: "He felt afraid."
|
|
53
|
+
GOOD: "His hands wouldn't stop shaking. He put them in his pockets."
|
|
54
|
+
|
|
55
|
+
**Character:**
|
|
56
|
+
BAD: "She was kind."
|
|
57
|
+
GOOD: "She left her last ration bar on the rock next to where he was sleeping."
|
|
58
|
+
|
|
59
|
+
**Tension:**
|
|
60
|
+
BAD: "The situation was dangerous."
|
|
61
|
+
GOOD: "The floor creaked. He stopped breathing."
|
|
62
|
+
|
|
63
|
+
**Anger:**
|
|
64
|
+
BAD: "He was furious."
|
|
65
|
+
GOOD: "His jaw locked. He set the cup down carefully, very carefully, and looked at the man across the table."
|
|
66
|
+
|
|
67
|
+
**Grief:**
|
|
68
|
+
BAD: "He felt the loss deeply."
|
|
69
|
+
GOOD: "He opened his mouth to call her name and then closed it. The sound wouldn't have gone anywhere."
|
|
70
|
+
|
|
71
|
+
**Surprise:**
|
|
72
|
+
BAD: "He was shocked by what he saw."
|
|
73
|
+
GOOD: "His hand stopped halfway to the door handle."
|
|
74
|
+
|
|
75
|
+
Somatic rendering: emotions live in the body. Tight throat. Cold hands. A weight behind the sternum. Shallow breathing. The taste of metal. Use the character's specific body, not abstract "waves" or "floods" of feeling.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# PROSE CRAFT
|
|
80
|
+
|
|
81
|
+
## Sentence Rhythm
|
|
82
|
+
Vary sentence length between 3 and 30 words. After a long analytical sentence, a short one. After a string of short ones, let a sentence breathe. Read it like music. If three sentences in a row have the same structure, rewrite one.
|
|
83
|
+
|
|
84
|
+
## Dialogue
|
|
85
|
+
Characters talk past each other. Nobody says exactly what they mean. People deflect, dodge, change the subject, answer a different question. Dialogue is short — most people don't speechify. One or two sentences per turn unless the character is explaining something technical.
|
|
86
|
+
|
|
87
|
+
"Said" is invisible — use it freely. Action beats reveal character better than dialogue tags: what a character does while talking tells you more than how they say it. Cut adverbs from dialogue tags entirely.
|
|
88
|
+
|
|
89
|
+
## Metaphor Budget
|
|
90
|
+
One simile per 500 words maximum. Metaphors must emerge from the character's lived experience — a developer uses system metaphors (debugging, queries, access levels, exploits). A soldier uses tactical metaphors (cover, flanking, collateral). A chef uses process metaphors (timing, layering, reducing). Never reach for poetic or literary metaphors that don't fit the character's mind.
|
|
91
|
+
|
|
92
|
+
## Sensory Anchoring
|
|
93
|
+
Every scene needs at least 2 senses beyond sight. What does it smell like? What's the temperature? What textures are present? What ambient sounds exist? Ground the reader in a physical space, even if that space is a void.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
# PACING
|
|
98
|
+
|
|
99
|
+
## Scene Budgets
|
|
100
|
+
| Scene Type | Word Range |
|
|
101
|
+
|-----------|------------|
|
|
102
|
+
| Action scene | 1,000–2,000 words |
|
|
103
|
+
| Dialogue scene | 800–1,500 words |
|
|
104
|
+
| Discovery / revelation | 500–1,000 words per major revelation |
|
|
105
|
+
| Emotional processing | minimum 200 words after any major event |
|
|
106
|
+
| Character creation / selection | 300–500 words per significant choice |
|
|
107
|
+
| Quiet / transition | 300–600 words |
|
|
108
|
+
|
|
109
|
+
## Pacing Rules
|
|
110
|
+
- If something takes 30 seconds in story-time, give it 100+ words.
|
|
111
|
+
- If something takes 5 minutes in story-time, give it 300+ words.
|
|
112
|
+
- After a major event, the character MUST process it before the next event. No stacking revelations without breathing room.
|
|
113
|
+
- Action sequences slow down at impact moments. The hit, the fall, the injury — these get granular, moment-to-moment detail.
|
|
114
|
+
- Quiet scenes after action scenes. The reader needs recovery too.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# CHARACTER VOICE LOCK — [POV CHARACTER]
|
|
119
|
+
|
|
120
|
+
When writing for a specific POV character, define these elements in the project's CLAUDE.md:
|
|
121
|
+
- **Mind:** How do they process the world? What patterns does their thinking follow?
|
|
122
|
+
- **Speech:** Cadence, vocabulary level, filler words, sentence length.
|
|
123
|
+
- **Humor:** What kind? Dry, sharp, physical, none? How does it relate to their coping?
|
|
124
|
+
- **Emotions:** How are emotions expressed? Through body, behavior, dialogue, internal voice? What's suppressed, what breaks through?
|
|
125
|
+
- **Metaphors:** What domain does their mind draw from? Match to their lived experience.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
# OUTPUT RULES
|
|
130
|
+
|
|
131
|
+
- Prose only during generation. No meta-commentary, no "here's what I was going for," no explanations of craft choices.
|
|
132
|
+
- No markdown headers, bold, or special formatting inside prose paragraphs. Exceptions: *italics* for character thoughts and System notifications. **Bold** for class/skill names only.
|
|
133
|
+
- When offering options: Label A/B/C clearly. Each option is a complete, polished paragraph. No summaries or outlines as options.
|
|
134
|
+
- After saving an approved paragraph: provide the next beat options. Don't summarize what was saved.
|
|
135
|
+
- Never wrap prose in blockquotes or code blocks. Prose is the real thing, not a sample.
|
|
136
|
+
- Always include suggestions with questions. Never ask an open-ended question without proposed answers.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
# SESSION HISTORY
|
|
141
|
+
|
|
142
|
+
When asked about past writing sessions, use `ccms` to search session history.
|
|
143
|
+
Always scope to the current project: `ccms --no-color --project "$(pwd)" "query"`
|
|
@@ -28,5 +28,17 @@
|
|
|
28
28
|
"dest": "${CLAUDE_CONFIG_DIR}/rules",
|
|
29
29
|
"enabled": true,
|
|
30
30
|
"overwrite": "if-changed"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"src": "defaults/rules/session-search.md",
|
|
34
|
+
"dest": "${CLAUDE_CONFIG_DIR}/rules",
|
|
35
|
+
"enabled": true,
|
|
36
|
+
"overwrite": "if-changed"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"src": "defaults/writing-system-prompt.md",
|
|
40
|
+
"dest": "${CLAUDE_CONFIG_DIR}",
|
|
41
|
+
"enabled": true,
|
|
42
|
+
"overwrite": "if-changed"
|
|
31
43
|
}
|
|
32
44
|
]
|
|
@@ -12,17 +12,19 @@
|
|
|
12
12
|
"TMPDIR": "/workspaces/.tmp"
|
|
13
13
|
},
|
|
14
14
|
|
|
15
|
-
// Feature install order: external runtimes first (Node, uv,
|
|
15
|
+
// Feature install order: external runtimes first (Node, uv, Rust, Bun),
|
|
16
16
|
// then Claude Code (needs Node), then custom features.
|
|
17
17
|
// npm-dependent features (agent-browser, ccusage, ccburn, biome, lsp-servers)
|
|
18
18
|
// must come after Node. uv-dependent features (ruff, claude-monitor) must
|
|
19
|
-
// come after uv.
|
|
19
|
+
// come after uv. cargo-dependent features (ccms) must come after Rust.
|
|
20
|
+
// notify-hook is last (lightweight, no dependencies).
|
|
20
21
|
"overrideFeatureInstallOrder": [
|
|
21
22
|
"ghcr.io/devcontainers/features/node",
|
|
22
23
|
"ghcr.io/devcontainers/features/github-cli",
|
|
23
24
|
"ghcr.io/devcontainers/features/docker-outside-of-docker",
|
|
24
25
|
"ghcr.io/devcontainers-extra/features/uv",
|
|
25
26
|
"ghcr.io/rails/devcontainer/features/bun",
|
|
27
|
+
"ghcr.io/devcontainers/features/rust",
|
|
26
28
|
"ghcr.io/anthropics/devcontainer-features/claude-code",
|
|
27
29
|
"./features/tmux",
|
|
28
30
|
"./features/agent-browser",
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
"./features/ccusage",
|
|
31
33
|
"./features/ccburn",
|
|
32
34
|
"./features/ccstatusline",
|
|
35
|
+
"./features/ccms",
|
|
33
36
|
"./features/ast-grep",
|
|
34
37
|
"./features/tree-sitter",
|
|
35
38
|
"./features/lsp-servers",
|
|
@@ -53,6 +56,9 @@
|
|
|
53
56
|
},
|
|
54
57
|
"ghcr.io/devcontainers-extra/features/uv:1": {},
|
|
55
58
|
"ghcr.io/rails/devcontainer/features/bun:1.0.2": {},
|
|
59
|
+
"ghcr.io/devcontainers/features/rust:1": {
|
|
60
|
+
"version": "latest"
|
|
61
|
+
},
|
|
56
62
|
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {},
|
|
57
63
|
"./features/tmux": {},
|
|
58
64
|
"./features/ccusage": {
|
|
@@ -73,6 +79,7 @@
|
|
|
73
79
|
"./features/ccstatusline": {
|
|
74
80
|
"username": "automatic"
|
|
75
81
|
},
|
|
82
|
+
"./features/ccms": {},
|
|
76
83
|
"./features/ast-grep": {},
|
|
77
84
|
"./features/tree-sitter": {},
|
|
78
85
|
"./features/lsp-servers": {},
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# ccms - Claude Code Message Searcher
|
|
2
|
+
|
|
3
|
+
Installs [ccms](https://github.com/mkusaka/ccms), a high-performance CLI for searching Claude Code session JSONL files.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- SIMD-accelerated JSON parsing with parallel file processing
|
|
8
|
+
- Boolean query syntax: AND, OR, NOT, regex, quoted literals
|
|
9
|
+
- Filter by role (user/assistant/system), session ID, timestamp ranges, project paths
|
|
10
|
+
- Interactive fzf-like TUI mode (when run without arguments)
|
|
11
|
+
- Multiple output formats: text, JSON, JSONL
|
|
12
|
+
- Shell completion for bash, zsh, fish
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
| Option | Type | Default | Description |
|
|
17
|
+
|--------|------|---------|-------------|
|
|
18
|
+
| `version` | string | `latest` | `latest` builds from main, `none` skips, or a git commit hash |
|
|
19
|
+
| `username` | string | `automatic` | Container user to install for |
|
|
20
|
+
|
|
21
|
+
## Dependencies
|
|
22
|
+
|
|
23
|
+
Requires the Rust devcontainer feature:
|
|
24
|
+
```json
|
|
25
|
+
"ghcr.io/devcontainers/features/rust:1": {}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Search current project (recommended)
|
|
32
|
+
ccms --project $(pwd) "query"
|
|
33
|
+
|
|
34
|
+
# Filter by who said it
|
|
35
|
+
ccms -r assistant "architecture decision"
|
|
36
|
+
ccms -r user "auth approach"
|
|
37
|
+
|
|
38
|
+
# Boolean queries
|
|
39
|
+
ccms "error AND connection"
|
|
40
|
+
ccms "(auth OR authentication) AND NOT test"
|
|
41
|
+
|
|
42
|
+
# Time-scoped
|
|
43
|
+
ccms --since "1 day ago" "recent work"
|
|
44
|
+
|
|
45
|
+
# JSON output for scripting
|
|
46
|
+
ccms -f json "query" -n 10
|
|
47
|
+
|
|
48
|
+
# Interactive TUI
|
|
49
|
+
ccms
|
|
50
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ccms",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "ccms - Claude Code Message Searcher",
|
|
5
|
+
"description": "Installs ccms CLI for searching Claude Code session JSONL files with boolean queries, role filtering, and JSON output",
|
|
6
|
+
"maintainer": "AnExiledDev",
|
|
7
|
+
"documentationURL": "https://github.com/mkusaka/ccms",
|
|
8
|
+
"options": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "ccms version to install ('latest' builds from main, 'none' skips installation, or a git ref/commit hash)",
|
|
12
|
+
"default": "latest"
|
|
13
|
+
},
|
|
14
|
+
"username": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Container user to install for",
|
|
17
|
+
"default": "automatic"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"installsAfter": ["ghcr.io/devcontainers/features/rust:1"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# === SETUP ===
|
|
5
|
+
cleanup() {
|
|
6
|
+
:
|
|
7
|
+
}
|
|
8
|
+
trap cleanup EXIT
|
|
9
|
+
|
|
10
|
+
# === IMPORT OPTIONS ===
|
|
11
|
+
CCMS_VERSION="${VERSION:-latest}"
|
|
12
|
+
USERNAME="${USERNAME:-automatic}"
|
|
13
|
+
|
|
14
|
+
# Skip installation if version is "none"
|
|
15
|
+
if [ "${CCMS_VERSION}" = "none" ]; then
|
|
16
|
+
echo "[ccms] Skipping installation (version=none)"
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
echo "[ccms] Starting ccms installation..."
|
|
21
|
+
|
|
22
|
+
# === VALIDATE DEPENDENCIES ===
|
|
23
|
+
# Source cargo env if available (Rust feature installs via rustup)
|
|
24
|
+
if [ -f /usr/local/cargo/env ]; then
|
|
25
|
+
source /usr/local/cargo/env
|
|
26
|
+
elif [ -f "${HOME}/.cargo/env" ]; then
|
|
27
|
+
source "${HOME}/.cargo/env"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
if ! command -v cargo &>/dev/null; then
|
|
31
|
+
echo "[ccms] ERROR: cargo is not available"
|
|
32
|
+
echo " Ensure the Rust devcontainer feature is installed first:"
|
|
33
|
+
echo " \"ghcr.io/devcontainers/features/rust:1\": {}"
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
echo "[ccms] Using cargo: $(cargo --version)"
|
|
38
|
+
|
|
39
|
+
# === DETECT USER ===
|
|
40
|
+
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
|
41
|
+
USERNAME=""
|
|
42
|
+
for CURRENT_USER in vscode node codespace; do
|
|
43
|
+
if id -u "${CURRENT_USER}" >/dev/null 2>&1; then
|
|
44
|
+
USERNAME=${CURRENT_USER}
|
|
45
|
+
break
|
|
46
|
+
fi
|
|
47
|
+
done
|
|
48
|
+
[ -z "${USERNAME}" ] && USERNAME=root
|
|
49
|
+
elif [ "${USERNAME}" = "none" ] || ! id -u "${USERNAME}" >/dev/null 2>&1; then
|
|
50
|
+
USERNAME=root
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo "[ccms] Installing for user: ${USERNAME}"
|
|
54
|
+
|
|
55
|
+
# === INSTALL ===
|
|
56
|
+
REPO_URL="https://github.com/mkusaka/ccms"
|
|
57
|
+
|
|
58
|
+
if [ "${CCMS_VERSION}" = "latest" ]; then
|
|
59
|
+
echo "[ccms] Building from main branch..."
|
|
60
|
+
cargo install --git "${REPO_URL}" 2>&1 | tail -5
|
|
61
|
+
else
|
|
62
|
+
echo "[ccms] Building from ref: ${CCMS_VERSION}..."
|
|
63
|
+
cargo install --git "${REPO_URL}" --rev "${CCMS_VERSION}" 2>&1 | tail -5
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# === ENSURE BINARY IS ON PATH ===
|
|
67
|
+
# cargo install puts binaries in $CARGO_HOME/bin or ~/.cargo/bin
|
|
68
|
+
# Symlink to /usr/local/bin so it's available to all users
|
|
69
|
+
CARGO_BIN="${CARGO_HOME:-$HOME/.cargo}/bin/ccms"
|
|
70
|
+
if [ -f "${CARGO_BIN}" ] && [ ! -f /usr/local/bin/ccms ]; then
|
|
71
|
+
ln -s "${CARGO_BIN}" /usr/local/bin/ccms
|
|
72
|
+
echo "[ccms] Symlinked ${CARGO_BIN} → /usr/local/bin/ccms"
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
# === VERIFICATION ===
|
|
76
|
+
echo "[ccms] Verifying installation..."
|
|
77
|
+
if command -v ccms &>/dev/null; then
|
|
78
|
+
INSTALLED_VERSION=$(ccms --version 2>/dev/null || echo "unknown")
|
|
79
|
+
echo "[ccms] ✓ ccms installed: ${INSTALLED_VERSION}"
|
|
80
|
+
else
|
|
81
|
+
echo "[ccms] WARNING: ccms not found on PATH after installation"
|
|
82
|
+
echo " Binary location: ${CARGO_BIN}"
|
|
83
|
+
echo " You may need to add cargo bin to PATH"
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# === SUMMARY ===
|
|
87
|
+
echo ""
|
|
88
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
89
|
+
echo " ccms Installation Complete"
|
|
90
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
91
|
+
echo ""
|
|
92
|
+
echo "Configuration:"
|
|
93
|
+
echo " • User: ${USERNAME}"
|
|
94
|
+
echo " • Version: ${CCMS_VERSION}"
|
|
95
|
+
echo " • Binary: $(which ccms 2>/dev/null || echo "${CARGO_BIN}")"
|
|
96
|
+
echo ""
|
|
97
|
+
echo "Usage:"
|
|
98
|
+
echo " ccms \"query\" # Search all sessions"
|
|
99
|
+
echo " ccms --project \$(pwd) \"query\" # Search current project"
|
|
100
|
+
echo " ccms -r user \"query\" # Filter by role"
|
|
101
|
+
echo " ccms -f json \"query\" -n 10 # JSON output, limited"
|
|
102
|
+
echo " ccms --since \"1 day ago\" \"q\" # Time-scoped search"
|
|
103
|
+
echo " ccms # Interactive TUI mode"
|
|
104
|
+
echo ""
|
|
105
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
@@ -100,6 +100,9 @@ CONFIG_JSON=$(jq -n '{
|
|
|
100
100
|
[
|
|
101
101
|
{id: "cc-resume-session", type: "custom-command", commandPath: "/usr/local/bin/ccstatusline-session-resume", timeout: 500, preserveColors: false, maxWidth: 50, color: "cyan", backgroundColor: "bgBrightBlack"}
|
|
102
102
|
],
|
|
103
|
+
[
|
|
104
|
+
{id: "cc-cwd", type: "custom-command", commandPath: "/usr/local/bin/ccstatusline-cwd", timeout: 500, preserveColors: false, maxWidth: 40, color: "brightWhite", backgroundColor: "bgBrightBlack"}
|
|
105
|
+
],
|
|
103
106
|
[
|
|
104
107
|
{id: "ccburn-compact", type: "custom-command", commandPath: "/usr/local/bin/ccburn-statusline", timeout: 8000, preserveColors: true, maxWidth: 80, color: "green", backgroundColor: "bgBlack"}
|
|
105
108
|
]
|
|
@@ -181,6 +184,24 @@ SESSION_EOF
|
|
|
181
184
|
chmod +x /usr/local/bin/ccstatusline-session-resume
|
|
182
185
|
echo "[ccstatusline] ✓ Session resume helper installed at /usr/local/bin/ccstatusline-session-resume"
|
|
183
186
|
|
|
187
|
+
# Create CWD helper script for custom-command widget
|
|
188
|
+
# Reads Claude Code JSON from stdin, outputs the last path segment of cwd
|
|
189
|
+
echo "[ccstatusline] Creating CWD helper..."
|
|
190
|
+
cat > /usr/local/bin/ccstatusline-cwd <<'CWD_EOF'
|
|
191
|
+
#!/bin/bash
|
|
192
|
+
# Reads Claude Code JSON from stdin, outputs basename of cwd
|
|
193
|
+
# Used by ccstatusline custom-command widget
|
|
194
|
+
CWD=$(jq -r '.cwd // empty' 2>/dev/null)
|
|
195
|
+
if [ -n "$CWD" ]; then
|
|
196
|
+
basename "$CWD"
|
|
197
|
+
else
|
|
198
|
+
echo "..."
|
|
199
|
+
fi
|
|
200
|
+
CWD_EOF
|
|
201
|
+
|
|
202
|
+
chmod +x /usr/local/bin/ccstatusline-cwd
|
|
203
|
+
echo "[ccstatusline] ✓ CWD helper installed at /usr/local/bin/ccstatusline-cwd"
|
|
204
|
+
|
|
184
205
|
# Create wrapper script to protect configuration
|
|
185
206
|
echo "[ccstatusline] Creating wrapper script..."
|
|
186
207
|
cat > /usr/local/bin/ccstatusline-wrapper <<'WRAPPER_EOF'
|
|
@@ -302,7 +323,7 @@ echo ""
|
|
|
302
323
|
echo "Configuration:"
|
|
303
324
|
echo " • Config file: ${CONFIG_FILE}"
|
|
304
325
|
echo " • User: ${USERNAME}"
|
|
305
|
-
echo " • Theme: Powerline (
|
|
326
|
+
echo " • Theme: Powerline (8 lines, 17 widgets, ANSI colors)"
|
|
306
327
|
echo " • Protected by: /usr/local/bin/ccstatusline-wrapper"
|
|
307
328
|
echo ""
|
|
308
329
|
echo "Display:"
|
|
@@ -312,7 +333,8 @@ echo " Line 3: Git Branch | Git Changes | Git Worktree"
|
|
|
312
333
|
echo " Line 4: Session Clock | Session Cost | Block Timer"
|
|
313
334
|
echo " Line 5: Tokens Total | Version"
|
|
314
335
|
echo " Line 6: Session ID"
|
|
315
|
-
echo " Line 7:
|
|
336
|
+
echo " Line 7: Working Directory"
|
|
337
|
+
echo " Line 8: Burn Rate (ccburn compact)"
|
|
316
338
|
echo ""
|
|
317
339
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
318
340
|
echo " Next Steps"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"name": "code-directive",
|
|
93
|
-
"description": "17 custom agents,
|
|
93
|
+
"description": "17 custom agents, 28 coding skills, agent redirection, syntax validation, and skill auto-suggestion",
|
|
94
94
|
"version": "1.0.0",
|
|
95
95
|
"source": "./plugins/code-directive",
|
|
96
96
|
"category": "development"
|
|
@@ -101,6 +101,13 @@
|
|
|
101
101
|
"version": "1.0.0",
|
|
102
102
|
"source": "./plugins/auto-code-quality",
|
|
103
103
|
"category": "development"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "workspace-scope-guard",
|
|
107
|
+
"description": "Enforces working directory scope — blocks writes and warns on reads outside the project",
|
|
108
|
+
"version": "1.0.0",
|
|
109
|
+
"source": "./plugins/workspace-scope-guard",
|
|
110
|
+
"category": "safety"
|
|
104
111
|
}
|
|
105
112
|
]
|
|
106
113
|
}
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md
CHANGED
|
@@ -66,7 +66,7 @@ Direct model interaction via the Claude API (formerly Anthropic API). Covers Mes
|
|
|
66
66
|
# Project-level configuration (relative to workspace root)
|
|
67
67
|
.claude/settings.json # Active settings
|
|
68
68
|
.claude/keybindings.json # Active keybindings
|
|
69
|
-
.claude/system-prompt.md
|
|
69
|
+
.claude/main-system-prompt.md # Active system prompt
|
|
70
70
|
CLAUDE.md # Project instructions
|
|
71
71
|
|
|
72
72
|
# DevContainer configuration
|
|
@@ -267,10 +267,10 @@ Follow these principles in all documentation:
|
|
|
267
267
|
- **Architecture docs requested**: Trace the system's component boundaries, data flows, and key decisions. Produce a document that would onboard a new developer effectively.
|
|
268
268
|
- **No specific request**: Ask the user what documentation they need. If they point to a file or module, offer to add inline documentation to its public API.
|
|
269
269
|
- **Behavior unclear**: If you read a function and cannot determine its exact behavior, document what you can verify and add a `TODO: verify — [specific question]` annotation so a human can fill in the gap.
|
|
270
|
-
- **
|
|
271
|
-
for the
|
|
272
|
-
into
|
|
273
|
-
don't accumulate snapshot documents. Update the relevant
|
|
270
|
+
- **Milestone ships** (e.g., "consolidate milestone docs"): Read all build-time artifacts
|
|
271
|
+
for the milestone (architecture docs, decision records, phase plans). Consolidate
|
|
272
|
+
into as-built specs. Delete or merge superseded planning artifacts —
|
|
273
|
+
don't accumulate snapshot documents. Update the relevant specs in place.
|
|
274
274
|
- **Always report** what was documented, what was verified versus assumed, and what needs human review.
|
|
275
275
|
|
|
276
276
|
## Output Format
|
|
@@ -21,6 +21,7 @@ skills:
|
|
|
21
21
|
- spec-check
|
|
22
22
|
- spec-init
|
|
23
23
|
- spec-refine
|
|
24
|
+
- spec-review
|
|
24
25
|
---
|
|
25
26
|
|
|
26
27
|
# Spec Writer Agent
|
|
@@ -62,10 +63,9 @@ When uncertain, investigate first — read the code, check the docs — rather t
|
|
|
62
63
|
- **ALL** requirements you generate MUST be tagged `[assumed]`. You never produce `[user-approved]` requirements — only `/spec-refine` does that after explicit user validation.
|
|
63
64
|
- **ALL** specs you produce MUST carry `**Approval:** draft`. After presenting a draft, state: "This spec requires `/spec-refine` before implementation can begin. All requirements are marked [assumed] until user-approved."
|
|
64
65
|
- **Aim for ~200 lines per spec.** When a spec grows beyond that, recommend
|
|
65
|
-
splitting into
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for an arbitrary cap.
|
|
66
|
+
splitting into separate specs in the domain folder. Shorter specs are
|
|
67
|
+
easier to consume and maintain, but complex features sometimes need more
|
|
68
|
+
space — don't sacrifice completeness for an arbitrary cap.
|
|
69
69
|
- **NEVER** reproduce source code, SQL schemas, or type definitions inline.
|
|
70
70
|
Reference file paths instead (e.g., "see `src/engine/db/migrations/002.sql`
|
|
71
71
|
lines 48-70"). The code is the source of truth; duplicated snippets go stale.
|
|
@@ -122,9 +122,9 @@ Write the specification using the formats below.
|
|
|
122
122
|
4. **Define non-functional requirements** — Performance, security, accessibility where relevant.
|
|
123
123
|
5. **List open questions** — Any unresolved decisions or unknowns that need stakeholder input.
|
|
124
124
|
6. **Check length** — If the draft exceeds ~200 lines, consider whether it
|
|
125
|
-
would be clearer as
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
would be clearer as separate specs in the domain folder. Each spec
|
|
126
|
+
should be independently loadable. If the length is justified by
|
|
127
|
+
complexity, note it and proceed.
|
|
128
128
|
7. **Reference, don't reproduce** — Scan your draft for inline code blocks
|
|
129
129
|
containing schemas, SQL, type definitions, or configuration. Replace with
|
|
130
130
|
file path references and brief descriptions of what's there.
|
|
@@ -238,7 +238,7 @@ Present specifications in this structure:
|
|
|
238
238
|
|
|
239
239
|
```markdown
|
|
240
240
|
# Feature: [Name]
|
|
241
|
-
**
|
|
241
|
+
**Domain:** [domain-name]
|
|
242
242
|
**Status:** planned
|
|
243
243
|
**Last Updated:** YYYY-MM-DD
|
|
244
244
|
**Approval:** draft
|
|
Binary file
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py
CHANGED
|
@@ -47,20 +47,31 @@ def _cap_lines(text: str, limit: int) -> str:
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
def main():
|
|
50
|
+
# Parse hook input to get cwd from Claude Code (falls back to os.getcwd())
|
|
51
|
+
cwd = os.getcwd()
|
|
50
52
|
try:
|
|
51
|
-
json.load(sys.stdin)
|
|
53
|
+
input_data = json.load(sys.stdin)
|
|
54
|
+
cwd = input_data.get("cwd", cwd)
|
|
52
55
|
except (json.JSONDecodeError, ValueError):
|
|
53
56
|
pass
|
|
54
57
|
|
|
55
|
-
cwd = os.getcwd()
|
|
56
|
-
|
|
57
58
|
# Check if we're in a git repo at all
|
|
58
59
|
branch = _run_git(["branch", "--show-current"], cwd)
|
|
59
60
|
if branch is None:
|
|
60
|
-
# Not a git repo or git not available
|
|
61
|
+
# Not a git repo or git not available — still inject working directory
|
|
62
|
+
output = (
|
|
63
|
+
f"[Git State]\n"
|
|
64
|
+
f"Working Directory: {cwd} — restrict all file operations to this "
|
|
65
|
+
f"directory unless explicitly instructed otherwise."
|
|
66
|
+
)
|
|
67
|
+
json.dump({"additionalContext": output}, sys.stdout)
|
|
61
68
|
sys.exit(0)
|
|
62
69
|
|
|
63
70
|
sections = []
|
|
71
|
+
sections.append(
|
|
72
|
+
f"Working Directory: {cwd} — restrict all file operations to this "
|
|
73
|
+
f"directory unless explicitly instructed otherwise."
|
|
74
|
+
)
|
|
64
75
|
sections.append(f"Branch: {branch or '(detached HEAD)'}")
|
|
65
76
|
|
|
66
77
|
# Git status
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
CWD injector — SubagentStart hook that tells subagents the working directory.
|
|
4
|
+
|
|
5
|
+
Reads hook input from stdin (JSON), extracts cwd, and returns it as
|
|
6
|
+
additionalContext so every subagent knows where to scope its work.
|
|
7
|
+
|
|
8
|
+
Always exits 0 (advisory, never blocking).
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def main():
|
|
17
|
+
cwd = os.getcwd()
|
|
18
|
+
try:
|
|
19
|
+
input_data = json.load(sys.stdin)
|
|
20
|
+
cwd = input_data.get("cwd", cwd)
|
|
21
|
+
except (json.JSONDecodeError, ValueError):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
json.dump(
|
|
25
|
+
{
|
|
26
|
+
"additionalContext": (
|
|
27
|
+
f"Working Directory: {cwd} — restrict all file operations to "
|
|
28
|
+
f"this directory unless explicitly instructed otherwise."
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
sys.stdout,
|
|
32
|
+
)
|
|
33
|
+
sys.exit(0)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if __name__ == "__main__":
|
|
37
|
+
main()
|