@markjaquith/agency 1.8.2 → 1.8.3

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": "@markjaquith/agency",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Manages personal agents files",
5
5
  "keywords": [
6
6
  "agents",
@@ -828,6 +828,53 @@ describe("task command", () => {
828
828
  await cleanupTempDir(configDir)
829
829
  })
830
830
 
831
+ test("copies files in subdirectories from template", async () => {
832
+ await initGitRepo(tempDir)
833
+ process.chdir(tempDir)
834
+
835
+ // Create template with files in subdirectories (including dotdirectories)
836
+ const templateDir = join(configDir, "templates", "custom")
837
+ await Bun.spawn(
838
+ ["mkdir", "-p", join(templateDir, ".agents", "skills", "my-skill")],
839
+ {
840
+ stdout: "pipe",
841
+ stderr: "pipe",
842
+ },
843
+ ).exited
844
+ await Bun.spawn(["mkdir", "-p", join(templateDir, "docs")], {
845
+ stdout: "pipe",
846
+ stderr: "pipe",
847
+ }).exited
848
+
849
+ const skillContent = "# My Skill\n\nSkill instructions here"
850
+ const docContent = "# Docs\n\nDocs content"
851
+ await Bun.write(
852
+ join(templateDir, ".agents", "skills", "my-skill", "SKILL.md"),
853
+ skillContent,
854
+ )
855
+ await Bun.write(join(templateDir, "docs", "guide.md"), docContent)
856
+
857
+ await initAgency(tempDir, "custom")
858
+
859
+ await runTestEffect(task({ silent: true, emit: "test-feature" }))
860
+
861
+ // Files in dotdirectory should be created
862
+ expect(
863
+ await fileExists(
864
+ join(tempDir, ".agents", "skills", "my-skill", "SKILL.md"),
865
+ ),
866
+ ).toBe(true)
867
+ const skillFileContent = await readFile(
868
+ join(tempDir, ".agents", "skills", "my-skill", "SKILL.md"),
869
+ )
870
+ expect(skillFileContent).toBe(skillContent)
871
+
872
+ // Files in regular subdirectory should also be created
873
+ expect(await fileExists(join(tempDir, "docs", "guide.md"))).toBe(true)
874
+ const docFileContent = await readFile(join(tempDir, "docs", "guide.md"))
875
+ expect(docFileContent).toBe(docContent)
876
+ })
877
+
831
878
  test("uses AGENTS.md from template directory if it exists", async () => {
832
879
  await initGitRepo(tempDir)
833
880
  process.chdir(tempDir)
@@ -1124,7 +1124,7 @@ const discoverTemplateFiles = (templateDir: string, verboseLog: Function) =>
1124
1124
  for (const file of foundFiles) {
1125
1125
  // Get relative path from template directory
1126
1126
  const relativePath = file.replace(templateDir + "/", "")
1127
- if (relativePath && !relativePath.startsWith(".")) {
1127
+ if (relativePath) {
1128
1128
  templateFiles.push(relativePath)
1129
1129
  }
1130
1130
  }