ssci-subagent-skills 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.
- package/CHANGELOG.md +195 -0
- package/LICENSE +21 -0
- package/README.md +529 -0
- package/agents/LITERATURE_EXPERT_INTEGRATION_SUMMARY.md +618 -0
- package/agents/LITERATURE_EXPERT_INTEGRATION_UPDATE.md +284 -0
- package/agents/__pycache__/literature_expert_integration.cpython-312.pyc +0 -0
- package/agents/ant-expert-main.md +127 -0
- package/agents/ant-expert.md +301 -0
- package/agents/chinese-localization-expert.md +261 -0
- package/agents/core_engine.py +375 -0
- package/agents/digital-ecosystem-analyst/digital-ecosystem-analyst.py +507 -0
- package/agents/digital-marx-expert.md +373 -0
- package/agents/digital-transformation-ecosystem-analyst/digital-transformation-ecosystem-analyst.md +76 -0
- package/agents/digital-transformation-innovation-analyst/DATA_CONSTITUTION_REALITY_VERIFIED.py +233 -0
- package/agents/digital-transformation-innovation-analyst/DATA_CONSTITUTION_SKILL_SPECIFICATION.md +357 -0
- package/agents/digital-transformation-innovation-analyst/README_AGENTSILLS_IO_STANDARD.md +418 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst.md +469 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst.py +513 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_DATA_CONSTITUTION.md +299 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_DATA_CONSTITUTION.py +342 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_DATA_CONSTITUTION_TDD.py +615 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_REAL_DATA_TDD.py +291 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_data_real_sources.py +468 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_tdd.py +1126 -0
- package/agents/digital-transformation-innovation-analyst/digital_transformation_innovation-analyst.py +756 -0
- package/agents/digital-transformation-innovation-analyst/tdd_executor.py +203 -0
- package/agents/digital-transformation-innovation-analyst/tdd_runner.py +154 -0
- package/agents/field-analysis-expert-main.md +129 -0
- package/agents/field-analysis-expert.md +231 -0
- package/agents/grounded-theory-agent-implementation.md +431 -0
- package/agents/grounded-theory-expert-v2.md +202 -0
- package/agents/grounded-theory-expert.md +309 -0
- package/agents/literature-expert-v2.md +489 -0
- package/agents/literature-expert.md +639 -0
- package/agents/literature_expert_integration.py +384 -0
- package/agents/references/actor-network-analysis.html +598 -0
- package/agents/references/ant-actor-identification.md +155 -0
- package/agents/references/ant-network-analysis.md +266 -0
- package/agents/references/ant-power-analysis.md +323 -0
- package/agents/references/ant-translation-process.md +185 -0
- package/agents/references/bourdieu-field-analysis.html +805 -0
- package/agents/references/business-ecosystem-analysis.html +598 -0
- package/agents/references/business-model-analysis-implementation-plan.md +199 -0
- package/agents/references/business-model-analysis-plan.md +217 -0
- package/agents/references/business-model-analysis.html +620 -0
- package/agents/references/business-model-coordinator.js +356 -0
- package/agents/references/business-model-expert-agent.js +204 -0
- package/agents/references/data-analysis.html +397 -0
- package/agents/references/did-analysis.html +591 -0
- package/agents/references/digital-durkheim.html +725 -0
- package/agents/references/digital-marx.html +460 -0
- package/agents/references/digital-weber.html +591 -0
- package/agents/references/field-boundary-identification.md +232 -0
- package/agents/references/field-capital-analysis.md +268 -0
- package/agents/references/grounded-theory.html +731 -0
- package/agents/references/msqca-analysis.html +589 -0
- package/agents/references/research-design.html +394 -0
- package/agents/references/social-network-analysis.html +590 -0
- package/agents/references/survey-design.html +577 -0
- package/agents/sna-expert.md +348 -0
- package/common/dependency_config.py +96 -0
- package/common/dependency_manager.py +175 -0
- package/common/smart_dependency_manager.py +331 -0
- package/package.json +81 -0
- package/scripts/postinstall.js +147 -0
- package/scripts/validate-skills.js +209 -0
- package/skills/2025_12_21_cnki-downloader.skill.install/cnki-downloader.skill +0 -0
- package/skills/2025_12_21_cnki-downloader.skill.install/cnki-downloader.skill.install.md +114 -0
- package/skills/COMPLIANCE_REPORT.md +122 -0
- package/skills/INTEGRATION_PLAN.md +405 -0
- package/skills/QWEN.md +230 -0
- package/skills/SKILLS_APPLICATION_MAPPING.md +155 -0
- package/skills/__init__.py +7 -0
- package/skills/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/SKILL.md +195 -0
- package/skills/alienation-analysis/__init__.py +8 -0
- package/skills/alienation-analysis/prompts/core-analysis-framework.md +88 -0
- package/skills/alienation-analysis/prompts/specialized-alienation-analysis.md +190 -0
- package/skills/alienation-analysis/pyproject.toml +36 -0
- package/skills/alienation-analysis/scripts/__init__.py +8 -0
- package/skills/alienation-analysis/scripts/__pycache__/alienation_analysis_engine.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/career_development_evaluation.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/classify_alienation_types.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/consumer_behavior_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/core_analyzer.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/digital_wellbeing_evaluation.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/generate_intervention_plan.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/materialism_assessment.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/relationship_quality_assessment.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/social_network_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/technology_dependency_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/workplace_satisfaction_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/alienation_analysis_engine.py +597 -0
- package/skills/alienation-analysis/scripts/career_development_evaluation.py +512 -0
- package/skills/alienation-analysis/scripts/classify_alienation_types.py +357 -0
- package/skills/alienation-analysis/scripts/consumer_behavior_analysis.py +643 -0
- package/skills/alienation-analysis/scripts/core_analyzer.py +571 -0
- package/skills/alienation-analysis/scripts/digital_wellbeing_evaluation.py +597 -0
- package/skills/alienation-analysis/scripts/generate_intervention_plan.py +358 -0
- package/skills/alienation-analysis/scripts/materialism_assessment.py +528 -0
- package/skills/alienation-analysis/scripts/relationship_quality_assessment.py +621 -0
- package/skills/alienation-analysis/scripts/social_network_analysis.py +802 -0
- package/skills/alienation-analysis/scripts/technology_dependency_analysis.py +534 -0
- package/skills/alienation-analysis/scripts/workplace_satisfaction_analysis.py +340 -0
- package/skills/alienation_analysis/SKILL.md +291 -0
- package/skills/alienation_analysis/__init__.py +1 -0
- package/skills/alienation_analysis/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/alienation_analysis/scripts/__init__.py +1 -0
- package/skills/alienation_analysis/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/ant/SKILL.md +139 -0
- package/skills/ant/pyproject.toml +36 -0
- package/skills/ant/scripts/ant_analysis_with_fallback.py +383 -0
- package/skills/ant-expert/SKILL.md +182 -0
- package/skills/ant-expert/integration_with_trusted_scraper.md +115 -0
- package/skills/ant-expert/modules/__pycache__/network_analysis.cpython-312.pyc +0 -0
- package/skills/ant-expert/modules/__pycache__/participant_identification.cpython-312.pyc +0 -0
- package/skills/ant-expert/modules/__pycache__/translation_process.cpython-312.pyc +0 -0
- package/skills/ant-expert/modules/network_analysis.py +253 -0
- package/skills/ant-expert/modules/participant_identification.py +325 -0
- package/skills/ant-expert/modules/translation_process.py +283 -0
- package/skills/ant-expert/pyproject.toml +27 -0
- package/skills/ant-expert/scripts/ant_expert_analyzer.py +146 -0
- package/skills/ant-expert/test_input.json +82 -0
- package/skills/ant-expert/test_output.json +728 -0
- package/skills/ant-network-analysis/SKILL.md +132 -0
- package/skills/ant-participant-identification/SKILL.md +140 -0
- package/skills/ant-participant-identification/pyproject.toml +35 -0
- package/skills/ant-participant-identification/scripts/identify_participants.py +318 -0
- package/skills/ant-subagent/SKILL.md +60 -0
- package/skills/ant-subagent/modules/network_analysis.py +146 -0
- package/skills/ant-subagent/pyproject.toml +16 -0
- package/skills/ant-translation-process/SKILL.md +144 -0
- package/skills/ant-translation-process/pyproject.toml +35 -0
- package/skills/ant-translation-process/scripts/trace_translation.py +370 -0
- package/skills/ant_relationship_analysis.md +157 -0
- package/skills/arxiv-paper-search/ARXIV_SKILL_COMPLETION_REPORT.md +449 -0
- package/skills/arxiv-paper-search/DEPENDENCY_OPTIMIZATION.md +355 -0
- package/skills/arxiv-paper-search/OPTIMIZATION_SUMMARY.md +213 -0
- package/skills/arxiv-paper-search/README.md +90 -0
- package/skills/arxiv-paper-search/SKILL.md +321 -0
- package/skills/arxiv-paper-search/pyproject.toml +29 -0
- package/skills/arxiv-paper-search/references/ADVANCED_USAGE.md +587 -0
- package/skills/arxiv-paper-search/references/API_REFERENCE.md +350 -0
- package/skills/arxiv-paper-search/references/ARXIV_CATEGORIES.md +249 -0
- package/skills/arxiv-paper-search/references/USER_GUIDE.md +349 -0
- package/skills/arxiv-paper-search/requirements.txt +13 -0
- package/skills/arxiv-paper-search/scripts/__pycache__/arxiv_searcher.cpython-312.pyc +0 -0
- package/skills/arxiv-paper-search/scripts/arxiv_searcher.py +439 -0
- package/skills/arxiv-paper-search/scripts/test_arxiv_searcher.py +307 -0
- package/skills/arxiv-paper-search/test_abstracts.json +461 -0
- package/skills/arxiv-paper-search/test_batch_papers/2009.00804v2_Architectural_Implications_of_.pdf +0 -0
- package/skills/arxiv-paper-search/test_batch_papers/2201.00978v1_PyramidTNT +0 -0
- package/skills/arxiv-paper-search/test_batch_papers/2207.13219v4_Dalorex +0 -0
- package/skills/arxiv-paper-search/test_papers/1706.03762.pdf +0 -0
- package/skills/arxiv-paper-search/test_papers.csv +11 -0
- package/skills/best_practices.md +271 -0
- package/skills/business-ecosystem-analysis/integration_with_trusted_scraper.md +97 -0
- package/skills/business-ecosystem-data-collection/FreeDataCrawler.js +472 -0
- package/skills/business-ecosystem-data-collection/INFO.md +68 -0
- package/skills/business-ecosystem-data-collection/SKILL.md +118 -0
- package/skills/business-ecosystem-data-collection/algorithms/data_validation.py +44 -0
- package/skills/business-ecosystem-data-collection/algorithms/entity_recognition.py +53 -0
- package/skills/business-ecosystem-data-collection/algorithms/relationship_mapping.py +44 -0
- package/skills/business-ecosystem-data-collection/config.json +10 -0
- package/skills/business-ecosystem-data-collection/e2e-test.js +81 -0
- package/skills/business-ecosystem-data-collection/package-lock.json +433 -0
- package/skills/business-ecosystem-data-collection/package.json +21 -0
- package/skills/business-ecosystem-data-collection/references/data-collection-strategies.md +18 -0
- package/skills/business-ecosystem-data-collection/references/data-validation.md +22 -0
- package/skills/business-ecosystem-data-collection/references/entity-recognition.md +16 -0
- package/skills/business-ecosystem-data-collection/references/relationship-mapping.md +16 -0
- package/skills/business-ecosystem-data-collection/scripts/ecosystem_data_collector.py +103 -0
- package/skills/business-ecosystem-data-collection/skill.js +1383 -0
- package/skills/business-ecosystem-data-collection/skill.json +191 -0
- package/skills/business-ecosystem-data-collection/test.js +304 -0
- package/skills/business-ecosystem-data-collection/test_context.json +16 -0
- package/skills/business-model-analysis/INFO.md +65 -0
- package/skills/business-model-analysis/SKILL.md +208 -0
- package/skills/business-model-analysis/e2e-test.js +111 -0
- package/skills/business-model-analysis/integration_with_trusted_scraper.md +97 -0
- package/skills/business-model-analysis/package.json +23 -0
- package/skills/business-model-analysis/skill.js +1779 -0
- package/skills/business-model-analysis/skill.json +175 -0
- package/skills/business-model-analysis/test.js +202 -0
- package/skills/business-model-canvas-analysis/INFO.md +68 -0
- package/skills/business-model-canvas-analysis/README.md +53 -0
- package/skills/business-model-canvas-analysis/SKILL.md +215 -0
- package/skills/business-model-canvas-analysis/prompts.txt +70 -0
- package/skills/business-model-canvas-analysis/reference.md +101 -0
- package/skills/business-model-canvas-analysis/skill.js +675 -0
- package/skills/business-model-canvas-analysis/skill.json +47 -0
- package/skills/business-service-supply-analysis/INFO.md +28 -0
- package/skills/business-service-supply-analysis/SKILL.md +300 -0
- package/skills/business-service-supply-analysis/skill.js +1319 -0
- package/skills/business-service-supply-analysis/skill.json +233 -0
- package/skills/capital-analysis/INFO.md +80 -0
- package/skills/capital-analysis/README.md +65 -0
- package/skills/capital-analysis/SKILL.md +367 -0
- package/skills/capital-analysis/prompts.txt +103 -0
- package/skills/capital-analysis/reference.md +132 -0
- package/skills/capital-analysis/skill.js +739 -0
- package/skills/capital-analysis/skill.json +268 -0
- package/skills/checking-theory-saturation/SKILL.md +280 -0
- package/skills/checking-theory-saturation/pyproject.toml +17 -0
- package/skills/checking-theory-saturation/references/README.md +54 -0
- package/skills/checking-theory-saturation/scripts/__pycache__/assess_saturation.cpython-312.pyc +0 -0
- package/skills/checking-theory-saturation/scripts/assess_saturation.py +296 -0
- package/skills/checking-theory-saturation/tests/__pycache__/test_assess_saturation.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/checking-theory-saturation/tests/test_assess_saturation.py +194 -0
- package/skills/class-structure-analysis/SKILL.md +211 -0
- package/skills/competitive-analysis/INFO.md +77 -0
- package/skills/competitive-analysis/README.md +61 -0
- package/skills/competitive-analysis/SKILL.md +357 -0
- package/skills/competitive-analysis/prompts.txt +117 -0
- package/skills/competitive-analysis/reference.md +206 -0
- package/skills/competitive-analysis/skill.js +1166 -0
- package/skills/competitive-analysis/skill.json +219 -0
- package/skills/conflict-resolution/SKILL.md +124 -0
- package/skills/conflict-resolution/conflict-resolution-skill.md +628 -0
- package/skills/data-analysis/SKILL.md +73 -0
- package/skills/data-analysis/prompts/data-cleaning-outline.md +355 -0
- package/skills/data-analysis/prompts/data-cleaning.md +40 -0
- package/skills/data-analysis/prompts/data-understanding-outline.md +243 -0
- package/skills/data-analysis/prompts/data-understanding.md +43 -0
- package/skills/data-analysis/prompts/exploratory-analysis-outline.md +316 -0
- package/skills/data-analysis/prompts/exploratory-analysis.md +40 -0
- package/skills/data-analysis/prompts/modeling-strategy.md +40 -0
- package/skills/data-analysis/pyproject.toml +39 -0
- package/skills/dependency_management.md +46 -0
- package/skills/dialectical-quantitative-synthesis/SKILL.md +239 -0
- package/skills/did-analysis/SKILL.md +239 -0
- package/skills/did-analysis/prompts/causal-interpretation.md +245 -0
- package/skills/did-analysis/prompts/experimental-design.md +260 -0
- package/skills/did-analysis/prompts/model-specification.md +242 -0
- package/skills/did-analysis/prompts/policy-recommendation.md +253 -0
- package/skills/did-analysis/pyproject.toml +35 -0
- package/skills/did-analysis/references/BEST_PRACTICES.md +553 -0
- package/skills/did-analysis/scripts/__pycache__/did_estimator.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/integrated_did.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/parallel_trend.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/robustness_test.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/visualization.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/did_estimator.py +553 -0
- package/skills/did-analysis/scripts/integrated_did.py +867 -0
- package/skills/did-analysis/scripts/parallel_trend.py +473 -0
- package/skills/did-analysis/scripts/parallel_trend_plot.png +0 -0
- package/skills/did-analysis/scripts/parallel_trend_test.png +0 -0
- package/skills/did-analysis/scripts/placebo_test_distribution.png +0 -0
- package/skills/did-analysis/scripts/robustness_test.py +633 -0
- package/skills/did-analysis/scripts/test_integration.py +253 -0
- package/skills/did-analysis/scripts/visualization.py +539 -0
- package/skills/digital-durkheim/SKILL.md +114 -0
- package/skills/digital-durkheim/prompts/collective-consciousness.md +127 -0
- package/skills/digital-durkheim/prompts/functional-analysis.md +127 -0
- package/skills/digital-durkheim/prompts/social-fact-identification.md +128 -0
- package/skills/digital-durkheim/prompts/social-solidarity.md +134 -0
- package/skills/digital-durkheim/pyproject.toml +36 -0
- package/skills/digital-durkheim/scripts/__pycache__/integrated_durkheim_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-durkheim/scripts/__pycache__/social_fact_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-durkheim/scripts/durkheim_analysis_results.json +226 -0
- package/skills/digital-durkheim/scripts/integrated_durkheim_analyzer.py +540 -0
- package/skills/digital-durkheim/scripts/social_fact_analyzer.py +712 -0
- package/skills/digital-durkheim/test_integration.py +226 -0
- package/skills/digital-marx/README.md +215 -0
- package/skills/digital-marx/SHORT_TERM_IMPLEMENTATION_REPORT.md +183 -0
- package/skills/digital-marx/SKILL.md +189 -0
- package/skills/digital-marx/THEORETICAL_ACCURACY_ANALYSIS.md +278 -0
- package/skills/digital-marx/prompts/material-base-analysis.md +113 -0
- package/skills/digital-marx/prompts/production-relations-analysis.md +113 -0
- package/skills/digital-marx/prompts/social-change-prediction.md +112 -0
- package/skills/digital-marx/prompts/superstructure-analysis.md +112 -0
- package/skills/digital-marx/pyproject.toml +37 -0
- package/skills/digital-marx/scripts/__pycache__/dialectical_thinking_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-marx/scripts/__pycache__/enhanced_historical_materialism_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-marx/scripts/__pycache__/historical_materialism_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-marx/scripts/basic_quality_detector.py +760 -0
- package/skills/digital-marx/scripts/dialectical_thinking_analyzer.py +1601 -0
- package/skills/digital-marx/scripts/enhanced_historical_materialism_analyzer.py +1525 -0
- package/skills/digital-marx/scripts/historical_materialism_analyzer.py +963 -0
- package/skills/digital-marx/scripts/integrated_marx_analyzer.py +932 -0
- package/skills/digital-marx/scripts/marxist_theory_validator.py +1192 -0
- package/skills/digital-marx/scripts/quality_validator.py +890 -0
- package/skills/digital-marx-expert/SKILL.md +179 -0
- package/skills/digital-marx-expert/modules/__pycache__/capital_analysis.cpython-312.pyc +0 -0
- package/skills/digital-marx-expert/modules/__pycache__/class_analysis.cpython-312.pyc +0 -0
- package/skills/digital-marx-expert/modules/__pycache__/historical_materialism.cpython-312.pyc +0 -0
- package/skills/digital-marx-expert/modules/capital_analysis.py +611 -0
- package/skills/digital-marx-expert/modules/class_analysis.py +836 -0
- package/skills/digital-marx-expert/modules/historical_materialism.py +435 -0
- package/skills/digital-marx-expert/pyproject.toml +29 -0
- package/skills/digital-marx-expert/scripts/digital_marx_expert_analyzer.py +189 -0
- package/skills/digital-marx-expert/test_input.json +100 -0
- package/skills/digital-marx-expert/test_output.json +588 -0
- package/skills/digital-transformation/business-innovation-pathway-planning.SKILL.md +102 -0
- package/skills/digital-transformation/business-model-reconstruction.SKILL.md +88 -0
- package/skills/digital-transformation/business-scene-deconstruction-analysis.SKILL.md +131 -0
- package/skills/digital-transformation/config.json +16 -0
- package/skills/digital-transformation/config_host_llm.json +311 -0
- package/skills/digital-transformation/config_llm.json +297 -0
- package/skills/digital-transformation/digitization-deconstruction-analysis.SKILL.md +84 -0
- package/skills/digital-transformation/innovation-niche-identification.SKILL.md +78 -0
- package/skills/digital-transformation/intelligent-transformation-deconstruction-analysis.SKILL.md +110 -0
- package/skills/digital-transformation/online-transformation-deconstruction-analysis.SKILL.md +110 -0
- package/skills/digital-transformation/scripts/data_integrator.py +637 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer.py +800 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_agentskills_io.py +1677 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_host_cli.py +834 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_host_llm.py +1026 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_llm.py +957 -0
- package/skills/digital-transformation/scripts/host_cli_interface.py +531 -0
- package/skills/digital-transformation/scripts/llm_client.py +662 -0
- package/skills/digital-transformation/scripts/skill_executor.py +527 -0
- package/skills/digital-transformation/scripts/transformation_visualizer.py +946 -0
- package/skills/digital-transformation/test_context.json +6 -0
- package/skills/digital-transformation/tests/test_digital_transformation.py +844 -0
- package/skills/digital-weber/SKILL.md +88 -0
- package/skills/digital-weber/prompts/comparative-research.md +155 -0
- package/skills/digital-weber/prompts/institutional-analysis.md +147 -0
- package/skills/digital-weber/prompts/theoretical-interpretation.md +102 -0
- package/skills/digital-weber/prompts/understanding-analysis.md +129 -0
- package/skills/digital-weber/pyproject.toml +36 -0
- package/skills/digital-weber/scripts/__pycache__/integrated_weber_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-weber/scripts/__pycache__/optimized_weberian_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-weber/scripts/__pycache__/weberian_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-weber/scripts/enhanced_weberian_analyzer.py +531 -0
- package/skills/digital-weber/scripts/integrated_weber_analyzer.py +772 -0
- package/skills/digital-weber/scripts/optimized_weberian_analyzer.py +713 -0
- package/skills/digital-weber/scripts/weber_analysis_results.json +196 -0
- package/skills/digital-weber/scripts/weberian_analyzer.py +877 -0
- package/skills/digital-weber/simple_quality_test.py +204 -0
- package/skills/digital-weber/test_comprehensive.py +320 -0
- package/skills/digital-weber/test_quality_improvement.py +237 -0
- package/skills/dissent-resolution/SKILL.md +159 -0
- package/skills/ecosystem-analysis/analyzing-business-model-of-key-species.SKILL.md +31 -0
- package/skills/ecosystem-analysis/analyzing-digital-transformation-impact-on-business.SKILL.md +36 -0
- package/skills/ecosystem-analysis/assessing-ecosystem-impact-of-digital-transformation.SKILL.md +36 -0
- package/skills/ecosystem-analysis/config.json +15 -0
- package/skills/ecosystem-analysis/constructing-business-ecosystem-map.SKILL.md +31 -0
- package/skills/ecosystem-analysis/identifying-key-species-in-industry.SKILL.md +30 -0
- package/skills/ecosystem-analysis/performing-industry-ecosystem-analysis.SKILL.md +79 -0
- package/skills/ecosystem-analysis/references/industry-life-cycle.md +29 -0
- package/skills/ecosystem-analysis/references/value-chain-analysis.md +28 -0
- package/skills/ecosystem-analysis/scripts/business_ecosystem_analyzer.py +640 -0
- package/skills/ecosystem-analysis/scripts/data_collector.py +239 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_analysis.py +309 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_data_integrator.py +620 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_preprocessing.py +262 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_visualizer.py +811 -0
- package/skills/ecosystem-analysis/test_context.json +6 -0
- package/skills/ecosystem-analysis/tests/test_ecosystem_analysis.py +1193 -0
- package/skills/ecosystem-relationship-analysis/INFO.md +28 -0
- package/skills/ecosystem-relationship-analysis/SKILL.md +147 -0
- package/skills/ecosystem-relationship-analysis/algorithms/community_detection.py +128 -0
- package/skills/ecosystem-relationship-analysis/algorithms/health_assessment.py +53 -0
- package/skills/ecosystem-relationship-analysis/algorithms/network_analysis.py +171 -0
- package/skills/ecosystem-relationship-analysis/config.json +10 -0
- package/skills/ecosystem-relationship-analysis/references/community-detection.md +24 -0
- package/skills/ecosystem-relationship-analysis/references/ecosystem-theory.md +23 -0
- package/skills/ecosystem-relationship-analysis/references/health-assessment.md +23 -0
- package/skills/ecosystem-relationship-analysis/references/network-analysis-theory.md +19 -0
- package/skills/ecosystem-relationship-analysis/references/relationship-analysis.md +27 -0
- package/skills/ecosystem-relationship-analysis/scripts/ecosystem_relationship_analyzer.py +155 -0
- package/skills/ecosystem-relationship-analysis/skill.js +797 -0
- package/skills/ecosystem-relationship-analysis/skill.json +205 -0
- package/skills/field-analysis/SKILL.md +145 -0
- package/skills/field-boundary-identification/SKILL.md +156 -0
- package/skills/field-boundary-identification/pyproject.toml +36 -0
- package/skills/field-boundary-identification/scripts/identify_boundaries.py +326 -0
- package/skills/field-capital-analysis/SKILL.md +165 -0
- package/skills/field-expert/SKILL.md +409 -0
- package/skills/field-expert/WORKFLOW_SPEC.md +195 -0
- package/skills/field-expert/field_analysis_workflow/input/processed/combined_input.json +247 -0
- package/skills/field-expert/field_analysis_workflow/input/processed/llm_input.json +76 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/01_boundary/boundary_results.json +6 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/02_capital/capital_results.json +5 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/03_habitus/habitus_results.json +120 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/04_dynamics/dynamics_results.json +6 -0
- package/skills/field-expert/field_analysis_workflow/output/executive_summary.txt +35 -0
- package/skills/field-expert/field_analysis_workflow/output/json/comprehensive_analysis.json +180 -0
- package/skills/field-expert/field_analysis_workflow/output/reports/field_analysis_report.html +22 -0
- package/skills/field-expert/modules/__pycache__/boundary_analysis.cpython-312.pyc +0 -0
- package/skills/field-expert/modules/__pycache__/capital_analysis.cpython-312.pyc +0 -0
- package/skills/field-expert/modules/__pycache__/habitus_analysis.cpython-312.pyc +0 -0
- package/skills/field-expert/modules/boundary_analysis.py +234 -0
- package/skills/field-expert/modules/capital_analysis.py +407 -0
- package/skills/field-expert/modules/habitus_analysis.py +306 -0
- package/skills/field-expert/prompts/boundary_analysis.txt +56 -0
- package/skills/field-expert/prompts/boundary_analysis_simple.txt +17 -0
- package/skills/field-expert/prompts/capital_analysis.txt +87 -0
- package/skills/field-expert/prompts/dynamics_analysis.txt +89 -0
- package/skills/field-expert/prompts/habitus_analysis.txt +87 -0
- package/skills/field-expert/pyproject.toml +27 -0
- package/skills/field-expert/scripts/__pycache__/field_analysis_tool.cpython-312.pyc +0 -0
- package/skills/field-expert/scripts/__pycache__/prepare_data.cpython-312.pyc +0 -0
- package/skills/field-expert/scripts/debug_output.txt +4 -0
- package/skills/field-expert/scripts/debug_output_converted.txt +27 -0
- package/skills/field-expert/scripts/field_analysis_tool.py +536 -0
- package/skills/field-expert/scripts/field_expert_analyzer.py +136 -0
- package/skills/field-expert/scripts/generate_report.py +525 -0
- package/skills/field-expert/scripts/prepare_data.py +226 -0
- package/skills/field-expert/scripts/run_workflow.py +571 -0
- package/skills/field-expert/scripts/summarize_data.py +156 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_213035_964505.txt +135 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_213534_264265.txt +16 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_213932_601575.txt +22 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_214330_241706.txt +15 -0
- package/skills/field-expert/scripts/test_host_llm.py +164 -0
- package/skills/field-expert/scripts/test_stigmergy_llm.py +91 -0
- package/skills/field-expert/test_input.json +168 -0
- package/skills/field-expert/test_output.json +724 -0
- package/skills/field-expert/workflow_spec.json +171 -0
- package/skills/field-habitus-analysis/SKILL.md +165 -0
- package/skills/fsqca-analysis/SKILL.md +71 -0
- package/skills/fsqca-analysis/assets/templates/report_template.md +122 -0
- package/skills/fsqca-analysis/comprehensive_test.py +573 -0
- package/skills/fsqca-analysis/comprehensive_test_report.json +207 -0
- package/skills/fsqca-analysis/comprehensive_test_report.md +35 -0
- package/skills/fsqca-analysis/fsqca_analysis_report.md +35 -0
- package/skills/fsqca-analysis/prompts/calibration-guidance-outline.md +142 -0
- package/skills/fsqca-analysis/prompts/calibration-guidance.md +40 -0
- package/skills/fsqca-analysis/prompts/result-interpretation-outline.md +133 -0
- package/skills/fsqca-analysis/prompts/result-interpretation.md +45 -0
- package/skills/fsqca-analysis/prompts/theoretical-analysis-outline.md +75 -0
- package/skills/fsqca-analysis/prompts/theoretical-analysis.md +34 -0
- package/skills/fsqca-analysis/pyproject.toml +36 -0
- package/skills/fsqca-analysis/references/BEST_PRACTICES-outline.md +158 -0
- package/skills/fsqca-analysis/references/BEST_PRACTICES.md +39 -0
- package/skills/fsqca-analysis/references/METHODOLOGY-outline.md +103 -0
- package/skills/fsqca-analysis/references/METHODOLOGY.md +38 -0
- package/skills/fsqca-analysis/scripts/__pycache__/calibration.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/__pycache__/integrated_analysis.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/__pycache__/minimization.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/__pycache__/truth_table.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/calibration.py +540 -0
- package/skills/fsqca-analysis/scripts/integrated_analysis.py +651 -0
- package/skills/fsqca-analysis/scripts/minimization.py +536 -0
- package/skills/fsqca-analysis/scripts/truth_table.py +433 -0
- package/skills/fsqca-analysis/test_fsqca.py +199 -0
- package/skills/fusion_plan.md +232 -0
- package/skills/grounded-theory-expert/SKILL.md +180 -0
- package/skills/grounded-theory-expert/pyproject.toml +23 -0
- package/skills/grounded-theory-expert/scripts/gt_expert_analyzer.py +185 -0
- package/skills/grounded-theory-expert/stages/__pycache__/axial_coding.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/stages/__pycache__/open_coding.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/stages/__pycache__/selective_coding.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/stages/axial_coding.py +294 -0
- package/skills/grounded-theory-expert/stages/open_coding.py +245 -0
- package/skills/grounded-theory-expert/stages/selective_coding.py +410 -0
- package/skills/grounded-theory-expert/test_input.json +27 -0
- package/skills/grounded-theory-expert/test_output.json +874 -0
- package/skills/grounded-theory-expert/tests/sample-cases/hongloumeng.txt +91 -0
- package/skills/grounded-theory-expert/tests/sample-cases/sanguoyanyi_excerpts.txt +169 -0
- package/skills/grounded-theory-expert/tests/sample-cases/shuihuzhuan_excerpts.txt +216 -0
- package/skills/grounded-theory-expert/tests/sample-cases/xiyouji_excerpts.txt +100 -0
- package/skills/grounded-theory-expert/tests/sample-cases//345/233/233/345/244/247/345/220/215/350/221/227ANT/345/210/206/346/236/220/346/212/245/345/221/212.md +283 -0
- package/skills/grounded-theory-expert/tools/__pycache__/memo_writer.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/tools/__pycache__/saturation_checker.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/tools/memo_writer.py +512 -0
- package/skills/grounded-theory-expert/tools/saturation_checker.py +345 -0
- package/skills/grounded-theory-expert-enhanced/SKILL.md +218 -0
- package/skills/grounded-theory-expert-enhanced/docs/00_master_guide.md +276 -0
- package/skills/grounded-theory-expert-enhanced/docs/01_quick_start.md +59 -0
- package/skills/grounded-theory-expert-enhanced/docs/02_task_flow.md +464 -0
- package/skills/grounded-theory-expert-enhanced/docs/03_path/350/247/204/350/214/203.md +161 -0
- package/skills/grounded-theory-expert-enhanced/docs/04_html_report.md +340 -0
- package/skills/grounded-theory-expert-enhanced/docs/05_best_practices.md +322 -0
- package/skills/grounded-theory-expert-enhanced/docs/FLOW_GUIDE.md +280 -0
- package/skills/grounded-theory-expert-enhanced/docs/LLM/350/260/203/347/224/250/346/250/241/346/213/237/346/265/201/347/250/213.md +299 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/constructivist_expert.md +64 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/localization_expert.md +66 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/phenomenological_expert.md +64 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/positivist_expert.md +67 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/level1_prompts.md +174 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/level2_prompts.md +176 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/level3_prompts.md +219 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/preprocessing_prompts.md +120 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/quality_standards.md +166 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/reliability_methods.md +159 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/saturation_methods.md +193 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/theory_construction.md +166 -0
- package/skills/grounded-theory-expert-enhanced/pyproject.toml +33 -0
- package/skills/grounded-theory-expert-enhanced/references/llm_integration_principles.md +56 -0
- package/skills/grounded-theory-expert-enhanced/scripts/preprocessing_script.py +191 -0
- package/skills/grounded-theory-expert-enhanced/stages/enhanced_axial_coding.py +146 -0
- package/skills/grounded-theory-expert-enhanced/stages/enhanced_open_coding.py +94 -0
- package/skills/grounded-theory-expert-enhanced/stages/enhanced_selective_coding.py +163 -0
- package/skills/grounded-theory-expert-enhanced/tools/.env.example +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/LLM_CONFIG_GUIDE.md +67 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/analysis_controller.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/host_cli_coder.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/llm_expert_coder.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/project_structure.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/reliability_validator.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/analysis_controller.py +2344 -0
- package/skills/grounded-theory-expert-enhanced/tools/enhanced_memo_writer.py +90 -0
- package/skills/grounded-theory-expert-enhanced/tools/enhanced_saturation_checker.py +216 -0
- package/skills/grounded-theory-expert-enhanced/tools/fix_dirs.py +48 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/00_raw_data/source_document.txt +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/01_preprocessing/preprocessing_report.json +15 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/01_preprocessing/text_cleaned/cleaned_text.txt +198 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/01_preprocessing/text_tokenized/tokenized_text.json +1099 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_1%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_1%/segment_text.txt +20 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_2%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_2%/segment_text.txt +21 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_3%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_3%/segment_text.txt +23 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_70%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_70%/segment_text.txt +135 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segmentation_summary.json +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_constructivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_constructivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_constructivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_localization/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_localization/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_localization/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_phenomenological/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_phenomenological/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_phenomenological/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_positivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_positivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_positivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/level1_all_experts_summary.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_achievement/consensus_report.json +13 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_achievement/merged_concept_library.json +308 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_calculation/cohens_kappa.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_calculation/fleiss_kappa.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_calculation/krippendorff_alpha.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_constructivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_localization/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_phenomenological/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_positivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/level2_all_experts_summary.json +31 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/06_level2_consensus/divergence_resolution/divergence_report.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/06_level2_consensus/divergence_resolution/merged_category_library.json +7 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/06_level2_consensus/divergence_resolution/paradigm_model.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_constructivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_localization/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_phenomenological/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_positivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/level3_all_experts_summary.json +30 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/08_level3_consensus/consensus_calculation/core_category_comparison.json +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/08_level3_consensus/theoretical_integration/final_theoretical_integration.json +52 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/08_level3_consensus/theoretical_integration/theory_description.md +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/final_saturation_verdict.json +32 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_100/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_70/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_80/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_90/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/codebook.md +84 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/comprehensive_analysis_report.md +360 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/project_summary.json +214 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/theory_description.md +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/config.json +68 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/project_manifest.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/host_cli_coder.py +168 -0
- package/skills/grounded-theory-expert-enhanced/tools/llm_expert_coder.py +469 -0
- package/skills/grounded-theory-expert-enhanced/tools/project_structure.py +1202 -0
- package/skills/grounded-theory-expert-enhanced/tools/reliability_validator.py +800 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/00_raw_data/source_document.txt +169 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/01_preprocessing/preprocessing_report.json +15 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/01_preprocessing/text_cleaned/cleaned_text.txt +200 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/01_preprocessing/text_tokenized/tokenized_text.json +1109 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_1%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_1%/segment_text.txt +22 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_2%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_2%/segment_text.txt +18 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_3%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_3%/segment_text.txt +24 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_70%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_70%/segment_text.txt +134 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segmentation_summary.json +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_constructivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_constructivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_constructivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_localization/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_localization/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_localization/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_phenomenological/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_phenomenological/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_phenomenological/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_positivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_positivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_positivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/level1_all_experts_summary.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_achievement/consensus_report.json +13 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_achievement/merged_concept_library.json +308 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_calculation/cohens_kappa.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_calculation/fleiss_kappa.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_calculation/krippendorff_alpha.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_constructivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_localization/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_phenomenological/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_positivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/level2_all_experts_summary.json +31 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/06_level2_consensus/divergence_resolution/divergence_report.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/06_level2_consensus/divergence_resolution/merged_category_library.json +7 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/06_level2_consensus/divergence_resolution/paradigm_model.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_constructivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_localization/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_phenomenological/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_positivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/level3_all_experts_summary.json +30 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/08_level3_consensus/consensus_calculation/core_category_comparison.json +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/08_level3_consensus/theoretical_integration/final_theoretical_integration.json +52 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/08_level3_consensus/theoretical_integration/theory_description.md +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/final_saturation_verdict.json +32 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_100/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_70/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_80/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_90/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/codebook.md +84 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/comprehensive_analysis_report.md +360 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/project_summary.json +214 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/theory_description.md +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/config.json +68 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/project_manifest.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_claude.py +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_host_cli_coder.py +168 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/00_raw_data/source_document.txt +11 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/01_preprocessing/preprocessing_report.json +15 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/01_preprocessing/text_cleaned/cleaned_text.txt +16 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/01_preprocessing/text_tokenized/tokenized_text.json +129 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_1%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_1%/segment_text.txt +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_2%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_2%/segment_text.txt +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_3%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_3%/segment_text.txt +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_70%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_70%/segment_text.txt +11 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segmentation_summary.json +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_constructivist/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_constructivist/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_constructivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_localization/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_localization/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_localization/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_phenomenological/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_phenomenological/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_phenomenological/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_positivist/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_positivist/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_positivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/level1_all_experts_summary.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_achievement/consensus_report.json +13 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_achievement/merged_concept_library.json +278 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_calculation/cohens_kappa.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_calculation/fleiss_kappa.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_calculation/krippendorff_alpha.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_constructivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_localization/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_phenomenological/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_positivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/level2_all_experts_summary.json +31 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/06_level2_consensus/divergence_resolution/divergence_report.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/06_level2_consensus/divergence_resolution/merged_category_library.json +7 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/06_level2_consensus/divergence_resolution/paradigm_model.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_constructivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_localization/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_phenomenological/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_positivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/level3_all_experts_summary.json +30 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/08_level3_consensus/consensus_calculation/core_category_comparison.json +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/08_level3_consensus/theoretical_integration/final_theoretical_integration.json +52 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/08_level3_consensus/theoretical_integration/theory_description.md +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/final_saturation_verdict.json +32 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_100/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_70/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_80/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_90/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/codebook.md +84 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/comprehensive_analysis_report.md +360 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/project_summary.json +214 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/theory_description.md +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/config.json +68 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/project_manifest.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_real_coding.py +135 -0
- package/skills/historical-materialist-analysis/SKILL.md +186 -0
- package/skills/information-verification/INFO.md +69 -0
- package/skills/information-verification/README.md +80 -0
- package/skills/information-verification/SKILL.md +305 -0
- package/skills/information-verification/prompts.txt +103 -0
- package/skills/information-verification/reference.md +212 -0
- package/skills/information-verification/skill.js +1056 -0
- package/skills/information-verification/skill.json +198 -0
- package/skills/management-theory-analysis/INFO.md +74 -0
- package/skills/management-theory-analysis/README.md +63 -0
- package/skills/management-theory-analysis/SKILL.md +361 -0
- package/skills/management-theory-analysis/prompts.txt +113 -0
- package/skills/management-theory-analysis/reference.md +167 -0
- package/skills/management-theory-analysis/skill.js +561 -0
- package/skills/management-theory-analysis/skill.json +223 -0
- package/skills/mathematical-statistics/SKILL.md +227 -0
- package/skills/mathematical-statistics/pyproject.toml +36 -0
- package/skills/mathematical-statistics/scripts/statistics_toolkit.py +270 -0
- package/skills/msqca-analysis/SKILL.md +261 -0
- package/skills/msqca-analysis/assets/templates/data_template.csv +11 -0
- package/skills/msqca-analysis/assets/templates/report_template.md +188 -0
- package/skills/msqca-analysis/integrated_analysis_report.md +35 -0
- package/skills/msqca-analysis/prompts/calibration-guidance.md +251 -0
- package/skills/msqca-analysis/prompts/result-interpretation.md +253 -0
- package/skills/msqca-analysis/prompts/theoretical-analysis.md +172 -0
- package/skills/msqca-analysis/pyproject.toml +37 -0
- package/skills/msqca-analysis/references/BEST_PRACTICES.md +612 -0
- package/skills/msqca-analysis/references/METHODOLOGY.md +282 -0
- package/skills/msqca-analysis/scripts/__pycache__/calibration.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/__pycache__/integrated_analysis.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/__pycache__/minimization.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/__pycache__/truth_table.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/calibration.py +341 -0
- package/skills/msqca-analysis/scripts/integrated_analysis.py +621 -0
- package/skills/msqca-analysis/scripts/integrated_analysis_report.md +35 -0
- package/skills/msqca-analysis/scripts/minimization.py +580 -0
- package/skills/msqca-analysis/scripts/truth_table.py +438 -0
- package/skills/network-computation/SKILL.md +270 -0
- package/skills/network-computation/pyproject.toml +34 -0
- package/skills/network-computation/scripts/calculate_centrality.py +213 -0
- package/skills/network-computation-expert/SKILL.md +183 -0
- package/skills/network-computation-expert/modules/__pycache__/centrality_analysis.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/__pycache__/community_detection.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/__pycache__/data_processing.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/__pycache__/network_construction.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/centrality_analysis.py +438 -0
- package/skills/network-computation-expert/modules/community_detection.py +467 -0
- package/skills/network-computation-expert/modules/data_processing.py +467 -0
- package/skills/network-computation-expert/modules/network_construction.py +460 -0
- package/skills/network-computation-expert/pyproject.toml +27 -0
- package/skills/network-computation-expert/scripts/network_computation_expert_analyzer.py +208 -0
- package/skills/network-computation-expert/test_input.json +140 -0
- package/skills/network-computation-expert/test_output.json +627 -0
- package/skills/operations-analysis/INFO.md +76 -0
- package/skills/operations-analysis/README.md +61 -0
- package/skills/operations-analysis/SKILL.md +365 -0
- package/skills/operations-analysis/prompts.txt +109 -0
- package/skills/operations-analysis/pyproject.toml +35 -0
- package/skills/operations-analysis/reference.md +178 -0
- package/skills/operations-analysis/skill.js +870 -0
- package/skills/operations-analysis/skill.json +219 -0
- package/skills/patent-downloader/README.md +358 -0
- package/skills/patent-downloader/SKILL.md +309 -0
- package/skills/patent-downloader/assets/README_TEMPLATE.md +140 -0
- package/skills/patent-downloader/assets/requirements.txt +5 -0
- package/skills/patent-downloader/references/google_patents.md +210 -0
- package/skills/patent-downloader/scripts/patent_server.py +279 -0
- package/skills/performing-axial-coding/SKILL.md +301 -0
- package/skills/performing-axial-coding/pyproject.toml +30 -0
- package/skills/performing-axial-coding/references/README.md +111 -0
- package/skills/performing-axial-coding/references/_BACKUP_paradigm-theory.md +375 -0
- package/skills/performing-axial-coding/references/_BACKUP_relationship-types.md +544 -0
- package/skills/performing-axial-coding/references/_BACKUP_troubleshooting.md +627 -0
- package/skills/performing-axial-coding/references/category-construction/INDEX.md +190 -0
- package/skills/performing-axial-coding/references/category-construction/complete-example.md +438 -0
- package/skills/performing-axial-coding/references/paradigm-theory/INDEX.md +181 -0
- package/skills/performing-axial-coding/references/paradigm-theory/chinese-adaptation.md +349 -0
- package/skills/performing-axial-coding/references/paradigm-theory/quality-standards.md +345 -0
- package/skills/performing-axial-coding/references/paradigm-theory/six-components.md +323 -0
- package/skills/performing-axial-coding/references/relationship-types/INDEX.md +126 -0
- package/skills/performing-axial-coding/references/relationship-types/causal.md +141 -0
- package/skills/performing-axial-coding/references/relationship-types/conditional.md +150 -0
- package/skills/performing-axial-coding/references/troubleshooting/INDEX.md +136 -0
- package/skills/performing-axial-coding/references/troubleshooting/category-issues.md +129 -0
- package/skills/performing-axial-coding/references/troubleshooting/relationship-issues.md +137 -0
- package/skills/performing-axial-coding/references/troubleshooting/technical-issues.md +184 -0
- package/skills/performing-axial-coding/scripts/__pycache__/build_relationships.cpython-312.pyc +0 -0
- package/skills/performing-axial-coding/scripts/__pycache__/construct_paradigm.cpython-312.pyc +0 -0
- package/skills/performing-axial-coding/scripts/__pycache__/identify_categories.cpython-312.pyc +0 -0
- package/skills/performing-axial-coding/scripts/build_relationships.py +314 -0
- package/skills/performing-axial-coding/scripts/categories_test.json +122 -0
- package/skills/performing-axial-coding/scripts/construct_paradigm.py +271 -0
- package/skills/performing-axial-coding/scripts/identify_categories.py +267 -0
- package/skills/performing-axial-coding/tests/test_integration.py +84 -0
- package/skills/performing-centrality-analysis/SKILL.md +210 -0
- package/skills/performing-centrality-analysis/pyproject.toml +21 -0
- package/skills/performing-centrality-analysis/references/README.md +60 -0
- package/skills/performing-centrality-analysis/references/centrality-theory/INDEX.md +136 -0
- package/skills/performing-centrality-analysis/references/chinese-context/INDEX.md +169 -0
- package/skills/performing-centrality-analysis/scripts/__pycache__/calculate_centrality.cpython-312.pyc +0 -0
- package/skills/performing-centrality-analysis/scripts/calculate_centrality.py +213 -0
- package/skills/performing-centrality-analysis/tests/__pycache__/test_calculate_centrality.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-centrality-analysis/tests/test_calculate_centrality.py +218 -0
- package/skills/performing-network-computation/SKILL.md +224 -0
- package/skills/performing-network-computation/pyproject.toml +34 -0
- package/skills/performing-network-computation/scripts/build_network.py +260 -0
- package/skills/performing-network-computation/scripts/calculate_metrics.py +236 -0
- package/skills/performing-network-computation/scripts/detect_communities.py +281 -0
- package/skills/performing-network-computation/scripts/visualize_network.py +272 -0
- package/skills/performing-open-coding/SKILL.md +299 -0
- package/skills/performing-open-coding/pyproject.toml +35 -0
- package/skills/performing-open-coding/references/chinese-context.md +270 -0
- package/skills/performing-open-coding/references/examples.md +338 -0
- package/skills/performing-open-coding/references/theory.md +215 -0
- package/skills/performing-open-coding/references/troubleshooting.md +491 -0
- package/skills/performing-open-coding/scripts/__pycache__/auto_loader.cpython-312.pyc +0 -0
- package/skills/performing-open-coding/scripts/__pycache__/compare_codes.cpython-312.pyc +0 -0
- package/skills/performing-open-coding/scripts/__pycache__/preprocess_text.cpython-312.pyc +0 -0
- package/skills/performing-open-coding/scripts/auto_loader.py +195 -0
- package/skills/performing-open-coding/scripts/cluster_concepts.py +294 -0
- package/skills/performing-open-coding/scripts/clusters_test.json +169 -0
- package/skills/performing-open-coding/scripts/compare_codes.py +257 -0
- package/skills/performing-open-coding/scripts/comparison_test.json +19 -0
- package/skills/performing-open-coding/scripts/concepts_test.json +135 -0
- package/skills/performing-open-coding/scripts/preprocess_text.py +218 -0
- package/skills/performing-open-coding/scripts/test_output.json +134 -0
- package/skills/performing-open-coding/scripts/validate_codes.py +302 -0
- package/skills/performing-open-coding/scripts/validation_test.json +95 -0
- package/skills/performing-open-coding/tests/__pycache__/test_auto_loader.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-open-coding/tests/__pycache__/test_preprocess.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-open-coding/tests/run_integration_tests.py +148 -0
- package/skills/performing-open-coding/tests/test_auto_loader.py +233 -0
- package/skills/performing-open-coding/tests/test_compare_codes.py +336 -0
- package/skills/performing-open-coding/tests/test_preprocess.py +187 -0
- package/skills/performing-selective-coding/SKILL.md +305 -0
- package/skills/performing-selective-coding/pyproject.toml +21 -0
- package/skills/performing-selective-coding/references/README.md +86 -0
- package/skills/performing-selective-coding/references/core-category/INDEX.md +132 -0
- package/skills/performing-selective-coding/references/saturation/INDEX.md +153 -0
- package/skills/performing-selective-coding/references/storyline/INDEX.md +166 -0
- package/skills/performing-selective-coding/references/theory-integration/INDEX.md +203 -0
- package/skills/performing-selective-coding/scripts/README.md +101 -0
- package/skills/performing-selective-coding/scripts/__pycache__/check_saturation.cpython-312.pyc +0 -0
- package/skills/performing-selective-coding/scripts/__pycache__/identify_core_category.cpython-312.pyc +0 -0
- package/skills/performing-selective-coding/scripts/check_saturation.py +236 -0
- package/skills/performing-selective-coding/scripts/construct_storyline.py +237 -0
- package/skills/performing-selective-coding/scripts/identify_core_category.py +265 -0
- package/skills/performing-selective-coding/scripts/integrate_theory.py +173 -0
- package/skills/performing-selective-coding/tests/__pycache__/test_check_saturation.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-selective-coding/tests/__pycache__/test_identify_core_category.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-selective-coding/tests/test_check_saturation.py +157 -0
- package/skills/performing-selective-coding/tests/test_identify_core_category.py +157 -0
- package/skills/practical-marxist-application/SKILL.md +230 -0
- package/skills/processing-network-data/SKILL.md +146 -0
- package/skills/processing-network-data/pyproject.toml +33 -0
- package/skills/processing-network-data/scripts/clean_survey_data.py +285 -0
- package/skills/processing-network-data/scripts/extract_network_data.py +286 -0
- package/skills/processing-network-data/scripts/transform_data_format.py +334 -0
- package/skills/processing-network-data/scripts/validate_network_data.py +322 -0
- package/skills/pubscholar-auto-search/AGENTSKILLS_OPTIMIZATION_REPORT.md +540 -0
- package/skills/pubscholar-auto-search/README.md +66 -0
- package/skills/pubscholar-auto-search/SKILL.md +242 -0
- package/skills/pubscholar-auto-search/references/API_REFERENCE.md +349 -0
- package/skills/pubscholar-auto-search/references/DEVELOPMENT.md +395 -0
- package/skills/pubscholar-auto-search/references/EXTENSION_STRATEGIES.md +415 -0
- package/skills/pubscholar-auto-search/references/USER_GUIDE.md +432 -0
- package/skills/pubscholar-auto-search/requirements.txt +17 -0
- package/skills/pubscholar-auto-search/scripts/__pycache__/pubscholar_searcher.cpython-312.pyc +0 -0
- package/skills/pubscholar-auto-search/scripts/pubscholar_searcher.py +602 -0
- package/skills/pubscholar-auto-search/scripts/test_pubscholar_search.py +205 -0
- package/skills/research-design/DEPENDENCY_MANAGEMENT.md +112 -0
- package/skills/research-design/README.md +158 -0
- package/skills/research-design/SKILL.md +82 -0
- package/skills/research-design/assets/templates/research_design_template.md +297 -0
- package/skills/research-design/prompts/analysis-strategy-outline.md +307 -0
- package/skills/research-design/prompts/analysis-strategy.md +37 -0
- package/skills/research-design/prompts/data-planning-outline.md +204 -0
- package/skills/research-design/prompts/data-planning.md +36 -0
- package/skills/research-design/prompts/ethics-review-outline.md +406 -0
- package/skills/research-design/prompts/ethics-review.md +36 -0
- package/skills/research-design/prompts/method-selection-outline.md +181 -0
- package/skills/research-design/prompts/method-selection.md +36 -0
- package/skills/research-design/prompts/problem-definition-outline.md +107 -0
- package/skills/research-design/prompts/problem-definition.md +30 -0
- package/skills/research-design/pyproject.toml +35 -0
- package/skills/research-design/references/best-practices.md +185 -0
- package/skills/research-design/references/methodology.md +162 -0
- package/skills/research-design/scripts/__pycache__/design_evaluation.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/__pycache__/integrated_analysis.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/__pycache__/literature_analysis.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/__pycache__/method_matching.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/design_evaluation.py +670 -0
- package/skills/research-design/scripts/integrated_analysis.py +543 -0
- package/skills/research-design/scripts/literature_analysis.py +303 -0
- package/skills/research-design/scripts/method_matching.py +478 -0
- package/skills/research-design/test_research_design.py +281 -0
- package/skills/sna-analysis/integration_with_trusted_scraper.md +115 -0
- package/skills/spark-integration/INFO.md +64 -0
- package/skills/spark-integration/README.md +159 -0
- package/skills/spark-integration/SKILL.md +232 -0
- package/skills/spark-integration/skill.js +308 -0
- package/skills/spark-integration/skill.json +37 -0
- package/skills/trusted-web-scraper/CONFIG.yaml +60 -0
- package/skills/trusted-web-scraper/README.md +137 -0
- package/skills/trusted-web-scraper/SKILL.md +173 -0
- package/skills/trusted-web-scraper/final_test.json +240 -0
- package/skills/trusted-web-scraper/modules/__pycache__/core_trusted_scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/modules/__pycache__/scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/modules/__pycache__/trusted_web_scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/modules/core_trusted_scraper.py +778 -0
- package/skills/trusted-web-scraper/modules/scraper_minimal.py +623 -0
- package/skills/trusted-web-scraper/pyproject.toml +46 -0
- package/skills/trusted-web-scraper/scripts/__pycache__/trusted_web_scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/scripts/trusted_web_scraper.py +109 -0
- package/skills/trusted-web-scraper/test_comprehensive.py +53 -0
- package/skills/trusted-web-scraper/test_full.py +154 -0
- package/skills/trusted-web-scraper/test_input.json +10 -0
- package/skills/trusted-web-scraper/test_output.json +162 -0
- package/skills/trusted-web-scraper/test_output2.json +240 -0
- package/skills/trusted-web-scraper/test_output3.json +240 -0
- package/skills/trusted-web-scraper/test_output4.json +240 -0
- package/skills/validity-reliability/SKILL.md +130 -0
- package/skills/validity-reliability/pyproject.toml +36 -0
- package/skills/validity-reliability/scripts/validity_reliability_toolkit.py +480 -0
- package/skills/verify_compliance.ps1 +40 -0
- package/skills/visualization-expert/INFO.md +77 -0
- package/skills/visualization-expert/README.md +78 -0
- package/skills/visualization-expert/SKILL.md +374 -0
- package/skills/visualization-expert/prompts.txt +92 -0
- package/skills/visualization-expert/reference.md +212 -0
- package/skills/visualization-expert/skill.js +904 -0
- package/skills/visualization-expert/skill.json +195 -0
- package/skills/writing-grounded-theory-memos/SKILL.md +301 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
多值定性比较分析(msQCA) - 真值表构建模块
|
|
5
|
+
提供真值表生成、逻辑余项识别和矛盾组合处理功能
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import pandas as pd
|
|
9
|
+
import numpy as np
|
|
10
|
+
from typing import Dict, List, Tuple, Optional, Union, Set
|
|
11
|
+
import itertools
|
|
12
|
+
from collections import defaultdict, Counter
|
|
13
|
+
import warnings
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class TruthTableBuilder:
|
|
17
|
+
"""QCA真值表构建类"""
|
|
18
|
+
|
|
19
|
+
def __init__(self):
|
|
20
|
+
self.truth_table = None
|
|
21
|
+
self.logical_remainders = []
|
|
22
|
+
self.contradictory_cases = []
|
|
23
|
+
self.consistency_scores = {}
|
|
24
|
+
|
|
25
|
+
def build_truth_table(self,
|
|
26
|
+
data: pd.DataFrame,
|
|
27
|
+
conditions: List[str],
|
|
28
|
+
outcome: str,
|
|
29
|
+
outcome_threshold: float = 0.8) -> pd.DataFrame:
|
|
30
|
+
"""
|
|
31
|
+
构建真值表
|
|
32
|
+
|
|
33
|
+
Parameters:
|
|
34
|
+
-----------
|
|
35
|
+
data : pd.DataFrame
|
|
36
|
+
校准后的数据
|
|
37
|
+
conditions : List[str]
|
|
38
|
+
条件变量列表
|
|
39
|
+
outcome : str
|
|
40
|
+
结果变量
|
|
41
|
+
outcome_threshold : float
|
|
42
|
+
结果一致性阈值
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
--------
|
|
46
|
+
pd.DataFrame
|
|
47
|
+
构建的真值表
|
|
48
|
+
"""
|
|
49
|
+
# 按条件组合分组
|
|
50
|
+
grouped = data.groupby(conditions)
|
|
51
|
+
|
|
52
|
+
truth_table_data = []
|
|
53
|
+
|
|
54
|
+
for condition_combo, group in grouped:
|
|
55
|
+
# 计算每个组合的一致性
|
|
56
|
+
consistency = self._calculate_consistency(group[outcome], outcome_threshold)
|
|
57
|
+
|
|
58
|
+
# 计算案例数量
|
|
59
|
+
n_cases = len(group)
|
|
60
|
+
|
|
61
|
+
# 识别结果类型
|
|
62
|
+
if consistency >= outcome_threshold:
|
|
63
|
+
result_type = 1 # 正面结果
|
|
64
|
+
elif consistency <= (1 - outcome_threshold):
|
|
65
|
+
result_type = 0 # 负面结果
|
|
66
|
+
else:
|
|
67
|
+
result_type = -1 # 矛盾结果
|
|
68
|
+
|
|
69
|
+
row_data = {
|
|
70
|
+
'condition_combo': condition_combo if len(conditions) > 1 else [condition_combo],
|
|
71
|
+
'consistency': consistency,
|
|
72
|
+
'n_cases': n_cases,
|
|
73
|
+
'result_type': result_type,
|
|
74
|
+
'cases': group.index.tolist()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
# 添加条件列
|
|
78
|
+
if len(conditions) == 1:
|
|
79
|
+
row_data[conditions[0]] = condition_combo
|
|
80
|
+
else:
|
|
81
|
+
for i, condition in enumerate(conditions):
|
|
82
|
+
row_data[condition] = condition_combo[i]
|
|
83
|
+
|
|
84
|
+
truth_table_data.append(row_data)
|
|
85
|
+
|
|
86
|
+
self.truth_table = pd.DataFrame(truth_table_data)
|
|
87
|
+
|
|
88
|
+
# 识别逻辑余项和矛盾组合
|
|
89
|
+
self._identify_logical_remainders(conditions)
|
|
90
|
+
self._identify_contradictory_cases()
|
|
91
|
+
|
|
92
|
+
return self.truth_table
|
|
93
|
+
|
|
94
|
+
def _calculate_consistency(self, outcome_values: pd.Series, threshold: float) -> float:
|
|
95
|
+
"""
|
|
96
|
+
计算一致性分数
|
|
97
|
+
|
|
98
|
+
Parameters:
|
|
99
|
+
-----------
|
|
100
|
+
outcome_values : pd.Series
|
|
101
|
+
结果变量值
|
|
102
|
+
threshold : float
|
|
103
|
+
阈值
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
--------
|
|
107
|
+
float
|
|
108
|
+
一致性分数
|
|
109
|
+
"""
|
|
110
|
+
if len(outcome_values) == 0 or outcome_values.isna().all():
|
|
111
|
+
return 0.0
|
|
112
|
+
|
|
113
|
+
# 计算达到阈值的案例比例
|
|
114
|
+
consistent_cases = (outcome_values >= threshold).sum()
|
|
115
|
+
total_cases = len(outcome_values.dropna()) # 只考虑非空值
|
|
116
|
+
|
|
117
|
+
consistency = consistent_cases / total_cases if total_cases > 0 else 0.0
|
|
118
|
+
|
|
119
|
+
# 确保结果是有效的数值
|
|
120
|
+
if np.isnan(consistency) or np.isinf(consistency):
|
|
121
|
+
consistency = 0.0
|
|
122
|
+
|
|
123
|
+
return consistency
|
|
124
|
+
|
|
125
|
+
def _identify_logical_remainders(self, conditions: List[str]):
|
|
126
|
+
"""
|
|
127
|
+
识别逻辑余项(未观察到的条件组合)
|
|
128
|
+
|
|
129
|
+
Parameters:
|
|
130
|
+
-----------
|
|
131
|
+
conditions : List[str]
|
|
132
|
+
条件变量列表
|
|
133
|
+
"""
|
|
134
|
+
if self.truth_table is None:
|
|
135
|
+
return
|
|
136
|
+
|
|
137
|
+
# 获取每个条件的所有可能值
|
|
138
|
+
condition_values = {}
|
|
139
|
+
for condition in conditions:
|
|
140
|
+
unique_values = sorted(self.truth_table[condition].unique())
|
|
141
|
+
condition_values[condition] = unique_values
|
|
142
|
+
|
|
143
|
+
# 生成所有可能的组合
|
|
144
|
+
all_combinations = list(itertools.product(*[
|
|
145
|
+
condition_values[condition] for condition in conditions
|
|
146
|
+
]))
|
|
147
|
+
|
|
148
|
+
# 获取已观察到的组合
|
|
149
|
+
observed_combinations = set()
|
|
150
|
+
for _, row in self.truth_table.iterrows():
|
|
151
|
+
if len(conditions) == 1:
|
|
152
|
+
combo = (row[conditions[0]],)
|
|
153
|
+
else:
|
|
154
|
+
combo = tuple(row[condition] for condition in conditions)
|
|
155
|
+
observed_combinations.add(combo)
|
|
156
|
+
|
|
157
|
+
# 识别逻辑余项
|
|
158
|
+
self.logical_remainders = [
|
|
159
|
+
combo for combo in all_combinations
|
|
160
|
+
if combo not in observed_combinations
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
def _identify_contradictory_cases(self):
|
|
164
|
+
"""识别矛盾组合"""
|
|
165
|
+
if self.truth_table is None:
|
|
166
|
+
return
|
|
167
|
+
|
|
168
|
+
contradictory_rows = self.truth_table[
|
|
169
|
+
self.truth_table['result_type'] == -1
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
self.contradictory_cases = contradictory_rows.to_dict('records')
|
|
173
|
+
|
|
174
|
+
def handle_contradictions(self,
|
|
175
|
+
method: str = 'remove',
|
|
176
|
+
consistency_threshold: float = 0.6) -> pd.DataFrame:
|
|
177
|
+
"""
|
|
178
|
+
处理矛盾组合
|
|
179
|
+
|
|
180
|
+
Parameters:
|
|
181
|
+
-----------
|
|
182
|
+
method : str
|
|
183
|
+
处理方法: 'remove', 'recode', 'split'
|
|
184
|
+
consistency_threshold : float
|
|
185
|
+
一致性阈值
|
|
186
|
+
|
|
187
|
+
Returns:
|
|
188
|
+
--------
|
|
189
|
+
pd.DataFrame
|
|
190
|
+
处理后的真值表
|
|
191
|
+
"""
|
|
192
|
+
if self.truth_table is None or len(self.contradictory_cases) == 0:
|
|
193
|
+
return self.truth_table
|
|
194
|
+
|
|
195
|
+
if method == 'remove':
|
|
196
|
+
# 移除矛盾组合
|
|
197
|
+
filtered_table = self.truth_table[
|
|
198
|
+
self.truth_table['result_type'] != -1
|
|
199
|
+
].copy()
|
|
200
|
+
|
|
201
|
+
elif method == 'recode':
|
|
202
|
+
# 重新编码为最接近的结果类型
|
|
203
|
+
filtered_table = self.truth_table.copy()
|
|
204
|
+
for idx, row in self.contradictory_cases:
|
|
205
|
+
if row['consistency'] >= consistency_threshold:
|
|
206
|
+
filtered_table.loc[idx, 'result_type'] = 1
|
|
207
|
+
else:
|
|
208
|
+
filtered_table.loc[idx, 'result_type'] = 0
|
|
209
|
+
|
|
210
|
+
elif method == 'split':
|
|
211
|
+
# 分裂矛盾组合为正负两种结果
|
|
212
|
+
new_rows = []
|
|
213
|
+
for idx, row in self.contradictory_cases:
|
|
214
|
+
# 创建正面结果行
|
|
215
|
+
pos_row = row.copy()
|
|
216
|
+
pos_row['result_type'] = 1
|
|
217
|
+
pos_row['n_cases'] = int(row['n_cases'] * row['consistency'])
|
|
218
|
+
new_rows.append(pos_row)
|
|
219
|
+
|
|
220
|
+
# 创建负面结果行
|
|
221
|
+
neg_row = row.copy()
|
|
222
|
+
neg_row['result_type'] = 0
|
|
223
|
+
neg_row['n_cases'] = int(row['n_cases'] * (1 - row['consistency']))
|
|
224
|
+
new_rows.append(neg_row)
|
|
225
|
+
|
|
226
|
+
# 移除原始矛盾行并添加新行
|
|
227
|
+
filtered_table = self.truth_table[
|
|
228
|
+
self.truth_table['result_type'] != -1
|
|
229
|
+
].copy()
|
|
230
|
+
filtered_table = pd.concat([filtered_table, pd.DataFrame(new_rows)],
|
|
231
|
+
ignore_index=True)
|
|
232
|
+
else:
|
|
233
|
+
raise ValueError(f"不支持的矛盾处理方法: {method}")
|
|
234
|
+
|
|
235
|
+
self.truth_table = filtered_table
|
|
236
|
+
return self.truth_table
|
|
237
|
+
|
|
238
|
+
def add_logical_remainders(self,
|
|
239
|
+
method: str = 'all',
|
|
240
|
+
consistency: float = 0.0) -> pd.DataFrame:
|
|
241
|
+
"""
|
|
242
|
+
添加逻辑余项到真值表
|
|
243
|
+
|
|
244
|
+
Parameters:
|
|
245
|
+
-----------
|
|
246
|
+
method : str
|
|
247
|
+
添加方法: 'all', 'positive', 'negative'
|
|
248
|
+
consistency : float
|
|
249
|
+
逻辑余项的一致性分数
|
|
250
|
+
|
|
251
|
+
Returns:
|
|
252
|
+
--------
|
|
253
|
+
pd.DataFrame
|
|
254
|
+
包含逻辑余项的真值表
|
|
255
|
+
"""
|
|
256
|
+
if self.truth_table is None:
|
|
257
|
+
return pd.DataFrame()
|
|
258
|
+
|
|
259
|
+
new_rows = []
|
|
260
|
+
|
|
261
|
+
for combo in self.logical_remainders:
|
|
262
|
+
# 确定结果类型
|
|
263
|
+
if method == 'all':
|
|
264
|
+
result_type = -1 # 逻辑余项
|
|
265
|
+
elif method == 'positive':
|
|
266
|
+
result_type = 1
|
|
267
|
+
elif method == 'negative':
|
|
268
|
+
result_type = 0
|
|
269
|
+
else:
|
|
270
|
+
raise ValueError(f"不支持的逻辑余项添加方法: {method}")
|
|
271
|
+
|
|
272
|
+
# 创建新行
|
|
273
|
+
row_data = {
|
|
274
|
+
'condition_combo': combo,
|
|
275
|
+
'consistency': consistency,
|
|
276
|
+
'n_cases': 0, # 逻辑余项没有实际案例
|
|
277
|
+
'result_type': result_type,
|
|
278
|
+
'cases': []
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
# 添加条件列
|
|
282
|
+
for i, condition in enumerate(self.get_condition_columns()):
|
|
283
|
+
row_data[condition] = combo[i]
|
|
284
|
+
|
|
285
|
+
new_rows.append(row_data)
|
|
286
|
+
|
|
287
|
+
# 添加到真值表
|
|
288
|
+
if new_rows:
|
|
289
|
+
extended_table = pd.concat([self.truth_table, pd.DataFrame(new_rows)],
|
|
290
|
+
ignore_index=True)
|
|
291
|
+
else:
|
|
292
|
+
extended_table = self.truth_table.copy()
|
|
293
|
+
|
|
294
|
+
return extended_table
|
|
295
|
+
|
|
296
|
+
def get_condition_columns(self) -> List[str]:
|
|
297
|
+
"""获取条件变量列名"""
|
|
298
|
+
if self.truth_table is None:
|
|
299
|
+
return []
|
|
300
|
+
|
|
301
|
+
# 排除非条件列
|
|
302
|
+
exclude_columns = {
|
|
303
|
+
'condition_combo', 'consistency', 'n_cases',
|
|
304
|
+
'result_type', 'cases'
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
condition_columns = [
|
|
308
|
+
col for col in self.truth_table.columns
|
|
309
|
+
if col not in exclude_columns
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
return condition_columns
|
|
313
|
+
|
|
314
|
+
def calculate_quality_metrics(self) -> Dict:
|
|
315
|
+
"""
|
|
316
|
+
计算真值表质量指标
|
|
317
|
+
|
|
318
|
+
Returns:
|
|
319
|
+
--------
|
|
320
|
+
Dict
|
|
321
|
+
质量指标字典
|
|
322
|
+
"""
|
|
323
|
+
if self.truth_table is None:
|
|
324
|
+
return {}
|
|
325
|
+
|
|
326
|
+
# 安全计算各项指标
|
|
327
|
+
total_cases = self.truth_table['n_cases'].sum() if 'n_cases' in self.truth_table.columns else 0
|
|
328
|
+
positive_cases = 0
|
|
329
|
+
negative_cases = 0
|
|
330
|
+
contradictory_cases = 0
|
|
331
|
+
|
|
332
|
+
if 'result_type' in self.truth_table.columns and 'n_cases' in self.truth_table.columns:
|
|
333
|
+
positive_cases = self.truth_table[
|
|
334
|
+
self.truth_table['result_type'] == 1
|
|
335
|
+
]['n_cases'].sum()
|
|
336
|
+
negative_cases = self.truth_table[
|
|
337
|
+
self.truth_table['result_type'] == 0
|
|
338
|
+
]['n_cases'].sum()
|
|
339
|
+
contradictory_cases = self.truth_table[
|
|
340
|
+
self.truth_table['result_type'] == -1
|
|
341
|
+
]['n_cases'].sum()
|
|
342
|
+
|
|
343
|
+
# 计算矛盾率和覆盖度,避免除零错误
|
|
344
|
+
contradiction_rate = contradictory_cases / total_cases if total_cases > 0 else 0
|
|
345
|
+
coverage = (positive_cases + negative_cases) / total_cases if total_cases > 0 else 0
|
|
346
|
+
|
|
347
|
+
metrics = {
|
|
348
|
+
'total_cases': total_cases,
|
|
349
|
+
'positive_cases': positive_cases,
|
|
350
|
+
'negative_cases': negative_cases,
|
|
351
|
+
'contradictory_cases': contradictory_cases,
|
|
352
|
+
'contradiction_rate': contradiction_rate,
|
|
353
|
+
'coverage': coverage,
|
|
354
|
+
'logical_remainders_count': len(self.logical_remainders),
|
|
355
|
+
'unique_combinations': len(self.truth_table) if self.truth_table is not None else 0
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
return metrics
|
|
359
|
+
|
|
360
|
+
def export_truth_table(self,
|
|
361
|
+
filename: str,
|
|
362
|
+
format: str = 'csv') -> bool:
|
|
363
|
+
"""
|
|
364
|
+
导出真值表
|
|
365
|
+
|
|
366
|
+
Parameters:
|
|
367
|
+
-----------
|
|
368
|
+
filename : str
|
|
369
|
+
文件名
|
|
370
|
+
format : str
|
|
371
|
+
导出格式: 'csv', 'excel', 'json'
|
|
372
|
+
|
|
373
|
+
Returns:
|
|
374
|
+
--------
|
|
375
|
+
bool
|
|
376
|
+
导出是否成功
|
|
377
|
+
"""
|
|
378
|
+
if self.truth_table is None:
|
|
379
|
+
return False
|
|
380
|
+
|
|
381
|
+
try:
|
|
382
|
+
if format == 'csv':
|
|
383
|
+
self.truth_table.to_csv(filename, index=False, encoding='utf-8')
|
|
384
|
+
elif format == 'excel':
|
|
385
|
+
self.truth_table.to_excel(filename, index=False)
|
|
386
|
+
elif format == 'json':
|
|
387
|
+
self.truth_table.to_json(filename, orient='records', force_ascii=False, indent=2)
|
|
388
|
+
else:
|
|
389
|
+
raise ValueError(f"不支持的导出格式: {format}")
|
|
390
|
+
|
|
391
|
+
return True
|
|
392
|
+
except Exception as e:
|
|
393
|
+
print(f"导出失败: {e}")
|
|
394
|
+
return False
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
def main():
|
|
398
|
+
"""示例用法"""
|
|
399
|
+
# 创建示例数据
|
|
400
|
+
np.random.seed(42)
|
|
401
|
+
n_cases = 100
|
|
402
|
+
|
|
403
|
+
data = pd.DataFrame({
|
|
404
|
+
'A': np.random.choice([0, 1, 2], n_cases),
|
|
405
|
+
'B': np.random.choice([0, 1, 2], n_cases),
|
|
406
|
+
'C': np.random.choice([0, 1, 2], n_cases),
|
|
407
|
+
'Y': np.random.uniform(0, 1, n_cases)
|
|
408
|
+
})
|
|
409
|
+
|
|
410
|
+
# 初始化真值表构建器
|
|
411
|
+
builder = TruthTableBuilder()
|
|
412
|
+
|
|
413
|
+
# 构建真值表
|
|
414
|
+
truth_table = builder.build_truth_table(
|
|
415
|
+
data=data,
|
|
416
|
+
conditions=['A', 'B', 'C'],
|
|
417
|
+
outcome='Y',
|
|
418
|
+
outcome_threshold=0.8
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
print("真值表:")
|
|
422
|
+
print(truth_table[['A', 'B', 'C', 'consistency', 'n_cases', 'result_type']].head(10))
|
|
423
|
+
|
|
424
|
+
# 处理矛盾组合
|
|
425
|
+
filtered_table = builder.handle_contradictions(method='remove')
|
|
426
|
+
print(f"\n移除矛盾组合后: {len(filtered_table)} 行")
|
|
427
|
+
|
|
428
|
+
# 计算质量指标
|
|
429
|
+
metrics = builder.calculate_quality_metrics()
|
|
430
|
+
print("\n质量指标:")
|
|
431
|
+
for key, value in metrics.items():
|
|
432
|
+
print(f"{key}: {value}")
|
|
433
|
+
|
|
434
|
+
print(f"\n逻辑余项数量: {len(builder.logical_remainders)}")
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
if __name__ == "__main__":
|
|
438
|
+
main()
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: network-computation
|
|
3
|
+
description: 社会网络计算分析工具,提供网络构建、中心性测量、社区检测、网络可视化等完整的网络分析支持
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: socienceAI.com
|
|
6
|
+
tags: [network-analysis, social-networks, centrality, community-detection, visualization]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Network Computation Analysis Skill
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
社会网络计算分析技能为社会科学研究提供全面的网络分析支持,包括网络构建、中心性测量、社区检测、网络可视化等,帮助研究者深入理解社会关系结构和动态。
|
|
13
|
+
|
|
14
|
+
## When to Use This Skill
|
|
15
|
+
Use this skill when the user requests:
|
|
16
|
+
- Social network analysis of relationships
|
|
17
|
+
- Network construction from relational data
|
|
18
|
+
- Centrality analysis (degree, betweenness, closeness, eigenvector)
|
|
19
|
+
- Community detection and clustering
|
|
20
|
+
- Network visualization and mapping
|
|
21
|
+
- Structural hole analysis
|
|
22
|
+
- Brokerage and mediation analysis
|
|
23
|
+
- Network density and cohesion measures
|
|
24
|
+
- Network evolution and change analysis
|
|
25
|
+
- Two-mode network analysis
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
When a user requests network analysis:
|
|
29
|
+
1. **Prepare** network data in appropriate format
|
|
30
|
+
2. **Construct** the network from relational data
|
|
31
|
+
3. **Analyze** key properties (centrality, communities, etc.)
|
|
32
|
+
4. **Visualize** the network structure
|
|
33
|
+
5. **Interpret** findings in social context
|
|
34
|
+
|
|
35
|
+
## 脚本调用时机
|
|
36
|
+
当需要执行网络计算分析时,调用 `calculate_centrality.py` 脚本,该脚本整合了网络分析的主要功能。
|
|
37
|
+
|
|
38
|
+
## 输入格式
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"network_data": {
|
|
42
|
+
"nodes": [
|
|
43
|
+
{
|
|
44
|
+
"id": "节点唯一ID",
|
|
45
|
+
"label": "节点标签",
|
|
46
|
+
"attributes": {
|
|
47
|
+
"type": "节点类型",
|
|
48
|
+
"size": "节点大小",
|
|
49
|
+
"group": "节点分组"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"edges": [
|
|
54
|
+
{
|
|
55
|
+
"source": "源节点ID",
|
|
56
|
+
"target": "目标节点ID",
|
|
57
|
+
"weight": "边权重",
|
|
58
|
+
"type": "边类型",
|
|
59
|
+
"attributes": {
|
|
60
|
+
"strength": "关系强度",
|
|
61
|
+
"direction": "方向性"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"analysis_parameters": {
|
|
67
|
+
"network_type": "directed/undirected",
|
|
68
|
+
"is_weighted": true,
|
|
69
|
+
"centrality_metrics": ["degree", "betweenness", "closeness", "eigenvector"],
|
|
70
|
+
"community_method": "louvain/modularity/greedy",
|
|
71
|
+
"visualization_type": "static/interactive",
|
|
72
|
+
"node_attributes": ["type", "size", "group"],
|
|
73
|
+
"edge_attributes": ["weight", "strength", "direction"]
|
|
74
|
+
},
|
|
75
|
+
"analysis_context": "分析背景和目的",
|
|
76
|
+
"research_questions": ["研究问题列表"]
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 输出格式
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"summary": {
|
|
84
|
+
"network_size": "网络规模(节点数)",
|
|
85
|
+
"network_density": "网络密度",
|
|
86
|
+
"connected_components": "连通分量数",
|
|
87
|
+
"analysis_time": "分析耗时"
|
|
88
|
+
},
|
|
89
|
+
"details": {
|
|
90
|
+
"network_metrics": {
|
|
91
|
+
"density": "网络密度",
|
|
92
|
+
"clustering_coefficient": "聚类系数",
|
|
93
|
+
"average_path_length": "平均路径长度",
|
|
94
|
+
"diameter": "网络直径",
|
|
95
|
+
"components": {
|
|
96
|
+
"number_of_components": "连通分量数",
|
|
97
|
+
"largest_component_size": "最大连通分量规模"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"centrality_analysis": {
|
|
101
|
+
"degree_centrality": {
|
|
102
|
+
"node_id": "中心度值"
|
|
103
|
+
},
|
|
104
|
+
"betweenness_centrality": {
|
|
105
|
+
"node_id": "中心度值"
|
|
106
|
+
},
|
|
107
|
+
"closeness_centrality": {
|
|
108
|
+
"node_id": "中心度值"
|
|
109
|
+
},
|
|
110
|
+
"eigenvector_centrality": {
|
|
111
|
+
"node_id": "中心度值"
|
|
112
|
+
},
|
|
113
|
+
"top_nodes_by_centrality": {
|
|
114
|
+
"degree": ["按度中心度排序的节点"],
|
|
115
|
+
"betweenness": ["按中介中心度排序的节点"],
|
|
116
|
+
"closeness": ["按接近中心度排序的节点"],
|
|
117
|
+
"eigenvector": ["按特征向量中心度排序的节点"]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"community_detection": {
|
|
121
|
+
"number_of_communities": "社区数量",
|
|
122
|
+
"communities": [
|
|
123
|
+
{
|
|
124
|
+
"id": "社区ID",
|
|
125
|
+
"size": "社区规模",
|
|
126
|
+
"nodes": ["节点列表"],
|
|
127
|
+
"modularity": "模块度值",
|
|
128
|
+
"description": "社区描述"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"node_to_community": {
|
|
132
|
+
"node_id": "社区ID"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"structural_analysis": {
|
|
136
|
+
"structural_holes": ["结构洞分析结果"],
|
|
137
|
+
"bridges": ["桥接节点"],
|
|
138
|
+
"brokerage_roles": ["中介角色"]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"visualization": {
|
|
142
|
+
"static_image": "静态图像链接",
|
|
143
|
+
"interactive_graph": "交互图链接",
|
|
144
|
+
"layout": "布局类型",
|
|
145
|
+
"color_scheme": "配色方案"
|
|
146
|
+
},
|
|
147
|
+
"interpretation": {
|
|
148
|
+
"key_findings": ["关键发现"],
|
|
149
|
+
"social_interpretation": "社会学解释",
|
|
150
|
+
"research_insights": ["研究洞察"]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"metadata": {
|
|
154
|
+
"timestamp": "时间戳",
|
|
155
|
+
"version": "版本号",
|
|
156
|
+
"skill": "network-computation",
|
|
157
|
+
"analysis_parameters": "分析参数"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Core Functions (Progressive Disclosure)
|
|
163
|
+
|
|
164
|
+
### Primary Functions
|
|
165
|
+
- **Network Construction**: Create networks from edgelist or matrix data
|
|
166
|
+
- **Centrality Analysis**: Calculate degree, betweenness, and closeness centrality
|
|
167
|
+
- **Basic Visualization**: Generate network diagrams with standard layouts
|
|
168
|
+
- **Network Metrics**: Compute density, clustering coefficient, path length
|
|
169
|
+
|
|
170
|
+
### Secondary Functions
|
|
171
|
+
- **Community Detection**: Identify clusters using modularity-based methods
|
|
172
|
+
- **Advanced Centrality**: Calculate eigenvector centrality, PageRank
|
|
173
|
+
- **Structural Analysis**: Identify structural holes, components
|
|
174
|
+
- **Interactive Visualization**: Create interactive network diagrams
|
|
175
|
+
|
|
176
|
+
### Advanced Functions
|
|
177
|
+
- **Multi-layer Networks**: Handle networks with multiple relationship types
|
|
178
|
+
- **Dynamic Networks**: Analyze network evolution over time
|
|
179
|
+
- **Two-mode Networks**: Handle bipartite network structures
|
|
180
|
+
- **Advanced Layouts**: Use specialized layout algorithms for large networks
|
|
181
|
+
|
|
182
|
+
## Detailed Instructions
|
|
183
|
+
|
|
184
|
+
### 1. Network Data Preparation
|
|
185
|
+
- Validate network data format (edgelist, adjacency matrix, etc.)
|
|
186
|
+
- Clean and preprocess relational data
|
|
187
|
+
- Identify and handle missing or anomalous connections
|
|
188
|
+
- Determine appropriate network type (directed/undirected, weighted/unweighted)
|
|
189
|
+
|
|
190
|
+
### 2. Network Construction
|
|
191
|
+
- Create network object from data
|
|
192
|
+
- Validate network properties (connectedness, size, etc.)
|
|
193
|
+
- Compute basic network metrics (nodes, edges, density)
|
|
194
|
+
- Visualize initial network structure
|
|
195
|
+
|
|
196
|
+
### 3. Centrality Analysis
|
|
197
|
+
- Calculate multiple centrality measures
|
|
198
|
+
- Rank nodes by different centrality indicators
|
|
199
|
+
- Identify key players, bridges, and influencers
|
|
200
|
+
- Interpret centrality in social context
|
|
201
|
+
|
|
202
|
+
### 4. Community Detection
|
|
203
|
+
- Apply appropriate clustering algorithms
|
|
204
|
+
- Validate community structure
|
|
205
|
+
- Analyze inter-community relationships
|
|
206
|
+
- Interpret community meaning in social context
|
|
207
|
+
|
|
208
|
+
### 5. Network Visualization
|
|
209
|
+
- Create clear, informative network diagrams
|
|
210
|
+
- Use visual attributes to highlight important features
|
|
211
|
+
- Generate publication-quality figures
|
|
212
|
+
- Provide interactive visualization when appropriate
|
|
213
|
+
|
|
214
|
+
### 6. Interpretation and Reporting
|
|
215
|
+
- Explain findings in social science terms
|
|
216
|
+
- Connect network properties to research questions
|
|
217
|
+
- Consider Chinese social context (guanxi, mianzi, etc.)
|
|
218
|
+
- Provide actionable insights
|
|
219
|
+
|
|
220
|
+
## Parameters
|
|
221
|
+
- `network_format`: Input format (edgelist, adjacency matrix, JSON, etc.)
|
|
222
|
+
- `directed`: Whether the network is directed (default: false)
|
|
223
|
+
- `weighted`: Whether the network is weighted (default: true)
|
|
224
|
+
- `centrality_metrics`: List of centrality measures to compute
|
|
225
|
+
- `community_method`: Community detection algorithm to use
|
|
226
|
+
- `visualization_type`: Type of visualization (static, interactive)
|
|
227
|
+
- `node_attributes`: Additional node properties to visualize
|
|
228
|
+
- `edge_attributes`: Additional edge properties to visualize
|
|
229
|
+
|
|
230
|
+
## Examples
|
|
231
|
+
|
|
232
|
+
### Example 1: Centrality Analysis
|
|
233
|
+
User: "Analyze this social network and identify the most important actors"
|
|
234
|
+
Response: Calculate all centrality measures, identify key nodes, interpret in social context.
|
|
235
|
+
|
|
236
|
+
### Example 2: Community Detection
|
|
237
|
+
User: "Find communities within this organization's communication network"
|
|
238
|
+
Response: Apply community detection algorithms, validate structure, interpret meaning.
|
|
239
|
+
|
|
240
|
+
### Example 3: Network Visualization
|
|
241
|
+
User: "Create a visualization of this collaboration network"
|
|
242
|
+
Response: Generate network diagram with appropriate layout, highlight important nodes.
|
|
243
|
+
|
|
244
|
+
## Quality Assurance
|
|
245
|
+
|
|
246
|
+
- Verify network data integrity before analysis
|
|
247
|
+
- Use multiple algorithms when possible for validation
|
|
248
|
+
- Consider social context in interpretation
|
|
249
|
+
- Ensure visualizations are clear and informative
|
|
250
|
+
- Validate community detection results
|
|
251
|
+
|
|
252
|
+
## Output Format
|
|
253
|
+
|
|
254
|
+
- Complete network analysis report
|
|
255
|
+
- Standardized network metrics tables
|
|
256
|
+
- Network visualization files (PNG, SVG, interactive HTML)
|
|
257
|
+
- Network data files in various formats
|
|
258
|
+
- Reproducible analysis code
|
|
259
|
+
|
|
260
|
+
## Resources
|
|
261
|
+
- Social network analysis best practices
|
|
262
|
+
- Network visualization guidelines
|
|
263
|
+
- Community detection algorithm comparisons
|
|
264
|
+
- Chinese social network characteristics (guanxi, etc.)
|
|
265
|
+
- Python toolkit: `skills/network-computation/scripts/calculate_centrality.py`
|
|
266
|
+
|
|
267
|
+
## Metadata
|
|
268
|
+
- Compatibility: Claude 3.5 Sonnet and above
|
|
269
|
+
- Domain: Social Network Analysis
|
|
270
|
+
- Language: Optimized for Chinese research context
|