feat: Update AI prompts with Atlas integration details and code example fixes
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -108,7 +108,7 @@ Add your model to the ModelsFactory struct in `factory.v`:
|
||||
```v
|
||||
pub struct ModelsFactory {
|
||||
pub mut:
|
||||
messages DBCalendar
|
||||
calendar DBCalendar
|
||||
// ... other models
|
||||
}
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -61,7 +61,7 @@ The `docusaurus.add` directive defines an individual Docusaurus site (your ebook
|
||||
```heroscript
|
||||
!!docusaurus.add
|
||||
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_pull:true // Pull latest changes
|
||||
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
|
||||
!!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
|
||||
replace:'NAME:MyName, URGENCY:red' // Optional: comma-separated key:value pairs for text replacement
|
||||
```
|
||||
|
||||
@@ -35,11 +35,11 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
if plbook.exists_once(filter: 'docusaurus.define') {
|
||||
mut action := plbook.get(filter: 'docusaurus.define')!
|
||||
mut p := action.params
|
||||
//example how we get parameters from the action see core_params.md for more details
|
||||
ds = new(
|
||||
path: p.get_default('path_publish', '')!
|
||||
production: p.get_default_false('production')
|
||||
)!
|
||||
//example how we get parameters from the action see aiprompts/herolib_core/core_params.md for more details
|
||||
path_build := p.get_default('path_build', '')!
|
||||
path_publish := p.get_default('path_publish', '')!
|
||||
reset := p.get_default_false('reset')
|
||||
use_atlas := p.get_default_false('use_atlas')
|
||||
}
|
||||
|
||||
// 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`.
|
||||
|
||||
@@ -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>
|
||||
/Users/despiegk/code/github/incubaid/herolib
|
||||
├── .github
|
||||
|
||||
@@ -122,12 +122,12 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
if plbook.exists_once(filter: 'docusaurus.define') {
|
||||
mut action := plbook.get(filter: 'docusaurus.define')!
|
||||
mut p := action.params
|
||||
//example how we get parameters from the action see core_params.md for more details
|
||||
ds = new(
|
||||
path: p.get_default('path_publish', '')!
|
||||
production: p.get_default_false('production')
|
||||
)!
|
||||
}
|
||||
//example how we get parameters from the action see aiprompts/herolib_core/core_params.md for more details
|
||||
path_build := p.get_default('path_build', '')!
|
||||
path_publish := p.get_default('path_publish', '')!
|
||||
reset := p.get_default_false('reset')
|
||||
use_atlas := p.get_default_false('use_atlas')
|
||||
}
|
||||
|
||||
// Process 'docusaurus.add' actions to configure individual Docusaurus sites
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user