forge-offline: Offline behavior
Engine: Forge native
Purpose
Audit local persistence, queued actions, synchronization, conflicts, revocation, privacy, and recovery under intermittent connectivity.
Deterministic runtime composition
Before loading any provider procedure, run:
Resolve ../../runtime/cli/src/composition-entry.js relative to this SKILL.md, then run:
node "<resolved-absolute-runner-path>" offline compose --workflow audit --root "<repository-root>" --dry-run --json
Add one repeatable --request <provider-or-source> flag for each explicit user request. Add
--condition <task-condition> or --risk-surface <surface> only for a task fact you directly
proved; never infer one from generic wording. The command above is the default for this
audit-oriented module; for implementation use --workflow build, and for a fix, retest, or
release gate use --workflow fix, verify, or ship respectively. Read the JSON response,
keep the Forge contract at index zero, and resolve paths against the absolute runtime_root
reported in that response. Read eager[].runtimePath when entering the module. The full
selected[] list is availability/provenance; load only deferred[].runtimePath when the task
reaches that concern, in tier order. Refuse any path that escapes the root. Respect every reported
suppression and context budget. If missing is non-empty, stop and report the installation as
damaged; do not improvise a prose fallback. The runner and specialist content may live in a plugin
cache or global installation; never assume they are inside the audited repository.
Resolve and read ../fullstack-forge/references/shared/module-contract.md (applicability,
execution, mutation, verification, completion) and
../fullstack-forge/references/shared/evidence-rules.md (statuses, standards, tools, findings via
../fullstack-forge/references/PROTOCOL.md) relative to this module SKILL.md before reporting.
Never hide failed checks or claim that an operation ran when it did not.
Automatic activation signals
Activate when a request or direct repository evidence involves offline behavior, when
the user explicitly names forge-offline, or when discovery proves an applicable boundary.
- Offline-capable web, mobile, or desktop applications
- Clients that queue writes or cache private state
When not to activate
- Online-only clients that store no durable application data locally
Automated support
Relevant discovery inputs are:
- service workers and local stores
- sync protocol
- authorization and conflict rules
Deterministic support, bounded evidence only:
Agent inspection procedure
- Map what is persisted locally: service-worker caches, IndexedDB, local storage, and their versioning and migration strategy.
- Trace an offline write to synchronization: queuing, retry, conflict detection, and resolution semantics.
- Exercise partial-sync interruption and recovery, duplicate-operation defense, and stale-data presentation.
- Verify security: local encryption where warranted, cleanup at logout, and offline authorization assumptions (entitlement and license behavior, clock manipulation).
- Check cache-version rollover: old clients against new APIs, and cache invalidation on deploy.
Manual inspection requirements:
- Exercise long-offline, low-storage, clock-change, and multi-device edits
- Review user-visible conflict and data-loss recovery
Stack-specific guidance:
- Treat the local database and service-worker cache as separate security boundaries
Evidence to collect
Standards used as criteria:
- Service Workers specification
- OWASP Mobile Application Security concepts
Common production failures
- Inventory locally stored data, cached responses, queued actions, versioning, encryption, and eviction
- Inspect duplicate delivery, ordering, conflict detection/resolution, tombstones, schema migration, partial sync, clock skew, and retry bounds
- Verify logout, revocation, role/tenant changes, device loss, shared-device privacy, stale authorization, and cache invalidation
Missing-control checks
Each item needs direct evidence or one reasoned status.
- Service workers
- Cache versioning
- Offline writes
- Conflict resolution
- Synchronization
- Stale data
- IndexedDB
- Local databases
- Local storage
- Encryption
- Logout cleanup
- Subscription and license behavior
- Clock manipulation
- Partial synchronization
- Recovery
- Duplicate operations
- Data ownership
- Offline authorization assumptions
Commands and tools
- Run
forge offline audit --json or fullstack-forge offline audit --json when
an explicit audit is requested and the CLI is installed. Normal feature work does not require it.
Safe fixes
- Add queue idempotency keys, version markers, and explicit offline states
- Clear scoped private caches on verified logout
Approval-required changes
- Changing conflict policy, offline authorization, retention, or destructive synchronization
Verification
- Run online-offline-reconnect flows with duplicate and conflicting actions
- Confirm revoked access does not remain usable offline beyond stated policy
Completion contract
Follow fullstack-forge/references/shared/completion.md and the limitations below.
Known limitations
- Platform background-execution and storage eviction vary by device
1---2name: forge-offline-33description: Audit local persistence, queued actions, synchronization, conflicts, revocation, privacy, and recovery under intermittent connectivity.4---56# forge-offline: Offline behavior78Engine: Forge native910## Purpose1112Audit local persistence, queued actions, synchronization, conflicts, revocation, privacy, and recovery under intermittent connectivity.131415## Deterministic runtime composition1617Before loading any provider procedure, run:1819Resolve `../../runtime/cli/src/composition-entry.js` relative to this `SKILL.md`, then run:2021`node "<resolved-absolute-runner-path>" offline compose --workflow audit --root "<repository-root>" --dry-run --json`2223Add one repeatable `--request <provider-or-source>` flag for each explicit user request. Add24`--condition <task-condition>` or `--risk-surface <surface>` only for a task fact you directly25proved; never infer one from generic wording. The command above is the default for this26audit-oriented module; for implementation use `--workflow build`, and for a fix, retest, or27release gate use `--workflow fix`, `verify`, or `ship` respectively. Read the JSON response,28keep the Forge contract at index zero, and resolve paths against the absolute `runtime_root`29reported in that response. Read `eager[].runtimePath` when entering the module. The full30`selected[]` list is availability/provenance; load only `deferred[].runtimePath` when the task31reaches that concern, in tier order. Refuse any path that escapes the root. Respect every reported32suppression and context budget. If `missing` is non-empty, stop and report the installation as33damaged; do not improvise a prose fallback. The runner and specialist content may live in a plugin34cache or global installation; never assume they are inside the audited repository.353637Resolve and read `../fullstack-forge/references/shared/module-contract.md` (applicability,38execution, mutation, verification, completion) and39`../fullstack-forge/references/shared/evidence-rules.md` (statuses, standards, tools, findings via40`../fullstack-forge/references/PROTOCOL.md`) relative to this module `SKILL.md` before reporting.4142Never hide failed checks or claim that an operation ran when it did not.4344## Automatic activation signals4546Activate when a request or direct repository evidence involves offline behavior, when47the user explicitly names `forge-offline`, or when discovery proves an applicable boundary.4849- Offline-capable web, mobile, or desktop applications50- Clients that queue writes or cache private state5152## When not to activate5354- Online-only clients that store no durable application data locally5556## Automated support5758Relevant discovery inputs are:5960- service workers and local stores61- sync protocol62- authorization and conflict rules6364Deterministic support, bounded evidence only:6566- `detect-stack`6768## Agent inspection procedure69701. Map what is persisted locally: service-worker caches, IndexedDB, local storage, and their versioning and migration strategy.712. Trace an offline write to synchronization: queuing, retry, conflict detection, and resolution semantics.723. Exercise partial-sync interruption and recovery, duplicate-operation defense, and stale-data presentation.734. Verify security: local encryption where warranted, cleanup at logout, and offline authorization assumptions (entitlement and license behavior, clock manipulation).745. Check cache-version rollover: old clients against new APIs, and cache invalidation on deploy.7576Manual inspection requirements:7778- Exercise long-offline, low-storage, clock-change, and multi-device edits79- Review user-visible conflict and data-loss recovery8081Stack-specific guidance:8283- Treat the local database and service-worker cache as separate security boundaries8485## Evidence to collect8687Standards used as criteria:8889- Service Workers specification90- OWASP Mobile Application Security concepts9192## Common production failures9394- Inventory locally stored data, cached responses, queued actions, versioning, encryption, and eviction95- Inspect duplicate delivery, ordering, conflict detection/resolution, tombstones, schema migration, partial sync, clock skew, and retry bounds96- Verify logout, revocation, role/tenant changes, device loss, shared-device privacy, stale authorization, and cache invalidation9798## Missing-control checks99100Each item needs direct evidence or one reasoned status.101102- Service workers103- Cache versioning104- Offline writes105- Conflict resolution106- Synchronization107- Stale data108- IndexedDB109- Local databases110- Local storage111- Encryption112- Logout cleanup113- Subscription and license behavior114- Clock manipulation115- Partial synchronization116- Recovery117- Duplicate operations118- Data ownership119- Offline authorization assumptions120121## Commands and tools122123- Run `forge offline audit --json` or `fullstack-forge offline audit --json` when124 an explicit audit is requested and the CLI is installed. Normal feature work does not require it.125126## Safe fixes127128- Add queue idempotency keys, version markers, and explicit offline states129- Clear scoped private caches on verified logout130131## Approval-required changes132133- Changing conflict policy, offline authorization, retention, or destructive synchronization134135## Verification136137- Run online-offline-reconnect flows with duplicate and conflicting actions138- Confirm revoked access does not remain usable offline beyond stated policy139140## Completion contract141142Follow `fullstack-forge/references/shared/completion.md` and the limitations below.143144## Known limitations145146- Platform background-execution and storage eviction vary by device