feat(editorial): add blocked profile policy distribution and isolated installer
This commit is contained in:
1 parent
8cedc2cd67
commit
ced4561635
23 files changed
+573
No files matched your search
@@ -0,0 +1,76 @@
|
||||
# Hermes editorial runtime distribution v4.1.0
|
||||
|
||||
Config-only tracked artifact for `canina-hermes`, explicit home `/opt/data`.
|
||||
No deployment or runtime writes were performed by this change. Parent owns CI
|
||||
copy/provisioning and Stage bridge acceptance. No dependencies beyond Python stdlib.
|
||||
|
||||
## Isolated verification / approved CI usage
|
||||
|
||||
```
|
||||
python3 -m unittest discover -s infra/hermes-editorial/tests -v
|
||||
python3 infra/hermes-editorial/installer.py install --target-home /ABSOLUTE/DISPOSABLE/HOME
|
||||
python3 infra/hermes-editorial/installer.py verify --target-home /ABSOLUTE/DISPOSABLE/HOME
|
||||
python3 infra/hermes-editorial/installer.py rollback --target-home /ABSOLUTE/DISPOSABLE/HOME
|
||||
```
|
||||
|
||||
Never use live `/opt/data` until the parent-approved CI installation step. Installer
|
||||
requires an explicit existing absolute home. Exact 19-file allowlist and SHA-256
|
||||
manifest cover unique `canina-editorial-v4` skills for six canonical profiles plus
|
||||
blocked status. No root skill inheritance is assumed. Profile discovery requires
|
||||
fresh-session validation after CI; copying bytes alone is not runtime discovery.
|
||||
|
||||
Each changed file is fsynced and atomically replaced on its destination filesystem.
|
||||
A durable write-ahead rollback journal records only allowlisted owned files and
|
||||
original modes; a process lock rejects concurrent installers. Synchronous failures
|
||||
restore the prior files. Process death may leave a partial transaction: rollback
|
||||
before retry; never activate consumers during install. This is per-file atomicity,
|
||||
not a claim of a globally atomic multi-directory swap. Rollback preflights every
|
||||
file, refuses external-edit conflicts, restores old bytes/modes, removes newly
|
||||
installed files, and leaves empty directories/lock. An unchanged reinstall performs
|
||||
no byte/mtime changes. Different-version upgrades require rollback first. Do not
|
||||
edit or symlink managed paths concurrently; installer rejects existing symlink
|
||||
ancestors but is not an adversarial filesystem sandbox.
|
||||
|
||||
## Read-only target findings (2026-10-24 UTC)
|
||||
|
||||
Inspected canonical `pmo`, `canina-competitor-worker`, `canina-seo-worker`,
|
||||
`canina-content-worker`, `canina-vet-review-worker`, `canina-qa-worker` under
|
||||
`/opt/data/profiles`. All exist; registry uses these names. PMO filesystem skill
|
||||
inventory lacks `canina-daily-content-publisher`; Content has it. Root publisher
|
||||
exists at `/opt/data/skills/canina/canina-daily-content-publisher/SKILL.md`.
|
||||
Existing cron JSON contains 17 jobs, all `enabled:false`, `state:paused` (there is
|
||||
no `paused` boolean field). CLI resolves `/opt/hermes/bin/hermes`.
|
||||
No secret values, config files, cron prompts or database contents were copied.
|
||||
Target checks establish filesystem availability, not an end-to-end workflow.
|
||||
|
||||
## Backend proposal bridge integration contract
|
||||
|
||||
Parent reports implementation `09dbe4d`, integrated as `64419f6`. This bundle does
|
||||
not mark dispatch or actual execution verified merely because this endpoint exists.
|
||||
CI/grant provisioning belongs to parent. No speculative token path or grants are
|
||||
created here; parent must pin the dedicated PMO secret file and service origin
|
||||
before implementing/exercising a submitting client. Never pass tokens in argv,
|
||||
print tokens, use generic admin grants, or submit to Production.
|
||||
|
||||
* POST `/api/internal/prepare-worker/editorial-proposals`, authenticated Bearer
|
||||
dedicated grant with id `pmo`, role `WORKFLOW_WORKER`, explicitly listed in
|
||||
`workerIds`.
|
||||
* DTO: `requestId` UUID; `pilotKind:editorial-research-to-brief-v1`;
|
||||
`operationMode:PREPARE`; `environment:staging`;
|
||||
`scope:EDITORIAL_RESEARCH_TO_BRIEF`; `researchTopic` <=180 characters;
|
||||
`acceptanceCriteria` 1..10 strings each <=500 characters; `commitSha` 40 lowercase
|
||||
hexadecimal characters; `budgetLimitCents:20`.
|
||||
* Response: `taskId`, `key`, `state:GATE1_PENDING`, `version`, `metadata`.
|
||||
* Submission is proposal preparation only, not worker execution, Gate1 approval,
|
||||
budget expenditure evidence, article creation or publishing authorization.
|
||||
A fixed reviewed request must be committed separately with a real commit SHA
|
||||
and stable requestId; ambiguous submit requires reconciliation, not new UUID retry.
|
||||
|
||||
## Remaining acceptance blockers
|
||||
|
||||
Read `payload/editorial-v4/status.json`. Dispatch/result transport, durable
|
||||
artifacts, authenticated owner gates, first-party research, image routing,
|
||||
Stage Admin auth, scoped backup/restore, publisher idempotency and public browser
|
||||
verification are all unverified. No cron activation, deployment, Production write
|
||||
or RELEASE_AUTHORIZE is included. Config isolation tests cannot establish any of
|
||||
these bridges. Policy is in each profile-local `references/policy.md`.
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"files": {
|
||||
"editorial-v4/status.json": "5694c82d4ef5ed0b070b72ad009a71c1362a4cffc32fd605e8456a8d1cb39720",
|
||||
"profiles/canina-competitor-worker/skills/canina-editorial-v4/SKILL.md": "c6827fae775b0b6ce897af6131cf56d39e6579c3cce3f8c899ac63f3967cff8b",
|
||||
"profiles/canina-competitor-worker/skills/canina-editorial-v4/references/policy.md": "61cf7c686440d542ae249320a2834cba5f06a5b985248b3ace7ca6233507a8a3",
|
||||
"profiles/canina-competitor-worker/skills/canina-editorial-v4/references/role.json": "04472ed7d789bde1b1846da04a30d11009ee645be08ca8493eeef7460e9fff48",
|
||||
"profiles/canina-content-worker/skills/canina-editorial-v4/SKILL.md": "a7ddef44876b55174470f7c196f5307870bff93a94fbc67e0a44abb5a287da9e",
|
||||
"profiles/canina-content-worker/skills/canina-editorial-v4/references/policy.md": "61cf7c686440d542ae249320a2834cba5f06a5b985248b3ace7ca6233507a8a3",
|
||||
"profiles/canina-content-worker/skills/canina-editorial-v4/references/role.json": "3d5cc5fb2c755b7afb69ec7ca6cc238ca13891d04d6c5e64e19c2c07402c473b",
|
||||
"profiles/canina-qa-worker/skills/canina-editorial-v4/SKILL.md": "b1558a923c9daad7ed270f6d997a13e69efa80d87345a0e515026cf8ab768910",
|
||||
"profiles/canina-qa-worker/skills/canina-editorial-v4/references/policy.md": "61cf7c686440d542ae249320a2834cba5f06a5b985248b3ace7ca6233507a8a3",
|
||||
"profiles/canina-qa-worker/skills/canina-editorial-v4/references/role.json": "4aa981d43f17d998708127da423905bab335a7eccff1bf8f2c7e46da62ffaa60",
|
||||
"profiles/canina-seo-worker/skills/canina-editorial-v4/SKILL.md": "480e8f02bf9051ad1f324783f4231d8ebc29061b97f2602942c69ff7fe216761",
|
||||
"profiles/canina-seo-worker/skills/canina-editorial-v4/references/policy.md": "61cf7c686440d542ae249320a2834cba5f06a5b985248b3ace7ca6233507a8a3",
|
||||
"profiles/canina-seo-worker/skills/canina-editorial-v4/references/role.json": "0fe8cd663434fd91c7fa43950327bae3aa831943a112d0ba9f5e8f6a47367ea2",
|
||||
"profiles/canina-vet-review-worker/skills/canina-editorial-v4/SKILL.md": "1f57072cf34101fa20f47c06be3d27f455e0460c5638acdaa36caf827d605243",
|
||||
"profiles/canina-vet-review-worker/skills/canina-editorial-v4/references/policy.md": "61cf7c686440d542ae249320a2834cba5f06a5b985248b3ace7ca6233507a8a3",
|
||||
"profiles/canina-vet-review-worker/skills/canina-editorial-v4/references/role.json": "9c29f4182228221740ec46ab76fd0a47af7885a2fe45e0c3aed0b0e4980f2560",
|
||||
"profiles/pmo/skills/canina-editorial-v4/SKILL.md": "bfff4d548ed920306b35680149bde2f08a9d1264d8ce5e6907482cec61a5e13c",
|
||||
"profiles/pmo/skills/canina-editorial-v4/references/policy.md": "61cf7c686440d542ae249320a2834cba5f06a5b985248b3ace7ca6233507a8a3",
|
||||
"profiles/pmo/skills/canina-editorial-v4/references/role.json": "34627d072c8d9328411db814335165ffceaafb354fc5a5d2f1f15f531f739444"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Config-only installer. No process, network, config.yaml or scheduler changes."""
|
||||
import argparse
|
||||
import base64
|
||||
import fcntl
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import tempfile
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
PROFILES = ('pmo', 'canina-competitor-worker', 'canina-seo-worker',
|
||||
'canina-content-worker', 'canina-vet-review-worker', 'canina-qa-worker')
|
||||
ALLOWED = {'editorial-v4/status.json'} | {
|
||||
f'profiles/{p}/skills/canina-editorial-v4/{f}'
|
||||
for p in PROFILES for f in ('SKILL.md', 'references/policy.md', 'references/role.json')}
|
||||
|
||||
|
||||
def digest(data):
|
||||
return hashlib.sha256(data).hexdigest()
|
||||
|
||||
|
||||
def safe(home, relative):
|
||||
path = home / relative
|
||||
for part in (path, *path.parents):
|
||||
if part.is_symlink():
|
||||
raise ValueError(f'symlink refused: {part}')
|
||||
if relative not in ALLOWED and relative not in (
|
||||
'editorial-v4/.installer/transaction.json', 'editorial-v4/.installer/lock'):
|
||||
raise ValueError('path not allowlisted')
|
||||
if path.exists() and not path.is_file():
|
||||
raise ValueError(f'not a regular file: {path}')
|
||||
return path
|
||||
|
||||
|
||||
def atomic(path, data):
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
fd, temp = tempfile.mkstemp(prefix='.editorial-', dir=path.parent)
|
||||
try:
|
||||
with os.fdopen(fd, 'wb') as stream:
|
||||
stream.write(data)
|
||||
stream.flush()
|
||||
os.fsync(stream.fileno())
|
||||
os.chmod(temp, 0o644)
|
||||
os.replace(temp, path)
|
||||
finally:
|
||||
if os.path.exists(temp):
|
||||
os.unlink(temp)
|
||||
|
||||
|
||||
def bundle():
|
||||
manifest = json.loads((ROOT / 'bundle.json').read_text())
|
||||
if set(manifest['files']) != ALLOWED:
|
||||
raise ValueError('bundle allowlist mismatch')
|
||||
result = {}
|
||||
for relative, expected in manifest['files'].items():
|
||||
path = ROOT / 'payload' / relative
|
||||
if path.is_symlink():
|
||||
raise ValueError('source symlink refused')
|
||||
data = path.read_bytes()
|
||||
if digest(data) != expected:
|
||||
raise ValueError(f'bundle digest mismatch: {relative}')
|
||||
result[relative] = data
|
||||
return result
|
||||
|
||||
|
||||
def execute(action, home):
|
||||
if not home.is_absolute() or not home.is_dir():
|
||||
raise ValueError('--target-home must be an existing absolute directory')
|
||||
files = bundle()
|
||||
paths = {r: safe(home, r) for r in files}
|
||||
journal = safe(home, 'editorial-v4/.installer/transaction.json')
|
||||
if action == 'verify':
|
||||
bad = [r for r, p in paths.items() if not p.exists() or p.read_bytes() != files[r]]
|
||||
if bad:
|
||||
raise ValueError('verification mismatch: ' + ', '.join(bad))
|
||||
return {'status': 'configured_only', 'files': len(files), 'workflow_verified': False}
|
||||
lock = safe(home, 'editorial-v4/.installer/lock')
|
||||
lock.parent.mkdir(parents=True, exist_ok=True)
|
||||
with lock.open('a') as stream:
|
||||
fcntl.flock(stream, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
if action == 'rollback':
|
||||
if not journal.exists():
|
||||
return {'status': 'nothing_to_rollback'}
|
||||
state = json.loads(journal.read_text())
|
||||
if set(state['before']) != ALLOWED or set(state['installed']) != ALLOWED:
|
||||
raise ValueError('invalid rollback allowlist')
|
||||
# Refuse external edits rather than destroying another writer\'s work.
|
||||
for r, p in paths.items():
|
||||
current = p.read_bytes() if p.exists() else None
|
||||
before = state['before'][r]
|
||||
old = base64.b64decode(before['data']) if before else None
|
||||
if current != old and (current is None or digest(current) != state['installed'][r]):
|
||||
raise ValueError(f'rollback conflict: {r}')
|
||||
restore(paths, state['before'])
|
||||
journal.unlink()
|
||||
return {'status': 'rolled_back'}
|
||||
changes = [r for r, p in paths.items() if not p.exists() or p.read_bytes() != files[r]]
|
||||
if not changes:
|
||||
return {'status': 'unchanged', 'files': len(files)}
|
||||
if journal.exists():
|
||||
raise ValueError('existing transaction: rollback before upgrade or recovery')
|
||||
before = {r: {'data': base64.b64encode(p.read_bytes()).decode(),
|
||||
'mode': p.stat().st_mode & 0o777} if p.exists() else None
|
||||
for r, p in paths.items()}
|
||||
state = {'before': before, 'installed': {r: digest(v) for r, v in files.items()}}
|
||||
atomic(journal, json.dumps(state, sort_keys=True).encode())
|
||||
try:
|
||||
for r in changes:
|
||||
atomic(paths[r], files[r])
|
||||
except BaseException:
|
||||
restore(paths, before)
|
||||
journal.unlink()
|
||||
raise
|
||||
return {'status': 'installed_config_only', 'files': len(files)}
|
||||
|
||||
|
||||
def restore(paths, before):
|
||||
for r, p in paths.items():
|
||||
old = before[r]
|
||||
if old is None:
|
||||
p.unlink(missing_ok=True)
|
||||
else:
|
||||
atomic(p, base64.b64decode(old['data']))
|
||||
os.chmod(p, old['mode'])
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('action', choices=['install', 'verify', 'rollback'])
|
||||
parser.add_argument('--target-home', type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
print(json.dumps(execute(args.action, args.target_home), sort_keys=True))
|
||||
except (OSError, ValueError, KeyError) as error:
|
||||
parser.exit(1, f'{error}\n')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"stage": "blocked",
|
||||
"production": "unauthorized",
|
||||
"cron_activation_allowed": false,
|
||||
"existing_cron_expected": 17,
|
||||
"workflow_exercised": false,
|
||||
"bridges": {
|
||||
"dispatch_results": "unverified",
|
||||
"artifact_store": "unverified",
|
||||
"owner_gate1_gate2": "unverified",
|
||||
"first_party_research": "unverified",
|
||||
"image_route": "unverified",
|
||||
"stage_admin_auth": "unverified",
|
||||
"backup_restore": "unverified",
|
||||
"publisher_idempotency": "unverified",
|
||||
"public_browser_verification": "unverified"
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: canina-editorial-v4
|
||||
description: "Use when running Canina editorial research or publishing. Enforce hash-bound departmental gates."
|
||||
version: 4.1.0
|
||||
---
|
||||
|
||||
# Editorial v4: canina-competitor-worker
|
||||
|
||||
Read references/policy.md and references/role.json before acting.
|
||||
|
||||
Independent parallel Persian market/SERP research with retrieved evidence; no publication.
|
||||
|
||||
Stage is blocked. This installed skill is not execution evidence. No Production or cron activation.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Editorial runtime policy v4.1.0
|
||||
|
||||
This versioned skill is configuration, not a scheduler, delegation transport, approval bridge or publisher implementation. Stage is BLOCKED until every bridge below has real evidence. No Production mutations or RELEASE_AUTHORIZE. The user's approval of ten implementation steps does not approve any article, Gate1, Gate2, deployment or cron activation. Keep all existing 17 cron jobs disabled/paused. Do not overwrite existing config.yaml, SOUL.md, registry, .env, auth, skills or cron files.
|
||||
|
||||
## Mandatory departmental chain (ten steps)
|
||||
1. Preflight: verify Stage authenticated Admin API read authority, author/category, current field manifest, backup mechanism, durable artifact store, dispatch/result transport, authenticated owner approval ingress, publisher idempotency and public browser verification bridges. Check credential handles only. Unverified bridge = BLOCKED, never success. Production inventory/GSC/GA4 may be read for topic decisions only.
|
||||
2. Parallel research: dispatch distinct jobs to canina-competitor-worker (Persian market/SERP), canina-content-worker (Canina live Production inventory, overlap and user value), and canina-seo-worker (first-party demand/SEO). All three return independent evidence artifacts. Never serialize these by having PMO impersonate departments. Missing analytics is labeled unavailable; never fabricate facts, metrics, citations or demand.
|
||||
3. PMO synthesis: consume all three results and propose at least 3 genuinely distinct NEW/UPDATE candidates, with intent, evidence URLs/retrieval timestamps, medical risk, overlap decision, component scores and limitations. Scores are judgments, not invented measured demand. PMO resolves conflicts, does not substitute for content workforce. NEW daily goal never overrides safety gates.
|
||||
4. Gate1: authenticated accountable owner explicitly approves selected candidate and immutable brief hash for this run and Stage. HOLD/REJECT/timeout/missing bridge block progress. No auto approval, inferred approval or previous-run reuse.
|
||||
5. Draft and image: canina-content-worker produces immutable Persian draft and source ledger with SHA-256. Verify current image route/quota before exactly one final generation attempt; network ambiguity counts as an attempt, no retries. Validate bytes, MIME, dimensions and visual appropriateness. Image failure is reported and permits truthful empty image fields, never a fabricated URL. No invented human author/endorsement.
|
||||
6. Independent review: canina-vet-review-worker and canina-seo-worker independently review the same exact draft SHA-256 in parallel. Return identity, hash, evidence, findings, critical blockers and decision. Internal AI veterinary evidence review is not a licensed human certification. High-risk guidance requires two independent authoritative sources, one guideline/official authority/systematic review/primary study; no invented diagnosis, dosing or cure claims.
|
||||
7. Revision and hash QA: Content resolves both reviews into a new immutable artifact and resolution ledger. canina-qa-worker verifies revised SHA-256, source mapping, HTML/metadata, relation IDs, complete current Admin field dispositions, links, truthful author attribution, overlap and review resolutions. QA_PASSED names exact revised hash. Any subsequent byte/payload/image change invalidates QA and approvals and requires renewed affected reviews/QA.
|
||||
8. Gate2: authenticated owner explicitly approves publication of exact QA-passed revised hash, full payload digest, image disposition, environment and run ID. Gate1 is not Gate2. Reject stale/mismatched/replayed approval. Never automatically approve to meet quota.
|
||||
9. Authenticated publisher: Content invokes approved Stage Admin API bridge only after gates, scoped nonempty backup, immediate uniqueness recheck and verified permissions. One idempotent NEW/UPDATE mutation per selected action, keyed by run/environment/payload hash; ambiguous timeout requires authenticated reconciliation, not blind retry. No SQL/Prisma/file-copy bypass, forged JWT or exposed credentials. No changes to products, prices, stock, users, schema or unrelated records.
|
||||
10. Public verification: QA reads back authenticated persisted fields and independently verifies exact public identity, title/H1, content/citations, metadata/canonical/schema/dates, attribution, listing, links and desktop/mobile rendering/image disposition. HTTP 200 alone may be soft-404 and is not completion. Postwrite failure = PUBLISHED BUT VERIFICATION FAILED. Only actual evidence permits PUBLISHED/UPDATED. PMO reports concise Persian evidence and blockers, never claims end-to-end success from config tests.
|
||||
|
||||
## Artifact and bridge contract
|
||||
Every artifact/result includes run_id, task_id, canonical profile, environment, created_at UTC, dependencies, immutable artifact path/URI, sha256, evidence (retrieved URLs and timestamps), assumptions, proposal, risks, acceptance_tests and blockers. Missing/failed worker output cannot be silently replaced by parent prose. Dispatch bridge must demonstrate real canonical-profile invocation and authenticated result ingestion; approval ingress must identify authorized owner and bind exact hashes. Durable object storage, research data access, image endpoint, Stage authenticated read/write, scoped backup/restore, publisher reconciliation and independent browser/public verification need representative evidence before Stage can be unblocked by a separately reviewed tracked change. No bridge flags in this bundle are assertions of runtime capability.
|
||||
|
||||
The root canina-daily-content-publisher skill was not discoverable by PMO on inspection. This self-contained profile-local policy/role distribution intentionally uses unique canina-editorial-v4 paths rather than overwriting that publisher or relying on root inheritance. Existing publisher procedures may supplement but never weaken these gates. Fresh-session skill discovery must be checked after approved CI installation; existing session snapshots may be stale.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"profile": "canina-competitor-worker",
|
||||
"role": "Independent parallel Persian market/SERP research with retrieved evidence; no publication.",
|
||||
"policy": "policy.md",
|
||||
"auto_approval": false
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: canina-editorial-v4
|
||||
description: "Use when running Canina editorial research or publishing. Enforce hash-bound departmental gates."
|
||||
version: 4.1.0
|
||||
---
|
||||
|
||||
# Editorial v4: canina-content-worker
|
||||
|
||||
Read references/policy.md and references/role.json before acting.
|
||||
|
||||
Canina inventory research, immutable draft/image, revisions, then approved authenticated publisher bridge; never self-approve.
|
||||
|
||||
Stage is blocked. This installed skill is not execution evidence. No Production or cron activation.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Editorial runtime policy v4.1.0
|
||||
|
||||
This versioned skill is configuration, not a scheduler, delegation transport, approval bridge or publisher implementation. Stage is BLOCKED until every bridge below has real evidence. No Production mutations or RELEASE_AUTHORIZE. The user's approval of ten implementation steps does not approve any article, Gate1, Gate2, deployment or cron activation. Keep all existing 17 cron jobs disabled/paused. Do not overwrite existing config.yaml, SOUL.md, registry, .env, auth, skills or cron files.
|
||||
|
||||
## Mandatory departmental chain (ten steps)
|
||||
1. Preflight: verify Stage authenticated Admin API read authority, author/category, current field manifest, backup mechanism, durable artifact store, dispatch/result transport, authenticated owner approval ingress, publisher idempotency and public browser verification bridges. Check credential handles only. Unverified bridge = BLOCKED, never success. Production inventory/GSC/GA4 may be read for topic decisions only.
|
||||
2. Parallel research: dispatch distinct jobs to canina-competitor-worker (Persian market/SERP), canina-content-worker (Canina live Production inventory, overlap and user value), and canina-seo-worker (first-party demand/SEO). All three return independent evidence artifacts. Never serialize these by having PMO impersonate departments. Missing analytics is labeled unavailable; never fabricate facts, metrics, citations or demand.
|
||||
3. PMO synthesis: consume all three results and propose at least 3 genuinely distinct NEW/UPDATE candidates, with intent, evidence URLs/retrieval timestamps, medical risk, overlap decision, component scores and limitations. Scores are judgments, not invented measured demand. PMO resolves conflicts, does not substitute for content workforce. NEW daily goal never overrides safety gates.
|
||||
4. Gate1: authenticated accountable owner explicitly approves selected candidate and immutable brief hash for this run and Stage. HOLD/REJECT/timeout/missing bridge block progress. No auto approval, inferred approval or previous-run reuse.
|
||||
5. Draft and image: canina-content-worker produces immutable Persian draft and source ledger with SHA-256. Verify current image route/quota before exactly one final generation attempt; network ambiguity counts as an attempt, no retries. Validate bytes, MIME, dimensions and visual appropriateness. Image failure is reported and permits truthful empty image fields, never a fabricated URL. No invented human author/endorsement.
|
||||
6. Independent review: canina-vet-review-worker and canina-seo-worker independently review the same exact draft SHA-256 in parallel. Return identity, hash, evidence, findings, critical blockers and decision. Internal AI veterinary evidence review is not a licensed human certification. High-risk guidance requires two independent authoritative sources, one guideline/official authority/systematic review/primary study; no invented diagnosis, dosing or cure claims.
|
||||
7. Revision and hash QA: Content resolves both reviews into a new immutable artifact and resolution ledger. canina-qa-worker verifies revised SHA-256, source mapping, HTML/metadata, relation IDs, complete current Admin field dispositions, links, truthful author attribution, overlap and review resolutions. QA_PASSED names exact revised hash. Any subsequent byte/payload/image change invalidates QA and approvals and requires renewed affected reviews/QA.
|
||||
8. Gate2: authenticated owner explicitly approves publication of exact QA-passed revised hash, full payload digest, image disposition, environment and run ID. Gate1 is not Gate2. Reject stale/mismatched/replayed approval. Never automatically approve to meet quota.
|
||||
9. Authenticated publisher: Content invokes approved Stage Admin API bridge only after gates, scoped nonempty backup, immediate uniqueness recheck and verified permissions. One idempotent NEW/UPDATE mutation per selected action, keyed by run/environment/payload hash; ambiguous timeout requires authenticated reconciliation, not blind retry. No SQL/Prisma/file-copy bypass, forged JWT or exposed credentials. No changes to products, prices, stock, users, schema or unrelated records.
|
||||
10. Public verification: QA reads back authenticated persisted fields and independently verifies exact public identity, title/H1, content/citations, metadata/canonical/schema/dates, attribution, listing, links and desktop/mobile rendering/image disposition. HTTP 200 alone may be soft-404 and is not completion. Postwrite failure = PUBLISHED BUT VERIFICATION FAILED. Only actual evidence permits PUBLISHED/UPDATED. PMO reports concise Persian evidence and blockers, never claims end-to-end success from config tests.
|
||||
|
||||
## Artifact and bridge contract
|
||||
Every artifact/result includes run_id, task_id, canonical profile, environment, created_at UTC, dependencies, immutable artifact path/URI, sha256, evidence (retrieved URLs and timestamps), assumptions, proposal, risks, acceptance_tests and blockers. Missing/failed worker output cannot be silently replaced by parent prose. Dispatch bridge must demonstrate real canonical-profile invocation and authenticated result ingestion; approval ingress must identify authorized owner and bind exact hashes. Durable object storage, research data access, image endpoint, Stage authenticated read/write, scoped backup/restore, publisher reconciliation and independent browser/public verification need representative evidence before Stage can be unblocked by a separately reviewed tracked change. No bridge flags in this bundle are assertions of runtime capability.
|
||||
|
||||
The root canina-daily-content-publisher skill was not discoverable by PMO on inspection. This self-contained profile-local policy/role distribution intentionally uses unique canina-editorial-v4 paths rather than overwriting that publisher or relying on root inheritance. Existing publisher procedures may supplement but never weaken these gates. Fresh-session skill discovery must be checked after approved CI installation; existing session snapshots may be stale.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"profile": "canina-content-worker",
|
||||
"role": "Canina inventory research, immutable draft/image, revisions, then approved authenticated publisher bridge; never self-approve.",
|
||||
"policy": "policy.md",
|
||||
"auto_approval": false
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: canina-editorial-v4
|
||||
description: "Use when running Canina editorial research or publishing. Enforce hash-bound departmental gates."
|
||||
version: 4.1.0
|
||||
---
|
||||
|
||||
# Editorial v4: canina-qa-worker
|
||||
|
||||
Read references/policy.md and references/role.json before acting.
|
||||
|
||||
Independent revised-hash QA and public verification; never waive critical findings.
|
||||
|
||||
Stage is blocked. This installed skill is not execution evidence. No Production or cron activation.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Editorial runtime policy v4.1.0
|
||||
|
||||
This versioned skill is configuration, not a scheduler, delegation transport, approval bridge or publisher implementation. Stage is BLOCKED until every bridge below has real evidence. No Production mutations or RELEASE_AUTHORIZE. The user's approval of ten implementation steps does not approve any article, Gate1, Gate2, deployment or cron activation. Keep all existing 17 cron jobs disabled/paused. Do not overwrite existing config.yaml, SOUL.md, registry, .env, auth, skills or cron files.
|
||||
|
||||
## Mandatory departmental chain (ten steps)
|
||||
1. Preflight: verify Stage authenticated Admin API read authority, author/category, current field manifest, backup mechanism, durable artifact store, dispatch/result transport, authenticated owner approval ingress, publisher idempotency and public browser verification bridges. Check credential handles only. Unverified bridge = BLOCKED, never success. Production inventory/GSC/GA4 may be read for topic decisions only.
|
||||
2. Parallel research: dispatch distinct jobs to canina-competitor-worker (Persian market/SERP), canina-content-worker (Canina live Production inventory, overlap and user value), and canina-seo-worker (first-party demand/SEO). All three return independent evidence artifacts. Never serialize these by having PMO impersonate departments. Missing analytics is labeled unavailable; never fabricate facts, metrics, citations or demand.
|
||||
3. PMO synthesis: consume all three results and propose at least 3 genuinely distinct NEW/UPDATE candidates, with intent, evidence URLs/retrieval timestamps, medical risk, overlap decision, component scores and limitations. Scores are judgments, not invented measured demand. PMO resolves conflicts, does not substitute for content workforce. NEW daily goal never overrides safety gates.
|
||||
4. Gate1: authenticated accountable owner explicitly approves selected candidate and immutable brief hash for this run and Stage. HOLD/REJECT/timeout/missing bridge block progress. No auto approval, inferred approval or previous-run reuse.
|
||||
5. Draft and image: canina-content-worker produces immutable Persian draft and source ledger with SHA-256. Verify current image route/quota before exactly one final generation attempt; network ambiguity counts as an attempt, no retries. Validate bytes, MIME, dimensions and visual appropriateness. Image failure is reported and permits truthful empty image fields, never a fabricated URL. No invented human author/endorsement.
|
||||
6. Independent review: canina-vet-review-worker and canina-seo-worker independently review the same exact draft SHA-256 in parallel. Return identity, hash, evidence, findings, critical blockers and decision. Internal AI veterinary evidence review is not a licensed human certification. High-risk guidance requires two independent authoritative sources, one guideline/official authority/systematic review/primary study; no invented diagnosis, dosing or cure claims.
|
||||
7. Revision and hash QA: Content resolves both reviews into a new immutable artifact and resolution ledger. canina-qa-worker verifies revised SHA-256, source mapping, HTML/metadata, relation IDs, complete current Admin field dispositions, links, truthful author attribution, overlap and review resolutions. QA_PASSED names exact revised hash. Any subsequent byte/payload/image change invalidates QA and approvals and requires renewed affected reviews/QA.
|
||||
8. Gate2: authenticated owner explicitly approves publication of exact QA-passed revised hash, full payload digest, image disposition, environment and run ID. Gate1 is not Gate2. Reject stale/mismatched/replayed approval. Never automatically approve to meet quota.
|
||||
9. Authenticated publisher: Content invokes approved Stage Admin API bridge only after gates, scoped nonempty backup, immediate uniqueness recheck and verified permissions. One idempotent NEW/UPDATE mutation per selected action, keyed by run/environment/payload hash; ambiguous timeout requires authenticated reconciliation, not blind retry. No SQL/Prisma/file-copy bypass, forged JWT or exposed credentials. No changes to products, prices, stock, users, schema or unrelated records.
|
||||
10. Public verification: QA reads back authenticated persisted fields and independently verifies exact public identity, title/H1, content/citations, metadata/canonical/schema/dates, attribution, listing, links and desktop/mobile rendering/image disposition. HTTP 200 alone may be soft-404 and is not completion. Postwrite failure = PUBLISHED BUT VERIFICATION FAILED. Only actual evidence permits PUBLISHED/UPDATED. PMO reports concise Persian evidence and blockers, never claims end-to-end success from config tests.
|
||||
|
||||
## Artifact and bridge contract
|
||||
Every artifact/result includes run_id, task_id, canonical profile, environment, created_at UTC, dependencies, immutable artifact path/URI, sha256, evidence (retrieved URLs and timestamps), assumptions, proposal, risks, acceptance_tests and blockers. Missing/failed worker output cannot be silently replaced by parent prose. Dispatch bridge must demonstrate real canonical-profile invocation and authenticated result ingestion; approval ingress must identify authorized owner and bind exact hashes. Durable object storage, research data access, image endpoint, Stage authenticated read/write, scoped backup/restore, publisher reconciliation and independent browser/public verification need representative evidence before Stage can be unblocked by a separately reviewed tracked change. No bridge flags in this bundle are assertions of runtime capability.
|
||||
|
||||
The root canina-daily-content-publisher skill was not discoverable by PMO on inspection. This self-contained profile-local policy/role distribution intentionally uses unique canina-editorial-v4 paths rather than overwriting that publisher or relying on root inheritance. Existing publisher procedures may supplement but never weaken these gates. Fresh-session skill discovery must be checked after approved CI installation; existing session snapshots may be stale.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"profile": "canina-qa-worker",
|
||||
"role": "Independent revised-hash QA and public verification; never waive critical findings.",
|
||||
"policy": "policy.md",
|
||||
"auto_approval": false
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: canina-editorial-v4
|
||||
description: "Use when running Canina editorial research or publishing. Enforce hash-bound departmental gates."
|
||||
version: 4.1.0
|
||||
---
|
||||
|
||||
# Editorial v4: canina-seo-worker
|
||||
|
||||
Read references/policy.md and references/role.json before acting.
|
||||
|
||||
Parallel first-party SEO research, then independent same-hash draft review; no self-authored approval.
|
||||
|
||||
Stage is blocked. This installed skill is not execution evidence. No Production or cron activation.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Editorial runtime policy v4.1.0
|
||||
|
||||
This versioned skill is configuration, not a scheduler, delegation transport, approval bridge or publisher implementation. Stage is BLOCKED until every bridge below has real evidence. No Production mutations or RELEASE_AUTHORIZE. The user's approval of ten implementation steps does not approve any article, Gate1, Gate2, deployment or cron activation. Keep all existing 17 cron jobs disabled/paused. Do not overwrite existing config.yaml, SOUL.md, registry, .env, auth, skills or cron files.
|
||||
|
||||
## Mandatory departmental chain (ten steps)
|
||||
1. Preflight: verify Stage authenticated Admin API read authority, author/category, current field manifest, backup mechanism, durable artifact store, dispatch/result transport, authenticated owner approval ingress, publisher idempotency and public browser verification bridges. Check credential handles only. Unverified bridge = BLOCKED, never success. Production inventory/GSC/GA4 may be read for topic decisions only.
|
||||
2. Parallel research: dispatch distinct jobs to canina-competitor-worker (Persian market/SERP), canina-content-worker (Canina live Production inventory, overlap and user value), and canina-seo-worker (first-party demand/SEO). All three return independent evidence artifacts. Never serialize these by having PMO impersonate departments. Missing analytics is labeled unavailable; never fabricate facts, metrics, citations or demand.
|
||||
3. PMO synthesis: consume all three results and propose at least 3 genuinely distinct NEW/UPDATE candidates, with intent, evidence URLs/retrieval timestamps, medical risk, overlap decision, component scores and limitations. Scores are judgments, not invented measured demand. PMO resolves conflicts, does not substitute for content workforce. NEW daily goal never overrides safety gates.
|
||||
4. Gate1: authenticated accountable owner explicitly approves selected candidate and immutable brief hash for this run and Stage. HOLD/REJECT/timeout/missing bridge block progress. No auto approval, inferred approval or previous-run reuse.
|
||||
5. Draft and image: canina-content-worker produces immutable Persian draft and source ledger with SHA-256. Verify current image route/quota before exactly one final generation attempt; network ambiguity counts as an attempt, no retries. Validate bytes, MIME, dimensions and visual appropriateness. Image failure is reported and permits truthful empty image fields, never a fabricated URL. No invented human author/endorsement.
|
||||
6. Independent review: canina-vet-review-worker and canina-seo-worker independently review the same exact draft SHA-256 in parallel. Return identity, hash, evidence, findings, critical blockers and decision. Internal AI veterinary evidence review is not a licensed human certification. High-risk guidance requires two independent authoritative sources, one guideline/official authority/systematic review/primary study; no invented diagnosis, dosing or cure claims.
|
||||
7. Revision and hash QA: Content resolves both reviews into a new immutable artifact and resolution ledger. canina-qa-worker verifies revised SHA-256, source mapping, HTML/metadata, relation IDs, complete current Admin field dispositions, links, truthful author attribution, overlap and review resolutions. QA_PASSED names exact revised hash. Any subsequent byte/payload/image change invalidates QA and approvals and requires renewed affected reviews/QA.
|
||||
8. Gate2: authenticated owner explicitly approves publication of exact QA-passed revised hash, full payload digest, image disposition, environment and run ID. Gate1 is not Gate2. Reject stale/mismatched/replayed approval. Never automatically approve to meet quota.
|
||||
9. Authenticated publisher: Content invokes approved Stage Admin API bridge only after gates, scoped nonempty backup, immediate uniqueness recheck and verified permissions. One idempotent NEW/UPDATE mutation per selected action, keyed by run/environment/payload hash; ambiguous timeout requires authenticated reconciliation, not blind retry. No SQL/Prisma/file-copy bypass, forged JWT or exposed credentials. No changes to products, prices, stock, users, schema or unrelated records.
|
||||
10. Public verification: QA reads back authenticated persisted fields and independently verifies exact public identity, title/H1, content/citations, metadata/canonical/schema/dates, attribution, listing, links and desktop/mobile rendering/image disposition. HTTP 200 alone may be soft-404 and is not completion. Postwrite failure = PUBLISHED BUT VERIFICATION FAILED. Only actual evidence permits PUBLISHED/UPDATED. PMO reports concise Persian evidence and blockers, never claims end-to-end success from config tests.
|
||||
|
||||
## Artifact and bridge contract
|
||||
Every artifact/result includes run_id, task_id, canonical profile, environment, created_at UTC, dependencies, immutable artifact path/URI, sha256, evidence (retrieved URLs and timestamps), assumptions, proposal, risks, acceptance_tests and blockers. Missing/failed worker output cannot be silently replaced by parent prose. Dispatch bridge must demonstrate real canonical-profile invocation and authenticated result ingestion; approval ingress must identify authorized owner and bind exact hashes. Durable object storage, research data access, image endpoint, Stage authenticated read/write, scoped backup/restore, publisher reconciliation and independent browser/public verification need representative evidence before Stage can be unblocked by a separately reviewed tracked change. No bridge flags in this bundle are assertions of runtime capability.
|
||||
|
||||
The root canina-daily-content-publisher skill was not discoverable by PMO on inspection. This self-contained profile-local policy/role distribution intentionally uses unique canina-editorial-v4 paths rather than overwriting that publisher or relying on root inheritance. Existing publisher procedures may supplement but never weaken these gates. Fresh-session skill discovery must be checked after approved CI installation; existing session snapshots may be stale.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"profile": "canina-seo-worker",
|
||||
"role": "Parallel first-party SEO research, then independent same-hash draft review; no self-authored approval.",
|
||||
"policy": "policy.md",
|
||||
"auto_approval": false
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: canina-editorial-v4
|
||||
description: "Use when running Canina editorial research or publishing. Enforce hash-bound departmental gates."
|
||||
version: 4.1.0
|
||||
---
|
||||
|
||||
# Editorial v4: canina-vet-review-worker
|
||||
|
||||
Read references/policy.md and references/role.json before acting.
|
||||
|
||||
Independent exact-hash medical evidence review; internal AI review, not human veterinary certification.
|
||||
|
||||
Stage is blocked. This installed skill is not execution evidence. No Production or cron activation.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Editorial runtime policy v4.1.0
|
||||
|
||||
This versioned skill is configuration, not a scheduler, delegation transport, approval bridge or publisher implementation. Stage is BLOCKED until every bridge below has real evidence. No Production mutations or RELEASE_AUTHORIZE. The user's approval of ten implementation steps does not approve any article, Gate1, Gate2, deployment or cron activation. Keep all existing 17 cron jobs disabled/paused. Do not overwrite existing config.yaml, SOUL.md, registry, .env, auth, skills or cron files.
|
||||
|
||||
## Mandatory departmental chain (ten steps)
|
||||
1. Preflight: verify Stage authenticated Admin API read authority, author/category, current field manifest, backup mechanism, durable artifact store, dispatch/result transport, authenticated owner approval ingress, publisher idempotency and public browser verification bridges. Check credential handles only. Unverified bridge = BLOCKED, never success. Production inventory/GSC/GA4 may be read for topic decisions only.
|
||||
2. Parallel research: dispatch distinct jobs to canina-competitor-worker (Persian market/SERP), canina-content-worker (Canina live Production inventory, overlap and user value), and canina-seo-worker (first-party demand/SEO). All three return independent evidence artifacts. Never serialize these by having PMO impersonate departments. Missing analytics is labeled unavailable; never fabricate facts, metrics, citations or demand.
|
||||
3. PMO synthesis: consume all three results and propose at least 3 genuinely distinct NEW/UPDATE candidates, with intent, evidence URLs/retrieval timestamps, medical risk, overlap decision, component scores and limitations. Scores are judgments, not invented measured demand. PMO resolves conflicts, does not substitute for content workforce. NEW daily goal never overrides safety gates.
|
||||
4. Gate1: authenticated accountable owner explicitly approves selected candidate and immutable brief hash for this run and Stage. HOLD/REJECT/timeout/missing bridge block progress. No auto approval, inferred approval or previous-run reuse.
|
||||
5. Draft and image: canina-content-worker produces immutable Persian draft and source ledger with SHA-256. Verify current image route/quota before exactly one final generation attempt; network ambiguity counts as an attempt, no retries. Validate bytes, MIME, dimensions and visual appropriateness. Image failure is reported and permits truthful empty image fields, never a fabricated URL. No invented human author/endorsement.
|
||||
6. Independent review: canina-vet-review-worker and canina-seo-worker independently review the same exact draft SHA-256 in parallel. Return identity, hash, evidence, findings, critical blockers and decision. Internal AI veterinary evidence review is not a licensed human certification. High-risk guidance requires two independent authoritative sources, one guideline/official authority/systematic review/primary study; no invented diagnosis, dosing or cure claims.
|
||||
7. Revision and hash QA: Content resolves both reviews into a new immutable artifact and resolution ledger. canina-qa-worker verifies revised SHA-256, source mapping, HTML/metadata, relation IDs, complete current Admin field dispositions, links, truthful author attribution, overlap and review resolutions. QA_PASSED names exact revised hash. Any subsequent byte/payload/image change invalidates QA and approvals and requires renewed affected reviews/QA.
|
||||
8. Gate2: authenticated owner explicitly approves publication of exact QA-passed revised hash, full payload digest, image disposition, environment and run ID. Gate1 is not Gate2. Reject stale/mismatched/replayed approval. Never automatically approve to meet quota.
|
||||
9. Authenticated publisher: Content invokes approved Stage Admin API bridge only after gates, scoped nonempty backup, immediate uniqueness recheck and verified permissions. One idempotent NEW/UPDATE mutation per selected action, keyed by run/environment/payload hash; ambiguous timeout requires authenticated reconciliation, not blind retry. No SQL/Prisma/file-copy bypass, forged JWT or exposed credentials. No changes to products, prices, stock, users, schema or unrelated records.
|
||||
10. Public verification: QA reads back authenticated persisted fields and independently verifies exact public identity, title/H1, content/citations, metadata/canonical/schema/dates, attribution, listing, links and desktop/mobile rendering/image disposition. HTTP 200 alone may be soft-404 and is not completion. Postwrite failure = PUBLISHED BUT VERIFICATION FAILED. Only actual evidence permits PUBLISHED/UPDATED. PMO reports concise Persian evidence and blockers, never claims end-to-end success from config tests.
|
||||
|
||||
## Artifact and bridge contract
|
||||
Every artifact/result includes run_id, task_id, canonical profile, environment, created_at UTC, dependencies, immutable artifact path/URI, sha256, evidence (retrieved URLs and timestamps), assumptions, proposal, risks, acceptance_tests and blockers. Missing/failed worker output cannot be silently replaced by parent prose. Dispatch bridge must demonstrate real canonical-profile invocation and authenticated result ingestion; approval ingress must identify authorized owner and bind exact hashes. Durable object storage, research data access, image endpoint, Stage authenticated read/write, scoped backup/restore, publisher reconciliation and independent browser/public verification need representative evidence before Stage can be unblocked by a separately reviewed tracked change. No bridge flags in this bundle are assertions of runtime capability.
|
||||
|
||||
The root canina-daily-content-publisher skill was not discoverable by PMO on inspection. This self-contained profile-local policy/role distribution intentionally uses unique canina-editorial-v4 paths rather than overwriting that publisher or relying on root inheritance. Existing publisher procedures may supplement but never weaken these gates. Fresh-session skill discovery must be checked after approved CI installation; existing session snapshots may be stale.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"profile": "canina-vet-review-worker",
|
||||
"role": "Independent exact-hash medical evidence review; internal AI review, not human veterinary certification.",
|
||||
"policy": "policy.md",
|
||||
"auto_approval": false
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: canina-editorial-v4
|
||||
description: "Use when running Canina editorial research or publishing. Enforce hash-bound departmental gates."
|
||||
version: 4.1.0
|
||||
---
|
||||
|
||||
# Editorial v4: pmo
|
||||
|
||||
Read references/policy.md and references/role.json before acting.
|
||||
|
||||
Synthesize research and route all work; own Gate1/Gate2 queue and evidence report. Never author/review in place of workers.
|
||||
|
||||
Stage is blocked. This installed skill is not execution evidence. No Production or cron activation.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Editorial runtime policy v4.1.0
|
||||
|
||||
This versioned skill is configuration, not a scheduler, delegation transport, approval bridge or publisher implementation. Stage is BLOCKED until every bridge below has real evidence. No Production mutations or RELEASE_AUTHORIZE. The user's approval of ten implementation steps does not approve any article, Gate1, Gate2, deployment or cron activation. Keep all existing 17 cron jobs disabled/paused. Do not overwrite existing config.yaml, SOUL.md, registry, .env, auth, skills or cron files.
|
||||
|
||||
## Mandatory departmental chain (ten steps)
|
||||
1. Preflight: verify Stage authenticated Admin API read authority, author/category, current field manifest, backup mechanism, durable artifact store, dispatch/result transport, authenticated owner approval ingress, publisher idempotency and public browser verification bridges. Check credential handles only. Unverified bridge = BLOCKED, never success. Production inventory/GSC/GA4 may be read for topic decisions only.
|
||||
2. Parallel research: dispatch distinct jobs to canina-competitor-worker (Persian market/SERP), canina-content-worker (Canina live Production inventory, overlap and user value), and canina-seo-worker (first-party demand/SEO). All three return independent evidence artifacts. Never serialize these by having PMO impersonate departments. Missing analytics is labeled unavailable; never fabricate facts, metrics, citations or demand.
|
||||
3. PMO synthesis: consume all three results and propose at least 3 genuinely distinct NEW/UPDATE candidates, with intent, evidence URLs/retrieval timestamps, medical risk, overlap decision, component scores and limitations. Scores are judgments, not invented measured demand. PMO resolves conflicts, does not substitute for content workforce. NEW daily goal never overrides safety gates.
|
||||
4. Gate1: authenticated accountable owner explicitly approves selected candidate and immutable brief hash for this run and Stage. HOLD/REJECT/timeout/missing bridge block progress. No auto approval, inferred approval or previous-run reuse.
|
||||
5. Draft and image: canina-content-worker produces immutable Persian draft and source ledger with SHA-256. Verify current image route/quota before exactly one final generation attempt; network ambiguity counts as an attempt, no retries. Validate bytes, MIME, dimensions and visual appropriateness. Image failure is reported and permits truthful empty image fields, never a fabricated URL. No invented human author/endorsement.
|
||||
6. Independent review: canina-vet-review-worker and canina-seo-worker independently review the same exact draft SHA-256 in parallel. Return identity, hash, evidence, findings, critical blockers and decision. Internal AI veterinary evidence review is not a licensed human certification. High-risk guidance requires two independent authoritative sources, one guideline/official authority/systematic review/primary study; no invented diagnosis, dosing or cure claims.
|
||||
7. Revision and hash QA: Content resolves both reviews into a new immutable artifact and resolution ledger. canina-qa-worker verifies revised SHA-256, source mapping, HTML/metadata, relation IDs, complete current Admin field dispositions, links, truthful author attribution, overlap and review resolutions. QA_PASSED names exact revised hash. Any subsequent byte/payload/image change invalidates QA and approvals and requires renewed affected reviews/QA.
|
||||
8. Gate2: authenticated owner explicitly approves publication of exact QA-passed revised hash, full payload digest, image disposition, environment and run ID. Gate1 is not Gate2. Reject stale/mismatched/replayed approval. Never automatically approve to meet quota.
|
||||
9. Authenticated publisher: Content invokes approved Stage Admin API bridge only after gates, scoped nonempty backup, immediate uniqueness recheck and verified permissions. One idempotent NEW/UPDATE mutation per selected action, keyed by run/environment/payload hash; ambiguous timeout requires authenticated reconciliation, not blind retry. No SQL/Prisma/file-copy bypass, forged JWT or exposed credentials. No changes to products, prices, stock, users, schema or unrelated records.
|
||||
10. Public verification: QA reads back authenticated persisted fields and independently verifies exact public identity, title/H1, content/citations, metadata/canonical/schema/dates, attribution, listing, links and desktop/mobile rendering/image disposition. HTTP 200 alone may be soft-404 and is not completion. Postwrite failure = PUBLISHED BUT VERIFICATION FAILED. Only actual evidence permits PUBLISHED/UPDATED. PMO reports concise Persian evidence and blockers, never claims end-to-end success from config tests.
|
||||
|
||||
## Artifact and bridge contract
|
||||
Every artifact/result includes run_id, task_id, canonical profile, environment, created_at UTC, dependencies, immutable artifact path/URI, sha256, evidence (retrieved URLs and timestamps), assumptions, proposal, risks, acceptance_tests and blockers. Missing/failed worker output cannot be silently replaced by parent prose. Dispatch bridge must demonstrate real canonical-profile invocation and authenticated result ingestion; approval ingress must identify authorized owner and bind exact hashes. Durable object storage, research data access, image endpoint, Stage authenticated read/write, scoped backup/restore, publisher reconciliation and independent browser/public verification need representative evidence before Stage can be unblocked by a separately reviewed tracked change. No bridge flags in this bundle are assertions of runtime capability.
|
||||
|
||||
The root canina-daily-content-publisher skill was not discoverable by PMO on inspection. This self-contained profile-local policy/role distribution intentionally uses unique canina-editorial-v4 paths rather than overwriting that publisher or relying on root inheritance. Existing publisher procedures may supplement but never weaken these gates. Fresh-session skill discovery must be checked after approved CI installation; existing session snapshots may be stale.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"profile": "pmo",
|
||||
"role": "Synthesize research and route all work; own Gate1/Gate2 queue and evidence report. Never author/review in place of workers.",
|
||||
"policy": "policy.md",
|
||||
"auto_approval": false
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import json
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
SCRIPT = ROOT / 'installer.py'
|
||||
|
||||
class InstallerTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.tmp = tempfile.TemporaryDirectory()
|
||||
self.addCleanup(self.tmp.cleanup)
|
||||
self.home = pathlib.Path(self.tmp.name) / 'home'
|
||||
self.home.mkdir()
|
||||
(self.home / 'config.yaml').write_text('untouched: true\n')
|
||||
(self.home / 'cron').mkdir()
|
||||
(self.home / 'cron/jobs.json').write_text('{"jobs":[]}')
|
||||
|
||||
def run_cli(self, action, *extra):
|
||||
return subprocess.run([sys.executable, str(SCRIPT), action,
|
||||
'--target-home', str(self.home), *extra],
|
||||
capture_output=True, text=True)
|
||||
|
||||
def test_install_is_idempotent_and_verify_is_read_only(self):
|
||||
result = self.run_cli('install')
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
first = {str(p.relative_to(self.home)): (p.read_bytes(), p.stat().st_mtime_ns)
|
||||
for p in self.home.rglob('*') if p.is_file()}
|
||||
self.assertEqual(self.run_cli('install').returncode, 0)
|
||||
self.assertEqual(self.run_cli('verify').returncode, 0)
|
||||
second = {str(p.relative_to(self.home)): (p.read_bytes(), p.stat().st_mtime_ns)
|
||||
for p in self.home.rglob('*') if p.is_file()}
|
||||
self.assertEqual(first, second)
|
||||
self.assertEqual((self.home / 'config.yaml').read_text(), 'untouched: true\n')
|
||||
self.assertEqual((self.home / 'cron/jobs.json').read_text(), '{"jobs":[]}')
|
||||
skills = list((self.home / 'profiles/pmo/skills').rglob('SKILL.md'))
|
||||
self.assertTrue(skills)
|
||||
status = json.loads((self.home / 'editorial-v4/status.json').read_text())
|
||||
self.assertEqual(status['stage'], 'blocked')
|
||||
self.assertFalse(status['cron_activation_allowed'])
|
||||
|
||||
def test_rollback_restores_previous_files_and_modes(self):
|
||||
path = self.home / 'profiles/pmo/skills/canina-editorial-v4/SKILL.md'
|
||||
path.parent.mkdir(parents=True)
|
||||
path.write_text('previous owned version')
|
||||
path.chmod(0o600)
|
||||
self.assertEqual(self.run_cli('install').returncode, 0)
|
||||
self.assertEqual(self.run_cli('rollback').returncode, 0)
|
||||
self.assertEqual(path.read_text(), 'previous owned version')
|
||||
self.assertEqual(path.stat().st_mode & 0o777, 0o600)
|
||||
self.assertFalse((self.home / 'editorial-v4/status.json').exists())
|
||||
self.assertEqual(self.run_cli('rollback').returncode, 0)
|
||||
|
||||
def test_refuses_symlink_escape_before_copy(self):
|
||||
outside = pathlib.Path(self.tmp.name) / 'outside'
|
||||
outside.mkdir()
|
||||
(self.home / 'profiles').symlink_to(outside, target_is_directory=True)
|
||||
self.assertNotEqual(self.run_cli('install').returncode, 0)
|
||||
self.assertEqual(list(outside.iterdir()), [])
|
||||
self.assertFalse((self.home / 'editorial-v4/status.json').exists())
|
||||
|
||||
def test_verify_detects_drift_and_rollback_refuses_external_edits(self):
|
||||
self.assertEqual(self.run_cli('install').returncode, 0)
|
||||
path = self.home / 'profiles/pmo/skills/canina-editorial-v4/SKILL.md'
|
||||
path.write_text('external change')
|
||||
self.assertNotEqual(self.run_cli('verify').returncode, 0)
|
||||
self.assertNotEqual(self.run_cli('rollback').returncode, 0)
|
||||
self.assertEqual(path.read_text(), 'external change')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user