@firatcand/roster 0.4.0 → 1.0.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 (76) hide show
  1. package/README.md +77 -220
  2. package/agents/lesson-drafter.md +3 -8
  3. package/agents/pattern-detector.md +0 -1
  4. package/bin/roster.js +168 -57
  5. package/package.json +2 -3
  6. package/skills/chief-of-staff/SKILL.md +62 -78
  7. package/skills/dreamer/SKILL.md +8 -7
  8. package/skills/roster-orchestrator/SKILL.md +53 -25
  9. package/templates/CLAUDE.project.template.md +1 -1
  10. package/templates/CONTEXT.template.md +2 -2
  11. package/templates/gitignore-defaults.txt +2 -0
  12. package/templates/scaffold/chief-of-staff/README.md +16 -24
  13. package/templates/scaffold/chief-of-staff/agent.md +22 -32
  14. package/templates/scaffold/chief-of-staff/plans/audit-agent.yaml +4 -4
  15. package/templates/scaffold/chief-of-staff/plans/audit-repo.yaml +5 -4
  16. package/templates/scaffold/chief-of-staff/plans/create-agent.yaml +5 -34
  17. package/templates/scaffold/config/project.yaml.template +10 -0
  18. package/templates/scaffold/conventions.md +159 -171
  19. package/templates/scaffold/dreamer/README.md +2 -2
  20. package/templates/scaffold/dreamer/agent.md +0 -1
  21. package/templates/scaffold/dreamer/plans/nightly-reflection.yaml +23 -37
  22. package/templates/scaffold/dreamer/subagents/lesson-drafter.md +2 -7
  23. package/templates/scaffold/{projects/_demo/guidelines → guidelines}/asset-links.md +4 -0
  24. package/templates/scaffold/{projects/_demo/guidelines → guidelines}/brand-book.md +4 -0
  25. package/templates/scaffold/{projects/_demo/guidelines → guidelines}/messaging.md +4 -0
  26. package/templates/scaffold/{projects/_demo/guidelines → guidelines}/voice.md +4 -0
  27. package/templates/scaffold/scripts/audit-agent.sh +74 -47
  28. package/templates/scaffold/scripts/audit-repo.sh +27 -49
  29. package/templates/scaffold/scripts/create-function.sh +1 -1
  30. package/templates/scaffold/scripts/lib/README.md +1 -1
  31. package/templates/scaffold/scripts/lib/bindings-prompt.sh +41 -124
  32. package/templates/scaffold/scripts/new-agent.sh +97 -91
  33. package/templates/scaffold/scripts/rename-agent.sh +91 -0
  34. package/templates/scaffold/scripts/save-state.sh +32 -0
  35. package/agents/critic.md +0 -74
  36. package/agents/enricher.md +0 -56
  37. package/agents/promotion-arbiter.md +0 -71
  38. package/agents/prospector.md +0 -51
  39. package/agents/writer.md +0 -58
  40. package/skills/sdr/SKILL.md +0 -147
  41. package/templates/scaffold/chief-of-staff/plans/add-agent-to-project.yaml +0 -45
  42. package/templates/scaffold/chief-of-staff/plans/archive-project.yaml +0 -51
  43. package/templates/scaffold/chief-of-staff/plans/audit-project.yaml +0 -34
  44. package/templates/scaffold/chief-of-staff/plans/create-project.yaml +0 -65
  45. package/templates/scaffold/chief-of-staff/plans/remove-agent-from-project.yaml +0 -50
  46. package/templates/scaffold/chief-of-staff/plans/rename-project.yaml +0 -62
  47. package/templates/scaffold/chief-of-staff/plans/unarchive-project.yaml +0 -41
  48. package/templates/scaffold/dreamer/subagents/promotion-arbiter.md +0 -64
  49. package/templates/scaffold/gtm/sdr/.claude/settings.json +0 -3
  50. package/templates/scaffold/gtm/sdr/.mcp.json +0 -21
  51. package/templates/scaffold/gtm/sdr/README.md +0 -41
  52. package/templates/scaffold/gtm/sdr/agent.md +0 -136
  53. package/templates/scaffold/gtm/sdr/plans/cold-outreach.yaml +0 -92
  54. package/templates/scaffold/gtm/sdr/projects/_demo/asset-references.md +0 -7
  55. package/templates/scaffold/gtm/sdr/projects/_demo/config/default.yaml +0 -69
  56. package/templates/scaffold/gtm/sdr/projects/_demo/log/feedback/.gitkeep +0 -0
  57. package/templates/scaffold/gtm/sdr/projects/_demo/log/runs/.gitkeep +0 -0
  58. package/templates/scaffold/gtm/sdr/projects/_demo/playbook/.gitkeep +0 -0
  59. package/templates/scaffold/gtm/sdr/subagents/critic.md +0 -67
  60. package/templates/scaffold/gtm/sdr/subagents/enricher.md +0 -49
  61. package/templates/scaffold/gtm/sdr/subagents/prospector.md +0 -44
  62. package/templates/scaffold/gtm/sdr/subagents/writer.md +0 -51
  63. package/templates/scaffold/projects/_demo/CLAUDE.md +0 -35
  64. package/templates/scaffold/projects/_demo/README.md +0 -16
  65. package/templates/scaffold/projects/_demo/assets/.gitkeep +0 -0
  66. package/templates/scaffold/projects/_demo/config/default.yaml +0 -28
  67. package/templates/scaffold/projects/_demo/state.md +0 -11
  68. package/templates/scaffold/scripts/archive-project.sh +0 -98
  69. package/templates/scaffold/scripts/audit-project.sh +0 -361
  70. package/templates/scaffold/scripts/new-agent-instance.sh +0 -114
  71. package/templates/scaffold/scripts/new-project.sh +0 -125
  72. package/templates/scaffold/scripts/remove-agent-from-project.sh +0 -67
  73. package/templates/scaffold/scripts/rename-project.sh +0 -118
  74. package/templates/scaffold/scripts/unarchive-project.sh +0 -115
  75. /package/templates/scaffold/gtm/{sdr/playbook/.gitkeep → .gitkeep} +0 -0
  76. /package/templates/scaffold/{projects/_demo/guidelines → guidelines}/icps/_persona-template.md +0 -0
