Compare commits
10 Commits
cf56d57225
...
b6df4dbb92
| Author | SHA1 | Date | |
|---|---|---|---|
| b6df4dbb92 | |||
| 57b752f54e | |||
| c2d5b2248d | |||
| 25608a5327 | |||
| f0ca867605 | |||
| 91a90ea622 | |||
| acc8ac87a0 | |||
| 7e45ce0756 | |||
| 9bf45416d5 | |||
| 361007d36b |
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Read JSON input from stdin and extract the prompt field
|
||||
prompt=$(cat | jq -r '.prompt // empty')
|
||||
|
||||
# Check if the prompt ends with a question mark (ignoring trailing whitespace)
|
||||
if echo "$prompt" | grep -qE '\?\s*$'; then
|
||||
# Use JSON additionalContext for discrete injection (not shown to user)
|
||||
cat <<'EOF'
|
||||
{
|
||||
"hookSpecificOutput": {
|
||||
"hookEventName": "UserPromptSubmit",
|
||||
"additionalContext": "STOP: This is a QUESTION. Suspend the current task, if any, and answer the question directly and concisely. Do NOT take any further actions, run any tools (except as necessary to answer the question), or continue previous work until instructed to 'resume' or otherwise continue the task. Wait for the user's next instruction."
|
||||
}
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
@@ -29,7 +29,51 @@
|
||||
"Bash(bd ready:*)",
|
||||
"Bash(bd close:*)",
|
||||
"WebFetch(domain:homeprozrealestate.com)",
|
||||
"Bash(npm init:*)"
|
||||
"Bash(npm init:*)",
|
||||
"Bash(bd sync:*)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(wp-content/plugins/mls-by-hansonxyz/includes/class-mls-query.php )",
|
||||
"Bash(wp-content/plugins/mls-by-hansonxyz/mls-by-hansonxyz.php )",
|
||||
"Bash(wp-content/themes/homeproz/archive-property.php )",
|
||||
"Bash(wp-content/themes/homeproz/dist/ )",
|
||||
"Bash(wp-content/themes/homeproz/inc/ajax-handlers.php )",
|
||||
"Bash(wp-content/themes/homeproz/template-parts/property/property-filters.js )",
|
||||
"Bash(wp-content/themes/homeproz/template-parts/property/property-filters.scss )",
|
||||
"Bash(wp-content/themes/homeproz/template-parts/property/property-results.php)",
|
||||
"Bash(/var/www/html/wp-content/themes/homeproz/archive-property.php )",
|
||||
"Bash(/var/www/html/wp-content/themes/homeproz/dist/assets/main.css )",
|
||||
"Bash(/var/www/html/wp-content/themes/homeproz/dist/assets/main.js )",
|
||||
"Bash(/var/www/html/wp-content/themes/homeproz/template-parts/property/property-filters.js )",
|
||||
"Bash(/var/www/html/wp-content/themes/homeproz/template-parts/property/property-filters.scss)",
|
||||
"Bash(bd list:*)",
|
||||
"Bash(.beads/ )",
|
||||
"Bash(FEATURES_PENDING_12_15.md )",
|
||||
"Bash(wp-content/plugins/mls-by-hansonxyz/ )",
|
||||
"Bash(wp-content/themes/homeproz/front-page.php )",
|
||||
"Bash(wp-content/themes/homeproz/inc/ )",
|
||||
"Bash(wp-content/themes/homeproz/page-about.php )",
|
||||
"Bash(wp-content/themes/homeproz/page-contact.php )",
|
||||
"Bash(wp-content/themes/homeproz/src/main.js )",
|
||||
"Bash(wp-content/themes/homeproz/template-parts/)",
|
||||
"Bash(mv:*)",
|
||||
"Bash(git -C /var/www/html log --oneline -5)",
|
||||
"Bash(git -C /var/www/html add wp-content/plugins/mls-by-hansonxyz/includes/class-mls-db.php wp-content/plugins/mls-by-hansonxyz/includes/class-mls-query.php wp-content/plugins/mls-by-hansonxyz/mls-by-hansonxyz.php wp-content/plugins/mls-by-hansonxyz/data/ wp-content/themes/homeproz/inc/ajax-handlers.php wp-content/themes/homeproz/template-parts/property/property-filters.js wp-content/themes/homeproz/dist/assets/main.js)",
|
||||
"Bash(npx playwright test:*)",
|
||||
"WebFetch(domain:homeproz.dev.hanson.xyz)",
|
||||
"Bash(python3:*)",
|
||||
"Bash(git -C /var/www/html status --short wp-content/themes/homeproz/)",
|
||||
"Bash(git -C /var/www/html diff --stat wp-content/themes/homeproz/template-parts/property/property-filters.js wp-content/themes/homeproz/template-parts/property/property-filters.scss wp-content/themes/homeproz/template-parts/property/property-filters-sticky.php)",
|
||||
"Bash(git -C /var/www/html add wp-content/themes/homeproz/template-parts/property/property-filters.js wp-content/themes/homeproz/template-parts/property/property-filters.scss wp-content/themes/homeproz/template-parts/property/property-filters-sticky.php wp-content/themes/homeproz/dist/assets/main.css wp-content/themes/homeproz/dist/assets/main.js)",
|
||||
"Bash(find:*)",
|
||||
"WebFetch(domain:www.parkdental.com)",
|
||||
"Bash(git -C /var/www/html status --short)",
|
||||
"Bash(git -C /var/www/html add:*)",
|
||||
"Bash(git -C /var/www/html diff --cached --stat)",
|
||||
"Bash(git -C /var/www/html commit -m \"$\\(cat <<''EOF''\nAdd 6 reusable page templates with ACF integration\n\nIntroduces layout-focused templates for marketing pages:\n- Content with Sidebar: 70/30 grid with callout boxes\n- Alternating Blocks: Zigzag image/text sections\n- Service Detail: Hero + features grid + FAQ accordion\n- Card Grid: Configurable 2/3/4 column card layouts\n- Long-Form Article: Clean reading layout with related links\n- Landing Page: Conversion-focused with benefits and testimonial\n\nEach template has corresponding ACF field groups for content\nmanagement. Sample pages created under /page-template-examples/.\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
|
||||
"Bash(cat:*)",
|
||||
"Bash(rsync -av /var/www/vhosts/homeprozrealestate.com/httpdocs/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-query.php /var/www/vhosts/homeprozrealestate.com/staging/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-query.php && rsync -av /var/www/vhosts/homeprozrealestate.com/httpdocs/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-cluster.php /var/www/vhosts/homeprozrealestate.com/staging/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-cluster.php)",
|
||||
"Bash(crontab:*)",
|
||||
"Bash(rsync:*)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
@@ -56,6 +100,17 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"UserPromptSubmit": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": ".claude/hooks/question-guard.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# WordPress config with secrets (keep sample)
|
||||
# wp-config.php # Commenting out - we want to track this for snapshots
|
||||
# WordPress config with secrets (use wp-config.php.dist as template)
|
||||
wp-config.php
|
||||
|
||||
# Uploads (too large for git, backup separately)
|
||||
wp-content/uploads/
|
||||
@@ -29,6 +29,15 @@ Thumbs.db
|
||||
|
||||
# Debug
|
||||
wp-content/debug.log
|
||||
wp-content/debug.log.*
|
||||
|
||||
# Runtime image caches (regenerable, capped by mls-image-cache-cap)
|
||||
wp-content/cache/transformed-images/
|
||||
wp-content/uploads/mls-thumbnails/
|
||||
wp-content/uploads/mls-listings/
|
||||
|
||||
# Local Claude CLI tooling
|
||||
node_modules/claude-cli/
|
||||
|
||||
# Vite
|
||||
*.local
|
||||
|
||||
@@ -13,6 +13,18 @@ Custom WordPress theme for HomeProz Real Estate (Albert Lea, MN). Dark/rust bran
|
||||
7. **No custom animations** - keep it static and fast
|
||||
8. **ASK before architectural decisions**
|
||||
9. **No git commits unless asked** - commits are for checkpoints before major work or major milestones, not for small single-file changes
|
||||
10. **Sync to staging** - after modifying theme or plugin files, sync them to `/var/www/vhosts/homeprozrealestate.com/staging/` using rsync
|
||||
|
||||
## Version Control Policy
|
||||
|
||||
Git is a snapshot tool and the historical record of what changed on the site. **If it's not in git, it may as well not exist.**
|
||||
|
||||
When asked to commit, commit **everything except build artifacts** — do not pick a "scope" or hand-select files. The point is the snapshot.
|
||||
|
||||
- **Commit:** all source (PHP, SCSS, JS), configs, `package.json`/`package-lock.json`, `db_content_updates/`, `node_modules/`, `dist/`, DB snapshots (`*.sql.gz`), plugins, themes, `CLAUDE.md`. `node_modules/` and `dist/` are tracked intentionally — see comments in `.gitignore`.
|
||||
- **Do not commit:** runtime caches (`wp-content/cache/transformed-images/`), log files (`wp-content/debug.log*`), and other transient/regenerable runtime output. These belong in `.gitignore`.
|
||||
|
||||
If you find untracked files in scope of a commit, include them. If something looks ambiguous, default to committing it — under-tracking loses history; over-tracking is reversible.
|
||||
|
||||
## Build
|
||||
|
||||
@@ -26,17 +38,35 @@ npm run build
|
||||
- **WP-CLI**: `wp --allow-root <command>`
|
||||
- **Dev commits**: `./dev_commit.sh "message"` (includes DB snapshot)
|
||||
|
||||
## WordPress Admin
|
||||
|
||||
- **URL**: `/wp-admin/`
|
||||
- **Username**: `admin`
|
||||
- **Password**: `Byg2X2sqbHeVvHLYRz5e`
|
||||
|
||||
## Theme Options
|
||||
|
||||
Access via `homeproz_get_option('key')`:
|
||||
- `phone`, `email`, `address`, `facebook`, `tiktok`
|
||||
|
||||
## Custom Post Types
|
||||
## Database Content Changes (MANDATORY)
|
||||
|
||||
### Property (`/properties/`)
|
||||
- ACF: price, address, beds/baths/sqft, gallery, documents, listing_agent
|
||||
- Taxonomies: `property_status` (Active/Pending/Sold), `property_type`, `property_location`
|
||||
- Location dropdown only shows communities with active/pending properties
|
||||
This site has a production fork. All database changes must be documented for production sync.
|
||||
|
||||
**Schema changes** (new tables, columns, indexes): Use migration files in the MLS plugin (`wp-content/plugins/mls-by-hansonxyz/`).
|
||||
|
||||
**Content changes** (options, ACF fields, posts, menus, terms): Create a timestamped document in `db_content_updates/` with:
|
||||
- Filename: `YYYY-MM-DD_HH-MM_description.md`
|
||||
- What was changed (exact field names, option keys, post IDs)
|
||||
- The exact values set (copy/paste the WP-CLI commands or SQL)
|
||||
- Why it was changed
|
||||
- Any dependencies or order of operations
|
||||
|
||||
Example: `2026-01-04_19-30_add-footer-menu.md`
|
||||
|
||||
**DO NOT** make database content changes without creating the corresponding document. The production team relies on these files to sync changes.
|
||||
|
||||
## Custom Post Types
|
||||
|
||||
### Agent (`/agents/`)
|
||||
- ACF: phone, email, bio, gallery, social links, order, disabled toggle
|
||||
@@ -55,3 +85,23 @@ $url = add_query_arg('property', urlencode($title), home_url('/contact/'));
|
||||
## Page Classes
|
||||
|
||||
`Home_Page`, `Properties_Archive`, `Single_Property`, `About_Page`, `Contact_Page`, `Blog_Archive`, `Single_Post`, `Agents_Archive`, `Single_Agent`, `Search_Page`, `Error_404`
|
||||
|
||||
## MLS Property Overrides
|
||||
|
||||
### Force a non-HomeProz listing to appear as HomeProz
|
||||
|
||||
Some properties (e.g., LandProz listings) may need to appear on the HomeProz site. The `is_homeproz` flag overrides the office name check.
|
||||
|
||||
1. Find the property's `listing_key`:
|
||||
```bash
|
||||
wp --allow-root db query "SELECT listing_key, listing_id, street_name, city, list_office_name, is_homeproz FROM wp_mls_properties WHERE listing_id LIKE '%<MLS_ID>%'"
|
||||
```
|
||||
|
||||
2. Set the override flag:
|
||||
```bash
|
||||
wp --allow-root db query "UPDATE wp_mls_properties SET is_homeproz = 1 WHERE listing_key = '<LISTING_KEY>'"
|
||||
```
|
||||
|
||||
3. Document the change in `db_content_updates/` per the Database Content Changes policy.
|
||||
|
||||
**Example**: 121 Main St, Glenville (NST7785198) is listed under "LandProz Real Estate, LLC" but appears on HomeProz via `is_homeproz = 1`.
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.0 MiB After Width: | Height: | Size: 5.0 MiB |