fraim-framework 2.0.2 → 2.0.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 +1 -1
- package/setup.js +203 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fraim-framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "FRAIM v2: Framework for Rigor-based AI Management - Transform from solo developer to AI manager orchestrating production-ready code with enterprise-grade discipline",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/setup.js
CHANGED
|
@@ -208,7 +208,7 @@ THIS IS THE MOST CRITICAL RULE. Be ethical, truthful, honest above all.
|
|
|
208
208
|
- **Accessibility**: Consider accessibility implications in all designs
|
|
209
209
|
- **Documentation**: Document known limitations and issues
|
|
210
210
|
- **Attribution**: Properly attribute external code sources and inspirations`;
|
|
211
|
-
writeFile('rules/integrity-and-test-ethics.md', integrityContent);
|
|
211
|
+
writeFile('.ai-agents/rules/integrity-and-test-ethics.md', integrityContent);
|
|
212
212
|
logSuccess('Created integrity-and-test-ethics.md');
|
|
213
213
|
|
|
214
214
|
// Create simplicity.md
|
|
@@ -238,7 +238,7 @@ Keep solutions simple and focused, avoid over-engineering.
|
|
|
238
238
|
- Avoid making unrelated changes
|
|
239
239
|
- File separate issues for other problems you discover
|
|
240
240
|
- Keep the scope narrow and well-defined`;
|
|
241
|
-
writeFile('rules/simplicity.md', simplicityContent);
|
|
241
|
+
writeFile('.ai-agents/rules/simplicity.md', simplicityContent);
|
|
242
242
|
logSuccess('Created simplicity.md');
|
|
243
243
|
|
|
244
244
|
// Create architecture.md
|
|
@@ -268,7 +268,7 @@ Maintain clean architectural boundaries by using appropriate technologies for ea
|
|
|
268
268
|
- Use deterministic code for business logic and data processing
|
|
269
269
|
- Select appropriate data storage technologies based on access patterns
|
|
270
270
|
- Choose UI frameworks based on application requirements and team expertise`;
|
|
271
|
-
writeFile('rules/architecture.md', architectureContent);
|
|
271
|
+
writeFile('.ai-agents/rules/architecture.md', architectureContent);
|
|
272
272
|
logSuccess('Created architecture.md');
|
|
273
273
|
|
|
274
274
|
// Create continuous-learning.md
|
|
@@ -299,7 +299,7 @@ Prevent repeating past mistakes by systematically learning from retrospectives,
|
|
|
299
299
|
- Check knowledge base for relevant patterns and anti-patterns
|
|
300
300
|
- Document new learnings after completing work
|
|
301
301
|
- Share insights with the team through appropriate channels`;
|
|
302
|
-
writeFile('rules/continuous-learning.md', continuousLearningContent);
|
|
302
|
+
writeFile('.ai-agents/rules/continuous-learning.md', continuousLearningContent);
|
|
303
303
|
logSuccess('Created continuous-learning.md');
|
|
304
304
|
|
|
305
305
|
// Create successful-debugging-patterns.md
|
|
@@ -332,7 +332,7 @@ Debug issues systematically and convert learnings into test cases.
|
|
|
332
332
|
- Break complex issues into smaller, testable components
|
|
333
333
|
- Document the debugging process and findings
|
|
334
334
|
- Create regression tests that would have caught the issue`;
|
|
335
|
-
writeFile('rules/successful-debugging-patterns.md', debuggingContent);
|
|
335
|
+
writeFile('.ai-agents/rules/successful-debugging-patterns.md', debuggingContent);
|
|
336
336
|
logSuccess('Created successful-debugging-patterns.md');
|
|
337
337
|
}
|
|
338
338
|
|
|
@@ -382,7 +382,7 @@ This workflow guides the design phase for new features or significant changes.
|
|
|
382
382
|
- Comprehensive RFC document
|
|
383
383
|
- Updated issue with implementation tasks
|
|
384
384
|
- Design approval from stakeholders`;
|
|
385
|
-
writeFile('workflows/design.md', designContent);
|
|
385
|
+
writeFile('.ai-agents/workflows/design.md', designContent);
|
|
386
386
|
logSuccess('Created design.md workflow');
|
|
387
387
|
|
|
388
388
|
// Create implement.md
|
|
@@ -432,7 +432,7 @@ This workflow guides the implementation phase after design approval.
|
|
|
432
432
|
- Comprehensive test coverage
|
|
433
433
|
- Updated documentation
|
|
434
434
|
- Pull request ready for review`;
|
|
435
|
-
writeFile('workflows/implement.md', implementContent);
|
|
435
|
+
writeFile('.ai-agents/workflows/implement.md', implementContent);
|
|
436
436
|
logSuccess('Created implement.md workflow');
|
|
437
437
|
|
|
438
438
|
// Create test.md
|
|
@@ -484,7 +484,7 @@ This workflow guides the testing phase to ensure quality and reliability.
|
|
|
484
484
|
- Test evidence documentation
|
|
485
485
|
- Test coverage report
|
|
486
486
|
- Stakeholder approval of test results`;
|
|
487
|
-
writeFile('workflows/test.md', testContent);
|
|
487
|
+
writeFile('.ai-agents/workflows/test.md', testContent);
|
|
488
488
|
logSuccess('Created test.md workflow');
|
|
489
489
|
|
|
490
490
|
// Create resolve.md
|
|
@@ -541,7 +541,7 @@ This workflow guides the process of resolving issues and bugs.
|
|
|
541
541
|
- Fixed implementation
|
|
542
542
|
- Tests that prevent regression
|
|
543
543
|
- Documentation of the resolution`;
|
|
544
|
-
writeFile('workflows/resolve.md', resolveContent);
|
|
544
|
+
writeFile('.ai-agents/workflows/resolve.md', resolveContent);
|
|
545
545
|
logSuccess('Created resolve.md workflow');
|
|
546
546
|
|
|
547
547
|
// Create retrospect.md
|
|
@@ -593,26 +593,23 @@ This workflow guides the process of conducting retrospectives after completing s
|
|
|
593
593
|
- Action items with owners and deadlines
|
|
594
594
|
- Updated processes and guidelines
|
|
595
595
|
- Knowledge sharing with the team`;
|
|
596
|
-
writeFile('workflows/retrospect.md', retrospectContent);
|
|
596
|
+
writeFile('.ai-agents/workflows/retrospect.md', retrospectContent);
|
|
597
597
|
logSuccess('Created retrospect.md workflow');
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// Create project structure
|
|
601
601
|
function createProjectStructure() {
|
|
602
602
|
// Create directories
|
|
603
|
-
ensureDirectory('
|
|
604
|
-
ensureDirectory('
|
|
605
|
-
ensureDirectory('
|
|
606
|
-
ensureDirectory('templates/
|
|
607
|
-
ensureDirectory('templates/
|
|
608
|
-
ensureDirectory('templates/
|
|
609
|
-
ensureDirectory('
|
|
610
|
-
ensureDirectory('
|
|
603
|
+
ensureDirectory('.ai-agents/rules');
|
|
604
|
+
ensureDirectory('.ai-agents/workflows');
|
|
605
|
+
ensureDirectory('.ai-agents/templates/evidence');
|
|
606
|
+
ensureDirectory('.ai-agents/templates/retrospective');
|
|
607
|
+
ensureDirectory('.ai-agents/templates/specs');
|
|
608
|
+
ensureDirectory('.ai-agents/templates/help');
|
|
609
|
+
ensureDirectory('.ai-agents/scripts');
|
|
610
|
+
ensureDirectory('examples/simple-webapp');
|
|
611
611
|
ensureDirectory('.github/workflows');
|
|
612
|
-
ensureDirectory('
|
|
613
|
-
ensureDirectory('agents/claude');
|
|
614
|
-
ensureDirectory('agents/windsurf');
|
|
615
|
-
ensureDirectory('scripts');
|
|
612
|
+
ensureDirectory('docs');
|
|
616
613
|
|
|
617
614
|
logSuccess('Created directory structure');
|
|
618
615
|
|
|
@@ -624,8 +621,8 @@ function createProjectStructure() {
|
|
|
624
621
|
- Could be new tests that need to be added into an existing test suite
|
|
625
622
|
- Could be a new test suite
|
|
626
623
|
`;
|
|
627
|
-
writeFile('
|
|
628
|
-
logSuccess('Created
|
|
624
|
+
writeFile('.ai-agents/templates/specs/BUGSPEC-TEMPLATE.md', bugfixTemplate);
|
|
625
|
+
logSuccess('Created BUGSPEC-TEMPLATE.md');
|
|
629
626
|
|
|
630
627
|
// Create RFC template
|
|
631
628
|
const rfcTemplate = `# RFC: <Title>
|
|
@@ -644,16 +641,20 @@ Owner: <agent>
|
|
|
644
641
|
- Unit: modules & edge cases
|
|
645
642
|
- Integration: API <-> DB <-> external
|
|
646
643
|
- E2E: user flows (happy/sad)`;
|
|
647
|
-
writeFile('
|
|
648
|
-
logSuccess('Created
|
|
644
|
+
writeFile('.ai-agents/templates/specs/FEATURESPEC-TEMPLATE.md', rfcTemplate);
|
|
645
|
+
logSuccess('Created FEATURESPEC-TEMPLATE.md');
|
|
649
646
|
|
|
650
|
-
//
|
|
651
|
-
|
|
647
|
+
// Copy all rule files from the package
|
|
648
|
+
copyRuleFiles();
|
|
652
649
|
logSuccess('Created rule files');
|
|
653
650
|
|
|
654
651
|
// Create workflow templates
|
|
655
652
|
createWorkflowTemplates();
|
|
656
653
|
logSuccess('Created workflow templates');
|
|
654
|
+
|
|
655
|
+
// Copy additional files
|
|
656
|
+
copyAdditionalFiles();
|
|
657
|
+
logSuccess('Copied additional files');
|
|
657
658
|
|
|
658
659
|
// Create basic CODEOWNERS file
|
|
659
660
|
const codeownersContent = `# This file defines the code owners for the repository
|
|
@@ -804,6 +805,180 @@ Owner: <agent>
|
|
|
804
805
|
logSuccess('Created labels.json');
|
|
805
806
|
}
|
|
806
807
|
|
|
808
|
+
// Copy rule files from the package
|
|
809
|
+
function copyRuleFiles() {
|
|
810
|
+
const fs = require('fs');
|
|
811
|
+
const path = require('path');
|
|
812
|
+
|
|
813
|
+
// List of rule files to copy
|
|
814
|
+
const ruleFiles = [
|
|
815
|
+
'agent-testing-guidelines.md',
|
|
816
|
+
'architecture.md',
|
|
817
|
+
'communication.md',
|
|
818
|
+
'continuous-learning.md',
|
|
819
|
+
'git-safe-commands.md',
|
|
820
|
+
'integrity-and-test-ethics.md',
|
|
821
|
+
'local-development.md',
|
|
822
|
+
'merge-requirements.md',
|
|
823
|
+
'pr-workflow-completeness.md',
|
|
824
|
+
'simplicity.md',
|
|
825
|
+
'software-development-lifecycle.md',
|
|
826
|
+
'spike-first-development.md',
|
|
827
|
+
'successful-debugging-patterns.md'
|
|
828
|
+
];
|
|
829
|
+
|
|
830
|
+
// Copy each rule file
|
|
831
|
+
ruleFiles.forEach(file => {
|
|
832
|
+
try {
|
|
833
|
+
const sourcePath = path.join(__dirname, '.ai-agents', 'rules', file);
|
|
834
|
+
const destPath = path.join('.ai-agents', 'rules', file);
|
|
835
|
+
|
|
836
|
+
if (fs.existsSync(sourcePath)) {
|
|
837
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
838
|
+
logSuccess(`Copied ${file}`);
|
|
839
|
+
} else {
|
|
840
|
+
console.log(`⚠️ Warning: ${file} not found in package`);
|
|
841
|
+
}
|
|
842
|
+
} catch (error) {
|
|
843
|
+
console.log(`⚠️ Warning: Could not copy ${file}: ${error.message}`);
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
// Copy workflow files
|
|
848
|
+
const workflowFiles = [
|
|
849
|
+
'design.md',
|
|
850
|
+
'implement.md',
|
|
851
|
+
'resolve.md',
|
|
852
|
+
'retrospect.md',
|
|
853
|
+
'spec.md',
|
|
854
|
+
'test.md'
|
|
855
|
+
];
|
|
856
|
+
|
|
857
|
+
workflowFiles.forEach(file => {
|
|
858
|
+
try {
|
|
859
|
+
const sourcePath = path.join(__dirname, '.ai-agents', 'workflows', file);
|
|
860
|
+
const destPath = path.join('.ai-agents', 'workflows', file);
|
|
861
|
+
|
|
862
|
+
if (fs.existsSync(sourcePath)) {
|
|
863
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
864
|
+
logSuccess(`Copied ${file}`);
|
|
865
|
+
} else {
|
|
866
|
+
console.log(`⚠️ Warning: ${file} not found in package`);
|
|
867
|
+
}
|
|
868
|
+
} catch (error) {
|
|
869
|
+
console.log(`⚠️ Warning: Could not copy ${file}: ${error.message}`);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
|
|
873
|
+
// Copy template files
|
|
874
|
+
const templateFiles = [
|
|
875
|
+
'templates/evidence/Design-Evidence.md',
|
|
876
|
+
'templates/evidence/Implementation-BugEvidence.md',
|
|
877
|
+
'templates/evidence/Implementation-FeatureEvidence.md',
|
|
878
|
+
'templates/evidence/Spec-Evidence.md',
|
|
879
|
+
'templates/help/HelpNeeded.md',
|
|
880
|
+
'templates/retrospective/RETROSPECTIVE-TEMPLATE.md',
|
|
881
|
+
'templates/specs/BUGSPEC-TEMPLATE.md',
|
|
882
|
+
'templates/specs/FEATURESPEC-TEMPLATE.md',
|
|
883
|
+
'templates/specs/TECHSPEC-TEMPLATE.md'
|
|
884
|
+
];
|
|
885
|
+
|
|
886
|
+
templateFiles.forEach(file => {
|
|
887
|
+
try {
|
|
888
|
+
const sourcePath = path.join(__dirname, '.ai-agents', file);
|
|
889
|
+
const destPath = path.join('.ai-agents', file);
|
|
890
|
+
|
|
891
|
+
if (fs.existsSync(sourcePath)) {
|
|
892
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
893
|
+
logSuccess(`Copied ${file}`);
|
|
894
|
+
} else {
|
|
895
|
+
console.log(`⚠️ Warning: ${file} not found in package`);
|
|
896
|
+
}
|
|
897
|
+
} catch (error) {
|
|
898
|
+
console.log(`⚠️ Warning: Could not copy ${file}: ${error.message}`);
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
|
|
902
|
+
// Copy script files
|
|
903
|
+
const scriptFiles = [
|
|
904
|
+
'scripts/cleanup-branch.ts',
|
|
905
|
+
'scripts/exec-with-timeout.ts',
|
|
906
|
+
'scripts/prep-issue.sh'
|
|
907
|
+
];
|
|
908
|
+
|
|
909
|
+
scriptFiles.forEach(file => {
|
|
910
|
+
try {
|
|
911
|
+
const sourcePath = path.join(__dirname, '.ai-agents', file);
|
|
912
|
+
const destPath = path.join('.ai-agents', file);
|
|
913
|
+
|
|
914
|
+
if (fs.existsSync(sourcePath)) {
|
|
915
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
916
|
+
logSuccess(`Copied ${file}`);
|
|
917
|
+
} else {
|
|
918
|
+
console.log(`⚠️ Warning: ${file} not found in package`);
|
|
919
|
+
}
|
|
920
|
+
} catch (error) {
|
|
921
|
+
console.log(`⚠️ Warning: Could not copy ${file}: ${error.message}`);
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
// Copy additional files
|
|
927
|
+
function copyAdditionalFiles() {
|
|
928
|
+
const fs = require('fs');
|
|
929
|
+
const path = require('path');
|
|
930
|
+
|
|
931
|
+
// Copy sample files
|
|
932
|
+
const additionalFiles = [
|
|
933
|
+
'sample_package.json',
|
|
934
|
+
'test-utils.ts',
|
|
935
|
+
'tsconfig.json'
|
|
936
|
+
];
|
|
937
|
+
|
|
938
|
+
additionalFiles.forEach(file => {
|
|
939
|
+
try {
|
|
940
|
+
const sourcePath = path.join(__dirname, file);
|
|
941
|
+
const destPath = file;
|
|
942
|
+
|
|
943
|
+
if (fs.existsSync(sourcePath)) {
|
|
944
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
945
|
+
logSuccess(`Copied ${file}`);
|
|
946
|
+
} else {
|
|
947
|
+
console.log(`⚠️ Warning: ${file} not found in package`);
|
|
948
|
+
}
|
|
949
|
+
} catch (error) {
|
|
950
|
+
console.log(`⚠️ Warning: Could not copy ${file}: ${error.message}`);
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
// Copy examples
|
|
955
|
+
try {
|
|
956
|
+
const examplesSource = path.join(__dirname, 'examples', 'simple-webapp');
|
|
957
|
+
const examplesDest = 'examples/simple-webapp';
|
|
958
|
+
|
|
959
|
+
if (fs.existsSync(examplesSource)) {
|
|
960
|
+
ensureDirectory(examplesDest);
|
|
961
|
+
|
|
962
|
+
const exampleFiles = [
|
|
963
|
+
'example-test.ts',
|
|
964
|
+
'TESTING.md'
|
|
965
|
+
];
|
|
966
|
+
|
|
967
|
+
exampleFiles.forEach(file => {
|
|
968
|
+
const sourcePath = path.join(examplesSource, file);
|
|
969
|
+
const destPath = path.join(examplesDest, file);
|
|
970
|
+
|
|
971
|
+
if (fs.existsSync(sourcePath)) {
|
|
972
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
973
|
+
logSuccess(`Copied examples/simple-webapp/${file}`);
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
} catch (error) {
|
|
978
|
+
console.log(`⚠️ Warning: Could not copy examples: ${error.message}`);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
807
982
|
// Export the main setup function
|
|
808
983
|
function runSetup() {
|
|
809
984
|
console.log('🚀 Setting up FRAIM in current repository...\n');
|