Skip to content

Commit 30a4786

Browse files
author
Your Name
committed
docs: add navigation index and copy buttons to Commands and Prompts pages
1 parent 37f47e3 commit 30a4786

File tree

2 files changed

+164
-0
lines changed

2 files changed

+164
-0
lines changed

docs/commands.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,89 @@ description: Complete reference for all Chuchu CLI commands
77

88
Complete guide to all `chu` commands and their usage.
99

10+
## Quick Navigation
11+
12+
<div class="command-nav">
13+
<a href="#setup-commands">Setup</a>
14+
<a href="#interactive-modes">Interactive</a>
15+
<a href="#workflow-commands-research--plan--implement">Workflow</a>
16+
<a href="#code-quality">Review</a>
17+
<a href="#feature-generation">Features</a>
18+
<a href="#execution-mode">Run</a>
19+
<a href="#machine-learning-commands">ML</a>
20+
<a href="#dependency-graph-commands">Graph</a>
21+
<a href="#configuration">Config</a>
22+
</div>
23+
24+
<style>
25+
.command-nav {
26+
display: flex;
27+
flex-wrap: wrap;
28+
gap: 0.75rem;
29+
padding: 1rem;
30+
background: #f5f5f5;
31+
border-radius: 8px;
32+
margin-bottom: 2rem;
33+
}
34+
.command-nav a {
35+
padding: 0.5rem 1rem;
36+
background: white;
37+
border: 1px solid #ddd;
38+
border-radius: 4px;
39+
text-decoration: none;
40+
color: #333;
41+
font-weight: 500;
42+
transition: all 0.2s;
43+
}
44+
.command-nav a:hover {
45+
background: #4a90e2;
46+
color: white;
47+
border-color: #4a90e2;
48+
}
49+
.copy-btn {
50+
position: absolute;
51+
top: 0.5rem;
52+
right: 0.5rem;
53+
padding: 0.25rem 0.5rem;
54+
background: #4a90e2;
55+
color: white;
56+
border: none;
57+
border-radius: 4px;
58+
cursor: pointer;
59+
font-size: 0.75rem;
60+
opacity: 0;
61+
transition: opacity 0.2s;
62+
}
63+
.highlight:hover .copy-btn {
64+
opacity: 1;
65+
}
66+
.copy-btn:hover {
67+
background: #357abd;
68+
}
69+
.highlight {
70+
position: relative;
71+
}
72+
</style>
73+
74+
<script>
75+
document.addEventListener('DOMContentLoaded', function() {
76+
document.querySelectorAll('pre code').forEach(function(codeBlock) {
77+
const button = document.createElement('button');
78+
button.className = 'copy-btn';
79+
button.textContent = 'Copy';
80+
button.addEventListener('click', function() {
81+
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
82+
button.textContent = 'Copied!';
83+
setTimeout(function() {
84+
button.textContent = 'Copy';
85+
}, 2000);
86+
});
87+
});
88+
codeBlock.parentElement.appendChild(button);
89+
});
90+
});
91+
</script>
92+
1093
---
1194

1295
## Setup Commands

docs/prompts.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,87 @@ description: System prompts, workflows, and best practices for Chuchu agents
88

99
Chuchu uses carefully crafted system prompts for each agent and workflow. Understanding these helps you get better results.
1010

11+
## Quick Navigation
12+
13+
<div class="prompt-nav">
14+
<a href="#research-mode">Research</a>
15+
<a href="#plan-mode">Plan</a>
16+
<a href="#agent-prompts">Agents</a>
17+
<a href="#best-practices">Best Practices</a>
18+
<a href="#common-patterns">Patterns</a>
19+
<a href="#customizing-prompts">Customize</a>
20+
<a href="#troubleshooting">Troubleshooting</a>
21+
</div>
22+
23+
<style>
24+
.prompt-nav {
25+
display: flex;
26+
flex-wrap: wrap;
27+
gap: 0.75rem;
28+
padding: 1rem;
29+
background: #f5f5f5;
30+
border-radius: 8px;
31+
margin-bottom: 2rem;
32+
}
33+
.prompt-nav a {
34+
padding: 0.5rem 1rem;
35+
background: white;
36+
border: 1px solid #ddd;
37+
border-radius: 4px;
38+
text-decoration: none;
39+
color: #333;
40+
font-weight: 500;
41+
transition: all 0.2s;
42+
}
43+
.prompt-nav a:hover {
44+
background: #8b5cf6;
45+
color: white;
46+
border-color: #8b5cf6;
47+
}
48+
.copy-btn {
49+
position: absolute;
50+
top: 0.5rem;
51+
right: 0.5rem;
52+
padding: 0.25rem 0.5rem;
53+
background: #8b5cf6;
54+
color: white;
55+
border: none;
56+
border-radius: 4px;
57+
cursor: pointer;
58+
font-size: 0.75rem;
59+
opacity: 0;
60+
transition: opacity 0.2s;
61+
}
62+
.highlight:hover .copy-btn {
63+
opacity: 1;
64+
}
65+
.copy-btn:hover {
66+
background: #7c3aed;
67+
}
68+
.highlight {
69+
position: relative;
70+
}
71+
</style>
72+
73+
<script>
74+
document.addEventListener('DOMContentLoaded', function() {
75+
document.querySelectorAll('pre code').forEach(function(codeBlock) {
76+
const button = document.createElement('button');
77+
button.className = 'copy-btn';
78+
button.textContent = 'Copy';
79+
button.addEventListener('click', function() {
80+
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
81+
button.textContent = 'Copied!';
82+
setTimeout(function() {
83+
button.textContent = 'Copy';
84+
}, 2000);
85+
});
86+
});
87+
codeBlock.parentElement.appendChild(button);
88+
});
89+
});
90+
</script>
91+
1192
## Research Mode
1293

1394
**Purpose**: Document codebase as-is without suggesting improvements.

0 commit comments

Comments
 (0)