feat: Update AI prompts with Atlas integration details and code example fixes

This commit is contained in:
mik-tf
2025-11-26 09:08:11 -05:00
parent 8a458c6b3f
commit 007361deab
6 changed files with 22 additions and 18 deletions

View File

@@ -2,9 +2,9 @@
## Overview ## Overview
This document provides clear instructions for AI agents to create new HeroDB models similar to `message.v`. This document provides clear instructions for AI agents to create new HeroDB models similar to `message.v`.
These models are used to store structured data in Redis using the HeroDB system. These models are used to store structured data in Redis using the HeroDB system.
The message.v can be found in `lib/hero/heromodels/message.v`.s The `message.v` example can be found in `lib/hero/heromodels/message.v`.
## Key Concepts ## Key Concepts
@@ -108,7 +108,7 @@ Add your model to the ModelsFactory struct in `factory.v`:
```v ```v
pub struct ModelsFactory { pub struct ModelsFactory {
pub mut: pub mut:
messages DBCalendar calendar DBCalendar
// ... other models // ... other models
} }
``` ```

View File

@@ -1,3 +1,5 @@
> NOTE: Atlas is the default document collections/export pipeline used by the current Docusaurus integration (see `lib/data/atlas/client`). The Doctree module described here is an alternative/legacy export mechanism that still exists but is not the primary path. Use Atlas by default unless you explicitly need Doctree.
# Doctree Export Specification # Doctree Export Specification
## Overview ## Overview

View File

@@ -61,7 +61,7 @@ The `docusaurus.add` directive defines an individual Docusaurus site (your ebook
```heroscript ```heroscript
!!docusaurus.add !!docusaurus.add
name:"tfgrid_tech_ebook" name:"tfgrid_tech_ebook"
git_url:"https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/ebooks/tech" git_url:"https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/ebooks/tech"
git_reset:true // Reset Git repository before pulling git_reset:true // Reset Git repository before pulling
git_pull:true // Pull latest changes git_pull:true // Pull latest changes
git_root:"/tmp/git_clones" // Optional: specify a root directory for git clones git_root:"/tmp/git_clones" // Optional: specify a root directory for git clones
@@ -227,7 +227,7 @@ This powerful feature allows you to pull markdown content and assets from other
```heroscript ```heroscript
!!site.import !!site.import
url:'https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/collections/cloud_reinvented' url:'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections/cloud_reinvented'
dest:'cloud_reinvented' // Destination subdirectory within your Docusaurus docs folder dest:'cloud_reinvented' // Destination subdirectory within your Docusaurus docs folder
replace:'NAME:MyName, URGENCY:red' // Optional: comma-separated key:value pairs for text replacement replace:'NAME:MyName, URGENCY:red' // Optional: comma-separated key:value pairs for text replacement
``` ```

View File

@@ -35,11 +35,11 @@ pub fn play(mut plbook PlayBook) ! {
if plbook.exists_once(filter: 'docusaurus.define') { if plbook.exists_once(filter: 'docusaurus.define') {
mut action := plbook.get(filter: 'docusaurus.define')! mut action := plbook.get(filter: 'docusaurus.define')!
mut p := action.params mut p := action.params
//example how we get parameters from the action see core_params.md for more details //example how we get parameters from the action see aiprompts/herolib_core/core_params.md for more details
ds = new( path_build := p.get_default('path_build', '')!
path: p.get_default('path_publish', '')! path_publish := p.get_default('path_publish', '')!
production: p.get_default_false('production') reset := p.get_default_false('reset')
)! use_atlas := p.get_default_false('use_atlas')
} }
// Process 'docusaurus.add' actions to configure individual Docusaurus sites // Process 'docusaurus.add' actions to configure individual Docusaurus sites
@@ -51,4 +51,4 @@ pub fn play(mut plbook PlayBook) ! {
} }
``` ```
For detailed information on parameter retrieval methods (e.g., `p.get()`, `p.get_int()`, `p.get_default_true()`), refer to `aiprompts/ai_core/core_params.md`. For detailed information on parameter retrieval methods (e.g., `p.get()`, `p.get_int()`, `p.get_default_true()`), refer to `aiprompts/herolib_core/core_params.md`.

View File

@@ -1,3 +1,5 @@
> NOTE: This document is an example snapshot of a developer's filesystem layout for HeroDB/HeroModels. Paths under `/Users/despiegk/...` are illustrative only. For the current, authoritative structure always use the live repository tree (this checkout) and the modules under `lib/hero/heromodels` and `lib/hero/db`.
<file_map> <file_map>
/Users/despiegk/code/github/incubaid/herolib /Users/despiegk/code/github/incubaid/herolib
├── .github ├── .github

View File

@@ -122,12 +122,12 @@ pub fn play(mut plbook PlayBook) ! {
if plbook.exists_once(filter: 'docusaurus.define') { if plbook.exists_once(filter: 'docusaurus.define') {
mut action := plbook.get(filter: 'docusaurus.define')! mut action := plbook.get(filter: 'docusaurus.define')!
mut p := action.params mut p := action.params
//example how we get parameters from the action see core_params.md for more details //example how we get parameters from the action see aiprompts/herolib_core/core_params.md for more details
ds = new( path_build := p.get_default('path_build', '')!
path: p.get_default('path_publish', '')! path_publish := p.get_default('path_publish', '')!
production: p.get_default_false('production') reset := p.get_default_false('reset')
)! use_atlas := p.get_default_false('use_atlas')
} }
// Process 'docusaurus.add' actions to configure individual Docusaurus sites // Process 'docusaurus.add' actions to configure individual Docusaurus sites
actions := plbook.find(filter: 'docusaurus.add')! actions := plbook.find(filter: 'docusaurus.add')!
@@ -138,7 +138,7 @@ pub fn play(mut plbook PlayBook) ! {
} }
``` ```
For detailed information on parameter retrieval methods (e.g., `p.get()`, `p.get_int()`, `p.get_default_true()`), refer to `aiprompts/ai_core/core_params.md`. For detailed information on parameter retrieval methods (e.g., `p.get()`, `p.get_int()`, `p.get_default_true()`), refer to `aiprompts/herolib_core/core_params.md`.
# PlayBook, process heroscripts # PlayBook, process heroscripts