create-filegrc 0.16.4 → 0.16.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-filegrc",
3
- "version": "0.16.4",
3
+ "version": "0.16.6",
4
4
  "description": "Create a filegrc workspace for a SOC 2 program",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/cli.js CHANGED
@@ -30,20 +30,22 @@ export async function runCli(argv = process.argv.slice(2)) {
30
30
  `filegrc ${result.engineVersion}${result.enginePackage ? ` from ${result.enginePackage}` : ""}: ` +
31
31
  `${result.install === "installed" ? "installed" : "installation skipped"}`
32
32
  );
33
- console.log("Use a dedicated private repository for your FileGRC workspace. The browser");
34
- console.log("commits and pushes each saved program change, so a standalone repository keeps");
35
- console.log("the compliance audit trail separate from application development history.");
33
+ console.log("Use a dedicated private repository for your FileGRC workspace.");
34
+ console.log("A standalone repository keeps the compliance audit trail separate from application development history.");
35
+ console.log(result.repository.mode === "trunk"
36
+ ? "In trunk mode, browser saves commit and push to the configured remote."
37
+ : "In manual mode, browser saves stay local until you commit and push with Git.");
36
38
  console.log(`Git: ${result.gitMode === "existing-worktree" ? "joined existing worktree" : "initialized new repository"}`);
37
39
  if (result.gitMode === "existing-worktree") {
38
40
  console.log("");
39
41
  console.log("This FileGRC workspace joined an existing Git repository.");
40
42
  console.log("");
41
- console.log("FileGRC recommends a dedicated private repository because browser saves create");
42
- console.log("frequent compliance commits. A standalone repository keeps the GRC audit trail");
43
+ console.log("FileGRC recommends a dedicated private repository. A standalone repository keeps the GRC audit trail");
43
44
  console.log("separate from application development history.");
44
45
  console.log("");
45
- console.log("Monorepo mode remains supported. Browser Git operations will commit only files");
46
- console.log("inside this FileGRC workspace.");
46
+ console.log(result.repository.mode === "trunk"
47
+ ? "Monorepo mode remains supported. Browser Git operations commit only this workspace."
48
+ : "Monorepo mode remains supported. In manual mode, browser saves remain local.");
47
49
  }
48
50
  if (
49
51
  result.gitMode === "existing-worktree"
@@ -90,7 +92,9 @@ export async function runCli(argv = process.argv.slice(2)) {
90
92
  console.log(" 2. Appoint an independent reviewer who is separate from the policy owner.");
91
93
  console.log(result.gitMode === "existing-worktree"
92
94
  ? "Review the generated records and commit only this workspace's approved baseline."
93
- : "Connect the dedicated private origin and push main before using browser writes.");
95
+ : result.repository.mode === "trunk"
96
+ ? `Connect a private ${result.repository.remote} and push ${result.repository.authoritativeBranch} before using browser writes.`
97
+ : "Review the generated records, then commit and push with Git when ready.");
94
98
  }
95
99
 
