create-filegrc 0.3.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +4 -3
  2. package/package.json +1 -1
  3. package/src/cli.js +12 -4
  4. package/src/defaults.js +299 -123
  5. package/src/index.js +30 -17
  6. package/template/AGENTS.md +55 -17
  7. package/template/README.md +20 -9
  8. package/template/WORKSPACE.md +13 -0
  9. package/template/data/AGENTS.md +41 -11
  10. package/template/data/action-items/AGENTS.md +2 -2
  11. package/template/data/appointments/appointment-independent-policy-reviewer.json +11 -0
  12. package/template/data/appointments/appointment-policy-owner.json +11 -0
  13. package/template/data/audits/AGENTS.md +1 -1
  14. package/template/data/collection-reviews/collection-review-complementary-control.json +10 -0
  15. package/template/data/collection-reviews/collection-review-framework.json +10 -0
  16. package/template/data/collection-reviews/collection-review-person.json +10 -0
  17. package/template/data/collection-reviews/collection-review-system.json +10 -0
  18. package/template/data/collection-reviews/collection-review-vendor.json +10 -0
  19. package/template/data/documents/document-business-continuity-disaster-recovery.json +14 -13
  20. package/template/data/documents/document-business-continuity-disaster-recovery.md +3 -1
  21. package/template/data/documents/document-contractor-policy-acknowledgement.json +12 -12
  22. package/template/data/documents/document-contractor-training-acknowledgement.json +15 -13
  23. package/template/data/documents/document-data-retention-schedule.json +11 -12
  24. package/template/data/documents/document-employee-handbook-acknowledgement.json +12 -12
  25. package/template/data/documents/document-employee-policy-acknowledgement.json +12 -12
  26. package/template/data/documents/document-employee-training-acknowledgement.json +15 -13
  27. package/template/data/documents/document-incident-response-plan.json +14 -13
  28. package/template/data/documents/document-incident-response-plan.md +4 -2
  29. package/template/data/documents/document-soc2-management-assertion.json +3 -3
  30. package/template/data/documents/document-soc2-management-representation.json +3 -3
  31. package/template/data/documents/document-soc2-period-completeness.json +3 -3
  32. package/template/data/documents/document-soc2-system-description.json +3 -3
  33. package/template/data/evidence/AGENTS.md +3 -3
  34. package/template/data/obligation-events/AGENTS.md +2 -2
  35. package/template/data/obligations/AGENTS.md +1 -1
  36. package/template/data/people/person-program-lead.json +9 -0
  37. package/template/data/policies/AGENTS.md +1 -1
  38. package/template/data/policies/policy-anti-bribery-corruption.json +10 -15
  39. package/template/data/policies/policy-anti-bribery-corruption.md +1 -1
  40. package/template/data/policies/policy-clear-desk-screen.json +9 -14
  41. package/template/data/policies/policy-clear-desk-screen.md +1 -1
  42. package/template/data/policies/policy-data-protection-handling.json +13 -24
  43. package/template/data/policies/policy-data-protection-handling.md +2 -2
  44. package/template/data/policies/policy-employee-handbook.json +9 -18
  45. package/template/data/policies/policy-information-security.json +11 -42
  46. package/template/data/policies/policy-information-security.md +3 -3
  47. package/template/data/policies/policy-mobile-computing-communications.json +9 -18
  48. package/template/data/policies/policy-mobile-computing-communications.md +1 -1
  49. package/template/data/renderer.json +1 -3
  50. package/template/data/systems/system-filegrc-program-repository.md +2 -2
  51. package/template/data/training/training-anti-bribery-high-risk-roles.json +1 -2
  52. package/template/data/training/training-privileged-sensitive-roles.json +1 -2
  53. package/template/data/training/training-secure-development.json +1 -2
  54. package/template/data/training/training-security-awareness.json +7 -9
  55. package/template/data/training/training-security-awareness.md +1 -1
  56. package/template/data/workspace.json +19 -8
  57. package/template/docs/filegrc-home.png +0 -0
  58. package/template/package.json +3 -2
  59. package/template-parameters.json +6 -1
  60. package/template/data/people/person-policy-owner.json +0 -10
package/src/index.js CHANGED
@@ -10,7 +10,7 @@ const execute = promisify(execFile);
10
10
  const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
11
11
  const textExtensions = new Set(["", ".json", ".md", ".txt", ".yml", ".yaml", ".gitignore"]);
12
12
  const STARTER_PROFILES = new Set(["foundation", "security"]);
13
- const SECURITY_TEMPLATE_COLLECTIONS = new Set(["documents", "policies", "training"]);
13
+ const SECURITY_TEMPLATE_COLLECTIONS = new Set(["collection-reviews", "documents", "policies", "training"]);
14
14
 
