Skip to content

Add Vietnam e-commerce compliance causal pack - #13

Merged
huygdv merged 15 commits into
mainfrom
agent/vn-ecommerce-compliance-pack
Aug 7, 2026
Merged

Add Vietnam e-commerce compliance causal pack#13
huygdv merged 15 commits into
mainfrom
agent/vn-ecommerce-compliance-pack

Conversation

@huygdv

@huygdv huygdv commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What changed

New compliance pack

  • add packs/vn-ecommerce-compliance-2026
  • 13 events, 18 causal links, 3 insight patterns, and 5 Canvas views
  • connect legal instruments and effective dates to role-owned actions, operating controls, and evidence
  • distinguish binding, derived-control, and recommended-practice nodes
  • add Vietnamese/English labels and official-source provenance
  • mark the pack as research-preview, asOf: 2026-07-30, and quality.causalProfile: policy-systemic

Generic pack → Canvas projection contract

  • add optional manifest.json and views.json
  • add executive, tax/accounting, e-commerce/livestream, IT/security, and teaching projections
  • document canonical graph + disposable views in docs/PACK-VIEWS.md
  • explicitly map the teaching view to the same pattern used by historical-causality lessons such as a WWI canvas: trigger → response → adaptation → observable outcome/evidence
  • preserve backwards compatibility: older consumers can still load only events.json, links.json, and insights.json

Validation and scale guardrails

  • extend scripts/validate-pack.mjs to validate optional manifests, view IDs, default views, highlighted paths, and all view-to-event references
  • replace the World-Cup-specific global semantic gate with profile-aware quality rules
  • declare sports-live for worldcup-2026 and policy-systemic for the compliance pack
  • add an explicit, dated World Cup quality baseline for five pre-existing scorer-only summaries; only those exact known issues are downgraded, while new semantic debt still fails CI
  • update add-match-day.mjs so cron updates use the pack's quality profile and baseline

Why

This PR tests a narrow but important Causari use case: turning regulatory change into an explainable causal path from source instrument to organizational adaptation and proof of execution.

The larger architectural goal is domain portability. World Cup, compliance, WWI teaching, AI-model recaps, and finance packs should share the same canonical graph contract while selecting different views and semantic quality profiles.

Safety and provenance

  • official government or ministry sources are required for binding legal nodes
  • operational interpretations are explicitly labelled as derived controls or recommended practices
  • no penalty calculator or organization-specific legal conclusion is included
  • the pack includes a legal/tax disclaimer and must be reviewed for organization-specific applicability

Validation

  • validate-packs GitHub Actions run 54: success
  • structural validation: 13 events, 18 links, 3 insights, 5 views; no dangling references
  • semantic validation: policy-systemic profile passes
  • sports-live profile remains active for World Cup-specific scoreline, entity, relationship-variety, and watchpoint checks
  • branch is 15 commits ahead of main, 0 behind, and mergeable

Follow-up boundary

This PR ships the data contract and guardrails. A separate Canvas implementation should read manifest.json and views.json to provide:

  1. view selector
  2. timeline lanes
  3. highlighted causal paths
  4. source/evidence drawer
  5. lecturer story mode
  6. shared support for compliance and WWI-style teaching packs

@huygdv
huygdv marked this pull request as ready for review August 7, 2026 09:54
@huygdv
huygdv merged commit 582a7f0 into main Aug 7, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 774fccd6ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


const evList = Array.isArray(events) ? events : [];
const lkList = Array.isArray(links) ? links : [];
const sports = profile === 'sports-live';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject unknown causal-quality profiles

When manifest.quality.causalProfile contains a typo or unsupported value, this comparison silently sets sports to false and runs the generic rules instead. In the checked validate-packs.yml workflow, such a pack can therefore pass while malformed completed scorelines, scheduled results, unknown knockout teams, relationship dominance, and missing watchpoints all bypass their intended checks; validate the profile against an explicit enum rather than treating every unknown value as generic.

Useful? React with 👍 / 👎.

Comment on lines +65 to +66
function baselineKeys(baseline) {
return new Set((baseline?.allowedIssues || []).map((x) => `${x.code}:${x.key}`));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind baseline exceptions to the issue content

When add-match-day.mjs updates one of the five baselined World Cup events and replaces its existing scorer-only text with a different templated whyItMatters, the issue still has the same templated-why:<event-id> key and is downgraded to a warning. The baseline therefore exempts all future instances of that rule on those events rather than the exact known debt, allowing a new regression to pass both the match-day gate and CI; include a fingerprint or expected offending value in the baseline match.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant