Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f627508
replace readme with detailed changelog of kevin's work before dec 15
arihantchoudhary Dec 15, 2025
8ed3a54
add commit categorization by four pillars
arihantchoudhary Dec 15, 2025
5d57861
add comprehensive documentation of cache display implementation
arihantchoudhary Dec 15, 2025
4c22e8e
merge commit categorization into README and remove separate file
arihantchoudhary Dec 15, 2025
f985bf6
move pillars to top of readme and enforce update rule
arihantchoudhary Dec 15, 2025
9ffb274
update commit hash in readme
arihantchoudhary Dec 15, 2025
499180d
add latest commit to readme pillars
arihantchoudhary Dec 15, 2025
d64143c
add commit 499180d29 to readme
arihantchoudhary Dec 15, 2025
f9546c4
Document major cache optimizations in README
arihantchoudhary Dec 16, 2025
ebd7bf5
chore: rename packages to @cerebras scope
arihantchoudhary Dec 16, 2025
18b354b
chore: publish cerebras-sdk and cerebras-plugin as unscoped packages
arihantchoudhary Dec 16, 2025
40cb88b
fix: replace workspace/catalog refs with real versions, bump to 1.0.138
arihantchoudhary Dec 16, 2025
00d28c9
chore: rename to cerebras-code and cerebras-plugin, v1.0.139
arihantchoudhary Dec 16, 2025
0cd33e2
chore: rename to cerebras-sdk, cerebras-plugin, cerebras-code (CLI), …
arihantchoudhary Dec 16, 2025
3d8eecc
Add GLM-specific system prompt with Cerebras branding and co-author a…
arihantchoudhary Dec 16, 2025
6cf8378
Add prompt cache hit rate tracking to sidebar with visual trend graph
arihantchoudhary Dec 16, 2025
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
126 changes: 126 additions & 0 deletions .github/README_UPDATE_RULE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# README Update Rule

## ⚠️ MANDATORY: Update README with Every Commit

Every commit MUST update the `README.md` file under the **"Commits Categorized by Strategic Pillars"** section.

---

## How to Update

### 1. Determine Which Pillar Your Change Belongs To:

#### **Pillar 1: Idea Stack (Infrastructure & Architecture)**
- Architecture changes
- Infrastructure setup
- CI/CD configuration
- Provider systems
- Build tools
- Package management
- Git hooks

#### **Pillar 2: TUI Features (User Interface & Experience)**
- UI/UX improvements
- TUI components
- Dialogs and modals
- Keyboard shortcuts
- Visual feedback
- User interactions
- Metrics display in UI

#### **Pillar 3: SDK Level Features (Core Functionality & API)**
- Core functionality
- API changes
- Authentication systems
- Retry logic
- SDK implementations
- Request/response handling
- Error handling

#### **Pillar 4: Experiment and Reporting (Metrics & Analytics)**
- Metrics collection
- Logging systems
- Experimentation tracking
- Analytics
- Reporting tools
- Usage statistics

---

### 2. Add Your Commit to the README

**Location:** Near the top of `README.md`, under "Commits Categorized by Strategic Pillars"

**Format:**
```markdown
- **[commit-hash]** - [Brief description] ([key details])
```

**Example:**
```markdown
- **a1b2c3d4e** - Add cache display to sidebar (93% hit rate visualization)
```

---

### 3. Placement Rules

- Add **new commits at the TOP** of their pillar section (most recent first)
- Keep entries concise (one line)
- Include commit hash (first 9 characters)
- Mention key metrics if applicable (lines changed, files added, etc.)

---

## Example Workflow

```bash
# 1. Make your changes
git add .

# 2. Commit with descriptive message
git commit -m "add cache display to sidebar"

# 3. Get your commit hash
git log -1 --format=%h

# 4. Update README.md under appropriate pillar
# Add line: - **abc123def** - Add cache display to sidebar (shows 93% cache hit rate)

# 5. Amend your commit to include README update
git add README.md
git commit --amend --no-edit

# 6. Push
git push
```

---

## Why This Matters

1. **Transparency:** Everyone can see what's been done at a glance
2. **Organization:** Changes are categorized by strategic focus
3. **History:** Complete record of all improvements
4. **Planning:** Easy to see which pillars need attention

---

## Enforcement

This rule is enforced by:
- Git pre-push hooks (warning if README not updated)
- Code review process
- Team accountability

**If you forget:** The pre-push hook will remind you to update the README before pushing.

---

## Questions?

Ask any collaborator:
- Kevin
- Isaac
- Daniel
- Arihant
88 changes: 88 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: npm-publish
run-name: "npm publish ${{ inputs.bump }}"

on:
workflow_dispatch:
inputs:
bump:
description: "Bump major, minor, or patch"
required: true
type: choice
options:
- major
- minor
- patch
version:
description: "Override version (optional)"
required: false
type: string

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: ./.github/actions/setup-bun

- name: Setup npm auth
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish packages
run: |
export OPENCODE_BUMP="${{ inputs.bump }}"
export OPENCODE_VERSION="${{ inputs.version }}"
export OPENCODE_CHANNEL="latest"

# Get version
cd packages/script
VERSION=$(bun run -e 'import { Script } from "./src/index.ts"; console.log(Script.version)')
cd ../..
echo "Publishing version: $VERSION"

# Update all package.json files
find . -name "package.json" -not -path "*/node_modules/*" -not -path "*/dist/*" | while read file; do
bun -e "const pkg = await Bun.file('$file').json(); pkg.version = '$VERSION'; await Bun.write('$file', JSON.stringify(pkg, null, 2) + '\n')"
echo "Updated: $file"
done

bun install

# Publish SDK
echo "=== Publishing cerebras-sdk ==="
cd packages/sdk/js
./script/publish.ts
cd ../../..

# Publish Plugin
echo "=== Publishing cerebras-plugin ==="
cd packages/plugin
./script/publish.ts
cd ../..

# Publish CLI
echo "=== Publishing cerebras-code ==="
cd packages/opencode
./script/publish.ts
cd ../..

# Commit and tag
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -m "release: v$VERSION" || echo "No changes to commit"
git tag "v$VERSION"
git push origin HEAD --tags --no-verify

# Create GitHub Release
gh release create "v$VERSION" --title "v$VERSION" --notes "Release v$VERSION"
env:
GH_TOKEN: ${{ github.token }}
17 changes: 17 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,21 @@ if [ "$CURRENT_VERSION" != "$EXPECTED_VERSION" ]; then
echo "Error: Bun version $CURRENT_VERSION does not match expected version $EXPECTED_VERSION from package.json"
exit 1
fi

# Check if README.md was updated in this push
if git diff --name-only origin/$(git branch --show-current)..HEAD | grep -q "README.md"; then
echo "✓ README.md updated - good job!"
else
echo ""
echo "⚠️ WARNING: README.md was not updated!"
echo "Please add your commit to the appropriate pillar section in README.md"
echo "See .github/README_UPDATE_RULE.md for guidelines"
echo ""
read -p "Continue anyway? (y/N) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

bun typecheck
Loading
Loading