Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .github/workflows/validate-catalog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Validate

# Structural gates for OS packages and the rebuilding-page site:
# test-aligned-onboarding — full-fidelity creative-corpus export
# validate-package-index — package registry and manifest contract
# build-site — typecheck + build use-case-library-site

Expand All @@ -17,6 +18,16 @@ concurrency:
cancel-in-progress: true

jobs:
test-aligned-onboarding:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Test the Aligned Onboarding creative-corpus exporter
run: node --test aligned-onboarding/test/export-creative-corpus.test.mjs

validate-package-index:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ legacy directory directly.
the recently merged onboarding flow keeps its source and referenced
dependencies while it is migrated to the package contract.

Validate its deterministic creative-corpus export with:

```bash
node --test aligned-onboarding/test/export-creative-corpus.test.mjs
```

## Library website

`use-case-library-site/` remains deployed as a rebuilding page. Its archived
Expand Down
30 changes: 21 additions & 9 deletions aligned-onboarding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ files: they do different jobs, persist to different places, and refresh on diffe
These instruction files (this overview, the Account Context Brain, the Creative Corpus, and the
Motion CLI Data-Query Guide) are the package itself, not its output. They live in the Brain outside
the `meta` folder structure; the exact folder for them is not fixed yet and can be decided later.
corpus-search is a bundled tool, not an instruction file, and installs under
The deterministic creative-corpus exporter installs with the orchestration skill at
`/agent/.agents/skills/aligned-onboarding/bin/export-creative-corpus.mjs`. corpus-search is a
bundled tool, not an instruction file, and installs under
`/agent/tools/corpus-search/`. The `meta` folder holds only what Runneth generates from running the
package: the filled account context and the per-creative files.

Expand Down Expand Up @@ -64,12 +66,17 @@ File: `account-context-brain.md`
### Creative Corpus
File: `creative-corpus-playbook.md`

- **Job:** build and maintain one enriched record per active creative (identity, summary, hook,
value props, transcript, AI tags, naming), the attributes Runneth uses to do the analysis the
Account Context Brain defines.
- **Job:** build and maintain one enriched record per active creative (identity, complete ad
description, complete hook/headline, creative breakdown, messaging and positioning, transcript,
AI tags, naming), the attributes Runneth uses to do the analysis the Account Context Brain
defines.
- **How it runs:** reads what the Account Context Brain already knows, then pulls from Motion only
what the Account Context Brain cannot tell it (the creative content itself). No separate corpus
tool to install.
what the Account Context Brain cannot tell it (the creative content itself). The installed
exporter validates and writes the raw sections deterministically; it never selects only the first
hook or reduces the creative breakdown and messaging to a few fields. Replacement exports
resolve by stable `source_id`, preserve missing prior Motion enrichment, and retain a protected
Account Context projection containing decoded naming and custom-threshold Spend State across
ad-name changes.
- **Persists to:** individual creative Markdown files under `/agent/brain/meta/creatives/`, plus an
optional tagging taxonomy at `/agent/brain/meta/creatives/_tagging-taxonomy.md`.
- **Retrieval:** automatic through Knoweth. Writing the file is the index step.
Expand Down Expand Up @@ -122,9 +129,14 @@ similar. Everything shares one index, kept separate by the `kind` tag (`creative
4. **Install corpus-search.** Run `bash /agent/tools/corpus-search/install.sh`, resolve its
checklist (including `OPENAI_API_KEY`), and register `/agent/brain/meta/creatives` as a source
with `kind: creative`. One-time; can happen before or after the corpus is built.
5. **Build the Creative Corpus.** With the Account Context Brain in place, generate the per-creative
attribute files (each with its frontmatter). The Creative Corpus reads the Account Context Brain
for interpretation. Then index the folder into corpus-search so filterable search is available.
5. **Build the Creative Corpus.** With the Account Context Brain in place, request all four Motion
summary sections and run the installed exporter to generate the per-creative attribute files
(each with its frontmatter). Project decoded naming and custom-threshold Spend State into each
file's protected Account Context block; the exporter preserves that block on later full or
fully enriched scoped replacements. Existing records resolve by `source_id`, so ad-name drift
moves one record, and omitted retry enrichment retains the prior complete Motion sections. The
Creative Corpus reads the Account Context Brain for interpretation. Then index the folder into
corpus-search so filterable search is available.
6. **Keep both current.** The Account Context Brain on its refresh cadence, the Creative Corpus on
daily and event-triggered maintenance, and refresh the corpus-search index on that same cadence.

Expand Down
17 changes: 14 additions & 3 deletions aligned-onboarding/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ procedures live in the staged docs and are the source of truth for each step:
- Account Context Brain: `/agent/brain/aligned-onboarding/account-context-brain.md`
- Creative Corpus playbook: `/agent/brain/aligned-onboarding/creative-corpus-playbook.md`
- Motion CLI data-query guide: `/agent/brain/aligned-onboarding/motion-cli-data-query-guide.md`
- Creative Corpus exporter:
`/agent/.agents/skills/aligned-onboarding/bin/export-creative-corpus.mjs`

## Scope rules (apply throughout)

Expand Down Expand Up @@ -66,9 +68,18 @@ procedures live in the staged docs and are the source of truth for each step:
install-config; never clobber a customized copy. It supplements Knoweth for deliberate,
filterable search. Register `/agent/brain/meta/creatives` as a source with `kind: creative`.
5. **Build the Creative Corpus.** Follow `creative-corpus-playbook.md`: read what the Account
Context Brain already knows, pull only the creative content from Motion, and write one enriched
Markdown file per active creative under `/agent/brain/meta/creatives/`. Writing the files is the
index step for Knoweth; index the corpus-search source too if installed.
Context Brain already knows, request all four Motion summary sections (`adDescription`,
`hookOrHeadline`, `creativeBreakdown`, and `messagingAndPositioning`), then run the installed
exporter over the returned Motion JSON. Do not hand-select nested fields. The exporter writes one
enriched Markdown file per active creative under `/agent/brain/meta/creatives/` and fails on a
malformed non-null section. Project the Account Context Brain's decoded naming and
custom-threshold Spend State inside each file's protected Account Context block; later exports
find the record by stable `source_id` and preserve that block across ad-name changes. If a
transcript needs a scoped retry, request all four summaries, glossary, metrics, and transcript
together, then export that fully enriched result after the full pull. Never export a
transcript-only result. If Motion omits requested retry enrichment, the exporter preserves the
prior complete Motion sections by `source_id` or fails before writing when none exists. Writing
the files is the index step for Knoweth; index the corpus-search source too if installed.
6. **Keep both current.** Account Context Brain on a monthly-plus-drift cadence; Creative Corpus on
daily and event-triggered maintenance. Log every refresh in `/agent/brain/meta/_changelog.md`.

Expand Down
Loading
Loading