96
100
  function shellQuote(value) {
package/src/index.js CHANGED
@@ -33,6 +33,9 @@ export async function createFilegrc(options = {}) {
33
33
  project_name: normalizePackageName(basename(target)),
34
34
  filegrc_version: engine.version,
35
35
  filegrc_version_range: engine.dependency,
36
+ repository_setup: repository.mode === "trunk"
37
+ ? `The editable browser uses \`${repository.authoritativeBranch}\` and pushes saved changes to \`${repository.remote}\`. Connect this repository to a dedicated private remote and push \`${repository.authoritativeBranch}\` before using browser writes.`
38
+ : "In manual mode, browser saves stay local. Review the workspace diff and commit or push with Git when ready.",
36
39
  ...starterText
37
40
  };
38
41
 
@@ -521,13 +524,13 @@ async function runCombinedSetup(target, input) {
521
524
  async function writeMinimalLockfile(target, name, versionRange) {
522
525
  const lock = {
523
526
  name,
524
- version: "0.16.4",
527
+ version: "0.16.6",
525
528
  lockfileVersion: 3,
526
529
  requires: true,
527
530
  packages: {
528
531
  "": {
529
532
  name,
530
- version: "0.16.4",
533
+ version: "0.16.6",
531
534
  dependencies: { filegrc: versionRange }
532
535
  }
533
536
  }
@@ -21,6 +21,8 @@ npx filegrc program-amendment SOURCE_RESOURCE_ID --json
21
21
 
22
22
  `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.
23
23
 
24
+ Before proposing a new process or record for a Control, inspect the current Control, its linked Policy and Markdown, Obligations, operating records, Components, and Evidence with `get`, `list`, `search`, and `references`. Read `get CONTROL_ID --workflow --json` and the relevant type guides to find the actual gap. Reuse an existing rule or workflow when it covers the requirement. If the design exists but operation is unproven, ask for the real event, actors, dates, and evidence needed to record it; do not ask management to design the process again. Ask users only for decisions or facts that the repository and available sources cannot verify. Never infer that a Policy or planned Obligation proves the Control operated.
25
+
24
26
  For a new record, generate a mutation envelope:
25
27
 
26
28
  ```sh
@@ -64,6 +66,8 @@ The JSON and Markdown under `data/`, the installed model, policy content, and Gi
64
66
 
65
67
  Start with `npx filegrc program-path --next --json` for the current step and next action. Use `npx filegrc workflow --json` when you need the complete derived checklist, named readiness assessments, blockers, and Work Items. `guide`, `list --workflow`, `get --workflow`, mutation previews, the HTTP API, and the browser consume the same calculation. In `get --workflow` output, `findings` and `workItems` preserve the complete checklist relevant to that record. `related` additionally groups downstream work that the record supports but that belongs to another record or program step. 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.
66
68
 
69
+ The workflow recommendation's `context` lists existing connected records, the work phase, and unmet checks. Open those records before following a setup prompt. A connected Policy, Obligation, or Evidence record is context; check the dated work and its proof before saying a Control operated.
70
+
67
71
  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.
68
72
 
69
73
  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.
@@ -78,22 +82,22 @@ Git exclusively supplies file authors, commit timestamps, messages, diffs, revis
78
82
 
79
83
  Domain events still need explicit dates. Keep values such as `occurredOn`, `scheduledFor`, `approvedOn`, `completedOn`, and audit-period dates in their records.
80
84
 
81
- 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.
85
+ Use a dedicated private repository for your FileGRC workspace. A standalone repository keeps the compliance audit trail separate from application development history.
82
86
 
83
87
  - Prefer creating or cloning FileGRC as a standalone private repository.
84
- - Run the editable browser from the authoritative branch's main checkout.
88
+ - In trunk mode, run the editable browser from the configured authoritative branch's main checkout.
85
89
  - Do not place a new FileGRC workspace inside an application monorepo unless the organization has explicitly chosen that structure.
86
90
  - If FileGRC already lives in a monorepo, do not relocate it automatically.
87
- - In a monorepo, never include application changes in FileGRC-generated commits.
88
- - Treat detached and feature-branch copies as read-only unless an explicit development override is active.
91
+ - In trunk mode, FileGRC-generated commits in a monorepo include only this workspace, never application changes.
92
+ - In trunk mode, detached and feature-branch copies are read-only unless an explicit development override is active.
89
93
 
90
- 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, Program, System, Component, and renderer changes together.
94
+ In trunk repository mode, 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, Program, System, Component, and renderer changes together.
91
95
 
92
- 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.
96
+ In trunk mode, 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.
93
97
 
94
- 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.
98
+ Record lifecycle fields are the approval source. Draft, proposed, approved, and retired records may all live on the same branch. Do not use Git branches to represent policy approval.
95
99
 
96
- 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.
100
+ Read `repositoryMode`, `authoritativeBranch`, and `repositoryRemote` from `data/renderer.json`. In manual mode, browser saves stay local, including on feature branches. Review the workspace diff, then commit and push with Git when ready. Agents and terminal users always own their Git synchronization. FileGRC does not replace repository authentication, authorization, branch protection, or review controls.
97
101
 
98
102
  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.
99
103
 
@@ -148,7 +152,7 @@ Headless agents get the same protection by exporting an edit payload with `fileg
148
152
 
149
153
  ## Renderer settings and onboarding
150
154
 
151
- `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.
155
+ `data/renderer.json` stores committed renderer and repository preferences. New workspaces set `showOnboarding` to `true`; the default Git settings are trunk mode, `main`, and `origin`. Creation can choose manual mode or other branch and remote names. In trunk mode, completing or skipping onboarding commits the related change and starts its background push.
152
156
 
153
157
  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 create a Requirement Mapping for the baseline SOC 2 Commitment, mark Controls implemented, 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, commit the prepared Reporting Channel Set proposal, and confirm the criteria, commitments, any supplemental mappings, vendors, and systems before approving policies.
154
158
 
@@ -38,7 +38,7 @@ git add .
38
38
  git commit -m "Initialize FileGRC program"
39
39
  ```
40
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.
41
+ {{repository_setup}} CLI and file-based users can manage Git on their normal review cadence, but should still commit the baseline before changing program facts.
42
42
 
43
43
  {{starter_setup}}
44
44
 
@@ -18,6 +18,10 @@ npx filegrc search "TERM" --json
18
18
 
19
19
  Use `program-path --next --json` for the current lifecycle step. Use `workflow --json` when you need the full shared assessments, complete checklist, Work Items, and blockers. 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.
20
20
 
21
+ Before creating a record or asking for a new procedure, inspect matching records and their links with `list`, `search`, `get RESOURCE_ID --workflow --json`, and `references RESOURCE_ID --json`. Read the linked Policy and companion Markdown, Control, Obligations, operating records, Components, and Evidence as applicable. Reuse the authoritative record and update it when needed. Separate a documented design or enabled schedule from proof that work actually occurred. Ask for only the missing business facts, decisions, or external evidence that you cannot verify; do not invent an event or ask for facts already recorded here.
22
+
23
+ In `get RESOURCE_ID --workflow --json`, inspect `workflow.recommended.context.existing` before using `scaffold`. The listed records are relationship candidates, not proof that work occurred.
24
+
21
25
  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. If it is a false positive, use `reconcile --dismiss` with the exact candidate fingerprint, a Person reviewer, the review date, a rationale, and `--yes`. The immutable dismissal suppresses only that fingerprint.
22
26
 
23
27
  ## Choose the right record
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "{{project_name}}",
3
- "version": "0.16.4",
3
+ "version": "0.16.6",
4
4
  "private": true,
5
5
  "description": "filegrc workspace for a SOC 2 program",
6
6
  "type": "module",
@@ -51,6 +51,10 @@
51
51
  "key": "filegrc_version_range",
52
52
  "source": "resolved-filegrc-version"
53
53
  },
54
+ {
55
+ "key": "repository_setup",
56
+ "source": "repository-mode"
57
+ },
54
58
  {
55
59
  "key": "program_title",
56
60
  "source": "starter-profile"