# Knowledge Schema 数据结构与使用指南
> 数据库:Zhouyang Database
> Schema:`knowledge`
> 文档版本:1.0
> 数据库迁移:`20260810140949_isolate_knowledge_by_project`
> 核对日期:2026-08-10
## 1. 文档目的
`knowledge` schema 用于保存项目开发过程中积累的知识,包括问题解决方案、技术文档、架构模式、功能模块、组件定义、提示词模板和可用于 RAG 的向量知识。
同一个数据库可以同时服务多个项目。所有知识记录都通过 `project_id` 归属于明确的项目,并由以下机制共同保证隔离:
1. 每张知识表都包含非空的 `project_id`。
2. 自然键和版本号按项目进行唯一约束。
3. 父子表之间使用包含 `project_id` 的复合外键,阻止跨项目关联。
4. RLS 根据 `knowledge.project_memberships` 判断当前用户可访问的项目。
5. 向量检索函数必须传入 `p_projec# Memory Schema 多项目长期记忆数据库说明
> 文档版本:1.0
> 数据库:Supabase / PostgreSQL 17
> Schema:`memory`
> 更新日期:2026-08-10
> 适用对象:Claude Code、Codex、后台 Agent、项目服务端和数据库维护人员
## 1. 文档目的
`memory` schema 是多个项目共享的长期记忆数据库。它负责保存项目资料、开发任务、Agent 会话、执行过程、长期记忆、关键决策、观察结果、摘要,以及记忆被检索和使用后的反馈。
多个项目共享同一组表,但数据通过 `project_id`、复合外键和 PostgreSQL Row Level Security(RLS)进行隔离。项目 A 无法查询、修改或关联项目 B 的数据。
本 schema 适合作为 Agent 的“外接大脑”:
1. Agent 开始任务时检索与当前项目相关的历史记忆。
2. Agent 在执行过程中记录任务、会话、运行过程和观察结果。
3. 任务完成后保存决策、摘要和新的长期记忆。
4. 系统记录哪# Ads Schema 多项目共享广告数据库架构文档
> 用途:Supabase `ads` schema 的长期数据库架构说明与 Claude 开发交接文档
> 数据库:Zhouyang Database
> Schema:`ads`
> 快照日期:2026-08-10
> 当前表数量:30
> 架构版本:Multi-Project Shared Resource Model v2
> 最终事实来源:实际 Supabase 数据库结构;本文档用于开发理解与约束说明
---
# 1. 文档目标
`ads` schema 用于构建一个跨项目、跨广告平台的 Creative Intelligence / Advertising Learning Engine。
当前系统不是“每个项目复制一套广告表”,而采用:
```text
Canonical Shared Resource
↓
Project Binding
↓
Project Execution
↓
Metrics / Revenue / Rewar/**
* Find the lexicographically smallest valid sequence of indices
* such that word2 can be matched inside word1 with at most ONE mismatch.
*
* @param {string} word1
* @param {string} word2
* @return {number[]} indices forming the valid sequence, or [] if impossible
*/
var validSequence = function(word1, word2) {
const n = word1.length;
const m = word2.length;
// suffix[i] = smallest index in word2 that can still be matched
// using the suffix word1[i:].
// Default v#include <Arduino.h>
#include "WiFi.h"
void setup()
{
Serial.begin(115200);
WiFi.mode(WIFI_STA);
Serial.print("MAC address: ");
Serial.println(WiFi.macAddress());
}
void loop()
{
}can you go to https://app.fivesurveys.com/ and login click the login button on the top right hand corner of the screen and use pwdesignhtx@gmail.com as the login then when the modal comes up and says login in with google/chrome click on the button, if it prompts you for an email use pwdesignhtx@gmail.com, the password is Wlaf3$!*13579 for the password. one you are in the site, click Desktop if it asks you what platform you are on then go and click on a survey and fill it in, use your best jugem/**
* @param {string} num
* @param {number} t
* @return {string}
*/
var smallestNumber = function (num, t) {
// ------------------------------------------------------------
// STEP 1 — Check if t contains only digit-prime factors (2–9)
// If t has any prime factor > 9, no digit product can ever reach it.
// ------------------------------------------------------------
let temp = t;
for (let i = 2; i <= 9; i++) {
while (temp % i === 0) {
temp /= i;
/**
* Samodejno zaključi brezplačna digitalna naročila (0,00 €).
* Deluje samo za naročila, ki vsebujejo izključno virtualne/prenosljive izdelke.
*/
add_filter( 'woocommerce_payment_complete_order_status', 'auto_complete_free_digital_orders', 10, 3 );
function auto_complete_free_digital_orders( $status, $order_id, $order ) {
// Varnostna preverba
if ( ! $order instanceof WC_Order ) {
return $status;
}
// Naročilo mora biti brezplačno
if ( (float) $order->get_tot<?php
/**
* Gravity Wiz // Gravity Forms // Display Field IDs Next to Field Labels in the Editor
* https://gravitywiz.com/
*
* Experimental Snippet 🧪
*
* Instruction Video: https://www.loom.com/share/0268993d0b6c429ba50686bd740093bc
*
*/
add_filter( 'gform_field_content', function( $content, $field ) {
if ( ! GFCommon::is_form_editor() ) {
return $content;
}
static $_gw_inline_field_id_style;
if ( ! $_gw_inline_field_id_style ) {
$content .= '
<style>
.gd#Requires AutoHotkey v2.0
SetTitleMatchMode(2)
Run('explorer.exe shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App')
if WinWait("ChatGPT",,15)
{
WinRestore("ChatGPT")
WinActivate("ChatGPT")
}
#Requires AutoHotkey v2.0
SetTitleMatchMode(2)
Run("C:\Windows\System32\calc.exe")
if WinWait("Calculator",, 15)
{
WinRestore("Calculator")
WinActivate("Calculator")
}/**
* @param {number} n
* @param {number} t
* @return {number}
*/
var smallestNumber = function(n, t) {
// Helper function to compute the product of digits of x
function digitProduct(x) {
let prod = 1;
// Extract digits one by one
while (x > 0) {
let d = x % 10; // get last digit
prod *= d; // multiply into product
x = Math.floor(x / 10); // remove last digit
}
return prod;
}
# utils/update_requirements.py
# This script Update requirements.txt from the currently active Python environment
"""
Update requirements.txt from the currently active Python environment.
How to use the script?
- Copy requirments.txt from the root folder to this folder
- Run this script to update it with the currently installed packages in the active virtual environment
- Check the changes and copy it back to the root folder if you want to update the main requirements.txt file
Behaadd_action('init', function () {
remove_action('wp_enqueue_scripts', 'wp_enqueue_global_styles');
remove_action('wp_footer', 'wp_enqueue_global_styles', 1);
remove_action('wp_body_open', 'wp_global_styles_render_svg_filters');
});/**
* @param {number} n
* @param {number} k
* @param {number[][]} invocations
* @return {number[]}
*/
var remainingMethods = function(n, k, invocations) {
const adj = Array.from({ length: n }, () => []);
const rev = Array.from({ length: n }, () => []);
for (const [a, b] of invocations) {
adj[a].push(b);
rev[b].push(a);
}
// Step 1: find suspicious nodes
const suspicious = new Array(n).fill(false);
const stack = [k];
suspicious[k] = true;