create-filegrc 0.1.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 (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -0
  3. package/bin/create-filegrc.js +8 -0
  4. package/package.json +26 -0
  5. package/src/cli.js +64 -0
  6. package/src/defaults.js +1063 -0
  7. package/src/index.js +252 -0
  8. package/template/AGENTS.md +227 -0
  9. package/template/README.md +102 -0
  10. package/template/data/AGENTS.md +185 -0
  11. package/template/data/action-items/AGENTS.md +11 -0
  12. package/template/data/audit-populations/AGENTS.md +13 -0
  13. package/template/data/audits/AGENTS.md +21 -0
  14. package/template/data/documents/document-business-continuity-disaster-recovery.json +29 -0
  15. package/template/data/documents/document-business-continuity-disaster-recovery.md +190 -0
  16. package/template/data/documents/document-contractor-policy-acknowledgement.json +21 -0
  17. package/template/data/documents/document-contractor-policy-acknowledgement.md +24 -0
  18. package/template/data/documents/document-contractor-training-acknowledgement.json +22 -0
  19. package/template/data/documents/document-contractor-training-acknowledgement.md +20 -0
  20. package/template/data/documents/document-data-retention-schedule.json +25 -0
  21. package/template/data/documents/document-data-retention-schedule.md +33 -0
  22. package/template/data/documents/document-employee-handbook-acknowledgement.json +21 -0
  23. package/template/data/documents/document-employee-handbook-acknowledgement.md +19 -0
  24. package/template/data/documents/document-employee-policy-acknowledgement.json +21 -0
  25. package/template/data/documents/document-employee-policy-acknowledgement.md +24 -0
  26. package/template/data/documents/document-employee-training-acknowledgement.json +22 -0
  27. package/template/data/documents/document-employee-training-acknowledgement.md +20 -0
  28. package/template/data/documents/document-incident-response-plan.json +29 -0
  29. package/template/data/documents/document-incident-response-plan.md +136 -0
  30. package/template/data/documents/document-soc2-management-assertion.json +17 -0
  31. package/template/data/documents/document-soc2-management-assertion.md +24 -0
  32. package/template/data/documents/document-soc2-management-representation.json +17 -0
  33. package/template/data/documents/document-soc2-management-representation.md +20 -0
  34. package/template/data/documents/document-soc2-period-completeness.json +17 -0
  35. package/template/data/documents/document-soc2-period-completeness.md +32 -0
  36. package/template/data/documents/document-soc2-system-description.json +17 -0
  37. package/template/data/documents/document-soc2-system-description.md +65 -0
  38. package/template/data/evidence/AGENTS.md +30 -0
  39. package/template/data/obligation-events/AGENTS.md +18 -0
  40. package/template/data/obligations/AGENTS.md +11 -0
  41. package/template/data/people/person-independent-approver.json +10 -0
  42. package/template/data/people/person-policy-owner.json +10 -0
  43. package/template/data/policies/AGENTS.md +15 -0
  44. package/template/data/policies/policy-anti-bribery-corruption.json +25 -0
  45. package/template/data/policies/policy-anti-bribery-corruption.md +87 -0
  46. package/template/data/policies/policy-clear-desk-screen.json +24 -0
  47. package/template/data/policies/policy-clear-desk-screen.md +49 -0
  48. package/template/data/policies/policy-data-protection-handling.json +34 -0
  49. package/template/data/policies/policy-data-protection-handling.md +130 -0
  50. package/template/data/policies/policy-employee-handbook.json +31 -0
  51. package/template/data/policies/policy-employee-handbook.md +161 -0
  52. package/template/data/policies/policy-information-security.json +61 -0
  53. package/template/data/policies/policy-information-security.md +233 -0
  54. package/template/data/policies/policy-mobile-computing-communications.json +28 -0
  55. package/template/data/policies/policy-mobile-computing-communications.md +74 -0
  56. package/template/data/renderer.json +7 -0
  57. package/template/data/risk-assessments/AGENTS.md +16 -0
  58. package/template/data/systems/system-filegrc-program-repository.md +9 -0
  59. package/template/data/training/training-anti-bribery-high-risk-roles.json +17 -0
  60. package/template/data/training/training-anti-bribery-high-risk-roles.md +19 -0
  61. package/template/data/training/training-privileged-sensitive-roles.json +21 -0
  62. package/template/data/training/training-privileged-sensitive-roles.md +20 -0
  63. package/template/data/training/training-secure-development.json +20 -0
  64. package/template/data/training/training-secure-development.md +22 -0
  65. package/template/data/training/training-security-awareness.json +28 -0
  66. package/template/data/training/training-security-awareness.md +192 -0
  67. package/template/data/workspace.json +27 -0
  68. package/template/docs/filegrc-audit.png +0 -0
  69. package/template/docs/filegrc-home.png +0 -0
  70. package/template/gitignore +4 -0
  71. package/template/package.json +15 -0
  72. package/template-parameters.json +34 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 FileGRC contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # create-filegrc
2
+
3
+ Create a Git-native FileGRC workspace for a SOC 2 program:
4
+
5
+ ```sh
6
+ npx create-filegrc@latest company-grc
7
+ cd company-grc
8
+ npm run validate
9
+ npm run serve
10
+ ```
11
+
12
+ Setup asks for the company name, the initial policy owner, and a security contact email. The generated private project includes a starter Security program, policy-driven work queue, event checklists, audit preparation, evidence packets, and one dependency: `filegrc`.
13
+
14
+ Generated workspaces also include layered `AGENTS.md` instructions and model-driven headless commands. Agents can discover types, scaffold JSON plus Markdown, inspect relationships, perform CRUD, complete policy work, and prepare audit packets through the same domain functions used by the renderer.
15
+
16
+ Git is initialized when needed. The browser can create local commits before a remote is configured.
17
+
18
+ Use `npx create-filegrc@latest --help` for non-interactive options.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { runCli } from "../src/cli.js";
4
+
5
+ runCli(process.argv.slice(2)).catch((error) => {
6
+ console.error(error instanceof Error ? error.message : String(error));
7
+ process.exitCode = 1;
8
+ });
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "create-filegrc",
3
+ "version": "0.1.0",
4
+ "description": "Create a FileGRC workspace for a SOC 2 program",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Sunpeak-AI/FileGRC.git"
9
+ },
10
+ "type": "module",
11
+ "bin": {
12
+ "create-filegrc": "bin/create-filegrc.js"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "src",
17
+ "template",
18
+ "template-parameters.json"
19
+ ],
20
+ "scripts": {
21
+ "test": "node --test"
22
+ },
23
+ "engines": {
24
+ "node": ">=20"
25
+ }
26
+ }
package/src/cli.js ADDED
@@ -0,0 +1,64 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { createFileGRC } from "./index.js";
3
+
4
+ export async function runCli(argv = process.argv.slice(2)) {
5
+ const { target, options } = parseArgs(argv);
6
+ if (options.help) return printHelp();
7
+ if (options.version) return printVersion();
8
+ const result = await createFileGRC({ target, ...options });
9
+ console.log(`Created ${result.target}`);
10
+ console.log("");
11
+ console.log(` cd ${result.target}`);
12
+ if (options.install === false) console.log(" npm install");
13
+ console.log(" npm run validate");
14
+ console.log(" npm run serve");
15
+ console.log("");
16
+ console.log("Review the starter drafts, then commit the approved baseline.");
17
+ }
18
+
19
+ function parseArgs(argv) {
20
+ let target;
21
+ const options = {};
22
+ for (let index = 0; index < argv.length; index += 1) {
23
+ const value = argv[index];
24
+ if (!value.startsWith("-") && !target) {
25
+ target = value;
26
+ continue;
27
+ }
28
+ const [name, inline] = value.replace(/^--?/, "").split("=", 2);
29
+ const next = () => inline ?? argv[++index];
30
+ if (name === "help" || name === "h") options.help = true;
31
+ else if (name === "version" || name === "v") options.version = true;
32
+ else if (name === "yes" || name === "y") options.yes = true;
33
+ else if (name === "force") options.force = true;
34
+ else if (name === "no-install") options.install = false;
35
+ else if (name === "company-name") options.companyName = next();
36
+ else if (name === "policy-owner-name") options.policyOwnerName = next();
37
+ else if (name === "security-contact-email") options.securityContactEmail = next();
38
+ else if (name === "filegrc-version") options.filegrcVersion = next();
39
+ else throw new Error(`Unknown option "${value}".`);
40
+ }
41
+ return { target: target ?? "filegrc-program", options };
42
+ }
43
+
44
+ function printHelp() {
45
+ console.log(`create-filegrc [directory] [options]
46
+
47
+ Create a FileGRC workspace for a SOC 2 program.
48
+
49
+ Options:
50
+ --company-name <name>
51
+ --policy-owner-name <name>
52
+ --security-contact-email <email>
53
+ --filegrc-version <version> Override resolved engine version
54
+ --no-install Write files and a preliminary lockfile only
55
+ --force Allow a non-empty target without overwriting files
56
+ --yes Use generic prompt defaults
57
+ --version Show the package version
58
+ --help Show this help`);
59
+ }
60
+
61
+ async function printVersion() {
62
+ const packageJson = JSON.parse(await readFile(new URL("../package.json", import.meta.url), "utf8"));
63
+ console.log(packageJson.version);
64
+ }