@@ -1,118 +0,0 @@
1
- #!/usr/bin/env bash
2
- # rename-project.sh — renames a project everywhere it appears
3
- # Usage: bash scripts/rename-project.sh <old> <new>
4
-
5
- set -euo pipefail
6
-
7
- if [ $# -ne 2 ]; then
8
- echo "Usage: $0 <old> <new>"
9
- exit 1
10
- fi
11
-
12
- OLD="$1"
13
- NEW="$2"
14
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
15
-
16
- # Validate new slug
17
- if ! [[ "$NEW" =~ ^[a-z][a-z0-9-]*$ ]]; then
18
- echo "ERROR: New slug must be lowercase, alphanumeric + hyphens, starting with a letter."
19
- exit 1
20
- fi
21
-
22
- # Validate old exists
23
- if [ ! -d "$ROOT/projects/$OLD" ]; then
24
- echo "ERROR: Project '$OLD' not found at $ROOT/projects/$OLD"
25
- exit 1
26
- fi
27
-
28
- # Validate new doesn't exist (live or archived)
29
- if [ -d "$ROOT/projects/$NEW" ]; then
30
- echo "ERROR: A project named '$NEW' already exists at $ROOT/projects/$NEW"
31
- exit 1
32
- fi
33
- if find "$ROOT/_archive" -maxdepth 3 -type d -name "$NEW-*" 2>/dev/null | grep -q .; then
34
- echo "ERROR: An archived project named '$NEW-*' exists. Cannot reuse the slug."
35
- echo " Resolve by unarchiving and re-renaming the archived one, or pick another slug."
36
- exit 1
37
- fi
38
-
39
- # Find all instances
40
- INSTANCES=()
41
- while IFS= read -r path; do
42
- INSTANCES+=("$path")
43
- done < <(find "$ROOT" -type d -path "*/projects/$OLD" -not -path "*/_template/*" -not -path "*/_archive/*" 2>/dev/null | grep -v "^$ROOT/projects/$OLD$" || true)
44
-
45
- TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
46
-
47
- echo "Renaming project: $OLD → $NEW"
48
-
49
- # Move project root
50
- mv "$ROOT/projects/$OLD" "$ROOT/projects/$NEW"
51
- echo " Moved: projects/$OLD/ → projects/$NEW/"
52
-
53
- # Move each instance
54
- for inst in "${INSTANCES[@]}"; do
55
- REL="${inst#$ROOT/}"
56
- PARENT_DIR=$(dirname "$REL")
57
- mv "$inst" "$ROOT/$PARENT_DIR/$NEW"
58
- echo " Moved: $REL/ → $PARENT_DIR/$NEW/"
59
- done
60
-
61
- # Portable sed
62
- SED_INPLACE=(-i)
63
- if [[ "$(uname)" == "Darwin" ]]; then
64
- SED_INPLACE=(-i '')
65
- fi
66
-
67
- # Update content in project CLAUDE.md (replace project name where safe)
68
- PROJECT_CLAUDE="$ROOT/projects/$NEW/CLAUDE.md"
69
- if [ -f "$PROJECT_CLAUDE" ]; then
70
- # Capitalize-aware replace: match the slug as a whole word
71
- sed "${SED_INPLACE[@]}" "s/\\b$OLD\\b/$NEW/g" "$PROJECT_CLAUDE"
72
- echo " Updated: projects/$NEW/CLAUDE.md"
73
- fi
74
-
75
- PROJECT_GUIDANCE="$ROOT/projects/$NEW/GUIDANCE.md"
76
- if [ -f "$PROJECT_GUIDANCE" ]; then
77
- sed "${SED_INPLACE[@]}" "s/\\b$OLD\\b/$NEW/g" "$PROJECT_GUIDANCE"
78
- echo " Updated: projects/$NEW/GUIDANCE.md"
79
- fi
80
-
81
- # Update each instance's config and asset-references
82
- for inst in "${INSTANCES[@]}"; do
83
- REL="${inst#$ROOT/}"
84
- PARENT_DIR=$(dirname "$REL")
85
- NEW_INSTANCE_DIR="$ROOT/$PARENT_DIR/$NEW"
86
-
87
- CONFIG="$NEW_INSTANCE_DIR/config/default.yaml"
88
- if [ -f "$CONFIG" ]; then
89
- sed "${SED_INPLACE[@]}" "s/^project: $OLD$/project: $NEW/" "$CONFIG"
90
- sed "${SED_INPLACE[@]}" "s/\\b$OLD\\b/$NEW/g" "$CONFIG"
91
- echo " Updated: $PARENT_DIR/$NEW/config/default.yaml"
92
- fi
93
-
94
- ASSET_REFS="$NEW_INSTANCE_DIR/asset-references.md"
95
- if [ -f "$ASSET_REFS" ]; then
96
- sed "${SED_INPLACE[@]}" "s/\\b$OLD\\b/$NEW/g" "$ASSET_REFS"
97
- echo " Updated: $PARENT_DIR/$NEW/asset-references.md"
98
- fi
99
- done
100
-
101
- # Surface other files that mention OLD but were NOT auto-updated (lessons, runs, feedback)
102
- echo ""
103
- echo "Files mentioning '$OLD' that were NOT auto-updated (review manually):"
104
- grep -rln "\\b$OLD\\b" "$ROOT/projects/$NEW" "$ROOT"/*/*/projects/"$NEW" 2>/dev/null | grep -vE "(CLAUDE\.md|GUIDANCE\.md|config/default\.yaml|asset-references\.md)$" | sed "s|$ROOT/| - |" || echo " (none found)"
105
-
106
- # Operation log
107
- LOG_DIR="$ROOT/chief-of-staff/logs/$(date +%Y-%m)"
108
- mkdir -p "$LOG_DIR"
109
- LOG_FILE="$LOG_DIR/operations-$(date +%Y-%m-%d).md"
110
- {
111
- echo ""
112
- echo "## $TIMESTAMP — rename-project: $OLD → $NEW"
113
- echo "Folders moved: 1 project + ${#INSTANCES[@]} instances"
114
- } >> "$LOG_FILE"
115
-
116
- echo ""
117
- echo "✓ Rename complete."
118
- echo " Operation log: $LOG_FILE"
@@ -1,115 +0,0 @@
1
- #!/usr/bin/env bash
2
- # unarchive-project.sh — restores a project and its instances from _archive/
3
- # Usage: bash scripts/unarchive-project.sh <project> [archive-suffix]
4
- #
5
- # If archive-suffix not provided, lists matching archives and asks user to specify.
6
-
7
- set -euo pipefail
8
-
9
- if [ $# -lt 1 ]; then
10
- echo "Usage: $0 <project> [archive-suffix]"
11
- exit 1
12
- fi
13
-
14
- PROJECT="$1"
15
- SUFFIX="${2:-}"
16
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
17
- ARCHIVE_PROJECTS="$ROOT/_archive/projects"
18
-
19
- if [ ! -d "$ARCHIVE_PROJECTS" ]; then
20
- echo "ERROR: No archive directory exists. Nothing to restore."
21
- exit 1
22
- fi
23
-
24
- # Find matching archive(s)
25
- MATCHES=()
26
- while IFS= read -r path; do
27
- MATCHES+=("$path")
28
- done < <(find "$ARCHIVE_PROJECTS" -maxdepth 1 -type d -name "$PROJECT-*" 2>/dev/null | sort)
29
-
30
- if [ ${#MATCHES[@]} -eq 0 ]; then
31
- echo "ERROR: No archived project matches '$PROJECT-*' in $ARCHIVE_PROJECTS"
32
- exit 1
33
- fi
34
-
35
- # Determine which archive to restore
36
- if [ -n "$SUFFIX" ]; then
37
- ARCHIVE_DIR="$ARCHIVE_PROJECTS/$PROJECT-$SUFFIX"
38
- if [ ! -d "$ARCHIVE_DIR" ]; then
39
- echo "ERROR: No archive at $ARCHIVE_DIR"
40
- echo "Available archives matching $PROJECT-*:"
41
- for m in "${MATCHES[@]}"; do
42
- echo " - $(basename "$m")"
43
- done
44
- exit 1
45
- fi
46
- else
47
- if [ ${#MATCHES[@]} -gt 1 ]; then
48
- echo "Multiple archives match. Specify which to restore:"
49
- for m in "${MATCHES[@]}"; do
50
- SUFFIX_FROM_NAME="${m##*/$PROJECT-}"
51
- echo " bash $0 $PROJECT $SUFFIX_FROM_NAME"
52
- done
53
- exit 1
54
- fi
55
- ARCHIVE_DIR="${MATCHES[0]}"
56
- SUFFIX="${ARCHIVE_DIR##*/$PROJECT-}"
57
- fi
58
-
59
- # Check live collision
60
- if [ -d "$ROOT/projects/$PROJECT" ]; then
61
- echo "ERROR: A live project already exists at projects/$PROJECT/. Cannot restore over it."
62
- echo "Either rename or archive the existing one first."
63
- exit 1
64
- fi
65
-
66
- # Find archived instances
67
- INSTANCES=()
68
- while IFS= read -r path; do
69
- INSTANCES+=("$path")
70
- done < <(find "$ROOT/_archive" -type d -path "*/projects/$PROJECT-$SUFFIX" -not -path "*/projects/$PROJECT-$SUFFIX/projects/*" 2>/dev/null | grep -v "^$ARCHIVE_DIR$" || true)
71
-
72
- # Check for collisions on each instance's live destination
73
- for inst in "${INSTANCES[@]}"; do
74
- REL="${inst#$ROOT/_archive/}"
75
- PARENT="${REL%/projects/$PROJECT-$SUFFIX}"
76
- LIVE_INSTANCE="$ROOT/$PARENT/projects/$PROJECT"
77
- if [ -d "$LIVE_INSTANCE" ]; then
78
- echo "ERROR: Live instance already exists at $PARENT/projects/$PROJECT/. Cannot restore over it."
79
- exit 1
80
- fi
81
- done
82
-
83
- echo "Restoring: $PROJECT (from suffix: $SUFFIX)"
84
-
85
- # Restore project root
86
- mv "$ARCHIVE_DIR" "$ROOT/projects/$PROJECT"
87
- # Remove ARCHIVED.md (no longer applicable in live state)
88
- rm -f "$ROOT/projects/$PROJECT/ARCHIVED.md"
89
- echo " Restored: _archive/projects/$PROJECT-$SUFFIX/ → projects/$PROJECT/"
90
-
91
- # Restore instances
92
- for inst in "${INSTANCES[@]}"; do
93
- REL="${inst#$ROOT/_archive/}"
94
- PARENT="${REL%/projects/$PROJECT-$SUFFIX}"
95
- LIVE_INSTANCE="$ROOT/$PARENT/projects/$PROJECT"
96
- mkdir -p "$ROOT/$PARENT/projects"
97
- mv "$inst" "$LIVE_INSTANCE"
98
- echo " Restored: _archive/$REL/ → $PARENT/projects/$PROJECT/"
99
- done
100
-
101
- # Operation log
102
- TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
103
- LOG_DIR="$ROOT/chief-of-staff/logs/$(date +%Y-%m)"
104
- mkdir -p "$LOG_DIR"
105
- LOG_FILE="$LOG_DIR/operations-$(date +%Y-%m-%d).md"
106
- {
107
- echo ""
108
- echo "## $TIMESTAMP — unarchive-project: $PROJECT"
109
- echo "From suffix: $SUFFIX"
110
- echo "Instances restored: ${#INSTANCES[@]}"
111
- } >> "$LOG_FILE"
112
-
113
- echo ""
114
- echo "✓ Restore complete."
115
- echo " Operation log: $LOG_FILE"