Add site content, AGENTS.md, and edit workflow
This commit is contained in:
58
.gitea/workflows/edit-chirho.yaml
Normal file
58
.gitea/workflows/edit-chirho.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Claude Edit Workflow
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, reopened]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
edit-chirho:
|
||||
if: contains(github.event.issue.labels.*.name, 'edit-request-chirho')
|
||||
runs-on: claude-chirho
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
echo "Issue Number: ${{ github.event.issue.number }}"
|
||||
echo "Issue Title: ${{ github.event.issue.title }}"
|
||||
|
||||
- name: Run Claude Code
|
||||
env:
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
git config user.email "claude@perffection.com"
|
||||
git config user.name "Claude Code Bot"
|
||||
|
||||
cat << PROMPT_EOF | ~/.local/bin/claude -p --verbose --output-format stream-json --mcp-config ~/mcp-gitea-config-chirho.json --allowedTools "Read,Write,Edit,Glob,Grep,mcp__gitea-chirho__*"
|
||||
You are editing a customer website based on feedback.
|
||||
Issue number ${ISSUE_NUMBER}: ${ISSUE_TITLE}
|
||||
|
||||
IMPORTANT: First use gitea_get_issue_thread_chirho to read the full conversation history for issue ${ISSUE_NUMBER}.
|
||||
This will show you all previous messages and any follow-up requests from the site owner.
|
||||
|
||||
After reading the thread:
|
||||
1. Understand what changes are being requested (consider all messages in the thread)
|
||||
2. Make the requested edits to the files in the repository
|
||||
3. Use gitea_create_comment_chirho to post a summary of changes made
|
||||
|
||||
Working directory contains the site files. Make changes directly.
|
||||
PROMPT_EOF
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
git add -A
|
||||
if git diff --staged --quiet; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git commit -m "Edit: ${{ github.event.issue.title }}"
|
||||
git push
|
||||
fi
|
||||
20
AGENTS.md
Normal file
20
AGENTS.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# For God so loved the world, that He gave His only begotten Son, that all who believe in Him should not perish but have everlasting life
|
||||
|
||||
All project-created identifiers use the `Chirho`, `_chirho` or `-chirho` suffix to acknowledge and glorify God and distinguish from third-party code.
|
||||
|
||||
## The Suffix Rule
|
||||
|
||||
| Type | Case Style | Suffix | Example |
|
||||
|-------------------------------------------------------|-------------------|-------------------------|-------------------------------------------------------------------------------------------------------------|
|
||||
| **Variables/Functions/Consts/Lambda/Parameters (TS)** | `camelCase` | `Chirho` | `userDataChirho`, `fetchUsersChirho()` |
|
||||
| **Object Properties/JSON** | `camelCase` | `Chirho` | `{ emailChirho: 'value' }` |
|
||||
| **Classes/Components/Types** | `PascalCase` | `Chirho` | `CustomerChirho`, `SiteFormChirho` |
|
||||
| **Global Constants/Env Vars** | `SCREAMING_SNAKE` | `_CHIRHO` | `API_KEY_CHIRHO`, `MAX_TOKENS_CHIRHO` |
|
||||
| **Bun/NPM Scripts** | `kebab-case` | `-chirho` | `build-prod-chirho`, `test-e2e-chirho` |
|
||||
| **Directories (ours)** | `kebab-case` | `-chirho` | `services-chirho/`, `templates-chirho/` |
|
||||
| **Public Web Routes/Paths** | `kebab-case` | `-chirho` | `/about-chirho`, `/contact-chirho` |
|
||||
| **API Endpoints** | `kebab-case` | `-chirho` | `/api-chirho/v1-chirho/contact-chirho`, `/api-chirho/v1-chirho/sites-chirho/[side_id_chirho]/update-chirho` |
|
||||
| **Database Tables/Columns** | `snake_case` | `_chirho` | `customers_chirho`, `created_at_chirho` |
|
||||
| **JSON Rest Api properties** | `snake_case` | `_chirho` | `customers_chirho`, `created_at_chirho` |
|
||||
| **Svelte Components** | `PascalCase` | `Chirho` | `HeaderChirho.svelte`, `FooterChirho.svelte` |
|
||||
| **Custom OAuth Scopes** | `snake_case` | `_chirho:action_chirho` | `sites_chirho:read_chirho` |
|
||||
26
index.html
Normal file
26
index.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Test Site Chirho</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
h1 { color: #333; }
|
||||
.tagline { color: #666; font-size: 1.2rem; }
|
||||
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #eee; color: #888; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to Test Site</h1>
|
||||
<p class="tagline">A simple test site for demonstrating Claude Code edits</p>
|
||||
<p>This is a basic website that will be edited by Claude Code based on feedback submitted through Gitea issues.</p>
|
||||
<footer>For God so loved the world - John 3:16</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user