Keep business rules in the domain
Publishing checks are shared rules that provider actions must satisfy. A misleading allowed flag is rejected when it conflicts with the underlying review state.
04 / SaltyFactory
A product studio connecting artwork, assets, product drafts, provider integrations and reviewed publishing.
Public sourceFounder, product design, engineering and acceptance
A product idea needs to survive a lot of handoffs before it reaches a shop. Artwork, files, product options, copy and provider state all need to agree.
I built SaltyFactory as a modular TypeScript workspace with a storefront, private studio, worker and shared packages. The product domain carries review rules, while adapters handle the commerce providers.
Follow the workflow. Select a stage to see its purpose.
Artwork. Prepare the design and the assets needed for the product.
Publishing checks are shared rules that provider actions must satisfy. A misleading allowed flag is rejected when it conflicts with the underlying review state.
Each role has an explicit tool registry. The runtime rejects unknown tools and invalid arguments before executing them.
Agent runs record tool calls and results, save their final output and enforce a turn limit. That makes an incomplete run distinguishable from a completed one.
tests/publish-gates-invariants.test.ts
it("human approval false blocks both providers", () => {
const review = { ...validDomainFixtures.publishReview, gates: { ...allTrueGates, human_approved: false }, all_gates_passed: false, shopify_publish_allowed: false, printify_sync_allowed: false };
expect(() => assertPublishAllowedForShopify(review)).toThrow();
expect(() => assertPublishAllowedForPrintify(review)).toThrow();
});
it("inconsistent allowed flag true is rejected", () => {
const review = { ...validDomainFixtures.publishReview, gates: { ...allTrueGates, title_reviewed: false }, all_gates_passed: false, shopify_publish_allowed: true, printify_sync_allowed: true };
expect(publishReviewSchema.safeParse(review).success).toBe(false);
expect(evaluatePublishReviewGates(review).inconsistent).toBe(true);
});Two regression cases from the public source. Missing human approval blocks both providers, and an allowed flag cannot override an unreviewed title.
The public repository shows the product workflow, agent runtime and regression tests. Its implementation notes describe the working features and provider setup, giving another engineer a concrete starting point for review.