@kienha/anti-chaotic 1.0.0 → 1.0.1

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 (2) hide show
  1. package/bin/ag.js +14 -101
  2. package/package.json +1 -1
package/bin/ag.js CHANGED
@@ -13,56 +13,25 @@ const REPO_URI = "kienhaminh/anti-chaotic/.agent";
13
13
 
14
14
  program
15
15
  .command("init")
16
- .description("Initialize the Anti-Chaotic framework structure (local copy)")
17
- .option(
18
- "-r, --remote",
19
- "Fetch from remote GitHub repository instead of local package",
20
- )
21
- .action(async (cmd) => {
16
+ .description("Initialize the Anti-Chaotic Agent Kit (download from GitHub)")
17
+ .action(async () => {
22
18
  const projectRoot = process.cwd();
23
- const sourceAgentDir = path.join(__dirname, "..", ".agent");
24
19
  const targetAgentDir = path.join(projectRoot, ".agent");
25
20
 
26
21
  try {
27
- console.log(chalk.blue("Initializing Anti-Chaotic framework..."));
22
+ console.log(chalk.blue("Initializing Anti-Chaotic Agent Kit..."));
23
+ console.log(chalk.yellow(`Fetching from GitHub: ${REPO_URI}...`));
28
24
 
29
- if (cmd.remote) {
30
- console.log(chalk.yellow(`Fetching from GitHub: ${REPO_URI}...`));
31
- const emitter = tiged(REPO_URI, {
32
- disableCache: true,
33
- force: true,
34
- mode: "git",
35
- });
25
+ const emitter = tiged(REPO_URI, {
26
+ disableCache: true,
27
+ force: true,
28
+ mode: "git",
29
+ });
36
30
 
37
- await emitter.clone(targetAgentDir);
38
- console.log(chalk.green("✔ Successfully fetched .agent from GitHub."));
39
- } else {
40
- // Local Copy
41
- if (!(await fs.pathExists(sourceAgentDir))) {
42
- // Fallback to remote if local not found (e.g. npx cache issue), though unlikely in packaged env
43
- console.log(
44
- chalk.yellow("Local source not found, attempting remote fetch..."),
45
- );
46
- const emitter = tiged(REPO_URI, {
47
- disableCache: true,
48
- force: true,
49
- mode: "git",
50
- });
51
- await emitter.clone(targetAgentDir);
52
- console.log(
53
- chalk.green(
54
- "✔ Successfully fetched .agent from GitHub (fallback).",
55
- ),
56
- );
57
- } else {
58
- await fs.copy(sourceAgentDir, targetAgentDir, { overwrite: true });
59
- console.log(
60
- chalk.green(
61
- "✔ Successfully installed .agent configuration from local package.",
62
- ),
63
- );
64
- }
65
- }
31
+ await emitter.clone(targetAgentDir);
32
+ console.log(
33
+ chalk.green("✔ Successfully installed Anti-Chaotic Agent Kit."),
34
+ );
66
35
 
67
36
  console.log(chalk.dim(` Location: ${targetAgentDir}`));
68
37
  } catch (err) {
@@ -78,7 +47,7 @@ program
78
47
 
79
48
  try {
80
49
  console.log(
81
- chalk.blue(`Updating Anti-Chaotic framework from ${REPO_URI}...`),
50
+ chalk.blue(`Updating Anti-Chaotic Agent Kit from ${REPO_URI}...`),
82
51
  );
83
52
 
84
53
  const emitter = tiged(REPO_URI, {
@@ -96,60 +65,4 @@ program
96
65
  }
97
66
  });
98
67
 
99
- program
100
- .command("add <type> <name>")
101
- .description("Add a new component (skill, rule, or workflow)")
102
- .action(async (type, name) => {
103
- const agentDir = path.join(process.cwd(), ".agent");
104
-
105
- if (!(await fs.pathExists(agentDir))) {
106
- console.error(
107
- chalk.red(
108
- '✘ Documentation framework not initialized. Run "ag init" first.',
109
- ),
110
- );
111
- return;
112
- }
113
-
114
- try {
115
- if (type === "skill") {
116
- const skillDir = path.join(agentDir, "skills", name);
117
- await fs.ensureDir(skillDir);
118
- await fs.ensureDir(path.join(skillDir, "scripts"));
119
- await fs.writeFile(
120
- path.join(skillDir, "SKILL.md"),
121
- `# ${name} Skill\n\nDescription of the ${name} skill.\n`,
122
- );
123
- console.log(
124
- chalk.green(`✔ Added skill: ${name} at .agent/skills/${name}`),
125
- );
126
- } else if (type === "workflow") {
127
- const workflowFile = path.join(agentDir, "workflows", `${name}.md`);
128
- await fs.writeFile(
129
- workflowFile,
130
- `---\ndescription: ${name} workflow\n---\n\n1. Step one\n2. Step two\n`,
131
- );
132
- console.log(
133
- chalk.green(
134
- `✔ Added workflow: ${name} at .agent/workflows/${name}.md`,
135
- ),
136
- );
137
- } else if (type === "rule") {
138
- const ruleFile = path.join(agentDir, "rules", `${name}.md`);
139
- await fs.writeFile(ruleFile, `# ${name} Rules\n\n- Rule 1\n`);
140
- console.log(
141
- chalk.green(`✔ Added rule: ${name} at .agent/rules/${name}.md`),
142
- );
143
- } else {
144
- console.error(
145
- chalk.red(
146
- `✘ Unknown type: ${type}. Use "skill", "rule", or "workflow".`,
147
- ),
148
- );
149
- }
150
- } catch (err) {
151
- console.error(chalk.red("✘ Error adding component:"), err.message);
152
- }
153
- });
154
-
155
68
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kienha/anti-chaotic",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Anti-Chaotic - An agent kit for Antigravity to standardize the software development process",
5
5
  "main": "index.js",
6
6
  "publishConfig": {