15
15
  export async function createFilegrc(options = {}) {
16
16
  const parameterConfig = JSON.parse(await readFile(join(packageRoot, "template-parameters.json"), "utf8"));
@@ -29,7 +29,7 @@ export async function createFilegrc(options = {}) {
29
29
  const starterText = starterTemplateText(starter, prompted.company_name);
30
30
  const values = {
31
31
  ...prompted,
32
- effective_date: options.effectiveDate ?? new Date().toISOString().slice(0, 10),
32
+ effective_date: options.effectiveDate ?? calendarDateInTimezone(prompted.timezone),
33
33
  project_name: normalizePackageName(basename(target)),
34
34
  filegrc_version: engine.version,
35
35
  filegrc_version_range: engine.dependency,
@@ -74,6 +74,16 @@ export async function createFilegrc(options = {}) {
74
74
  };
75
75
  }
76
76
 
77
+ function calendarDateInTimezone(timezone, date = new Date()) {
78
+ const values = Object.fromEntries(new Intl.DateTimeFormat("en-US", {
79
+ timeZone: timezone,
80
+ year: "numeric",
81
+ month: "2-digit",
82
+ day: "2-digit"
83
+ }).formatToParts(date).map(({ type, value }) => [type, value]));
84
+ return `${values.year}-${values.month}-${values.day}`;
85
+ }
86
+
77
87
  export function normalizeStarterProfile(value = "security") {
78
88
  const profile = String(value || "security").trim().toLowerCase();
79
89
  const normalized = profile === "empty" ? "foundation" : profile === "soc2-security" ? "security" : profile;
@@ -172,6 +182,7 @@ async function resolvePromptValues(parameters, options) {
172
182
  const mapped = {
173
183
  company_name: options.companyName,
174
184
  policy_owner_name: options.policyOwnerName,
185
+ policy_owner_job_title: options.policyOwnerJobTitle,
175
186
  policy_owner_email: options.policyOwnerEmail,
176
187
  security_contact_email: options.securityContactEmail,
177
188
  timezone: options.timezone
@@ -179,6 +190,7 @@ async function resolvePromptValues(parameters, options) {
179
190
  if (options.yes) {
180
191
  mapped.company_name ??= "Example Company";
181
192
  mapped.policy_owner_name ??= "Security Owner";
193
+ mapped.policy_owner_job_title ??= "Chief Executive Officer";
182
194
  mapped.security_contact_email ??= "security@example.com";
183
195
  }
184
196
  for (const key of Object.keys(mapped)) {
@@ -208,7 +220,7 @@ async function resolvePromptValues(parameters, options) {
208
220
  if (missing.length) {
209
221
  throw new Error(`Missing required values: ${missing.map(({ key }) => key).join(", ")}`);
210
222
  }
211
- for (const key of ["company_name", "policy_owner_name"]) {
223
+ for (const key of ["company_name", "policy_owner_name", "policy_owner_job_title"]) {
212
224
  if (/[\u0000-\u001f\u007f]/.test(mapped[key])) {
213
225
  throw new Error(`${key} must be a single line without control characters.`);
214
226
  }
@@ -372,7 +384,7 @@ async function summarizeResources(target) {
372
384
  for (const path of await collectFiles(join(target, "data"))) {
373
385
  if (extname(path) !== ".json") continue;
374
386
  const record = JSON.parse(await readFile(path, "utf8"));
375
- if (!record?.id || !record?.type || !record?.schemaVersion) continue;
387
+ if (!record?.id || !record?.type) continue;
376
388
  total += 1;
377
389
  counts[record.type] = (counts[record.type] || 0) + 1;
378
390
  }
@@ -394,7 +406,7 @@ async function applyStarterScope(target, starter, effectiveDate) {
394
406
  }
395
407
 
396
408
  function starterStages(starter, counts) {
397
- const foundationTypes = new Set(["workspace", "renderer-settings", "person", "team", "system"]);
409
+ const foundationTypes = new Set(["workspace", "renderer-settings", "person", "appointment", "team", "system"]);
398
410
  const foundation = Object.entries(counts.byType)
399
411
  .filter(([type]) => foundationTypes.has(type))
400
412
  .reduce((total, [, count]) => total + count, 0);
@@ -418,11 +430,12 @@ function starterTemplateText(starter, companyName) {
418
430
  agent_purpose: `This repository is ${companyName}’s foundation filegrc workspace. Engineers and agents maintain the source records under \`data/\`. The \`filegrc\` package validates, searches, edits, and renders those files. No framework or assurance program has been selected yet.`,
419
431
  starter_baseline: `## Foundation baseline
420
432
 
421
- The generated workspace starts with five structural records:
433
+ The generated workspace starts with foundational program records:
422
434
 
423
435
  - Workspace and renderer settings
424
436
  - The initial active owner
425
- - An inactive security and risk oversight team that still needs an independent chair
437
+ - The two core Appointment records: an active Policy Owner plus a planned Independent Policy Reviewer assignment. Create another Appointment only when management actually delegates a named responsibility.
438
+ - A planned security and risk oversight team that still needs an independent chair
426
439
  - The filegrc Git repository as a governance system of record
427
440
  - A default 5x5 risk method and Public, Internal, Confidential, and Restricted data classifications
428
441
 
@@ -430,7 +443,7 @@ This profile does not include framework requirements, policies, governed documen
430
443
  audit_preparation_guidance: "The foundation profile does not include the local SOC 2 management-document templates used by `prepare-audit`. Add reviewed templates and program scope before initializing audit work. Audit preparation must not invent missing policy, control, or evidence facts.",
431
444
  starter_setup: `## Start the program
432
445
 
433
- This foundation profile contains the workspace, initial owner, oversight team, renderer settings, and filegrc system of record. It does not select a framework or create proposed policies, controls, obligations, or evidence.
446
+ This foundation profile contains the workspace, initial owner, core Appointments, oversight team, renderer settings, and filegrc system of record. It does not select a framework or create proposed policies, controls, obligations, or evidence.
434
447
 
435
448
  1. Run \`npx filegrc setup\` for guided service and goal setup, or use browser onboarding.
436
449
  2. Use \`npx filegrc guide --json\` before creating framework requirements, policies, controls, obligations, and evidence sources.
@@ -451,6 +464,7 @@ The generated workspace starts with the SOC 2 Security category:
451
464
  - The 33 Common Criteria reference IDs from CC1.1 through CC9.2, without the licensed criteria text
452
465
  - The nine Description Criteria reference IDs from DC1 through DC9, without the licensed criteria text
453
466
  - Planned controls mapped to those references and the included policies
467
+ - The two core Appointment records. Policy Owner starts active; Independent Policy Reviewer remains Ready until assigned. Program coordination, incident, recovery, executive, legal, privacy, insurance, communications, and audit-coordination functions stay with the Policy Owner unless management delegates one through a custom Appointment.
454
468
  - A security and risk oversight team chaired by an independent reviewer who may be internal or external
455
469
  - Recurring obligations for the reviews, scans, tests, training, and meetings required by the included policies
456
470
  - A default 5x5 risk method and Public, Internal, Confidential, and Restricted data classifications
@@ -465,23 +479,22 @@ The starter policies, controls, and obligations are proposals. They do not state
465
479
 
466
480
  1. Run \`npx filegrc setup\` for guided service and goal setup, or use browser onboarding. Then finish Step 1 by adding the real reviewers and operators, finishing the oversight team, and confirming applicable criteria, commitments, material vendors, and in-scope systems.
467
481
  2. Review the starter policies, appoint a reviewer who is separate from the policy owner, and activate only the policies that match current practice. The reviewer will usually be another person in the organization, but may be external.
468
- 3. Review the starter control set, implement each applicable control with its actual procedure, scope, cadence, evidence sources, and implementation date, and confirm any linked Work Queue schedules are enabled. Marking a control implemented starts eligible schedules. Then record any complementary customer or subservice controls.
469
- 4. Preview External Evidence drafts with \`npx filegrc evidence-test-drafts --preview --json\`. Create them only after confirming applicable controls and authoritative source systems.
470
- 5. Run \`npx filegrc program-readiness --require-ready\`, record the management candidate period start when reliable evidence collection begins, maintain risk assessments and risks, update controls when needed, use Work Queue for scheduled work, and trigger Policy Events when changes create required actions.
471
- 6. Engage a CPA firm, record the separate firm-agreed period in an audit record, review filegrc Evidence and External Evidence, and prepare fieldwork.`
482
+ 3. Review the starter control set and implement each applicable Control with its actual procedure, scope, cadence, and authoritative evidence source Systems. Confirm every source is active, has the required evidence role and current access owners, and includes repeatable retrieval instructions in Record Markdown. Add the implementation date, confirm any linked Work Queue schedules are enabled, then record any complementary customer or subservice controls.
483
+ 4. Run \`npx filegrc program-readiness --require-ready\`, record the management candidate period start when reliable evidence collection begins, maintain risk assessments and risks, update controls when needed, use Work Queue for scheduled work, and trigger Policy Events when changes create required actions.
484
+ 5. Engage a CPA firm, record the separate firm-agreed period in an audit record, review filegrc Evidence and External Evidence, and prepare fieldwork.`
472
485
  };
473
486
  }
474
487
 
475
488
  function validateCombinedSetup(setup) {
476
489
  if (!setup) return;
477
490
  if (Array.isArray(setup) || typeof setup !== "object") throw new Error("setup must be a JSON object.");
478
- const required = ["serviceName", "boundary", "criticality", "dataClassification", "internetExposed"];
491
+ const required = ["serviceName", "boundary", "criticality", "classificationId", "internetExposed"];
479
492
  const missing = required.filter((name) => setup[name] === undefined || setup[name] === "");
480
493
  if (missing.length) throw new Error(`Combined setup is missing: ${missing.join(", ")}.`);
481
494
  }
482
495
 
483
496
  async function runCombinedSetup(target, input) {
484
- const setup = { programGoal: "none", ownerId: "person-policy-owner", ...input };
497
+ const setup = { programGoal: "none", ownerId: "person-program-lead", ...input };
485
498
  const args = [
486
499
  join(target, "node_modules", "filegrc", "bin", "filegrc.js"),
487
500
  "setup",
@@ -489,7 +502,7 @@ async function runCombinedSetup(target, input) {
489
502
  "--boundary", String(setup.boundary),
490
503
  "--owner", String(setup.ownerId),
491
504
  "--criticality", String(setup.criticality),
492
- "--classification", String(setup.dataClassification),
505
+ "--classification", String(setup.classificationId),
493
506
  "--internet-exposed", String(setup.internetExposed),
494
507
  "--program-goal", String(setup.programGoal),
495
508
  "--summary",
@@ -503,13 +516,13 @@ async function runCombinedSetup(target, input) {
503
516
  async function writeMinimalLockfile(target, name, versionRange) {
504
517
  const lock = {
505
518
  name,
506
- version: "0.3.4",
519
+ version: "0.5.0",
507
520
  lockfileVersion: 3,
508
521
  requires: true,
509
522
  packages: {
510
523
  "": {
511
524
  name,
512
- version: "0.3.4",
525
+ version: "0.5.0",
513
526
  dependencies: { filegrc: versionRange }
514
527
  }
515
528
  }
@@ -18,7 +18,7 @@ npx filegrc list person --json
18
18
  npx filegrc program-readiness --summary --json
19
19
  ```
20
20
 
21
- `program-path --next --json` gives agents the current step and first action. Use `--summary` for all six step statuses or `--current` for the current step’s full renderer Instructions, Use, Policy Basis, commands, and next actions. The general guide lists every supported action and record type. A type guide repeats that page guidance and adds timing, required and conditional fields, current relationship candidates, JSON location, and Markdown slots.
21
+ `program-path --next --json` gives agents the current step and first action. Use `--summary` for all five step statuses or `--current` for the current step’s page summaries, detailed guidance fields, commands, and next actions. The general guide lists every supported action and record type. A type guide adds the checks needed for that resource, including timing, required and conditional fields, current relationship candidates, JSON location, and Markdown slots.
22
22
 
23
23
  For a new record, generate a mutation envelope:
24
24
 
@@ -52,11 +52,25 @@ Read `data/AGENTS.md` before changing records. More specific instructions inside
52
52
  - Do not store secrets, credentials, session data, or personal data that may need to be erased from Git history.
53
53
  - Keep the editable local server on loopback or behind trusted authentication. Use the read-only static build for audit sharing.
54
54
 
55
+ ## Source truth and derived workflow
56
+
57
+ The JSON and Markdown under `data/`, the installed model, policy content, and Git history are the inputs to FileGRC’s shared workflow calculation. Source files hold facts, decisions, relationships, dates, status, and evidence references. They do not each need a copy of the generic audit-readiness instructions or calculated TODO list.
58
+
59
+ Use `npx filegrc workflow --json` for the complete derived checklist, named readiness assessments, blockers, Work Items, and recommended next action. `guide`, `list --workflow`, `get --workflow`, mutation previews, the HTTP API, and the browser consume the same calculation. Resolve a derived finding by changing its source facts, recording a reviewed applicability decision, accepting an allowed Exception, or completing authoritative assigned work. Never add a separate TODO file or UI-only completion flag for calculated work.
60
+
61
+ FileGRC marks an item `blocked` only when named prerequisite records must be resolved first. A missing record, editable error, or management decision is `ready` when you can act on it now, even when it prevents a readiness assessment from passing.
62
+
63
+ An Action Item or Audit Request is a source record because it captures a real assignment, owner, deadline, and completion proof. A Collection Review is also a source record because FileGRC cannot infer that management reviewed an apparently complete or empty collection. `npx filegrc guide RESOURCE_TYPE --json` returns the type-specific review criteria and current confirmation state. Use `npx filegrc review-collection RESOURCE_TYPE --scaffold`, fill the conclusion and reviewer facts, preview it, then apply it with `--yes`. FileGRC calculates the collection revision and marks the confirmation stale after a reviewed record or material scope fact changes.
64
+
65
+ Other prompts and blockers remain derived. After a direct file edit, run `npm run validate`, `npx filegrc reconcile --preview --json`, and `npx filegrc workflow --json`. Reconciliation reports source transitions that may need a dated Policy Event and linked tasks. It never treats a file diff as proof that a real-world event happened. Apply a candidate only after confirming the event facts. The result must match an equivalent browser or CLI edit.
66
+
67
+ Run `npm run check:milestone` in CI. Before an assurance goal is selected it checks structural validity. It checks Evidence Readiness after a goal is selected, then Period Health after candidate coverage dates exist.
68
+
55
69
  ## Git is the audit trail
56
70
 
57
71
  Git supplies file authors, commit timestamps, messages, diffs, and revisions. Do not add fields such as `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, or a second change log.
58
72
 
59
- Domain events still need explicit dates. Keep values such as `occurredOn`, `approvedOn`, `reviewedOn`, `completedOn`, and audit-period dates in their records.
73
+ Domain events still need explicit dates. Keep values such as `occurredOn`, `scheduledFor`, `approvedOn`, `completedOn`, and audit-period dates in their records.
60
74
 
61
75
  Use a dedicated private repository for your FileGRC workspace. The browser commits and pushes each saved program change, so a standalone repository keeps the compliance audit trail separate from application development history.
62
76
 
@@ -69,11 +83,11 @@ Use a dedicated private repository for your FileGRC workspace. The browser commi
69
83
 
70
84
  New workspaces use trunk repository mode with `main` as the authoritative branch and `origin` as the remote. Each browser mutation checks the whole Git worktree, fetches the remote, fast-forwards only, rechecks the edited revision, writes through the normal domain function, validates the workspace, stages only this FileGRC workspace, creates a focused commit, and pushes it. Browser onboarding commits its related workspace, system, and renderer changes together.
71
85
 
72
- The Repository page reports `Synced`, `Syncing`, `Not synced`, `Read-only checkout`, or `Git setup required`. A failed push keeps the local FileGRC commit and offers Retry sync when every ahead commit changes only this workspace. FileGRC never pushes an ahead commit that includes files outside this workspace, and it never merges, rebases, switches branches, resolves conflicts, or changes files outside the workspace.
86
+ The Repository page reports `Synced`, `Syncing`, `Not synced`, `Read-only checkout`, or `Git setup required`. Browser saves return after the validated local commit, then push in the background. Treat `Syncing` as locally durable but not yet durable on the remote, and wait for `Synced` before starting another write. A failed push keeps the local FileGRC commit and offers Retry sync when every ahead commit changes only this workspace. FileGRC never pushes an ahead commit that includes files outside this workspace, and it never merges, rebases, switches branches, resolves conflicts, or changes files outside the workspace.
73
87
 
74
88
  Record lifecycle fields are the approval source. Draft, proposed, approved, and retired records may all live on the authoritative branch. Do not use Git branches to represent policy approval.
75
89
 
76
- Existing workspaces without `repositoryMode` remain in manual mode. In manual mode, review the workspace diff and use the Repository controls or Git CLI. Agents and terminal users always own their Git synchronization and should pull, commit, and push directly. FileGRC does not replace repository authentication, authorization, branch protection, or review controls.
90
+ Manual mode requires an explicit `repositoryMode` in `data/renderer.json`. In manual mode, review the workspace diff and use the Repository controls or Git CLI. Agents and terminal users always own their Git synchronization and should pull, commit, and push directly. FileGRC does not replace repository authentication, authorization, branch protection, or review controls.
77
91
 
78
92
  Use `npx filegrc serve --allow-non-authoritative-writes` only for local development in a task worktree. The override is visible in the UI and never commits or pushes.
79
93
 
@@ -83,6 +97,16 @@ Do not rewrite or remove committed records that explain prior audit periods. Clo
83
97
 
84
98
  `data/workspace.json` selects the model through `dataModelVersion`. The installed `filegrc` package owns the authoritative model. Do not copy or invent a local schema.
85
99
 
100
+ If the installed CLI reports that this workspace uses an unsupported model, start with:
101
+
102
+ ```sh
103
+ npx filegrc migrate --to-model 3 --preview --json
104
+ ```
105
+
106
+ Model v1 workspaces migrate to v2 first. Review the v3 preview’s automatic, review-required, and unsupported classifications before applying it with the same options and `--yes`. The migration creates no approvals, holders, evidence, or historical dates.
107
+
108
+ The [model v3 upgrade guide](https://github.com/Sunpeak-AI/filegrc/blob/main/docs/upgrading-to-model-v3.md) explains the classifications, automatic changes, and required post-migration review.
109
+
86
110
  Run these commands when working with records:
87
111
 
88
112
  ```sh
@@ -108,14 +132,16 @@ Headless agents get the same protection by exporting an edit payload with `fileg
108
132
 
109
133
  ## Renderer settings and onboarding
110
134
 
111
- `data/renderer.json` stores committed renderer and repository preferences. New workspaces set `showOnboarding` to `true`, `repositoryMode` to `trunk`, `authoritativeBranch` to `main`, and `repositoryRemote` to `origin`. In trunk mode, completing or skipping onboarding commits and pushes the related change. Existing settings without `repositoryMode` keep manual behavior.
135
+ `data/renderer.json` stores committed renderer and repository preferences. New workspaces set `showOnboarding` to `true`, `repositoryMode` to `trunk`, `authoritativeBranch` to `main`, and `repositoryRemote` to `origin`. In trunk mode, completing or skipping onboarding commits the related change and starts its background push.
112
136
 
113
- Onboarding explains the file and Git workflow, the program path, policy obligations, and Policy Events before covering report types and the final audit stage. It then collects the initial service boundary, owner, business criticality, highest data classification, internet exposure, and optional program goal. It creates or updates one `system` record and stores that selected system and the management goal on `workspace`. It does not select framework records, link controls to the service, or create evidence. Selecting Type 1 or Type 2 does not create an audit engagement. Completing onboarding opens the Step 1 overview so the user can add the real reviewers and operators, finish the oversight team, and confirm the criteria, commitments, vendors, and systems before approving policies.
137
+ Onboarding explains the file and Git workflow, the program path, policy obligations, and Policy Events before covering report types and the final audit stage. It then collects the initial service boundary, owner, business criticality, highest data classification, internet exposure, and optional program goal. It creates or updates one `system` record, stores that selected system and the management goal on `workspace`, and creates one planned service-commitment prompt. Replace that prompt with the actual customer promise or approved service requirement before activation. Onboarding does not link controls to the service or create evidence. Selecting Type 1 or Type 2 does not create an audit engagement. Completing onboarding opens the Step 1 overview so the user can add the real reviewers and operators, finish the oversight team, and confirm the criteria, commitments, vendors, and systems before approving policies.
114
138
 
115
139
  The renderer is optional. Agents may set `showOnboarding` to `false` and maintain all records headlessly. Restart onboarding from Repository when useful. Read-only builds never run it.
116
140
 
117
141
  {{starter_baseline}}
118
142
 
143
+ Review all criteria against the actual service boundary in one explicit batch. Run `npx filegrc review-applicability --scaffold --type requirement > decisions.json`, fill every decision, then preview with `npx filegrc review-applicability decisions.json --preview --json` and apply the same file with `--yes`. Every decision needs a reviewer, date, and rationale. FileGRC records the current scope revision automatically.
144
+
119
145
  ## Work Queue and Policy Events
120
146
 
121
147
  Run the same obligation planner used by the web app:
@@ -130,12 +156,14 @@ Work Queue includes recurring obligations, Policy Event tasks, and every other o
130
156
  A calendar obligation’s recurrence anchor starts its first allowed cycle. Unless `window` narrows that range, completion is allowed from the cycle start through the day before the next cycle, and the item becomes overdue on the next cycle’s first day. Use **Record work** in Work Queue, or create and link a completion atomically with:
131
157
 
132
158
  ```sh
159
+ npx filegrc complete obligation-id --scaffold --window-start YYYY-MM-DD --completed-on YYYY-MM-DD > completion-record.json
160
+ # Fill the actual work, evidence, review, and any null or empty required values.
133
161
  npx filegrc complete obligation-id completion-record.json
134
162
  ```
135
163
 
136
- Keep prior completion links because the planner matches each dated record to its own period.
164
+ The scaffold includes the current obligation revision, so the second command rejects a stale Work Queue write. Keep prior completion links because the planner matches each dated record to its own period.
137
165
 
138
- Event obligations are templates. Do not mark a template complete or replace it for each occurrence. Use Trigger Work on Step 5 or run:
166
+ Event obligations are templates. Do not mark a template complete or replace it for each occurrence. Use Trigger Work on Step 4 or run:
139
167
 
140
168
  ```sh
141
169
  npx filegrc trigger person-started --occurred-on 2026-07-25 --subject person-new-worker --json
@@ -147,11 +175,13 @@ Run `npx filegrc obligations` first to preview every task, owner, deadline, and
147
175
  Complete an event action and link its new proof in one validated write:
148
176
 
149
177
  ```sh
178
+ npx filegrc complete-action action-item-id --scaffold --completed-on 2026-07-25 > completion-record.json
179
+ # Fill the actual work, evidence, review, and any null or empty required values.
150
180
  npx filegrc complete-action action-item-id completion-record.json --completed-on 2026-07-25
151
- npx filegrc complete-event obligation-event-id --completed-on 2026-07-25
181
+ npx filegrc complete-event obligation-event-id --completed-on 2026-07-25 --expected-revision REVISION
152
182
  ```
153
183
 
154
- filegrc rejects a completion resource whose type does not match the obligation. It will close the event only after every action has its requested proof.
184
+ Completion scaffolds include the target revision. For other updates, read `REVISION` from `npx filegrc get RESOURCE_ID --mutation`. filegrc rejects a completion resource whose type does not match the obligation. It will close the event only after every action has its requested proof.
155
185
 
156
186
  ## Headless Markdown
157
187
 
@@ -177,11 +207,10 @@ The Evidence Ready gate requires:
177
207
 
178
208
  1. A management goal, selected systems, criteria, and controls.
179
209
  2. Active policies with completed text, separate management approval, real approval and effective dates, and linked controls.
180
- 3. Implemented controls with an owner, actual procedure, scope, cadence, evidence source, mappings, implementation date, and every eligible linked Work Queue schedule running.
181
- 4. Active authoritative systems with evidence source roles, access owners, and repeatable extraction instructions in Record Markdown.
182
- 5. A verified `test-export` or `test-capture` evidence record for each selected control family that relies on evidence from outside filegrc.
210
+ 3. Implemented Controls with an owner, actual procedure, scope, operation pattern, mappings, implementation date, and every required linked Work Queue schedule running.
211
+ 4. Every selected Control mapped to active authoritative Systems with the required evidence source roles, current access owners, and repeatable extraction instructions in Record Markdown.
183
212
 
184
- Onboarding does not create External Evidence records. After confirming the applicable controls and authoritative source Systems, run `npx filegrc evidence-test-drafts --preview --json` and review the proposed collection tests. Then run `npx filegrc evidence-test-drafts` to create the missing drafts. filegrc-managed records, such as risk assessments, meetings, vendor reviews, attestations, vulnerability scans, penetration tests, backup tests, exercises, exceptions, and findings, do not need a separate collection test. Put any fixed external artifact in an External Evidence record and link it from the operating record. For each created draft, choose its authoritative source System, attach or reference the real result, record its collector and classification, then have another person verify it.
213
+ Onboarding does not create External Evidence records. Complete authoritative source Systems as part of Control implementation. For every incomplete family in Program Readiness, update the Control with its authoritative evidence source Systems, then give each source the required evidence role, current access owners, and repeatable retrieval instructions in Record Markdown. Use `npx filegrc evidence-map --json` when you want only those source checks. During Step 4, create External Evidence only when a real artifact exists. Select its source System, attach or reference the result, link the Controls and operating record it supports, record its collector and classification, then have another person verify it before audit use.
185
214
 
186
215
  When the gate passes, set `workspace.candidatePeriodStart` to the date reliable evidence collection begins. Do not backdate it. `candidatePeriodStart` and `candidatePeriodEnd` express management’s target. They do not establish the final report period.
187
216
 
@@ -205,7 +234,7 @@ The audit record’s `typeOneAsOf`, `periodStart`, and `periodEnd` are the dates
205
234
 
206
235
  Review both evidence paths against the exact firm-agreed date or period:
207
236
 
208
- 1. filegrc Evidence consists of dated Step 5 operating records. Complete each applicable record, link it to the Controls it supports, record the result in structured fields or Markdown, and link any external artifact needed to support that result.
237
+ 1. filegrc Evidence consists of dated Step 4 operating records. Complete each applicable record, link it to the Controls it supports, record the result in structured fields or Markdown, and link any external artifact needed to support that result.
209
238
  2. External Evidence consists of verified `evidence` records from authoritative Systems. Confirm the source System, audit date or period, Control links, collector, verifier, and fixed attachment or approved external reference.
210
239
 
211
240
  Audit Readiness reports coverage for both paths. The packet includes the matching filegrc records and Markdown with Git history, plus External Evidence records, retained attachments, delivery indexes, and checksums.
@@ -232,9 +261,18 @@ Link a control test to its `audit-population` record when sampling applies. Link
232
261
 
233
262
  ## Content and approvals
234
263
 
235
- The seed policy owner is {{policy_owner_name}} at {{policy_owner_email}}, and the security reporting address is {{security_contact_email}}. Replace ownership or contacts when responsibilities change.
264
+ The initial program lead is {{policy_owner_name}}, {{policy_owner_job_title}}, at {{policy_owner_email}}. The separate Policy Owner Appointment records this person’s starting program authority, and the security reporting address is {{security_contact_email}}. Update the Person when their organizational position changes. End and replace Appointments when named authority moves to someone else.
236
265
 
237
- Appoint an independent management reviewer during policy review, not as a condition of defining the service boundary. The reviewer must be separate from the policy owner and able to challenge the owner’s decisions. Most organizations assign another internal leader or manager. An external reviewer is also allowed, and a one-person company needs one because no second internal person is available. The reviewer chairs Security and Risk Oversight and approves policies and governed documents.
266
+ Appoint an independent management reviewer during policy review, not as a condition of defining the service boundary. The reviewer must be separate from the policy owner and able to challenge the owner’s decisions. Assign another internal leader or manager when a suitable reviewer is available. Otherwise, appoint a qualified external reviewer. The reviewer chairs Security and Risk Oversight and approves policies and governed documents.
267
+
268
+ To appoint an internal reviewer, create or update that Person and set the planned Independent Policy Reviewer Appointment’s `holderId`, scope, start date, responsibilities, and independence rationale before making it active. When no suitable internal reviewer is available, include the reviewer’s real organizational job title, organization, start date, and independence rationale in `reviewer.json`, then preview the external-reviewer bundle before applying it:
269
+
270
+ ```sh
271
+ npx filegrc external-reviewer-setup --scaffold > reviewer.json
272
+ # Replace the null values with the reviewer's current facts and independence rationale.
273
+ npx filegrc external-reviewer-setup reviewer.json --preview --json
274
+ npx filegrc external-reviewer-setup reviewer.json --yes --json
275
+ ```
238
276
 
239
277
  The management reviewer and CPA auditor are different roles. Do not assign the CPA firm management or approval work without first confirming the firm's independence requirements.
240
278
 
@@ -19,6 +19,8 @@ npm run serve
19
19
 
20
20
  Requires Node.js 20 or newer and Git.
21
21
 
22
+ Existing model v2 workspaces must run `npx filegrc migrate --to-model 3 --preview --json` after installing a model v3 package. Review each automatic, review-required, and unsupported item before applying the same migration with `--yes`. Model v1 workspaces migrate to v2 first. See the [model v3 upgrade guide](https://github.com/Sunpeak-AI/filegrc/blob/main/docs/upgrading-to-model-v3.md).
23
+
22
24
  ## How it works
23
25
 
24
26
  The repository is the program. There is no separate application database.
@@ -29,28 +31,30 @@ The repository is the program. There is no separate application database.
29
31
 
30
32
  Use the same source through the local web app, a text editor, the CLI, or CI. Browser and CLI actions call the same rules, so engineers and agents see the same validation and readiness results.
31
33
 
32
- New workspaces use `main` as the authoritative browser branch. Browser saves fetch and fast-forward from `origin`, validate the change, create a focused commit, and push it. Draft, proposed, approved, and retired records all live on that branch because record status, not a Git branch, represents approval.
34
+ New workspaces use `main` as the authoritative browser branch. Browser saves fetch and fast-forward from `origin`, validate the change, and create a focused local commit. The UI then unlocks for navigation while Git push continues in the background. Other writes remain locked until the Repository status confirms `Synced`; a failed push keeps the local commit and offers Retry sync. Draft, proposed, approved, and retired records all live on that branch because record status, not a Git branch, represents approval.
33
35
 
34
- Detached and feature-branch checkouts are read-only in the browser by default. Developers can run `npx filegrc serve --allow-non-authoritative-writes` for local task-worktree edits; that override never commits or pushes. Existing workspaces without `repositoryMode` keep manual browser Git behavior. CLI and agent workflows continue to manage Git explicitly.
36
+ Detached and feature-branch checkouts are read-only in the browser by default. Developers can run `npx filegrc serve --allow-non-authoritative-writes` for local task-worktree edits; that override never commits or pushes. CLI and agent workflows continue to manage Git explicitly.
35
37
 
36
38
  ## One path from setup to audit
37
39
 
38
40
  ![filegrc SOC 2 program overview](docs/filegrc-home.png)
39
41
 
40
- 1. **Define scope.** Confirm owners, criteria, commitments, vendors, and in-scope systems.
41
- 2. **Approve policies.** Tailor the proposals and record separate owners and reviewers.
42
- 3. **Implement controls.** Add the real procedure, scope, cadence, and evidence source.
43
- 4. **Test evidence collection.** Collect and verify evidence from each authoritative system.
44
- 5. **Operate the program.** Work the queue, trigger Policy Events, maintain risks, and preserve dated evidence.
45
- 6. **Audit.** Record the CPA engagement and agreed period, support fieldwork, and build the packet.
42
+ 1. **Define scope.** Set program ownership, choose the criteria, and define the service, Systems, and providers in scope.
43
+ 2. **Approve policies.** Turn the starter policy set into approved rules that match how the organization works.
44
+ 3. **Implement controls.** Define how each control works, where its evidence comes from, and whether customers or providers have responsibilities.
45
+ 4. **Operate the program.** Run scheduled and event-driven work, maintain risk, and retain dated evidence.
46
+ 5. **Audit.** Set up the CPA engagement, support fieldwork, and prepare the evidence packet.
47
+
48
+ Control implementation includes evidence-source readiness. Use `npx filegrc program-readiness --json` to find incomplete Control or System records. `npx filegrc evidence-map --json` remains available as a focused diagnostic. Create External Evidence during Step 4 only when a real export, report, screenshot, signed file, or approved external reference exists.
46
49
 
47
50
  The Program Overview shows what is done, what is blocked, and what to do next.
48
51
 
49
52
  ## The routine work stays connected
50
53
 
51
- - **Work Queue** turns policy schedules and follow-up into upcoming, due, and overdue work.
54
+ - **Work Queue** turns policy schedules and follow-up into upcoming, blocked, due, and overdue work, with named blockers when a task cannot proceed.
52
55
  - **Policy Events** create the right tasks for hiring, departures, incidents, vendor changes, and other events.
53
56
  - **Program Readiness** checks whether management can begin a reliable evidence period.
57
+ - **Period Health** checks role, policy, control, source, obligation, and Git-history continuity across candidate and formal Type 2 dates.
54
58
  - **Audit Readiness** checks the engagement, period, documents, evidence, and Type 2 populations.
55
59
  - **Evidence packets** collect the scoped records, attachments, history, indexes, and checksums for delivery.
56
60
 
@@ -64,11 +68,18 @@ The browser is helpful, but it is not required. An agent can discover the model,
64
68
 
65
69
  ```sh
66
70
  npx filegrc program-path --next --json
71
+ npx filegrc workflow --json
72
+ npx filegrc reconcile --preview --json
73
+ npx filegrc period-health --require-healthy --json
74
+ npx filegrc review-applicability decisions.json --preview --json
75
+ npx filegrc review-collection person --scaffold
67
76
  npx filegrc guide risk-assessment --json
68
77
  npx filegrc obligations --json
78
+ npx filegrc complete OBLIGATION_ID --scaffold --window-start YYYY-MM-DD --completed-on YYYY-MM-DD
69
79
  npx filegrc program-readiness --summary --json
70
80
  npx filegrc audit-readiness audit-id --json
71
81
  npx filegrc evidence-packet --audit audit-id
82
+ npm run check:milestone
72
83
  ```
73
84
 
74
85
  Read `AGENTS.md` and `data/AGENTS.md` inside a generated workspace for the full headless workflow.
@@ -27,6 +27,19 @@ npx filegrc validate --json
27
27
 
28
28
  Read `AGENTS.md` and `data/AGENTS.md` before broad changes.
29
29
 
30
+ ## Establish the Git baseline
31
+
32
+ Review the generated proposals and make an initial commit before recording setup decisions. This gives later changes a clear baseline and prevents first-run files from looking like real-world policy events.
33
+
34
+ If this is a dedicated repository:
35
+
36
+ ```sh
37
+ git add .
38
+ git commit -m "Initialize FileGRC program"
39
+ ```
40
+
41
+ The editable browser uses `main` and pushes saved changes to `origin`. Connect this repository to a dedicated private remote and push `main` before using browser writes. CLI and file-based users can manage Git on their normal review cadence, but should still commit the baseline before changing program facts.
42
+
30
43
  {{starter_setup}}
31
44
 
32
45
  filegrc manages GRC records and audit evidence. It does not replace infrastructure logging, monitoring, identity, backup, endpoint, or incident-detection systems.
@@ -8,6 +8,8 @@ Treat the installed model as the authority. Do not infer a schema from a nearby
8
8
 
9
9
  ```sh
10
10
  npx filegrc guide --json
11
+ npx filegrc workflow --json
12
+ npx filegrc reconcile --preview --json
11
13
  npx filegrc program-path --next --json
12
14
  npx filegrc types --json
13
15
  npx filegrc guide RESOURCE_TYPE --json
@@ -15,7 +17,9 @@ npx filegrc list RESOURCE_TYPE --json
15
17
  npx filegrc search "TERM" --json
16
18
  ```
17
19
 
18
- Use `program-path --next --json` to find the current lifecycle step and first action. Use `--summary` for all six step statuses or `--current` for the current step’s full renderer Instructions, Use, Policy Basis, commands, and next actions. Use `guide` before any unfamiliar create or status transition. It repeats the page guidance and reports required fields, fields required by a status, enum values, relationship types and candidates, Markdown slots, timing, and exact paths. Use `describe` only when you need the raw model definition.
20
+ Use `workflow --json` to get the shared assessments, complete checklist, Work Items, blockers, and recommended next action. Use `program-path --next --json` for the current lifecycle step. Use `guide` before any unfamiliar create or status transition. It reports required fields, fields required by a status, enum values, relationship types and candidates, Markdown slots, timing, and exact paths. Use `describe` only when you need the raw model definition.
21
+
22
+ After changing a lifecycle fact directly, review `reconcile --preview --json`. A candidate asks whether the change represents a real policy event. Supply the actual event date or timestamp, departure risk when relevant, and explicit confirmation before applying it.
19
23
 
20
24
  ## Choose the right record
21
25
 
@@ -24,7 +28,9 @@ Use `program-path --next --json` to find the current lifecycle step and first ac
24
28
  - Work required on a schedule or event belongs in `obligation`.
25
29
  - A dated instance of work belongs in its activity type, such as `meeting`, `risk-assessment`, `access-review`, `vulnerability-scan`, `backup-test`, or `exercise`.
26
30
  - A fact that may change over time belongs in an inventory record, such as `person`, `system`, `asset`, `vendor`, or `access-grant`.
27
- - A dated Step 5 operating record proves that filegrc-managed work occurred. Put each fixed external artifact in an `evidence` record and link it from the operating record; never add an unexplained attachment.
31
+ - A Person’s `jobTitle` is their actual position in the organization. A named authority they hold, such as CISO, DPO, Policy Owner, or team chair, belongs in a dated `appointment` scoped to the workspace, team, or governed records.
32
+ - Team membership and chairs are authoritative on `team.memberIds` and `team.chairIds`.
33
+ - A dated Step 4 operating record proves that filegrc-managed work occurred. Put each fixed external artifact in an `evidence` record and link it from the operating record; never add an unexplained attachment.
28
34
  - Follow-up work belongs in `action-item`. A gap belongs in `finding`, a known threat belongs in `risk`, and an approved temporary departure belongs in `exception`.
29
35
  - An auditor request belongs in `audit-request`; the engagement itself belongs in `audit`.
30
36
 
@@ -43,7 +49,6 @@ The scaffold is a mutation envelope:
43
49
  ```json
44
50
  {
45
51
  "record": {
46
- "schemaVersion": 1,
47
52
  "id": "resource-type-human-name",
48
53
  "type": "resource-type",
49
54
  "title": "Human name"
@@ -93,7 +98,11 @@ JSON is for stable metadata used by validation, relationships, filters, schedule
93
98
 
94
99
  If `guide` marks a Markdown slot recommended, fill it before treating the deliverable as complete. Keep observations and report details in the source record’s Markdown. Create a Finding only for a confirmed gap that needs its own remediation lifecycle. Create an Action Item only when follow-up needs a separate assignee, deadline, and completion proof. Set each child record’s `sourceResourceId` to the record that produced it; do not maintain reverse Finding or Action Item arrays on the source. Do not put a report’s entire variable structure into new JSON fields.
95
100
 
96
- Use explicit business dates. Git records when a file changed, but it does not replace `occurredOn`, `assessmentDate`, `reviewedOn`, `completedOn`, or similar fields.
101
+ When `guide` returns a collection review requirement, review the listed type-specific criteria and use `npx filegrc review-collection RESOURCE_TYPE --scaffold`. Fill the management conclusion, rationale, reviewer, and date, then preview and apply the payload. Do not invent `collectionRevision`; FileGRC calculates it from the current records and material Workspace scope. Any later change makes the confirmation stale and requires another review.
102
+
103
+ Store a relationship only on its authoritative record. Control Tests store `auditId`; External Evidence stores `auditIds`; Commitments store `systemIds` and `controlIds`; Controls store `policyIds` and `requirementIds`; Risks store `controlIds`; Systems store their direct `vendorId`. Use `references` to inspect derived inbound links.
104
+
105
+ Use explicit business dates. Git records when a file changed, but it does not replace `occurredOn`, `scheduledFor`, `completedOn`, `approvedOn`, or similar fields.
97
106
 
98
107
  ## Status changes
99
108
 
@@ -118,7 +127,7 @@ npx filegrc references RESOURCE_ID --json
118
127
  Delete only an uncommitted draft or a mistake:
119
128
 
120
129
  ```sh
121
- npx filegrc delete RESOURCE_TYPE RESOURCE_ID --yes
130
+ npx filegrc delete RESOURCE_TYPE RESOURCE_ID --yes --expected-revision REVISION
122
131
  ```
123
132
 
124
133
  filegrc rejects deletion that breaks references and removes owned Markdown with the JSON. Retire, close, cancel, supersede, or replace committed records that explain historical operation.
@@ -137,7 +146,7 @@ The JSON uses `filePaths: ["evidence/evidence-example/source-export.csv"]`. Comm
137
146
  Use the attachment command to copy a fixed file and update `filePaths` in one validated action:
138
147
 
139
148
  ```sh
140
- npx filegrc attach EVIDENCE_ID /path/to/source-export.csv
149
+ npx filegrc attach EVIDENCE_ID /path/to/source-export.csv --expected-revision REVISION
141
150
  ```
142
151
 
143
152
  It refuses symlinks, hidden destination names, and existing destination files.
@@ -145,24 +154,45 @@ It refuses symlinks, hidden destination names, and existing destination files.
145
154
  Remove a local attachment explicitly before deleting its evidence record:
146
155
 
147
156
  ```sh
148
- npx filegrc detach EVIDENCE_ID source-export.csv --yes
157
+ npx filegrc detach EVIDENCE_ID source-export.csv --yes --expected-revision REVISION
149
158
  ```
150
159
 
151
160
  filegrc will not delete an evidence record that still has local attachments.
152
161
 
153
162
  Never invent evidence, dates, approvals, results, people, or source-system details. If a required fact is unavailable, leave the record in a non-final state and report the missing input.
154
163
 
164
+ ## Implement Controls and Their Evidence Sources
165
+
166
+ Finish each applicable Control and its authoritative source Systems together. Use Program Readiness as the completion check:
167
+
168
+ ```sh
169
+ npx filegrc program-readiness --json
170
+ ```
171
+
172
+ The Control stage reports both Control implementation items and evidence-family source checks. Resolve them through the source records:
173
+
174
+ 1. Choose an existing System or scaffold the System that is authoritative for the family.
175
+ 2. Set the System to `active`, add the matching `evidenceSourceKinds`, and name current `evidenceOwnerIds`.
176
+ 3. Put the exact report, filters, date range, timezone, export format, and reconciliation steps in the System’s Record Markdown.
177
+ 4. Add the System ID to `evidenceSourceIds` on every Control in the family that it supports.
178
+ 5. Finish the Control’s owner, procedure, scope, operation pattern, mappings, and implementation date. Put every calendar or event schedule in an Obligation.
179
+ 6. Run `program-readiness --json` again and resolve every failed Control or source check before marking the Controls implemented or starting the candidate period.
180
+
181
+ Use `get RESOURCE_ID --mutation` and `update` so JSON and Markdown change together. `evidence-map --json` remains available when you want only the evidence-family checks. Do not create an Evidence record while designing or implementing a Control. Create External Evidence during Step 4 only when the real export, report, screenshot, signed file, or approved external reference exists.
182
+
155
183
  ## Scheduled and event work
156
184
 
157
185
  ```sh
158
186
  npx filegrc obligations --json
187
+ npx filegrc complete OBLIGATION_ID --scaffold --window-start YYYY-MM-DD --completed-on YYYY-MM-DD > completion-mutation.json
159
188
  npx filegrc complete OBLIGATION_ID completion-mutation.json
160
189
  npx filegrc trigger EVENT_TYPE --occurred-on YYYY-MM-DD --subject RESOURCE_ID --json
190
+ npx filegrc complete-action ACTION_ITEM_ID --scaffold --completed-on YYYY-MM-DD > completion-mutation.json
161
191
  npx filegrc complete-action ACTION_ITEM_ID completion-mutation.json --completed-on YYYY-MM-DD
162
- npx filegrc complete-event OBLIGATION_EVENT_ID --completed-on YYYY-MM-DD
192
+ npx filegrc complete-event OBLIGATION_EVENT_ID --completed-on YYYY-MM-DD --expected-revision REVISION
163
193
  ```
164
194
 
165
- Run `obligations` before `trigger` to preview every Policy Event task, owner, deadline, and requested proof. Triggering creates the event and adds all linked Action Items to the Work Queue atomically. `complete` and `complete-action` validate the expected completion type and link the new record atomically. `complete-event` refuses to close the workflow until every action has its requested proof. For hour-based deadlines use `--occurred-at` with an RFC 3339 timestamp and timezone.
195
+ Fill the scaffold with the actual work, evidence, review, and every null or empty required value. Completion scaffolds include the target revision. For other updates, read `REVISION` from `npx filegrc get RESOURCE_ID --mutation`. Run `obligations` before `trigger` to preview every Policy Event task, owner, deadline, and requested proof. Triggering creates the event and adds all linked Action Items to the Work Queue atomically. `complete` and `complete-action` validate the expected completion type and link the new record atomically. `complete-event` refuses to close the workflow until every action has its requested proof. For hour-based deadlines use `--occurred-at` with an RFC 3339 timestamp and timezone.
166
196
 
167
197
  ## Audit work
168
198
 
@@ -173,7 +203,7 @@ npx filegrc audit-readiness AUDIT_ID --json
173
203
  npx filegrc evidence-packet --audit AUDIT_ID --preview --json
174
204
  ```
175
205
 
176
- Run Program Readiness before creating the normal audit engagement. It checks scope, effective policies, implemented controls, evidence sources, and test captures without an audit ID. Fix readiness errors in source records. Do not edit packet output under `.filegrc/`. A delivery-ready filegrc packet means the management checks passed; the engagement team still judges evidence and performs the examination.
206
+ Run Program Readiness before creating the normal audit engagement. It checks scope, effective policies, implemented controls, and evidence mapping without an audit ID. Fix readiness errors in the Control and System records. Do not edit packet output under `.filegrc/`. A delivery-ready filegrc packet means the management checks passed; the engagement team still judges evidence and performs the examination.
177
207
 
178
208
  ## Finish every change
179
209
 
@@ -186,4 +216,4 @@ git diff
186
216
 
187
217
  Review every changed JSON, Markdown, and attachment. Confirm the diff contains no secrets, temporary files, source exports with prohibited data, or derived `.filegrc/` output. Make one focused commit whose message says why the compliance record changed.
188
218
 
189
- These commands are for CLI and agent work, which continues to manage Git explicitly. Browser saves in trunk mode commit and push automatically from the configured authoritative branch. Do not use a feature branch as a record approval state, and never include application changes when this workspace lives in a monorepo.
219
+ These commands are for CLI and agent work, which continues to manage Git explicitly. Browser saves in trunk mode commit automatically from the configured authoritative branch, then push in the background while the UI reports `Syncing`. Do not start another write until it reports `Synced`. Do not use a feature branch as a record approval state, and never include application changes when this workspace lives in a monorepo.
@@ -5,7 +5,7 @@ Create an Action Item only when follow-up needs its own assignee, deadline, and
5
5
  For an event-generated action, do not weaken or extend its policy deadline by hand. Create the requested completion resource and close the action atomically:
6
6
 
7
7
  ```sh
8
- npx filegrc complete-action ACTION_ITEM_ID completion-mutation.json --completed-on YYYY-MM-DD
8
+ npx filegrc complete-action ACTION_ITEM_ID completion-mutation.json --completed-on YYYY-MM-DD --expected-revision REVISION
9
9
  ```
10
10
 
11
- filegrc rejects the wrong completion type. Mark ordinary Action Items `done` only after the work occurred, set `completedOn`, and link the completion record or evidence. Use `blocked` while a named dependency prevents work, and link that dependency with `blockingResourceIds`.
11
+ Read `REVISION` from `npx filegrc get ACTION_ITEM_ID --mutation`. filegrc rejects the wrong completion type. Mark ordinary Action Items `done` only after the work occurred, set `completedOn`, and link the completion record or evidence. Use `blocked` while a named dependency prevents work, and link that dependency with `blockingResourceIds`.
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "appointment-independent-policy-reviewer",
3
+ "type": "appointment",
4
+ "title": "Independent Policy Reviewer",
5
+ "status": "planned",
6
+ "appointmentKind": "independent-policy-reviewer",
7
+ "scopeResourceIds": [
8
+ "workspace"
9
+ ],
10
+ "responsibilities": "Challenge and approve policies and governed documents independently from their owners. Assign a qualified external reviewer when no suitable internal reviewer is available."
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "appointment-policy-owner",
3
+ "type": "appointment",
4
+ "title": "Policy Owner",
5
+ "status": "active",
6
+ "appointmentKind": "policy-owner",
7
+ "holderId": "person-program-lead",
8
+ "scopeResourceIds": ["workspace"],
9
+ "startsOn": "{{effective_date}}",
10
+ "responsibilities": "Own the information security program and the starter policies, controls, documents, training, and scheduled work until management assigns more specific accountable parties."
11
+ }